Cross-function taint (phases 1+2): bidirectional single-file propagation (0.21.0) - #25
Merged
Merged
Conversation
Completes bidirectional single-file cross-function taint for AG040. Phase 1 followed a
helper's RETURN into its caller; phase 2 follows a caller's argument INTO a helper's
parameter and to a sink inside it:
def run_it(code): exec(code) # bare param — silent on its own
def tool(p): run_it(llm.invoke(p)) # now flagged: a caller feeds model output
New _param_index + _param_fed_by_model: resolve the sink's enclosing function, find the
parameter's position, and check same-file callers (positional, keyword, and non-first
position) for model output. Bounded depth; keyword-only params conservatively skipped.
Verification:
- Ground-truth corpus: 160 cases, precision 1.000 / recall 1.000 (adds return + parameter
positives and non-model / no-caller negatives).
- Real-repo benchmark: AG040 = 0 across 41 repos — zero false positives, total findings flat.
- 635 tests, 100% branch coverage, ruff + ruff format + mypy all clean.
Stacked on phase 1; carries both phases. Bumps 0.20.0 -> 0.21.0. README limits note updated.
Signed-off-by: AutonomyProof <info@autonomyproof.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a same-file call graph (function_defs/return_values) and makes AG040 follow model output across the function boundary in both directions: a helper's return (phase 1) and into a helper's parameter (phase 2).
Verified: corpus 160 cases 1.000/1.000; AG040=0 across 41 repos; 635 tests, 100% coverage. Bumps 0.19.0 -> 0.21.0.