Skip to content

Cross-function taint phase 1: single-file return propagation (0.20.0) - #24

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

Cross-function taint phase 1: single-file return propagation (0.20.0)#24
autonomyproof merged 1 commit into
mainfrom
feat/xfn-taint-phase1

Conversation

@autonomyproof

Copy link
Copy Markdown
Owner

First engine upgrade beyond single-function tracking. New astutils.function_defs/return_values build a minimal same-file call graph; AG040 now follows model output across a local helper's return.

Verified: corpus 156 cases 1.000/1.000; AG040=0 across 41 repos (zero FP); 623 tests, 100% coverage. Bumps 0.19.0 -> 0.20.0.

First real engine upgrade beyond single-function tracking. Adds a minimal same-file call
graph and applies it to AG040 (insecure model-output handling).

Engine (astutils):
- function_defs(tree): map function name -> its definition (first wins) — the minimal
  call graph for resolving a plain helper(x) call to its def in the same file.
- return_values(func): the value expressions of func's own return statements, scope-
  respecting (does not descend into nested functions).

AG040 now follows model output across a local helper's return:
    def get_response(p): return llm.invoke(p)
    def run(p): exec(get_response(p))        # now caught; before, taint died at the boundary
Handles return-via-variable and .content/.choices accessors on the helper result. Bounded
depth (guards against deep/cyclic chains); still single-file (no cross-module reachability).

Verification:
- Ground-truth corpus: 156 cases, precision 1.000 / recall 1.000 (adds cross-function cases:
  helper returns model, via-variable, accessor, bare-return; negatives: helper returns
  non-model, unknown/undefined callee, over-depth chain).
- Real-repo benchmark: AG040 = 0 across 41 repos — zero false positives, total findings flat.
- 623 tests, 100% branch coverage, ruff + ruff format + mypy all clean.

README limits note updated (now: single-file cross-function taint; not yet cross-module).
Bumps 0.19.0 -> 0.20.0.

Signed-off-by: AutonomyProof <info@autonomyproof.io>
@autonomyproof
autonomyproof merged commit ac3e53d 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