fad-checker 1.0.6 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/README.md +77 -15
- package/completions/fad-checker.bash +4 -1
- package/completions/fad-checker.zsh +9 -0
- package/data/eol-mapping.json +17 -0
- package/fad-checker.js +353 -241
- package/lib/codecs/codec.interface.js +27 -0
- package/lib/codecs/composer/parse.js +59 -0
- package/lib/codecs/composer/registry.js +92 -0
- package/lib/codecs/composer.codec.js +93 -0
- package/lib/codecs/index.js +37 -0
- package/lib/codecs/maven.codec.js +71 -0
- package/lib/{npm → codecs/npm}/collect.js +58 -35
- package/lib/{npm → codecs/npm}/parse.js +114 -10
- package/lib/{npm → codecs/npm}/registry.js +4 -3
- package/lib/codecs/npm.codec.js +52 -0
- package/lib/codecs/nuget/parse.js +75 -0
- package/lib/codecs/nuget/registry.js +88 -0
- package/lib/codecs/nuget.codec.js +94 -0
- package/lib/codecs/pypi/parse.js +163 -0
- package/lib/codecs/pypi/registry.js +89 -0
- package/lib/codecs/pypi.codec.js +102 -0
- package/lib/codecs/recipes.js +108 -0
- package/lib/codecs/select.js +27 -0
- package/lib/codecs/yarn.codec.js +19 -0
- package/lib/core.js +35 -1
- package/lib/cve-match.js +18 -11
- package/lib/cve-report.js +34 -70
- package/lib/dep-record.js +60 -0
- package/lib/deps-descriptor.js +110 -0
- package/lib/nvd.js +4 -3
- package/lib/osv.js +29 -18
- package/lib/outdated.js +20 -4
- package/lib/retire.js +77 -13
- package/lib/transitive.js +3 -3
- package/lib/ui.js +87 -0
- package/package.json +4 -2
- package/CLAUDE.md +0 -129
- package/docs/ARCHITECTURE.md +0 -154
- package/docs/USAGE.md +0 -179
- package/test/core.test.js +0 -153
- package/test/cpe.test.js +0 -166
- package/test/cve-download.test.js +0 -39
- package/test/cve-match.test.js +0 -217
- package/test/cve-report.test.js +0 -171
- package/test/fixtures/complex-enterprise/api/pom.xml +0 -32
- package/test/fixtures/complex-enterprise/build/pom.xml +0 -46
- package/test/fixtures/complex-enterprise/dao/pom.xml +0 -37
- package/test/fixtures/complex-enterprise/pom.xml +0 -66
- package/test/fixtures/complex-enterprise/web/pom.xml +0 -77
- package/test/fixtures/cve-samples/cve-non-java.json +0 -19
- package/test/fixtures/cve-samples/cve-product-only.json +0 -31
- package/test/fixtures/cve-samples/cve-with-packagename.json +0 -37
- package/test/fixtures/cve-samples/nvd-log4shell.json +0 -40
- package/test/fixtures/cve-samples/nvd-npm-lodash.json +0 -22
- package/test/fixtures/monorepo-mixed/libs/common-bom/pom.xml +0 -26
- package/test/fixtures/monorepo-mixed/packages/cli/package.json +0 -14
- package/test/fixtures/monorepo-mixed/packages/cli/yarn.lock +0 -41
- package/test/fixtures/monorepo-mixed/packages/no-lock/package.json +0 -9
- package/test/fixtures/monorepo-mixed/packages/web-app/package-lock.json +0 -71
- package/test/fixtures/monorepo-mixed/packages/web-app/package.json +0 -17
- package/test/fixtures/monorepo-mixed/pom.xml +0 -29
- package/test/fixtures/monorepo-mixed/services/api/pom.xml +0 -27
- package/test/fixtures/monorepo-mixed/services/worker/pom.xml +0 -28
- package/test/fixtures/private-lib-detection/core/pom.xml +0 -26
- package/test/fixtures/private-lib-detection/plugin/pom.xml +0 -23
- package/test/fixtures/private-lib-detection/pom.xml +0 -35
- package/test/fixtures/simple/app/pom.xml +0 -28
- package/test/fixtures/simple/lib/pom.xml +0 -18
- package/test/fixtures/simple/pom.xml +0 -24
- package/test/maven-repo.test.js +0 -111
- package/test/maven-version.test.js +0 -57
- package/test/monorepo.test.js +0 -132
- package/test/npm-registry.test.js +0 -64
- package/test/npm.test.js +0 -146
- package/test/outdated.test.js +0 -101
- package/test/snyk.test.js +0 -64
- package/test/transitive.test.js +0 -305
- package/test/webjar.test.js +0 -33
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `fad-checker` are documented here.
|
|
4
|
+
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## [2.0.1]
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
- **EOL detection for PyPI / NuGet** used dead endoflife.date product slugs
|
|
10
|
+
(`fastapi`, `aspnetcore`, `efcore` → HTTP 404), so no .NET / FastAPI EOL was ever
|
|
11
|
+
flagged. NuGet ASP.NET Core / EF Core packages now map to the `dotnet` product
|
|
12
|
+
(their versions track .NET cycles); `fastapi` removed (no endoflife.date source).
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- Detailed capability test suite (`test/codec-capabilities.test.js`): end-to-end EOL
|
|
16
|
+
per ecosystem (seeded cycles), registry findings (abandoned / yanked / inactive /
|
|
17
|
+
deprecation) + outdated gating, cycle-matching logic, fix recipes, and report
|
|
18
|
+
rendering of EOL/Obsolete/Outdated. Plus a guard asserting every eol-mapping product
|
|
19
|
+
slug is a known-valid endoflife.date product.
|
|
20
|
+
|
|
21
|
+
## [2.0.0]
|
|
22
|
+
|
|
23
|
+
Major release: **codec architecture** + three new ecosystems.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- **Codec abstraction** (`lib/codecs/`): every ecosystem now lives behind a single
|
|
27
|
+
interface (`detect` / `collect` / `coordKey` / `formatCoord` / `osvPackageName` /
|
|
28
|
+
`checkRegistry` / `resolveEolProduct` / `recipe` / `nativeScanners`) discovered through
|
|
29
|
+
a registry. OSV, NVD, CPE refinement and endoflife.date are shared, ecosystem-agnostic
|
|
30
|
+
services. Adding an ecosystem is adding a codec — no orchestrator changes.
|
|
31
|
+
- **Composer (PHP)** codec — `composer.lock` / `composer.json`, Packagist `abandoned`,
|
|
32
|
+
EOL (Laravel/Symfony/Drupal), `composer require` fix recipe.
|
|
33
|
+
- **PyPI (Python)** codec — `poetry.lock` / `Pipfile.lock` / `uv.lock` / `pdm.lock` /
|
|
34
|
+
`requirements.txt`, PEP 503 name normalisation, PyPI `yanked` + "Inactive" classifier,
|
|
35
|
+
EOL (Django/NumPy/FastAPI), `pip install` fix recipe.
|
|
36
|
+
- **NuGet (C#/.NET)** codec — `packages.lock.json` / `*.csproj` (+ Central Package
|
|
37
|
+
Management via `Directory.Packages.props`) / `packages.config`, NuGet `deprecation`,
|
|
38
|
+
EOL (.NET/ASP.NET Core/EF Core), `dotnet add package` fix recipe.
|
|
39
|
+
- `--ecosystem` is now a **list** (`auto` | `all` | comma list) and per-codec opt-outs
|
|
40
|
+
`--no-maven` / `--no-npm` / `--no-yarn` / `--no-nuget` / `--no-composer` / `--no-pypi`.
|
|
41
|
+
- Generalized `depRecord` (`ecosystem` / `namespace` / `name` / `coordKey`).
|
|
42
|
+
- Dependency: `smol-toml` (TOML lockfile parsing).
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
- **npm no-lockfile behaviour (contract change)**: a `package.json` without a sibling
|
|
46
|
+
`package-lock.json` / `yarn.lock` is now parsed **best-effort** (pinned exact versions
|
|
47
|
+
scanned, ranges skipped, `no-lockfile` warning) instead of being skipped entirely. The
|
|
48
|
+
same lockfile-first, best-effort fallback applies to Composer / PyPI / NuGet.
|
|
49
|
+
- The orchestrator now loops over detected codecs; report sections, labels, coordinate
|
|
50
|
+
formatting and fix recipes are driven by the codec registry.
|
|
51
|
+
- Maven CVE-index (cvelistV5) and retire.js are now `nativeScanners` owned by their codec.
|
|
52
|
+
- `--no-js` is retained as an alias for `--no-npm` + `--no-yarn`.
|
|
53
|
+
|
|
54
|
+
### Notes
|
|
55
|
+
- Maven map keys stay bare `g:a` (collision-free against the prefixed `npm:` / `nuget:` /
|
|
56
|
+
`composer:` / `pypi:` keyspaces) to keep transitive resolution and existing behaviour intact.
|
|
57
|
+
- Verified non-regression against a real Maven + npm project: identical findings modulo
|
|
58
|
+
upstream advisory drift.
|
|
59
|
+
|
|
60
|
+
## [1.x]
|
|
61
|
+
- Maven + npm/Yarn + vendored-JS scanning; CVEProject + OSV + NVD + CPE; EOL / obsolete /
|
|
62
|
+
outdated; HTML + Word report; private-dep cleanup for Snyk.
|
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
> **F**ucking **A**utonomous **D**ependency **C**hecker
|
|
4
4
|
|
|
5
|
-
`fad-checker` scans **Maven**, **npm**, **Yarn** and **vendored JavaScript** in any source tree — multi-module, monorepo, polyglot, whatever you've got — and produces a single self-contained HTML report with CVE, EOL, obsolete and outdated findings, plus per-ecosystem fix recipes.
|
|
5
|
+
`fad-checker` scans **Maven**, **npm**, **Yarn**, **Composer (PHP)**, **PyPI (Python)**, **NuGet (C#/.NET)** and **vendored JavaScript** in any source tree — multi-module, monorepo, polyglot, whatever you've got — and produces a single self-contained HTML report with CVE, EOL, obsolete and outdated findings, plus per-ecosystem fix recipes.
|
|
6
6
|
|
|
7
|
-
It runs against the source files alone. **No `mvn`, no `npm install`, no `
|
|
7
|
+
It runs against the source files alone. **No `mvn`, no `npm install`, no `composer install`, no `pip`, no `dotnet restore`, no Docker.** It reads `pom.xml`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `composer.lock`, `poetry.lock`/`Pipfile.lock`/`uv.lock`/`pdm.lock`/`pyproject.toml`/`requirements.txt`, and `packages.lock.json`/`*.csproj`/`*.fsproj`/`*.vbproj`/`packages.config` directly.
|
|
8
8
|
|
|
9
|
-
> **
|
|
9
|
+
> **Supported ecosystems: Maven, npm, Yarn (v1 + Berry/v2+), pnpm, Composer, PyPI, NuGet.** Each is a self-contained **codec** (`lib/codecs/`) — adding another is adding a codec, no orchestrator surgery. Vendored JS (jQuery, Bootstrap, PDF.js, etc.) is also scanned via retire.js.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -18,8 +18,11 @@ Because it doesn't need anything you don't already have on disk:
|
|
|
18
18
|
| --- | --- |
|
|
19
19
|
| Maven installed | `pom.xml` files are parsed directly with xml2js. Properties, profiles and local BOMs are resolved in-process. Transitive deps fetched from Maven Central if `--transitive` (cached forever). |
|
|
20
20
|
| `mvn dependency:tree` | Same as above. We walk the tree ourselves. |
|
|
21
|
-
| `npm install` / a `node_modules/` | `package-lock.json` (v1/v2/v3)
|
|
22
|
-
| `yarn install` | Same. We read `yarn.lock` v1. |
|
|
21
|
+
| `npm install` / a `node_modules/` | `package-lock.json` (v1/v2/v3), `yarn.lock` (v1 + Berry/v2+) and `pnpm-lock.yaml` (v5/v6/v9) are parsed as text/JSON/YAML. Versions come from the lockfile — no installation. |
|
|
22
|
+
| `yarn install` / `pnpm install` | Same. We read `yarn.lock` (v1 + Berry) and `pnpm-lock.yaml` directly. |
|
|
23
|
+
| `composer install` | `composer.lock` is parsed directly (concrete versions + transitive). `composer.json` alone → best-effort on pinned versions + warning. |
|
|
24
|
+
| `pip` / `poetry` / a venv | `poetry.lock`, `Pipfile.lock`, `uv.lock`, `pdm.lock` are parsed for concrete versions; `pyproject.toml` (PEP 621 + poetry) and `requirements.txt` (following `-r`/`-c` includes) are best-effort on exact pins. Names normalised per PEP 503. |
|
|
25
|
+
| `dotnet restore` | `packages.lock.json` is parsed; otherwise `*.csproj`/`*.fsproj`/`*.vbproj` (+ `Directory.Packages.props` Central Package Management) and legacy `packages.config`, best-effort on pinned versions. |
|
|
23
26
|
| `snyk` binary | Built-in CVE matching via 4 independent sources (see below). Snyk is *optional* (`--snyk`). |
|
|
24
27
|
| A network connection | First run downloads CVE / OSV / EOL data; subsequent runs use cached copies (`--offline` to force). |
|
|
25
28
|
|
|
@@ -35,10 +38,10 @@ Exactly **two** runtime dependencies must be on PATH (or installed automatically
|
|
|
35
38
|
| **1. CVE (production)** | CVEProject + OSV.dev + NVD + CPE | Public CVE / GHSA in production deps, per ecosystem, per manifest file |
|
|
36
39
|
| **2. CVE in dev deps** | same | Same, but for `test`/`provided` (Maven) and `dev`/`optional`/`peer` (npm) |
|
|
37
40
|
| **3. Vendored JS** | [retire.js](https://retirejs.github.io/) | Old jQuery/Bootstrap/Angular/PDF.js copies sitting in `static/` or `webapp/` with no lockfile |
|
|
38
|
-
| **4. EOL frameworks** | endoflife.date | Spring Boot 2.5, Hibernate 4.x, EOL JDKs, etc. |
|
|
39
|
-
| **5. Obsolete libraries** | curated list (
|
|
40
|
-
| **6. Outdated libraries** | Maven Central
|
|
41
|
-
| **7. Fix Recommendations** | computed | Per-ecosystem pin recipes: Maven `<dependencyManagement>`, npm `overrides`, yarn `resolutions` |
|
|
41
|
+
| **4. EOL frameworks** | endoflife.date | Spring Boot 2.5, Hibernate 4.x, EOL JDKs, AngularJS, Laravel/Symfony, Django, .NET, etc. |
|
|
42
|
+
| **5. Obsolete libraries** | curated list (Maven) + registry maintainer flags | log4j 1.x, jackson-mapper-asl, joda-time, …; npm `deprecated`, Composer `abandoned`, PyPI `yanked`/inactive, NuGet `deprecation` |
|
|
43
|
+
| **6. Outdated libraries** | Maven Central + npm / Packagist / PyPI / NuGet registries | Available newer versions, with release dates |
|
|
44
|
+
| **7. Fix Recommendations** | computed | Per-ecosystem pin recipes: Maven `<dependencyManagement>`, npm `overrides`, yarn `resolutions`, `composer require`, `pip install`, `dotnet add package` |
|
|
42
45
|
|
|
43
46
|
The HTML report opens in any browser, contains every detail (CVSS vectors, references, full descriptions, CPE configurations, via-paths for transitives) and ships a Word-compatible `.doc` twin.
|
|
44
47
|
|
|
@@ -82,8 +85,10 @@ fad-checker -s ./proj --no-all-libs --no-transitive
|
|
|
82
85
|
# Fully offline (uses cached data only)
|
|
83
86
|
fad-checker -s ./proj --offline
|
|
84
87
|
|
|
85
|
-
#
|
|
86
|
-
fad-checker -s ./proj --ecosystem maven
|
|
88
|
+
# Pick ecosystems — --ecosystem is a list: auto (default) | all | comma list
|
|
89
|
+
fad-checker -s ./proj --ecosystem maven # Maven only
|
|
90
|
+
fad-checker -s ./proj --ecosystem maven,npm,pypi # several
|
|
91
|
+
fad-checker -s ./proj --no-nuget --no-composer # or opt out per codec
|
|
87
92
|
```
|
|
88
93
|
|
|
89
94
|
Run `fad-checker --help` for the full flag list.
|
|
@@ -165,7 +170,11 @@ fad-checker --completion zsh > ~/.zsh/completions/_fad-checker
|
|
|
165
170
|
This is the surprising bit. The whole point is that you can run `fad-checker` against a *checkout* with no build environment.
|
|
166
171
|
|
|
167
172
|
- **Maven** — `pom.xml` files are parsed with xml2js. Property substitution (`${jackson.version}`), parent inheritance, local BOM imports (`<scope>import</scope>`) and every profile are resolved in-process. Transitive deps are walked by fetching child POMs from Maven Central (cached forever — POMs are immutable). When the project uses an **external BOM** (`spring-boot-dependencies` etc.), the deps whose version comes from that BOM can't be resolved without `mvn` itself — those are surfaced in chapter 0 as "unresolved-versions" so you know what's missing.
|
|
168
|
-
- **npm / Yarn** — `package-lock.json` (v1, v2, v3)
|
|
173
|
+
- **npm / Yarn / pnpm** — `package-lock.json` (v1, v2, v3), `yarn.lock` (v1 + Berry/v2+, via `js-yaml`) and `pnpm-lock.yaml` (v5/v6/v9, via `js-yaml`) are parsed directly. Lockfiles already contain every transitive version. No `node_modules/` traversal, no `npm install`.
|
|
174
|
+
- **Composer (PHP)** — `composer.lock` (`packages` + `packages-dev`) gives concrete + transitive versions; `composer.json` alone is best-effort.
|
|
175
|
+
- **PyPI (Python)** — `poetry.lock` / `Pipfile.lock` / `uv.lock` / `pdm.lock` are parsed (TOML via `smol-toml`, or JSON); `pyproject.toml` (PEP 621 `[project]` + `[tool.poetry]`) and `requirements.txt` (following `-r`/`-c` includes recursively, with `-c` constraint pins applied to ranges) are best-effort on exact pins. Package names are PEP 503-normalised (`Flask-SQLAlchemy` → `flask-sqlalchemy`).
|
|
176
|
+
- **NuGet (C#/.NET)** — `packages.lock.json` is authoritative; otherwise `*.csproj` / `*.fsproj` / `*.vbproj` `<PackageReference>` (resolving Central Package Management against `Directory.Packages.props`) and legacy `packages.config`. Ids are case-insensitive.
|
|
177
|
+
- **Lockfile-first, best-effort fallback** — when a lockfile is present it wins. When it's absent, the loose manifest (`package.json` / `composer.json` / `pyproject.toml` / `requirements.txt` / `*.csproj`) is still parsed for its **pinned exact versions**, with ranges skipped and a `no-lockfile` warning in chapter 0 flagging the partial coverage.
|
|
169
178
|
- **Vendored JavaScript** — `retire.js` shells out and scans `.js` / `.min.js` files by signature, catching old jQuery / Bootstrap / Angular / PDF.js copies that no lockfile knows about.
|
|
170
179
|
- **CVE data** — three independent sources merged:
|
|
171
180
|
- **CVEProject** (the canonical `cvelistV5` bundle, filtered to Maven-relevant entries)
|
|
@@ -189,6 +198,7 @@ All cached data lives in `~/.fad-checker/`:
|
|
|
189
198
|
| Maven Central latest versions | `version-cache.json` | 24 h |
|
|
190
199
|
| Transitive POMs from Maven Central | `poms-cache/<g>__<a>__<v>.pom` | ∞ (immutable) |
|
|
191
200
|
| retire.js findings | `retire-cache/<md5(src)>.json` | 24 h |
|
|
201
|
+
| retire.js signature DB | `retire-signatures/jsrepository-v5.json` | warmed online, used offline |
|
|
192
202
|
| User config (NVD key) | `config.json` (mode 0600) | — |
|
|
193
203
|
|
|
194
204
|
Export the lot to share between machines:
|
|
@@ -201,6 +211,53 @@ fad-checker --import-cache fad-cache.tar.gz
|
|
|
201
211
|
|
|
202
212
|
`--include-config` ships the NVD API key too (off by default).
|
|
203
213
|
|
|
214
|
+
> The cache export bundles **everything** under `~/.fad-checker/` (except `config.json`),
|
|
215
|
+
> including the retire.js findings **and** the warmed retire.js signature DB — so a
|
|
216
|
+
> machine that imports it can scan vendored JavaScript fully offline.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Air-gapped / PASSI audits: anonymized dependency descriptor
|
|
221
|
+
|
|
222
|
+
When the audited system is **offline / confidential** (typical of a PASSI engagement) it
|
|
223
|
+
can't reach OSV / NVD / Maven Central / npm. Split the work across machines while keeping
|
|
224
|
+
**zero environment information** off the secure enclave: an anonymized descriptor carries
|
|
225
|
+
only **public package coordinates** — no filesystem paths, no registry URLs, no
|
|
226
|
+
hostnames/usernames — and the **detailed report is produced back on the offline machine**.
|
|
227
|
+
|
|
228
|
+
The transfer relies on a property of fad-checker's caches: they are keyed by *coordinate*
|
|
229
|
+
or *vuln id*, never by path, so they are **machine-independent**. The online step just
|
|
230
|
+
**warms the caches**; the offline step replays the scan and gets cache hits.
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# ── Phase 1 — OFFLINE (audited machine): export the anonymized descriptor ──
|
|
234
|
+
# Exclude private/internal packages with -e (offline we can't tell private from public).
|
|
235
|
+
fad-checker -s ./proj -e "^(client|internal)\." --export-anonymized deps.json
|
|
236
|
+
# → deps.json: public coordinates only. Review it before it leaves the enclave.
|
|
237
|
+
|
|
238
|
+
# ── Phase 2 — ONLINE (any machine, no source needed): warm the caches ──
|
|
239
|
+
fad-checker --import-anonymized deps.json # scans coordinates → OSV/NVD/CVE/registry/EOL + retire signatures
|
|
240
|
+
fad-checker --export-cache fad-cache.tar.gz # bundle the warmed ~/.fad-checker/
|
|
241
|
+
|
|
242
|
+
# ── Phase 3 — OFFLINE (audited machine): full report, all local context ──
|
|
243
|
+
fad-checker --import-cache fad-cache.tar.gz
|
|
244
|
+
fad-checker -s ./proj --offline # re-collect locally (real paths) + cache hits
|
|
245
|
+
# → full HTML/.doc report with manifests & structure, generated inside the enclave.
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
What the descriptor (`fad-deps/1`) contains vs. drops:
|
|
249
|
+
|
|
250
|
+
| Kept (needed to scan) | Dropped (environment) |
|
|
251
|
+
| --- | --- |
|
|
252
|
+
| ecosystem, ecosystemType | manifest paths / pom paths |
|
|
253
|
+
| namespace, name | resolved registry URLs |
|
|
254
|
+
| version, versions | integrity hashes |
|
|
255
|
+
| scope, isDev | parent chains, lockfile type |
|
|
256
|
+
|
|
257
|
+
The online phase report is itself path-free; vendored-JavaScript (retire.js) findings are
|
|
258
|
+
produced **offline in phase 3**, since retire needs the actual `.js` files — its signature
|
|
259
|
+
DB is warmed online (phase 2) and carried by `--export-cache`.
|
|
260
|
+
|
|
204
261
|
---
|
|
205
262
|
|
|
206
263
|
## Custom Maven repositories
|
|
@@ -231,10 +288,14 @@ Repos are tried **in declared order, Maven Central last**. Auth is sent as a `Ba
|
|
|
231
288
|
| Source | What we use | License | API / endpoint |
|
|
232
289
|
| --- | --- | --- | --- |
|
|
233
290
|
| [CVEProject `cvelistV5`](https://github.com/CVEProject/cvelistV5) | Daily bulk CVE bundle, filtered to Maven-relevant entries | CC0-1.0 | GitHub release asset (zip) |
|
|
234
|
-
| [OSV.dev](https://osv.dev/) (Google + GitHub Security Lab) | Per-dep vulnerability lookup (Maven
|
|
291
|
+
| [OSV.dev](https://osv.dev/) (Google + GitHub Security Lab) | Per-dep vulnerability lookup (Maven, npm, Packagist, PyPI, NuGet, …) | CC-BY 4.0 | `POST api.osv.dev/v1/querybatch`, `GET api.osv.dev/v1/vulns/{id}` |
|
|
235
292
|
| [NIST NVD](https://nvd.nist.gov/) | Canonical CVE description + CVSS vectors + CPE configurations + CWE | US-gov public domain | `GET services.nvd.nist.gov/rest/json/cves/2.0?cveId=…` — free [API key](https://nvd.nist.gov/developers/request-an-api-key) bumps the rate limit 10× |
|
|
236
293
|
| [endoflife.date](https://endoflife.date/) | Framework / runtime EOL cycle data | MIT | `GET endoflife.date/api/{product}.json` |
|
|
237
294
|
| [Maven Central](https://search.maven.org/) | Latest-version lookups + transitive POM fetches | Free public service | Solr `search.maven.org/solrsearch/select?q=…` + `repo1.maven.org/maven2/<coord>` |
|
|
295
|
+
| [npm registry](https://registry.npmjs.org/) | Per-version `deprecated` + `dist-tags.latest` | Free public service | `GET registry.npmjs.org/<pkg>` |
|
|
296
|
+
| [Packagist](https://packagist.org/) | Latest stable + `abandoned` flag | Free public service | `GET packagist.org/packages/<vendor>/<pkg>.json` |
|
|
297
|
+
| [PyPI](https://pypi.org/) | Latest + `yanked` + "Inactive" classifier | Free public service | `GET pypi.org/pypi/<pkg>/json` |
|
|
298
|
+
| [NuGet](https://www.nuget.org/) | Latest stable + per-version `deprecation` | Free public service | `GET api.nuget.org/v3/registration5-gz-semver2/<id>/index.json` |
|
|
238
299
|
| [retire.js](https://retirejs.github.io/retire.js/) | Vendored-JS signature DB + scanner | Apache-2.0 | npm package `retire`, executed locally |
|
|
239
300
|
| [Snyk](https://snyk.io/) (optional) | Additional CVE source via `snyk test --all-projects --json` | Per Snyk EULA; needs a Snyk account | Local CLI `snyk` |
|
|
240
301
|
| [MITRE CWE](https://cwe.mitre.org/) | Weakness category links in the report | Free public reference | Linked by URL only, no API call |
|
|
@@ -258,7 +319,7 @@ Built-in guardrails that fire **before** any disk write:
|
|
|
258
319
|
| Tool | What `fad-checker` adds |
|
|
259
320
|
| --- | --- |
|
|
260
321
|
| `mvn dependency:tree` | No Maven needed; multi-source CVE scan; HTML report |
|
|
261
|
-
| `npm audit` | Polyglot (Maven + npm + vendored JS in one report); EOL & obsolete checks; works without
|
|
322
|
+
| `npm audit` | Polyglot (Maven + npm + Composer + PyPI + NuGet + vendored JS in one report); EOL & obsolete checks; works without installing anything |
|
|
262
323
|
| Snyk CLI | Free; offline-capable; integrates Snyk's results if you have it |
|
|
263
324
|
| OWASP DC | Faster (cached); cleaner UI; multi-source dedup |
|
|
264
325
|
|
|
@@ -269,7 +330,8 @@ You don't have to choose — `fad-checker` will use any of them as input (`--sny
|
|
|
269
330
|
## Docs
|
|
270
331
|
|
|
271
332
|
- [`docs/USAGE.md`](docs/USAGE.md) — every flag, every workflow, examples.
|
|
272
|
-
- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) — internals: collection, matching, report pipeline.
|
|
333
|
+
- [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) — internals: codecs, collection, matching, report pipeline.
|
|
334
|
+
- [`CHANGELOG.md`](CHANGELOG.md) — release history.
|
|
273
335
|
- [`CLAUDE.md`](CLAUDE.md) — code-level orientation for contributors.
|
|
274
336
|
|
|
275
337
|
---
|
|
@@ -6,11 +6,14 @@ _fad_check_complete() {
|
|
|
6
6
|
COMPREPLY=()
|
|
7
7
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
8
8
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
9
|
-
opts="--src --target --exclude --verbose --no-report --no-transitive --no-all-libs --no-osv --no-nvd --report-output --ignore-test --cve-refresh --cve-offline --snyk --transitive-depth --offline --set-nvd-key --show-config --completion --help --version -s -t -e -v"
|
|
9
|
+
opts="--src --target --exclude --verbose --no-report --no-transitive --no-all-libs --no-osv --no-nvd --no-retire --retire-refresh --report-output --ignore-test --cve-refresh --cve-offline --snyk --transitive-depth --offline --ecosystem --no-maven --no-npm --no-yarn --no-nuget --no-composer --no-pypi --no-js --set-nvd-key --show-config --completion --help --version -s -t -e -v"
|
|
10
10
|
case "$prev" in
|
|
11
11
|
--src|-s|--target|-t|--report-output)
|
|
12
12
|
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
13
13
|
return 0 ;;
|
|
14
|
+
--ecosystem)
|
|
15
|
+
COMPREPLY=( $(compgen -W "auto all maven npm yarn nuget composer pypi" -- "$cur") )
|
|
16
|
+
return 0 ;;
|
|
14
17
|
--completion)
|
|
15
18
|
COMPREPLY=( $(compgen -W "bash zsh" -- "$cur") )
|
|
16
19
|
return 0 ;;
|
|
@@ -20,6 +20,15 @@ _fad_check() {
|
|
|
20
20
|
'--cve-refresh[force CVE re-download]'
|
|
21
21
|
'--cve-offline[use cached CVE only]'
|
|
22
22
|
'--snyk[run snyk and merge]'
|
|
23
|
+
'--ecosystem[codecs to run]:list:(auto all maven npm yarn nuget composer pypi)'
|
|
24
|
+
'--no-maven[skip the Maven codec]'
|
|
25
|
+
'--no-npm[skip the npm codec]'
|
|
26
|
+
'--no-yarn[skip the Yarn codec]'
|
|
27
|
+
'--no-nuget[skip the NuGet codec]'
|
|
28
|
+
'--no-composer[skip the Composer codec]'
|
|
29
|
+
'--no-pypi[skip the PyPI codec]'
|
|
30
|
+
'--no-js[alias: skip JS/npm/yarn]'
|
|
31
|
+
'--no-retire[skip retire.js vendored-JS scan]'
|
|
23
32
|
'--completion[print shell completion]:shell:(bash zsh)'
|
|
24
33
|
)
|
|
25
34
|
_arguments $opts
|
package/data/eol-mapping.json
CHANGED
|
@@ -42,5 +42,22 @@
|
|
|
42
42
|
},
|
|
43
43
|
"by_npm_scope": {
|
|
44
44
|
"@angular/": { "product": "angular", "label": "Angular" }
|
|
45
|
+
},
|
|
46
|
+
"by_composer_name": {
|
|
47
|
+
"laravel/framework": { "product": "laravel", "label": "Laravel" },
|
|
48
|
+
"symfony/symfony": { "product": "symfony", "label": "Symfony" },
|
|
49
|
+
"symfony/console": { "product": "symfony", "label": "Symfony" },
|
|
50
|
+
"symfony/http-kernel": { "product": "symfony", "label": "Symfony" },
|
|
51
|
+
"drupal/core": { "product": "drupal", "label": "Drupal" }
|
|
52
|
+
},
|
|
53
|
+
"by_pypi_name": {
|
|
54
|
+
"django": { "product": "django", "label": "Django" },
|
|
55
|
+
"numpy": { "product": "numpy", "label": "NumPy" }
|
|
56
|
+
},
|
|
57
|
+
"by_nuget_name": {
|
|
58
|
+
"microsoft.aspnetcore.app": { "product": "dotnet", "label": "ASP.NET Core (.NET)" },
|
|
59
|
+
"microsoft.aspnetcore.all": { "product": "dotnet", "label": "ASP.NET Core (.NET)" },
|
|
60
|
+
"microsoft.netcore.app": { "product": "dotnet", "label": ".NET" },
|
|
61
|
+
"microsoft.entityframeworkcore": { "product": "dotnet", "label": "EF Core (.NET)" }
|
|
45
62
|
}
|
|
46
63
|
}
|