Verification · Finding validation · Path reachability check
Guard analysis
Find early returns, enclosing conditions and defaults that exclude the trigger.
How to build it
- Run a path-sensitive analyzer on the flagged function.
- Read the early returns, enclosing conditions and default values on the path to the flagged line.
- Mark a finding as excluded when a guard blocks the trigger, and cite the guard's line.
Signals in a repository
- An infer run in CI or an infer configuration file.
- A joern query script that walks control flow to a sink.
- Suppression entries that cite the guard line that excludes the finding.
In practice
No scanned repository runs a tool for this check. The steps above are the only guidance.