By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.
18px_cookie
e-remove
Blog

Reachability Analysis for SAST Findings

Published on
November 17, 2026
Updated on
November 18, 2026
Topics

TL;DR

  • Reachability analysis checks whether untrusted input from a real entry point can follow a feasible path to a flagged sink without being sanitized or authorization-checked along the way.
  • SCA reachability asks whether your code calls a vulnerable function in a dependency. SAST reachability asks whether attacker-controlled data can get from your entry point to your sink.
  • Every reachability verdict should name the entry point, call path, tainted variable, sink, and result, so a reviewer can check it against the code.
  • Block a pull request only when it adds a new, reachable, high or critical finding, and keep unreachable findings tracked, since a future change can make them reachable.

What is reachability analysis for SAST findings?

Reachability analysis for SAST findings is the process of determining whether untrusted input from a real entry point can travel along a feasible path to a flagged sink without being sanitized or authorization-checked along the way. A pattern-matching scanner tells you a dangerous call exists in your code. Reachability tells you whether an attacker's data can get there.

A raw SAST report is a list of maybes: string-built queries, shell calls, deserializers, file writes. A reachability verdict attaches a path to each finding, or shows that no path exists. The analysis follows a sequence that the rest of this post walks through:

  1. Find the entry points where outside data enters the application.
  2. Build a call graph that connects those entry points to the code that runs.
  3. Trace tainted data across functions and files to the sink.
  4. Check that the path is feasible and that no sanitizer or authorization check breaks it.
  5. Prioritize what's left by severity and exposure.

Reachability makes AI-powered static application security testing trustworthy. Without a path, a finding is only a guess about risk.

How SAST reachability differs from SCA reachability

SAST reachability and SCA reachability ask different questions. SCA reachability asks whether your code calls the vulnerable function in a dependency. SAST reachability asks whether attacker-influenced data can get from your entry point to your sink, and whether anything along the way neutralizes it.

If you already know dependency reachability, it's tempting to assume the SAST version just checks "is this function called."

Question asked Where analysis starts What counts as reachable What can break the path Output a developer sees
SCA reachability Is the vulnerable function in this dependency called by my code? Your application code, looking outward into dependencies A call chain from your code to the vulnerable function No call edge to the function, or the package is never loaded The CVE, the dependency, and the call chain into it
SAST reachability Can untrusted data from an entry point reach this sink in my code? External entry points such as routes, consumers, and parsers A feasible taint path from source to sink A sanitizer, an authorization check, or an infeasible condition The entry point, call path, tainted variable, sink, and verdict

For open source, a call edge is often enough. For first-party code, a call edge is necessary but not sufficient. The data on that edge has to be attacker-controlled, it has to survive every check in between, and the branch it travels through has to be one the program can execute.

Security backlogs grow in the gap between "95% sure this finding doesn't apply" and "100% sure." A developer who suspects a flagged query only takes internal input still has to prove it before closing the ticket. Reachability closes that gap with evidence.

For the dependency side in depth, see how reachability analysis works for open source dependencies.

How reachability analysis traces a finding through your code

Reachability analysis traces a finding by connecting entry points to sinks through a model of how your application runs, then checking every condition on the path.

Entry points

Entry points are the places where data from outside the process enters your code. In a typical service, that includes:

  • HTTP routes and GraphQL resolvers
  • Message queue consumers and webhook handlers
  • CLI arguments and environment-driven input
  • File and document parsers

Entry points matter because the same sink can have very different callers. A helper called from a public route carries attacker input. The same helper called only from a scheduled job with constant arguments doesn't. If the analysis can't tell those callers apart, every shared helper looks equally dangerous.

Call graphs and interprocedural taint

The call graph records which functions call which. Taint tracking then follows a value from its source through assignments, parameters, return values, and object fields, across function and file boundaries. Real applications pass data through controllers, services, repositories, and utilities before it reaches a query or a shell. Endor Labs AI SAST traces data from source to sink across 3 to 5 architectural layers, including multi-file and multi-function interactions.

Path feasibility

A path that exists on paper may never execute. Guard conditions, constant values, and type constraints can rule out a branch entirely. If a function only reaches the sink when mode == "debug" and every caller passes "prod", the path is infeasible. Authorization checks as path conditions

Sanitizers aren't the only thing that can break a path. An authorization check can too. A request that reaches a sensitive operation after an ownership or role check is a different finding from one that skips the check.

Take a route like GET /invoices/<invoice_id> that loads an invoice by ID and returns it. If the handler calls require_owner(invoice, current_user) before returning, the path to the sensitive read passes an authorization check. If it doesn't, an attacker can swap in someone else's ID. That's CWE-862: Missing Authorization, and it's the shape behind most insecure direct object reference bugs.

This is how reachability extends beyond injection to access control. It matters because OWASP Top 10:2025 A01 Broken Access Control ranks broken access control as the top risk, and OWASP reports that every application it tested had some form of it.

The model behind the paths

All of this needs a structure that holds entry points, call edges, and data flow together. Endor Labs builds a patented code context graph that models application behavior with line-level detail. Reachability queries run against that graph, so each verdict points to specific lines rather than a file or a package.

A reachable and an unreachable finding, side by side

Here's the same SQL injection sink, CWE-89: Improper Neutralization of Special Elements used in an SQL Command, used by two services that share a helper module.

# shared/db.py
import sqlite3

def fetch_orders(sort_column):
    conn = sqlite3.connect("orders.db")
    query = f"SELECT id, total FROM orders ORDER BY {sort_column}"
    return conn.execute(query).fetchall()


# orders_api/routes.py
from flask import Flask, jsonify, request
from shared.db import fetch_orders

app = Flask(__name__)

@app.route("/orders")
def list_orders():
    sort = request.args.get("sort", "id")
    return jsonify(fetch_orders(sort))


# reporting_worker/nightly.py
from shared.db import fetch_orders

def run():
    for column in ("id", "total"):
        print(column, len(fetch_orders(column)))

A pattern matcher flags the f-string query in shared/db.py and reports it for both services. Reachability produces two different answers.

Finding:          SQL injection (CWE-89), shared/db.py, fetch_orders()
Service:          orders_api
Entry point:      GET /orders (Flask route, list_orders)
Source:           request.args.get("sort")
Call path:        list_orders() -> fetch_orders(sort_column)
Tainted variable: sort -> sort_column -> query
Sink:             conn.execute(query)
Path conditions:  none
Verdict:          reachable


Finding:          SQL injection (CWE-89), shared/db.py, fetch_orders()
Service:          reporting_worker
Entry point:      none external (run() invoked by scheduler)
Source:           none, column takes constant values "id" and "total"
Call path:        run() -> fetch_orders(column)
Tainted variable: none
Sink:             conn.execute(query)
Verdict:          unreachable

The first one is real. SQLite's Python driver won't run stacked statements, but an attacker can still pass an expression such as a CASE WHEN subquery into ORDER BY and read data one bit at a time through the sort order.

The fix also shows how a check breaks a path. You can't parameterize a column name in ORDER BY, so an allowlist is the right control:

# orders_api/routes.py (allowlisted)
from flask import Flask, abort, jsonify, request
from shared.db import fetch_orders

app = Flask(__name__)
ALLOWED_SORTS = {"id", "total"}

@app.route("/orders")
def list_orders():
    sort = request.args.get("sort", "id")
    if sort not in ALLOWED_SORTS:
        abort(400)
    return jsonify(fetch_orders(sort))
Entry point:      GET /orders
Call path:        list_orders() -> fetch_orders(sort_column)
Tainted variable: sort
Path condition:   sort in ALLOWED_SORTS, else abort(400)
Sink:             conn.execute(query)
Verdict:          reachable path, neutralized (value constrained to constants)

Each trace names its entry point, call path, tainted variable, sink, and verdict. That's what reachability evidence should look like, and a reviewer can check it against the code in under a minute.

Reachability vs exploitability

Exploitability is a stronger claim than reachability: it means an attacker can use the reachable path in the running system, given who controls the input, where the code runs, and which other controls stand in the way. Reachable and exploitable are different levels of confidence, and policy works better when teams say which one they mean.

Level What it means Evidence required
Unreachable No feasible path from an untrusted source to the sink No external entry point, or a check that breaks every path
Reachable A feasible taint path exists from an entry point to the sink Named entry point, call path, and taint trace
Reachable and exploitable An attacker can drive the path in production Entry point exposure, attacker control of the input, deployment status, and no compensating control

A route behind a VPN with only internal callers can be reachable without being exploitable from the internet. A route that's exposed publicly but sits behind a strict web application firewall rule may be reachable with a compensating control. The ladder helps you decide which level should block a merge and which should open a ticket.

AI Security Review builds on reachability to confirm which vulnerabilities are exploitable on each pull request. The triage section below covers how that fits into a workflow.

Why reachability cuts false positives and alert fatigue

Reachability cuts false positives because it removes findings that have a dangerous sink but no attacker-controlled path to it. Rule-based SAST can't tell whether user-controlled data reaches a vulnerable sink, because it only matches patterns. It also loses context between source and sink when data crosses architectural boundaries in multi-layer applications.The scanner flags every shared helper with a risky call.

That noise has a long, documented history. NIST's 2018 Static Analysis Tool Exposition (SATE V) report found a 69% false positive rate for C/C++ static analysis tools. NIST's guidelines on minimum standards for developer verification of software (NIST IR 8397) make a related point: static analysis can return findings that are false positives or don't matter in context, so teams need a way to suppress and prioritize them. Reachability gives that prioritization a principled basis: a path, or the absence of one.

Endor Labs AI SAST applies that basis to every finding. In the June 2026 GA benchmark, it found 4x more high-severity findings than the strongest traditional tool (72 vs 17), with about 60% fewer false positives than pattern-based SAST.

In separate testing, the Endor Labs whitepaper on combining agents, program analysis, and rules reports up to 95% false positive reduction.

Each AI SAST classification also comes with a written explanation, so your team can audit the reasoning and learn from it.

Where static reachability gets hard, and how AI reasoning closes the gaps

Static reachability gets hard wherever the code that runs isn't spelled out as a direct function call. A pure call graph drops those edges, which produces two kinds of error: real paths that look unreachable, and safe paths that look exposed. Framework-heavy codebases hit these spots constantly.

Hard spot Why call graphs drop it How AI reasoning resolves it
Interface calls and dynamic dispatch The concrete method depends on the runtime type Reasoning over the class hierarchy and construction sites narrows the likely implementations
Reflection, such as getattr(obj, name)() The target is a string, not a symbol Reasoning over where the string comes from shows whether it's constant or attacker-controlled
Dependency injection and decorator-based routing The framework wires handlers at startup, outside normal calls Knowledge of framework conventions turns decorators and providers into entry points and edges
Config-file routing Routes live in YAML, XML, or a URL config, not in code Reading the config alongside the code connects paths to handlers
Generated code, such as RPC stubs and ORM layers Generated files are often skipped or opaque Modeling what the generated layer does lets taint pass through it

Endor Labs AI SAST orchestrates multiple specialized AI agents that combine rule-based pattern matching, dataflow tracing, and multi-pass LLM reasoning. Deterministic program analysis supplies the paths, which keeps results repeatable. LLM reasoning judges what program analysis can't settle alone: what a framework does at startup, whether a function sanitizes input, and whether a check enforces authorization or only logs it.

The combination pays off in coverage. In the June 2026 GA benchmark, Endor Labs AI SAST found 3x more real vulnerabilities than frontier models, plus 63 unique findings no other tool found.

These gaps get wider as more code comes from coding agents, which generate framework boilerplate and indirection at volume. For more on that problem, see what static analysis catches and misses in AI-generated code.

Using reachability in triage and PR policy

The most useful reachability policy blocks a pull request only when a change introduces a reachable, high-impact finding, and lets everything else merge. A rule like this works well as a starting point:

fail_pull_request if:
  finding.is_new
  and finding.reachable_from == external_entry_point
  and finding.severity in {high, critical}

otherwise:
  create backlog ticket
  route to owning team

Most changes never touch that condition, so they merge without friction. The ones that do carry a finding with a path a reviewer can inspect.

A verdict is only as good as the evidence behind it. Before you let reachability gate merges, check that each finding comes with:

  • A named entry point, such as a route, consumer, or parser
  • A full call path from that entry point to the sink
  • A taint trace showing which variable carries untrusted data at each hop
  • A stated reason for any sanitizer or authorization check that breaks the path

When you first adopt a tool, sample findings and walk at least one call path per finding by hand. If the evidence holds up, you can trust the label. If a tool can't show you the path, treat its verdict as a guess.

Every Endor Labs finding comes with verifiable evidence showing data flow, call paths, and reachability proof, so reviewers can vet the verdict instead of trusting a label. AI Security Review runs the AI SAST engine on every pull request, confirms which vulnerabilities are exploitable, and ships a context-aware fix with each confirmed finding. OPA-based policies let you suppress false positives, block pull requests only on high-confidence findings, or route findings by team.

Policy also needs to reach the places where people and agents write code. Endor Labs lets you define security policy as code and enforce it in AI coding agents and other tools through Hooks, Skills, MCP, CLI, and API. AURI by Endor Labs secures agentic software development, so a "reachable plus high severity" rule applies to an agent's changes the same way it applies to a human's.

The results show up in the merge queue. Teams using Endor Labs see 83% fewer blocked PRs and 10x fewer security tickets. Remediation runs 6x faster.

For the broader argument about developer workflow behind this kind of policy, see making SAST work for developers.

Full-stack reachability across code, dependencies, and containers

Full-stack reachability is function-level reachability applied across first-party code, open source dependencies, and container images, so all three feed one prioritized view. First-party SAST reachability tells you which of your own flaws attackers can reach. Dependency reachability tells you which CVEs your code calls. Container reachability tells you which OS and runtime vulnerabilities your images exercise.

For open source, Endor Labs’ function-level reachability delivers an average 92% false positive reduction for SCA. Container scanning extends reachability through runtime and OS layers, with up to 90% container noise reduction. When a tainted input in your code reaches a vulnerable function in a dependency, you want that connection in one place, with one set of evidence.

If you're comparing approaches across layers, start with the five types of reachability analysis. To see reachability-backed findings on your own code, with the entry point, call path, and data flow attached to each one, explore Endor Labs AI SAST.

FAQs

Does reachability analysis replace DAST or runtime testing?

Reachability analysis is a static complement to DAST and runtime testing. It finds paths in source code before deployment, covering routes and branches a dynamic scan may never hit. DAST and runtime testing confirm behavior in a running environment, including deployment and configuration issues that source code doesn't show. Most mature programs use both.

Can reachability analysis run on every pull request without slowing builds?

Reachability analysis can run on every pull request when it reviews the change in context and reports only new findings. Endor Labs AI Security Review runs the AI SAST engine on every pull request and developers fix confirmed findings. Pair it with a policy that blocks only new, reachable, high or critical findings, and most changes merge without waiting on security.

Is an unreachable SAST finding safe to ignore forever?

An unreachable SAST finding is a lower-priority item that should stay tracked, because a future change can make it reachable. In the example above, one new route that passes a query parameter to fetch_orders() would turn the reporting worker's harmless helper into a live injection. Keep unreachable findings in the backlog, rescan on every pull request, and let the verdict change when the code does.