Skip to content

🛡️ Sentinel: [HIGH] Fix missing deserialization sinks in taint tracking - #140

Open
tachyon-beep wants to merge 1 commit into
mainfrom
sentinel/fix-missing-deserialization-sinks-3440635421251319783
Open

🛡️ Sentinel: [HIGH] Fix missing deserialization sinks in taint tracking#140
tachyon-beep wants to merge 1 commit into
mainfrom
sentinel/fix-missing-deserialization-sinks-3440635421251319783

Conversation

@tachyon-beep

Copy link
Copy Markdown
Collaborator

🚨 Severity: HIGH
💡 Vulnerability: The static analyzer was missing curated third-party deserialization sinks (dill.load, jsonpickle.decode, joblib.load, torch.load, numpy.load) in its core taint propagation mapping (_SERIALISATION_SINKS).
🎯 Impact: When tracking untrusted data flowing through these dangerous deserialization functions, the analyzer failed to shed validation provenance (convert outputs to UNKNOWN_RAW), potentially leading to false negatives in security scanning (failing to flag untrusted data reaching trusted tier code via these sinks).
🔧 Fix: Added the missing load variants of these sinks to _SERIALISATION_SINKS in src/wardline/scanner/taint/variable_level.py. Also adjusted the clean example in untrusted_to_deserialization.py to correctly reflect the updated UNKNOWN_RAW tracking without triggering PY-WL-101.
Verification: Verified by ensuring the updated test_clean_example_fires_no_defect passes, meaning numpy.load correctly propagates UNKNOWN_RAW taint and the fix integrates correctly. Regenerated golden identity tests and passed all make test, make lint, and make typecheck suites.


PR created automatically by Jules for task 3440635421251319783 started by @tachyon-beep

Update `_SERIALISATION_SINKS` to include specific third-party
deserialization functions (`dill.load`, `jsonpickle.decode`, etc.)
that were added to the `PY-WL-106` rule but omitted from core taint
propagation, ensuring validation provenance is correctly shed.

Co-authored-by: tachyon-beep <544926+tachyon-beep@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 8, 2026 16:49
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR strengthens Wardline’s level-2 taint tracking by ensuring additional high-risk third-party deserialization APIs are treated as representation-boundary sinks (shedding validation provenance to UNKNOWN_RAW), and updates the PY-WL-106 rule’s clean example to remain non-failing under the new taint behavior.

Changes:

  • Added missing third-party deserialization sink names (dill.load(s), jsonpickle.decode, joblib.load, torch.load, numpy.load) to _SERIALISATION_SINKS so their outputs become UNKNOWN_RAW.
  • Updated the untrusted_to_deserialization clean example to avoid returning the (now UNKNOWN_RAW) result of numpy.load, preventing a PY-WL-101 finding.

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 Extends _SERIALISATION_SINKS to include additional third-party deserialization APIs so taint provenance is shed consistently.
src/wardline/scanner/rules/untrusted_to_deserialization.py Adjusts the clean example to align with the new UNKNOWN_RAW propagation behavior and avoid PY-WL-101.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 129 to +131
# numpy.load without allow_pickle=True is safe by default (no object unpickling).
# We must not return its result directly to avoid a PY-WL-101 finding, as numpy.load
# is a serialization sink shedding validation provenance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants