🛡️ Sentinel: [security improvement] Add unsafe deserialization sinks to taint tracking - #164
Conversation
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
This PR strengthens Wardline’s taint tracking by expanding the set of known unsafe (de)serialization call targets so that values produced by these operations are conservatively treated as UNKNOWN_RAW, reducing false negatives in downstream flow analysis.
Changes:
- Add additional third-party/stdlib unsafe deserialization sinks to
_SERIALISATION_SINKS(shelve.open,dill.load/loads,jsonpickle.decode,joblib.load,torch.load). - Apply minor formatting-only updates in a few unit tests and in
WardlineMCPServerargument-merging logic. - Add a couple of spacing tweaks in the install instruction-block renderer.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/mcp/test_server_trust_grants.py | Formatting-only change in project fixture creation. |
| tests/unit/install/test_mcp_json.py | Formatting-only changes in JSON writing and one test signature. |
| tests/unit/install/test_doctor_pack_grants.py | Formatting-only change to one test signature. |
| src/wardline/scanner/taint/variable_level.py | Adds new unsafe deserialization sinks to _SERIALISATION_SINKS to force UNKNOWN_RAW on return taint. |
| src/wardline/mcp/server.py | Formatting-only change to trust_packs merge expression. |
| src/wardline/install/block.py | Spacing-only adjustments around top-level definitions/constants. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🚨 Severity: MEDIUM
💡 Vulnerability: The static analyzer was missing third-party and standard library unsafe deserialization sinks (
shelve.open,dill.load,jsonpickle.decode,joblib.load,torch.load) in its_SERIALISATION_SINKSmapping, leading to false negatives when propagating untrusted data into these sinks.🎯 Impact: Untrusted data flowing into these dangerous deserialization functions may not be correctly tracked, causing the engine to miss potential remote code execution (RCE) vulnerabilities.
🔧 Fix: Added the missing curated deserialization functions to
_SERIALISATION_SINKSinvariable_level.pyto ensure the analyzer correctly sheds validation provenance (converting output toUNKNOWN_RAW). Note thatnumpy.loadis conditionally unsafe and remains excluded to avoid false positives in safe-by-default code.✅ Verification: Ensure the test suite passes (
make test), and all the required sinks are present in_SERIALISATION_SINKS.PR created automatically by Jules for task 7995341098049714857 started by @tachyon-beep