π‘οΈ Sentinel: [CRITICAL/HIGH] Fix missing deserialization sinks in taint tracking - #168
Conversation
Update `_SERIALISATION_SINKS` in `variable_level.py` to include missing third-party deserialization functions (`dill.load`, `dill.loads`, `jsonpickle.decode`, `joblib.load`, `torch.load`). This ensures the static analyzer correctly tracks untrusted data flowing out of these dangerous functions. Conditionally safe sinks like `numpy.load` are intentionally omitted. 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 strengthens Wardlineβs L2 taint tracking by expanding the _SERIALISATION_SINKS set so additional thirdβparty deserialization entrypoints are treated as representation-boundary crossings that force outputs to UNKNOWN_RAW, reducing false negatives in the static analyzer.
Changes:
- Add third-party deserialization functions (
dill.load/loads,jsonpickle.decode,joblib.load,torch.load) to_SERIALISATION_SINKS.
π‘ 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", |
There was a problem hiding this comment.
π‘ Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 000fa82491
βΉοΈ 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.load", | ||
| "dill.loads", | ||
| "jsonpickle.decode", | ||
| "joblib.load", | ||
| "torch.load", |
There was a problem hiding this comment.
Preserve project summaries for colliding package names
When a scanned project owns a module such as torch.py, joblib.py, or dill.py and calls its own torch.load()-style function, these new literal names cause _resolve_call to return UNKNOWN_RAW before consulting the project-generated taint_map entry (at the checks around lines 1229 and 1245). This discards the known project return summary and can produce false downstream taint findings; apply this override only to external-library imports, or otherwise allow project-owned summaries to retain precedence.
Useful? React with πΒ / π.
Update `_SERIALISATION_SINKS` in `variable_level.py` to include missing third-party deserialization functions (`dill.load`, `dill.loads`, `jsonpickle.decode`, `joblib.load`, `torch.load`). This ensures the static analyzer correctly tracks untrusted data flowing out of these dangerous functions. Conditionally safe sinks like `numpy.load` are intentionally omitted. Also ran `make format` which formatted some previously unformatted unrelated files to ensure CI passes `ruff format --check`. Co-authored-by: tachyon-beep <544926+tachyon-beep@users.noreply.github.com>
π¨ Severity: HIGH
π‘ Vulnerability: Several third-party deserialization functions (
dill.load,dill.loads,jsonpickle.decode,joblib.load,torch.load) were missing from the_SERIALISATION_SINKSmapping in taint tracking, which could cause the static analyzer to lose track of untrusted data flowing out of these dangerous functions, potentially leading to false negatives.π― Impact: Attackers could bypass static analysis detection if untrusted data flowed through these third-party deserialization functions, as the analyzer would fail to convert the output to
UNKNOWN_RAW, thereby assuming the data was safe.π§ Fix: Added the missing third-party deserialization functions to
_SERIALISATION_SINKSinsrc/wardline/scanner/taint/variable_level.pyto correctly shed validation provenance. Conditionally safe sinks likenumpy.loadwere intentionally omitted.β Verification: Ran the full test suite (
make test), type checks (make typecheck), and linters (make lint) to confirm no regressions were introduced. Verified the modifications in_SERIALISATION_SINKSviaread_file.PR created automatically by Jules for task 3165986914773362305 started by @tachyon-beep