🛡️ Sentinel: [CRITICAL] Fix missing deserialization sinks in core taint propagation#109
Conversation
…nt propagation Add missing curated third-party deserialization sinks to `_SERIALISATION_SINKS` in the taint engine, ensuring the analyzer accurately sheds validation provenance for these dangerous sinks. 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. |
There was a problem hiding this comment.
Pull request overview
This PR aligns wardline’s core variable-level taint propagation with the deserialization sink list already present in the PY-WL-106 rule by adding missing third-party deserialization endpoints (and pickle.Unpickler.load) to _SERIALISATION_SINKS. It also adjusts the PY-WL-106 rule metadata “clean” example to remain clean under the updated taint propagation behavior.
Changes:
- Extend
_SERIALISATION_SINKSto include additional deserialization endpoints (e.g.,dill.load(s),joblib.load,torch.load,numpy.load, etc.). - Update the
PY-WL-106metadata clean example fornumpy.loadto avoid returning newly-tainted values and to properly importnumpy.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/wardline/scanner/taint/variable_level.py | Adds missing deserialization endpoints to the core “representation-boundary” sink set used by variable-level taint propagation. |
| src/wardline/scanner/rules/untrusted_to_deserialization.py | Updates rule metadata examples to remain clean and to exercise numpy.load with proper import and non-tainted return value. |
đź’ˇ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "jsonpickle.decode", | ||
| "joblib.load", | ||
| "torch.load", | ||
| "numpy.load", | ||
| "pickle.Unpickler.load", |
🚨 Severity: CRITICAL
đź’ˇ Vulnerability: The static analyzer (
wardline) accurately identified untrusted data flowing to deserialization sinks likedill.load,shelve.open,torch.loadandnumpy.loadin its rule configuration (_SINK_SPECS). However, these functions were missing from the core taint propagation logic (_SERIALISATION_SINKS).🎯 Impact: Because these sinks were absent from the core propagation mappings, the taint engine might fail to shed validation provenance correctly. This could lead to false negatives (or in some edge cases, false positives), making the analyzer miss untrusted data being passed to dangerous deserialization targets resulting in Remote Code Execution (RCE) vectors slipping through undetected.
đź”§ Fix: Added the missing third-party deserialization endpoints to the
_SERIALISATION_SINKSfrozenset insidesrc/wardline/scanner/taint/variable_level.py. Additionally, updated the metadata examples to ensure they properly conform to test contracts.âś… Verification: Ran
make testlocally. The rule example meta tests specifically test for clean operation, and the core unit tests pass, confirming no regressions.PR created automatically by Jules for task 15516097863603429189 started by @tachyon-beep