Skip to Content
SCA & DependenciesReachability Analysis

Reachability analysis

Every dependency scan runs a reachability pass over the repository checkout. For each dependency advisory it answers one question: does first-party code import this package, and does it use anything from it? The answer is stored on the finding as one of five states and drives the Reachability column, chip and filter in the SCA dashboard.

Reachability ranks advisories. It does not hide them, and it never marks an advisory as fixed.

The five states

State (API value)Label in the UIHow it is decided
reachableReachableFirst-party code imports the package and calls or references at least one of its symbols (a call, member access, JSX element, decorator, or the symbol passed as a value). A proven static path from an external entry point also counts.
importedImportedFirst-party code imports the package, but no use of an imported symbol was observed. A transitive package also reads imported when the direct dependency that pulls it in is itself reachable or imported.
unreachedUnreachedThe package is declared in a manifest or lockfile, but no first-party import of it was found.
transitive_unreachedTransitive, unreachedA transitive package with no first-party import, whose direct parent is not imported either.
unknownNot analysed yet - rescanThe pass did not run for this scan, the ecosystem or language is not supported, or the source index was incomplete.

A transitive package that is loaded through a reached parent is only ever imported, never reachable: CodeStax does not prove that the parent calls the vulnerable function.

What counts as first-party code

Imports in test, fixture and build-tooling files are excluded. That includes paths such as tests/, __tests__/, spec/, fixtures/, mocks/, testdata/, cypress/, playwright/, e2e/, .storybook/, files named *.test.*, *.spec.*, *_test.*, test_*.py and conftest.py, and tool configs such as webpack.config.js, vite.config.ts, jest.config.js, Gruntfile.js, setup.py and build.gradle. A package used only by your test suite reads Unreached, and its excluded import sites are kept as evidence. Commented-out imports are ignored.

Supported ecosystems

EcosystemPackage managers recognisedSource languages indexed
npmnpm, yarn, pnpmJavaScript, TypeScript
PyPIpip, pipenv, poetry, condaPython
GoGo modules, Go binariesGo
MavenMaven, Gradle, JARJava, Kotlin, Scala

Matching rules per ecosystem:

  • npm - the import specifier’s package root (including @scope/name) must equal the package. Relative imports never match.
  • PyPI - distribution names are mapped to import names (for example beautifulsoup4 imports as bs4, pyyaml as yaml, scikit-learn as sklearn), with common python-/py prefixes and suffixes also tried.
  • Go - the import path must equal the module path or sit below it.
  • Maven - the Java package root is derived from groupId:artifactId, or taken from a built-in table for artifacts whose packages differ (for example com.google.guava:guava maps to com.google.common).

Any other ecosystem (for example Cargo, Composer, RubyGems or NuGet) reads Not analysed yet. So does a Maven artifact whose package root cannot be derived, and any ecosystem where the scan indexed no source files in a matching language.

Why “unknown” is never “unreached”

CodeStax only claims Unreached when the source index is complete. If the scan hit its file limit, the finding stays unknown instead, because a file that was never indexed could still import the package. Advisories from scans that ran before the reachability pass existed also read unknown, except where older evidence proved a path: a proven entry-point path carries over as reachable, and a reached direct dependency pulling in the package carries over as imported. That carry-over applies to the chip and ranking only: the reachability filter reads the stored state, so those older advisories match only the unknown filter. Run a new dependency scan to analyse them properly.

The dashboard also reports the pass status for the scan:

Pass statusBanner shown above the advisories
computedNone
partialReachability partially computed for this scan: some files were not indexed or a manifest could not be parsed
failedReachability pass failed for this scan: advisories read “Not analysed yet” rather than “Unreached”
not_runReachability not computed for this scan

How reachability affects ranking

Advisory lists are ranked by exploit signal: CISA KEV first, then EPSS (scores of 10% or more come first, then advisories with no EPSS score, then the rest), then reachability, then CVSS. Within reachability the order is:

reachable > imported > unknown > unreached = transitive_unreached

So a reachable advisory outranks an unreached one only when KEV and EPSS are tied. The scan-time priority score is calculated separately.

Find reachable advisories

  • Vulnerabilities → All advisories (/dashboard/sca/vulnerabilities) shows a Reachability column and a Reachable quick filter.
  • Vulnerabilities → Evidence search (/dashboard/sca/vulnerabilities?show=evidence) has a Reachability filter row with one toggle per state and a count for each. Select several states to combine them.
  • Open an advisory to see the chip in the Reachability metric and, under Supply-chain evidence, the Import and call sites list: up to 20 file:line locations, the direct parent for transitive packages, and when the analysis ran.

API

Filter findings by one or more states (repeat the parameter or use a comma list):

GET /api/sca/findings/{repository_id}?reachability=reachable,imported&sort_by=exploit_signal

An invalid value returns 400. Each finding carries reachability, reachability_signal_reason, reachability_analyzed_at and reachability_evidence_entries, and the response includes reachability_analysis (the pass status above).

  • GET /api/sca/reachability/{repository_id} returns reachability_counts and the findings in each state for the latest completed dependency scan. Add ?branch=<branch> to pick a branch.
  • GET /api/sca/reachability-detail/{repository_id}/{issue_id} returns the evidence for one advisory.

Limitations

  • Analysis is static. Dynamic require() with computed names, reflection, generated code and plugin loading are not seen.
  • Symbol use is detected from imported names in the same file. A package imported in one file and used through a re-export elsewhere may read Imported.
  • Reachable means the package is used, not that the vulnerable function inside it is called.