Skip to content

Cross-function taint (phases 1+2): bidirectional single-file propagation (0.21.0) - #25

Merged
autonomyproof merged 1 commit into
mainfrom
feat/xfn-taint-phase2
Aug 18, 2026
Merged

Cross-function taint (phases 1+2): bidirectional single-file propagation (0.21.0)#25
autonomyproof merged 1 commit into
mainfrom
feat/xfn-taint-phase2

Conversation

@autonomyproof

Copy link
Copy Markdown
Owner

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.

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>
@autonomyproof
autonomyproof merged commit 73156ac into main Aug 18, 2026
8 checks passed
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.

1 participant