🛡️ Sentinel: [security improvement] Add missing deserialization sinks to taint tracking - #174
Conversation
Missing `dill`, `jsonpickle`, `joblib`, and `torch` deserialization sinks were missing from `_SERIALISATION_SINKS` core mapping, which could lead to false negatives. This adds them to ensure the analyzer correctly handles validation provenance. 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. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: baea786e86
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "dill.loads", | ||
| "jsonpickle.decode", | ||
| "joblib.load", | ||
| "torch.load", |
There was a problem hiding this comment.
Add numpy.load to the provenance-reset set
When a project config declares numpy.load as a sanitiser, this omission still lets build_call_taint_map() install an ASSURED return taint, while the newly added names are protected by the serialization-sink alias closure and produce a sanitiser-collision diagnostic. This leaves the same validation-provenance bypass for numpy.load(..., allow_pickle=True), even though _SINK_SPECS in untrusted_to_deserialization.py explicitly identifies it as the sixth curated third-party deserialization sink; include numpy.load in this set so loaded object data cannot be treated as validated.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
This PR strengthens Wardline’s taint propagation by expanding the _SERIALISATION_SINKS mapping so additional high-risk (de)serialization APIs are treated as losing validation provenance (forcing UNKNOWN_RAW) during analysis.
Changes:
- Added
dill.load,dill.loads,jsonpickle.decode,joblib.load, andtorch.loadto_SERIALISATION_SINKSto avoid under-tainting across these boundary-crossing calls. - Applied small formatting-only refactors in a few unit tests and an MCP server helper for consistency with the formatter.
- Added minor whitespace normalization in
install/block.py.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/wardline/scanner/taint/variable_level.py |
Adds additional (de)serialization boundary calls to _SERIALISATION_SINKS to force UNKNOWN_RAW taint on results. |
src/wardline/mcp/server.py |
Formatting-only change to a trust_packs merge expression. |
src/wardline/install/block.py |
Whitespace-only change (blank lines) around top-level definitions. |
tests/unit/mcp/test_server_trust_grants.py |
Formatting-only change in a fixture project writer. |
tests/unit/install/test_mcp_json.py |
Formatting-only changes to JSON writing and a test signature. |
tests/unit/install/test_doctor_pack_grants.py |
Formatting-only change to a test signature. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "dill.load", | ||
| "dill.loads", | ||
| "jsonpickle.decode", | ||
| "joblib.load", | ||
| "torch.load", |
🚨 Severity: MEDIUM
💡 Vulnerability: Missing
dill,jsonpickle,joblib, andtorchdeserialization sinks in_SERIALISATION_SINKScore mapping.🎯 Impact: Untrusted data flowing into these dangerous deserialization functions could lead to false negatives if the analyzer incorrectly tracked validation provenance.
🔧 Fix: Added
"dill.load","dill.loads","jsonpickle.decode","joblib.load", and"torch.load"to the_SERIALISATION_SINKSfrozenset insrc/wardline/scanner/taint/variable_level.py.✅ Verification: Ran
make test,make typecheck, andmake formatto verify functionality.PR created automatically by Jules for task 16538584149398476319 started by @tachyon-beep