Hub rules-redis

rules-redis

v3 public Verified

Redis

Redis is an in-memory data structure store used as a database, cache, and message broker. These rules govern efficient data modeling, command usage, and performance tuning for AI agents interacting with Redis.

@sigmashakeinc 2 pulls 6 rules published Apr 8, 2026 synced Oct 11, 2026 sigmashakeinc/rules/rulesets/rules-redis →
Severity
4 error 2 warn 0 info
demo.cast
Redis is an in-memory data structure store used as a database, cache, and message broker. These rules govern efficient data modeling, command usage, and performance tuning for AI agents interacting with Redis.

Rules index

6 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

redis

redis-eval-ask warning log

ADVISORY: Redis EVAL runs arbitrary Lua on the server. Ensure the script is a fixed literal (not constructed from user input), review it for logic errors, and consider using EVALSHA with pre-loaded scripts to reduce attack surface.

Rule source requires an active Pro or Enterprise subscription.
redis-eval-user-input error block

RISK: Redis EVAL with string interpolation can inject arbitrary Lua code, allowing data exfiltration or server-side RCE (CWE-94). FIX: never embed user-supplied values in the Lua script — pass them as KEYS[] or ARGV[] arguments to a fixed, pre-reviewed script.

Rule source requires an active Pro or Enterprise subscription.
redis-flushall-deny error block

RISK: FLUSHALL deletes every key in every Redis database — it is irreversible and catastrophic in production. FIX: restrict this command to maintenance scripts with explicit operator confirmation, never call it from application code, and use ACL SETUSER to deny FLUSHALL for the application user.

Rule source requires an active Pro or Enterprise subscription.
redis-flushdb-deny error block

RISK: FLUSHDB deletes all keys in the current Redis database without confirmation. FIX: gate behind explicit operator confirmation in maintenance scripts only; never call from application code.

Rule source requires an active Pro or Enterprise subscription.
redis-hardcoded-connection-string error block

RISK: hardcoded Redis connection string with embedded password leaks credentials when committed. FIX: load from an environment variable (process.env.REDIS_URL / os.environ['REDIS_URL']) and never commit the literal value.

Rule source requires an active Pro or Enterprise subscription.
redis-keys-star-blocking warning log

RISK: KEYS * (or KEYS '*') does a full keyspace scan and blocks the Redis event loop for the entire duration — in production this can cause connection timeouts for all clients. FIX: use SCAN with a cursor and a COUNT hint to iterate the keyspace incrementally.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v3
Published
Apr 8, 2026
Source commits
0
Synced
Oct 11, 2026
Hash
2485413b85822cddbfe43efb0e32197241633aecc460ee782f8cf4532c0968d7
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-redis/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-redis. The published version only bumps when a maintainer resyncs.

No commit history available.