Skip to content

🛡️ Sentinel: [CRITICAL] Fix deserialization sinks missing from taint propagation#98

Open
tachyon-beep wants to merge 1 commit into
mainfrom
sentinel/fix-deserialization-sinks-taint-propagation-17940626351355831895
Open

🛡️ Sentinel: [CRITICAL] Fix deserialization sinks missing from taint propagation#98
tachyon-beep wants to merge 1 commit into
mainfrom
sentinel/fix-deserialization-sinks-taint-propagation-17940626351355831895

Conversation

@tachyon-beep

Copy link
Copy Markdown
Collaborator

🚨 Severity: CRITICAL
đź’ˇ Vulnerability: The static analyzer was missing dill.load, dill.loads, jsonpickle.decode, joblib.load, torch.load, and numpy.load in its _SERIALISATION_SINKS mapping.
🎯 Impact: Untrusted data flowing into these dangerous deserialization functions might not have shed validation provenance correctly, leading to false negatives in security scanning.
đź”§ Fix: Added these missing deserialization sinks to the _SERIALISATION_SINKS set in src/wardline/scanner/taint/variable_level.py. Adjusted a unit test in src/wardline/scanner/rules/untrusted_to_deserialization.py to ensure it passes with the new taint tracking behavior.
âś… Verification: Ran uv run pytest tests/unit/scanner/taint/test_variable_level.py and uv run pytest tests/unit/scanner/rules/test_rule_examples_meta.py locally and all passed.


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

…propagation

Added `dill.load`, `dill.loads`, `jsonpickle.decode`, `joblib.load`, `torch.load`, and `numpy.load` to `_SERIALISATION_SINKS` in `variable_level.py`. Also adjusted a unit test `examples_clean` to accommodate the change in taint tracking behavior for `numpy.load`.

Co-authored-by: tachyon-beep <544926+tachyon-beep@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 16:43
@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.

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 hardens Wardline’s Python taint propagation by ensuring additional third-party (de)serialization entrypoints are treated as representation-boundary calls, preventing validated inputs from incorrectly conferring “trusted” provenance onto deserialized outputs and reducing security-scanning false negatives.

Changes:

  • Added missing third-party deserialization functions (dill.*, jsonpickle.decode, joblib.load, torch.load, numpy.load) to the core _SERIALISATION_SINKS frozenset used by variable-level taint propagation.
  • Updated the PY-WL-106 rule’s “clean” example so it remains clean under the new taint tracking semantics.
  • Documented the incident/learning in .jules/sentinel.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/wardline/scanner/taint/variable_level.py Expands core serialization/deserialization sink list so these calls shed validation provenance to UNKNOWN_RAW.
src/wardline/scanner/rules/untrusted_to_deserialization.py Adjusts rule metadata example to avoid unintended findings after taint behavior changes.
.jules/sentinel.md Adds a Sentinel log entry capturing the vulnerability, learning, and prevention guidance.

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

Comment thread .jules/sentinel.md
**Vulnerability:** The static analyzer was missing `yaml.unsafe_load` and `yaml.full_load` in its `_SERIALISATION_SINKS` mapping, potentially leading to false negatives when tracking untrusted data flowing into these dangerous deserialization functions.
**Learning:** Even if functions are listed in rule specifications (like `_SINK_SPECS`), they also need to be properly categorized in the core taint propagation logic (`_SERIALISATION_SINKS`) to ensure the analyzer correctly sheds validation provenance (converting output to `UNKNOWN_RAW`).
**Prevention:** When adding new sinks to rule definitions, always verify if they need to be added to core propagation mappings like `_SERIALISATION_SINKS` or `_PROPAGATING_BUILTINS`.
## 2025-02-14 - Add Unsafe Third-party Loaders to Taint Tracking
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