🛡️ Sentinel: [security improvement] Add missing deserialization sinks to taint propagation - #179
Conversation
… to taint propagation Co-authored-by: tachyon-beep <544926+tachyon-beep@users.noreply.github.com>
|
đź‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a đź‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Adds additional third-party deserialization entry points to Wardline’s variable-level taint propagation so validation provenance is conservatively shed (→ UNKNOWN_RAW) when data crosses common serialization/deserialization boundaries, reducing false negatives in downstream analyses.
Changes:
- Extend
_SERIALISATION_SINKSwithshelve.open,dill.load/loads,jsonpickle.decode,joblib.load, andtorch.load. - Regenerate/update golden identity corpus metadata to reflect the change rationale.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/golden/identity/corpus/META.json | Updates golden corpus metadata “reason” to match regenerated identity corpus context. |
| src/wardline/scanner/taint/variable_level.py | Adds missing third-party/stdlib-adjacent deserialization sinks to the variable-level taint “representation boundary” sink set. |
đź’ˇ Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "tomllib.load", | ||
| "tomli_w.dumps", | ||
| "tomli_w.dump", | ||
| "shelve.open", |
… to taint propagation Co-authored-by: tachyon-beep <544926+tachyon-beep@users.noreply.github.com>
🚨 Severity: MEDIUM
đź’ˇ Vulnerability: Missing third-party deserialization functions (
dill,joblib,jsonpickle,torch,shelve) in the core_SERIALISATION_SINKStaint propagation logic. This can lead to false negatives, as untrusted data flowing into these sinks wouldn't correctly shed validation provenance.🎯 Impact: The static analyzer might falsely mark downstream usages as safe if validation provenance wasn't properly shed, potentially missing dangerous usage patterns in custom/third-party deserializers.
đź”§ Fix: Added
shelve.open,dill.load,dill.loads,jsonpickle.decode,joblib.load, andtorch.loadto_SERIALISATION_SINKSinsrc/wardline/scanner/taint/variable_level.py, bringing it up to parity with theuntrusted_to_deserializationrule sink specs.numpy.loadwas intentionally excluded as it is conditionally safe.âś… Verification: Run
make testandmake typecheck. Golden identity tests have been regenerated.PR created automatically by Jules for task 10412650041573842007 started by @tachyon-beep