Skip to content

The CollectionInstrument No. 04

reachable

An advisory only matters if the vulnerable path is reachable from your code.

The Problem

npm audit is a fire alarm that can’t tell the kitchen from the attic. Every advisory arrives with the same urgency, whether the vulnerable function sits in your request path or in a code path nothing can reach.

Teams respond rationally: they stop reading. Real exposure hides inside hundreds of theoretical ones.

The Insight

Severity is a property of the advisory. Reachability is a property of your application.

The Instrument

reachable parses your JS/TS application with tree-sitter into a graph of its imports and call sites, then checks it against full OSV advisory records. Each function an advisory names gets a verdict: REACHABLE, with the call path from your entry points as evidence; UNKNOWN, with the reason it can’t tell; or UNREACHABLE, a best-effort static result that means lower priority, not proof of safety.

trace shows the import paths from your entry points to a package, and graph shows one file’s imports, exports and reachable symbols. Output in table, JSON, SARIF or markdown drops straight into CI: exit 1 when a reachable advisory meets the threshold, exit 2 when the scan is incomplete, so an OSV outage never reads as a clean scan.

Triage with evidence

$ reachable scan

REACHABLE

+----------+----------------+---------------------+-----------+-------------------+

| Severity | Package | GHSA ID | Status | Vulnerable Symbol |

+----------+----------------+---------------------+-----------+-------------------+

| HIGH | lodash@4.17.20 | GHSA-35jh-r3h4-6jhm | REACHABLE | template |

+----------+----------------+---------------------+-----------+-------------------+

| Path: index.js::module -> index.js::call:_.template:2 |

+----------+----------------+---------------------+-----------+-------------------+

| HIGH | lodash@4.17.20 | GHSA-r5fr-rjxr-66jc | REACHABLE | template |

+----------+----------------+---------------------+-----------+-------------------+

| Path: index.js::module -> index.js::call:_.template:2 |

+---------------------------------------------------------------------------------+

UNKNOWN

+----------+----------------+---------------------+---------+-------------------+

| Severity | Package | GHSA ID | Status | Vulnerable Symbol |

+----------+----------------+---------------------+---------+-------------------+

| MODERATE | lodash@4.17.20 | GHSA-29mw-wpgm-hmr9 | UNKNOWN | toNumber |

+----------+----------------+---------------------+---------+-------------------+

| Reason: symbol-unconfirmed |

+-------------------------------------------------------------------------------+

UNREACHABLE

+----------+----------------+---------------------+-------------+-------------------+

| Severity | Package | GHSA ID | Status | Vulnerable Symbol |

+----------+----------------+---------------------+-------------+-------------------+

| MODERATE | lodash@4.17.20 | GHSA-29mw-wpgm-hmr9 | UNREACHABLE | trim |

+----------+----------------+---------------------+-------------+-------------------+

| MODERATE | lodash@4.17.20 | GHSA-29mw-wpgm-hmr9 | UNREACHABLE | trimEnd |

+----------+----------------+---------------------+-------------+-------------------+

$ reachable trace lodash

Path 1

index.js::module

pkg:lodash::module

Real output from reachable 1.0.15 on an app that calls _.template with lodash 4.17.20 installed. Borders are drawn in ASCII, and the UNREACHABLE table shows 2 of its 6 rows.

Spec

Analysis
tree-sitter import and call graph × OSV advisory records
Verdicts
REACHABLE · UNKNOWN · UNREACHABLE
Output
Table · JSON · SARIF · Markdown
Config
.reachablerc.json
Install
npm @merupatel/reachable
Adoption
1,487 npm downloads, Mar–Oct 2026
Quick start
npx @merupatel/reachable@latest scan

The Outcome

reachable went from 1.0.0 to 1.0.8 on npm between 19 March and 4 April 2026. 1.0.9 to 1.0.15 followed on 27 and 28 October 2026, each published from CI with signed provenance (and a GitHub Release from 1.0.11): patched dependencies first, then the fixes from independent verification against real advisories and real projects. Each fix landed with its tests, and the README lists the blind spots that remain. It runs locally or in CI with no hosted service, account or API key. Built so audit noise collapses into a short list that leads with the advisories your code reaches.