Skip to content

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

Open
tachyon-beep wants to merge 1 commit into
mainfrom
sentinel-fix-deserialization-sinks-11015560082743165297
Open

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

Conversation

@tachyon-beep

Copy link
Copy Markdown
Collaborator

🚨 Severity: HIGH
đź’ˇ Vulnerability: The static analyzer's taint tracking was missing third-party deserialization functions in its core _SERIALISATION_SINKS mapping. This meant untrusted data flowing into these dangerous functions might not properly shed validation provenance (resulting in false negatives in the tool).
🎯 Impact: False negatives in the static analysis tool where developers using third-party deserialization sinks wouldn't be alerted to untrusted data flows, leading to potential Remote Code Execution (RCE) vectors.
đź”§ Fix: Added the missing third-party deserialization sinks to the _SERIALISATION_SINKS frozenset. Also modified a clean test example for numpy.load in untrusted_to_deserialization.py to prevent false positive test failures since its output is now correctly tracked as UNKNOWN_RAW.
âś… Verification: Verified by running the full test suite (make test), static type checker (make typecheck), and linters (make format). Appended the journal entry to .jules/sentinel.md documenting this finding.


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

This commit adds missing third-party deserialization functions (`shelve.open`, `dill.load`, `dill.loads`, `jsonpickle.decode`, `joblib.load`, `torch.load`, and `numpy.load`) to the core `_SERIALISATION_SINKS` set. This ensures the static analyzer properly sheds validation provenance when untrusted data passes through these functions, preventing false negatives. Also includes a fix for a rule test that was failing due to this behavior change.

Co-authored-by: tachyon-beep <544926+tachyon-beep@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 4, 2026 16:34
@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.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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 updates Wardline’s taint propagation engine to recognize additional third‑party deserialization entry points as serialization/deserialization “boundary” calls, ensuring outputs are conservatively treated as UNKNOWN_RAW to avoid false negatives in downstream taint-based findings.

Changes:

  • Extend the core _SERIALISATION_SINKS set to include third‑party deserialization APIs (e.g., dill.load(s), jsonpickle.decode, joblib.load, torch.load, numpy.load, shelve.open).
  • Adjust the PY-WL-106 rule’s clean metadata example to avoid returning the (now boundary-tainted) result of numpy.load.
  • Append a Sentinel journal entry documenting the finding and mitigation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/wardline/scanner/taint/variable_level.py Adds third‑party deserialization functions to the taint engine’s serialization-sink boundary set so return values shed provenance to UNKNOWN_RAW.
src/wardline/scanner/rules/untrusted_to_deserialization.py Updates the rule metadata clean example to avoid returning a value that is now boundary-tainted by core propagation logic.
.jules/sentinel.md Documents the vulnerability, learning, and prevention guidance for future sink additions.

đź’ˇ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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