Skip to content

🛡️ Sentinel: [security improvement] Add missing deserialization sinks to taint tracking - #174

Open
tachyon-beep wants to merge 1 commit into
mainfrom
sentinel/fix-missing-serialization-sinks-16538584149398476319
Open

🛡️ Sentinel: [security improvement] Add missing deserialization sinks to taint tracking#174
tachyon-beep wants to merge 1 commit into
mainfrom
sentinel/fix-missing-serialization-sinks-16538584149398476319

Conversation

@tachyon-beep

Copy link
Copy Markdown
Collaborator

🚨 Severity: MEDIUM
💡 Vulnerability: Missing dill, jsonpickle, joblib, and torch deserialization sinks in _SERIALISATION_SINKS core mapping.
🎯 Impact: Untrusted data flowing into these dangerous deserialization functions could lead to false negatives if the analyzer incorrectly tracked validation provenance.
🔧 Fix: Added "dill.load", "dill.loads", "jsonpickle.decode", "joblib.load", and "torch.load" to the _SERIALISATION_SINKS frozenset in src/wardline/scanner/taint/variable_level.py.
✅ Verification: Ran make test, make typecheck, and make format to verify functionality.


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

Missing `dill`, `jsonpickle`, `joblib`, and `torch` deserialization sinks were missing from `_SERIALISATION_SINKS` core mapping, which could lead to false negatives. This adds them to ensure the analyzer correctly handles validation provenance.

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 30, 2026 16:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T16:29:45.397141Z baea786 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: baea786e86

ℹ️ 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".

"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 Add numpy.load to the provenance-reset set

When a project config declares numpy.load as a sanitiser, this omission still lets build_call_taint_map() install an ASSURED return taint, while the newly added names are protected by the serialization-sink alias closure and produce a sanitiser-collision diagnostic. This leaves the same validation-provenance bypass for numpy.load(..., allow_pickle=True), even though _SINK_SPECS in untrusted_to_deserialization.py explicitly identifies it as the sixth curated third-party deserialization sink; include numpy.load in this set so loaded object data cannot be treated as validated.

Useful? React with 👍 / 👎.

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 taint propagation by expanding the _SERIALISATION_SINKS mapping so additional high-risk (de)serialization APIs are treated as losing validation provenance (forcing UNKNOWN_RAW) during analysis.

Changes:

  • Added dill.load, dill.loads, jsonpickle.decode, joblib.load, and torch.load to _SERIALISATION_SINKS to avoid under-tainting across these boundary-crossing calls.
  • Applied small formatting-only refactors in a few unit tests and an MCP server helper for consistency with the formatter.
  • Added minor whitespace normalization in install/block.py.

Reviewed changes

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

Show a summary per file
File Description
src/wardline/scanner/taint/variable_level.py Adds additional (de)serialization boundary calls to _SERIALISATION_SINKS to force UNKNOWN_RAW taint on results.
src/wardline/mcp/server.py Formatting-only change to a trust_packs merge expression.
src/wardline/install/block.py Whitespace-only change (blank lines) around top-level definitions.
tests/unit/mcp/test_server_trust_grants.py Formatting-only change in a fixture project writer.
tests/unit/install/test_mcp_json.py Formatting-only changes to JSON writing and a test signature.
tests/unit/install/test_doctor_pack_grants.py Formatting-only change to a test signature.

💡 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",
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