Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL/HIGH] Fix missing deserialization sinks in taint tracking - #168

Open
tachyon-beep wants to merge 2 commits into
mainfrom
sentinel/fix-missing-deserialization-sinks-3165986914773362305
Open

πŸ›‘οΈ Sentinel: [CRITICAL/HIGH] Fix missing deserialization sinks in taint tracking#168
tachyon-beep wants to merge 2 commits into
mainfrom
sentinel/fix-missing-deserialization-sinks-3165986914773362305

Conversation

@tachyon-beep

Copy link
Copy Markdown
Collaborator

🚨 Severity: HIGH
πŸ’‘ Vulnerability: Several third-party deserialization functions (dill.load, dill.loads, jsonpickle.decode, joblib.load, torch.load) were missing from the _SERIALISATION_SINKS mapping in taint tracking, which could cause the static analyzer to lose track of untrusted data flowing out of these dangerous functions, potentially leading to false negatives.
🎯 Impact: Attackers could bypass static analysis detection if untrusted data flowed through these third-party deserialization functions, as the analyzer would fail to convert the output to UNKNOWN_RAW, thereby assuming the data was safe.
πŸ”§ Fix: Added the missing third-party deserialization functions to _SERIALISATION_SINKS in src/wardline/scanner/taint/variable_level.py to correctly shed validation provenance. Conditionally safe sinks like numpy.load were intentionally omitted.
βœ… Verification: Ran the full test suite (make test), type checks (make typecheck), and linters (make lint) to confirm no regressions were introduced. Verified the modifications in _SERIALISATION_SINKS via read_file.


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

Update `_SERIALISATION_SINKS` in `variable_level.py` to include missing
third-party deserialization functions (`dill.load`, `dill.loads`,
`jsonpickle.decode`, `joblib.load`, `torch.load`). This ensures the
static analyzer correctly tracks untrusted data flowing out of these
dangerous functions. Conditionally safe sinks like `numpy.load` are
intentionally omitted.

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 lite review requested due to automatic review settings August 26, 2026 16:34

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 strengthens Wardline’s L2 taint tracking by expanding the _SERIALISATION_SINKS set so additional third‑party deserialization entrypoints are treated as representation-boundary crossings that force outputs to UNKNOWN_RAW, reducing false negatives in the static analyzer.

Changes:

  • Add third-party deserialization functions (dill.load/loads, jsonpickle.decode, joblib.load, torch.load) to _SERIALISATION_SINKS.

πŸ’‘ Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +70 to +74
"dill.load",
"dill.loads",
"jsonpickle.decode",
"joblib.load",
"torch.load",

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 000fa82491

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +70 to +74
"dill.load",
"dill.loads",
"jsonpickle.decode",
"joblib.load",
"torch.load",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve project summaries for colliding package names

When a scanned project owns a module such as torch.py, joblib.py, or dill.py and calls its own torch.load()-style function, these new literal names cause _resolve_call to return UNKNOWN_RAW before consulting the project-generated taint_map entry (at the checks around lines 1229 and 1245). This discards the known project return summary and can produce false downstream taint findings; apply this override only to external-library imports, or otherwise allow project-owned summaries to retain precedence.

Useful? React with πŸ‘Β / πŸ‘Ž.

Update `_SERIALISATION_SINKS` in `variable_level.py` to include missing
third-party deserialization functions (`dill.load`, `dill.loads`,
`jsonpickle.decode`, `joblib.load`, `torch.load`). This ensures the
static analyzer correctly tracks untrusted data flowing out of these
dangerous functions. Conditionally safe sinks like `numpy.load` are
intentionally omitted.

Also ran `make format` which formatted some previously unformatted
unrelated files to ensure CI passes `ruff format --check`.

Co-authored-by: tachyon-beep <544926+tachyon-beep@users.noreply.github.com>
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