From cddc421a57dc1fa99b938ab9a674a2154d0c3290 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 21 Jun 2026 16:18:26 +0000 Subject: [PATCH] Add `yaml.unsafe_load` and `yaml.full_load` to serialization sinks This ensures that the output of these potentially unsafe deserialization functions correctly sheds validation provenance (becomes `UNKNOWN_RAW`) in the taint propagation logic. Co-authored-by: tachyon-beep <544926+tachyon-beep@users.noreply.github.com> --- .jules/sentinel.md | 4 ++++ src/wardline/scanner/taint/variable_level.py | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 .jules/sentinel.md diff --git a/.jules/sentinel.md b/.jules/sentinel.md new file mode 100644 index 00000000..beba06d8 --- /dev/null +++ b/.jules/sentinel.md @@ -0,0 +1,4 @@ +## 2026-06-21 - [Add Unsafe PyYAML Loaders to Taint Tracking] +**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`. diff --git a/src/wardline/scanner/taint/variable_level.py b/src/wardline/scanner/taint/variable_level.py index 056c083c..cecc111d 100644 --- a/src/wardline/scanner/taint/variable_level.py +++ b/src/wardline/scanner/taint/variable_level.py @@ -57,6 +57,8 @@ "yaml.load", "yaml.safe_load_all", "yaml.load_all", + "yaml.unsafe_load", + "yaml.full_load", "marshal.dumps", "marshal.dump", "marshal.loads",