Skip to content

fix: validate modules during callable traversal - #12416

Open
sjrl wants to merge 2 commits into
mainfrom
security/validate-intermediate-callable-origins
Open

fix: validate modules during callable traversal#12416
sjrl wants to merge 2 commits into
mainfrom
security/validate-intermediate-callable-origins

Conversation

@sjrl

@sjrl sjrl commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Related Issues

  • fixes #issue-number

Proposed Changes:

Harden callable deserialization by checking the real module of every object traversed in a dotted callable path. This prevents an allowlisted module from exposing an object defined in an unallowlisted module that leads back to an otherwise allowlisted final callable.

How did you test it?

New test

Notes for the reviewer

@julian-risch this should stop the POC you developed by accessing os.environ through a module loaded in HITL

Checklist

  • I have read the contributors guidelines and the code of conduct.
  • I have updated the related issue with new insights and changes.
  • I have added unit tests and updated the docstrings.
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I have documented my code.
  • I have added a release note file, following the contributors guidelines.
  • I have run pre-commit hooks and fixed any issue.

@sjrl
sjrl requested a review from a team as a code owner August 20, 2026 07:10
@sjrl
sjrl requested review from julian-risch and removed request for a team August 20, 2026 07:10
@sjrl sjrl self-assigned this Aug 20, 2026
@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
haystack-docs Ignored Ignored Preview Aug 20, 2026 8:59am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  haystack/utils
  callable_serialization.py 117-119
Project Total  

This report was generated by python-coverage-comment-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant