🛡️ Sentinel: [HIGH] Fix missing deserialization functions in taint tracking#105
🛡️ Sentinel: [HIGH] Fix missing deserialization functions in taint tracking#105tachyon-beep wants to merge 1 commit into
Conversation
…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>
|
đź‘‹ 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 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_SINKSto include curated third-party deserialization entrypoints (and additional YAML load variants). - Updated PY-WL-106
examples_cleanto 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.
| "shelve.open", | ||
| "dill.load", | ||
| "dill.loads", | ||
| "jsonpickle.decode", | ||
| "joblib.load", | ||
| "torch.load", | ||
| "numpy.load", | ||
| "pickle.Unpickler.load", |
🚨 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_SINKSinsrc/wardline/scanner/taint/variable_level.py. Also fixed thePY-WL-106rule metadata'sexamples_cleanto correctly demonstrate safe usage without triggering thePY-WL-101rule (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 usinggolden.identity.regen. All checks passed successfully.PR created automatically by Jules for task 6233769144846668098 started by @tachyon-beep