Skip to content

🛡️ Sentinel: [HIGH] Fix missing deserialization functions in taint tracking#105

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

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

Conversation

@tachyon-beep

Copy link
Copy Markdown
Collaborator

🚨 Severity: HIGH
đź’ˇ Vulnerability: The static analyzer was missing yaml.unsafe_load, yaml.full_load, and several other curated third-party deserialization sinks (shelve, dill, joblib, torch.load, numpy.load, pickle.Unpickler.load, jsonpickle) in its core taint propagation logic _SERIALISATION_SINKS.
🎯 Impact: This could lead to false negatives when tracking untrusted data flowing into these dangerous deserialization functions, as the engine would not correctly shed validation provenance and convert the output to UNKNOWN_RAW.
đź”§ Fix: Added the missing deserialization sinks to _SERIALISATION_SINKS in src/wardline/scanner/taint/variable_level.py. Also fixed the PY-WL-106 rule metadata's examples_clean to correctly demonstrate safe usage without triggering the PY-WL-101 rule (untrusted data reaching a trusted producer).
âś… Verification: Ran the full test suite (make test), linting (make lint), formatting (make format), and type checking (make typecheck). Also regenerated golden identity tests for the analyzer using golden.identity.regen. All checks passed successfully.


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

…acking

Added unsafe PyYAML loaders and other third-party deserialization functions (`shelve`, `dill`, `joblib`, `torch`, `numpy`) to `_SERIALISATION_SINKS` to ensure the taint engine correctly tracks untrusted data flowing into these endpoints. Updated tests and golden identities to reflect these changes.

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

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 core level-2 taint propagation so additional deserialization-related call sites are treated as serialization/representation-boundary sinks (forcing their outputs to shed provenance and become UNKNOWN_RAW), and adjusts PY-WL-106 metadata examples + golden corpus metadata accordingly.

Changes:

  • Expanded _SERIALISATION_SINKS to include curated third-party deserialization entrypoints (and additional YAML load variants).
  • Updated PY-WL-106 examples_clean to avoid cross-rule interactions while still demonstrating safe usage.
  • Regenerated golden identity corpus metadata to reflect the new sink mapping behavior.

Reviewed changes

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

File Description
tests/golden/identity/corpus/META.json Updates golden corpus metadata “reason” to match the taint-mapping change.
src/wardline/scanner/taint/variable_level.py Adds additional deserialization-related call FQNs to the core _SERIALISATION_SINKS mapping.
src/wardline/scanner/rules/untrusted_to_deserialization.py Adjusts PY-WL-106 clean example to remain clean under the updated taint behavior.

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

Comment on lines +70 to +77
"shelve.open",
"dill.load",
"dill.loads",
"jsonpickle.decode",
"joblib.load",
"torch.load",
"numpy.load",
"pickle.Unpickler.load",
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