Repository navigation
v2.1
Stack trace locals redaction with bytecode taint analysis
Sensitive values and sanitize_params now redact stack trace locals using three-layer analysis:
- Name-based: Parameter variables redacted by name (works for any type — strings, ints, dicts, etc.)
- Bytecode dataflow: Analyzes function bytecode to find derived variables
- Value check: Only redacts if the runtime value actually contains the secret
Examples
| Variable | Redacted? | Why |
|---|---|---|
token = "sk-secret" |
'***' |
Parameter name |
header = f"Bearer {token}" |
'***' |
In dataflow + contains secret |
secrets = [token] |
'***' |
Container holds the object |
token_len = len(token) |
14 |
In dataflow, but value doesn't contain secret |
coincidence = "sk-secret" |
'sk-secret' |
Not in dataflow from token |
Changes
- Add stack trace locals redaction for
Sensitivevalues andsanitize_params - Three-layer taint analysis: name-based, bytecode dataflow, and value checking
- Update README with sanitization examples and async sample output
- 10 new tests (72 total)
Full Changelog: v2.0...v2.1