circle-ir v3.36.0
Fixed
Python taint flows emit for every sink category — systematic fix (#18).
result.taint.flows was empty for every Python case (sqli, command_injection, path_traversal, code_injection, deserialization, xxe, ldap_injection, open_redirect) — including the XSS case the reporter believed was working.
Root causes
Two structural defects, not category-specific:
- No per-language DFG builder for Python.
core/extractors/dfg.ts:buildDFG()dispatches on language with explicit branches for JS, Rust, Bash, Go. Python falls through tobuildJavaDFG(), which scans formethod_declarationAST nodes; Python emitsfunction_definition. Result: every Python file produced empty DFG. - Python compound-expression args lose
arg.variable.extractPythonArgumentsonly setsarg.variablefor bareidentifiernodes.cur.execute("SELECT … " + uid)leavesarg.variable = undefined, defeating the DFG propagator'sarg.variable === use.variablematching.
Fix
Language-agnostic detectExpressionScanFlows() supplement in TaintPropagationPass. Word-boundary matches each source's explicit .variable field against sink call argument expressions. Reuses existing FP filters; respects sink.argPositions. ~40 LOC vs ~990 LOC for a full Python DFG.
Why systematic
Python's findPythonAssignmentSources already sets source.variable for assignment-style sources — a single variable-tracking primitive covers every sink category at once. Not a per-category patch.
Tests
- 10 unit tests (
taint-propagation-pass.test.ts) — positive cases, multi-sink-same-line dedup, argPositions filter, word-boundary, dead-code, Java non-emission, source-after-sink, propagator dedup. - 11 end-to-end tests (
taint-propagation.test.ts) — every previously-broken Python category + XSS positive control + Java sqli non-regression.
Total suite: 1925 passing tests (1904 baseline + 21 new).
Notes
- Reporter's premise that "XSS works, others don't" was falsified by direct probe.
- Python DFG fall-through is a latent bug affecting other consumers (
DFGVerifier,PathFinder). A properbuildPythonDFGremains future work.