redis-py is the de-facto Redis client for Python. Most commands are typed and safe. The main sinks are eval() and evalsha() which run Lua scripts — injection-sensitive when the script body is user-controlled.
.get().eval().evalsha().execute_command().get()SourceRedis.get(name: str) -> bytes | None
Reads a key. Source when cached data originated from user input.
return.eval()SinkRedis.eval(script: str, numkeys: int, *keys_and_args) -> Any
Executes a Lua script on the server. Injection sink when script is user-controlled.
0.evalsha()SinkRedis.evalsha(sha: str, numkeys: int, *keys_and_args) -> Any
Executes a cached Lua script by SHA. Tainted sha reaches pre-registered scripts.
0.execute_command()SinkRedis.execute_command(*args) -> Any
Sends an arbitrary Redis command. Injection sink for command name.
0.set()NeutralRedis.set(name: str, value, ex=None, ...) -> bool
Sets a key. Typed arguments, generally safe.
| FQN | Field | |
|---|---|---|
| redis | fqns[0] | |
| redis.Redis | fqns[1] | |
| redis.StrictRedis | fqns[2] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
from codepathfinder.go_rule import PyRedis