reachability-analyzer
БесплатноБез исполняемых скриптовНе проверенUse whenever npm audit, OSV-Scanner or Snyk reports too many vulnerabilities and only the ones that matter should count. Finds dependencies the code never…
от testland★ 18 звёзд на GitHubОб этом скилле
reachability-analyzer
Overview
Static vulnerability scanners report a CVE for every declared dependency that
matches a vulnerable version, regardless of whether the vulnerable code is ever
executed. A critical-severity finding in a test-only helper that your production
build tree never reaches is a different risk level than the same CVE in a
hot-path dependency. This skill operationalizes a reachability heuristic:
run an ecosystem-native dead-dependency tool, produce an unused-deps.txt
artifact, and feed that list into your SCA prioritization step so it can
assign reachable: false and route affected findings to Fix-Backlog instead
of Fix-Now.
The approach is static-analysis heuristic only. A dependency flagged unused by these tools is a strong signal to deprioritize its CVEs, not a guarantee that the vulnerable code is unreachable at runtime. Treat it accordingly.
When to use
- After any SCA scan produces more findings than the team can triage in one sprint and you need a principled filter.
- Before feeding findings into SCA prioritization so the
reachablefield is populated. - During dependency cleanup: the same tooling surfaces dead weight (unused packages that add attack surface and install time with no benefit).
- When a security reviewer asks "is this CVE in something we actually use?"
How to use
Run SCA first and save the findings JSON - this skill annotates existing findings, it does not replace them. See
dependency-vulnerability-scanningfor full setup:osv-scanner scan -r . --format json --output osv.jsonRun the ecosystem-native dead-dependency tool for your stack, then extract the unused names into
unused-deps.txt. Full config, flags, exit codes, and suppression per tool: references/dead-dependency-tools.md:# JS/TS - knip (preferred; depcheck was archived June 2025) npx knip --reporter json | jq -r '.dependencies[].name' > unused-deps.txt # Python - vulture; --min-confidence 90 targets unused imports vulture src/ --min-confidence 90 > vulture-report.txt # Rust - cargo-machete; --with-metadata catches renamed/feature-gated crates cargo machete 2>&1 | grep "unused dependency" | awk '{print $NF}' > unused-deps.txtKeep production and dev unused-dep lists separate: dev deps with CVEs can still reach production in bundled builds.
Cross-reference
unused-deps.txtagainst the SCA JSON, settingreachable: falseon every finding whose package is unused (script below).Verify: assert
unused-deps.txtis non-empty and every finding in the annotated JSON carries a populatedreachablefield before handoff. If the file is empty or a finding lacks the field, re-run the dead-dependency tool (a silent tool failure or the wrong workspace root is the usual cause) and re-annotate before proceeding.Pass the annotated JSON to your SCA prioritization step;
reachable: falseroutes to Fix-Backlog unless the CVE is in the CISA KEV catalog.Wire steps 2-4 into CI so the annotated artifact feeds the prioritization job on every run, and still schedule each unused package for cleanup.
Cross-reference unused deps with SCA findings
Once you have an unused-deps.txt for your ecosystem, annotate the SCA JSON
output before passing it to your SCA prioritization step:
import json
with open("osv.json") as f:
findings = json.load(f)
with open("unused-deps.txt") as f:
unused = {line.strip() for line in f}
for finding in findings.get("results", []):
pkg = finding.get("package", {}).get("name", "")
finding["reachable"] = pkg not in unused
with open("osv-annotated.json", "w") as f:
json.dump(findings, f, indent=2)
Pass osv-annotated.json to your SCA prioritization step. Per the priority
logic, findings with reachable: false route to Fix-Backlog regardless of
severity, unless they are in the CISA KEV catalog.
CI integration
jobs:
reachability:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: JS unused deps (knip)
run: npx knip --reporter json | jq -r '.dependencies[].name' > unused-deps.txt
- name: Annotate OSV output
run: python3 ci/annotate-reachability.py osv.json unused-deps.txt
- uses: actions/upload-artifact@v4
with:
name: osv-annotated
path: osv-annotated.json
The annotated artifact is then consumed by the prioritization job.
Worked example
A team's OSV scan of a Next.js service returns 60 CVEs - too many to patch in one
sprint. They run the JS dead-dependency tool (step 2), which flags 12 of the 80
declared dependencies as unused, including moment (CVE-2022-31129, CVSS 7.5). The cross-reference script sets
reachable: false on the moment finding because moment appears in
unused-deps.txt. Prioritization routes that CVE to Fix-Backlog instead of
Fix-This-Spr
Установить reachability-analyzer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл reachability-analyzer?
Use whenever npm audit, OSV-Scanner or Snyk reports too many vulnerabilities and only the ones that matter should count. Finds dependencies the code never uses with knip or depcheck (JS), vulture (Python) or cargo-machete (Rust) and downranks their CVEs. EPSS and KEV: cve-exploitability-triage.
Как установить скилл reachability-analyzer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл reachability-analyzer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic