fad-checker 2.1.2 → 2.2.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 CHANGED
@@ -3,6 +3,43 @@
3
3
  All notable changes to `fad-checker` are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## [Unreleased]
7
+
8
+ ### Added
9
+ - **Custom registries for npm, PyPI, Ruby and Go** (previously Maven-only). Point
10
+ fad-checker at private Verdaccio/Artifactory/GitHub Packages (npm), devpi (PyPI),
11
+ Gemfury/Geminabox (Ruby) or a private GOPROXY/Athens (Go). They are tried in
12
+ declared order, the public registry last; auth via `--auth user:pass` (→ Basic)
13
+ or `--token TOK` (→ Bearer), inline `https://user:pass@host/` also accepted.
14
+ CRUD: `--add-repo <eco> <name> <url>`, `--remove-repo <eco> <name>`,
15
+ `--list-repos` (grouped by ecosystem); one-off repeatable `--repo <eco>=<url>`.
16
+ New `lib/registries.js`; per-codec fetchers honour `opts.registries`.
17
+ - **Layered configuration.** Defaults can come from a JSON config file
18
+ (`--config <file.json>`, else auto-discovered `./.fad-env.json`) and from the
19
+ `FAD_CHECKER_ENV` environment variable (a string of CLI flags). Precedence:
20
+ **CLI flag > config file > `FAD_CHECKER_ENV` > `~/.fad-checker/config.json` >
21
+ defaults**; `registries` are unioned across every layer. New `lib/options-env.js`.
22
+ - **`--source` alias** for `-s`/`--src` (and the JSON config key `"source"`/`"src"`).
23
+ - **Vendored-JS inventory (report chapter 1D + JSON `vendoredJs`).** retire.js now
24
+ runs with `--verbose`, so fad lists **every** identified standalone JS library
25
+ committed into the tree (jQuery, Bootstrap, PDF.js, …) — **vulnerable or not** —
26
+ as a cyber-hygiene inventory of unmanaged third-party code (the JS twin of the
27
+ native-binary chapter 1C). Each entry: component, version, file, detection
28
+ method, and vulnerability status. Vulnerable libs remain detailed in chapter 2.
29
+ On by default; `--no-vendored-js-inventory` keeps only the vulnerable findings.
30
+ - **`--exclude-path <glob...>`** — ignore sub-paths during the directory walk,
31
+ gitignore-style (matched relative to `--src`, prunes the dir + its subtree),
32
+ across every ecosystem. Repeatable; also `excludePath: [...]` in `.fad-env.json`,
33
+ unioned across config layers. **`--no-default-excludes`** walks the normally
34
+ pruned dirs (`node_modules`, `vendor`, `target`, `.git`, …). New `lib/path-filter.js`.
35
+
36
+ ### Changed
37
+ - **BREAKING:** the persisted-registry store moved from the Maven-only
38
+ `maven_repos` config key + 2-arg `--add-repo <name> <url>` to a per-ecosystem
39
+ `registries` map + `--add-repo <ecosystem> <name> <url>`. `--repo` now requires
40
+ the `<ecosystem>=<url>` form (a bare URL is rejected). Re-add any private Maven
41
+ repos with `--add-repo maven <name> <url>`.
42
+
6
43
  ## [2.1.0]
7
44
 
8
45
  ### Added
package/README.md CHANGED
@@ -7,15 +7,16 @@
7
7
 
8
8
  > **F**ucking **A**utonomous **D**ependency **C**hecker
9
9
 
10
- `fad-checker` scans **Maven**, **npm**, **Yarn**, **Composer (PHP)**, **PyPI (Python)**, **NuGet (C#/.NET)**, **Go**, **Ruby** 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 (prioritised by **EPSS + CISA KEV**), EOL, obsolete, outdated and **license** findings, plus per-ecosystem fix recipes. It also exports a **CycloneDX 1.6 SBOM** and a **CSAF 2.0 VEX**.
10
+ `fad-checker` scans **Maven**, **npm**, **Yarn**, **Composer (PHP)**, **PyPI (Python)**, **NuGet (C#/.NET)**, **Go**, **Ruby**, **vendored JavaScript** and **committed native binaries** in any source tree — multi-module, monorepo, polyglot, whatever you've got — and produces a single self-contained HTML report with CVE (prioritised by **EPSS + CISA KEV**), EOL, obsolete, outdated and **license** findings, plus per-ecosystem fix recipes. It also exports a **CycloneDX 1.6 SBOM** and a **CSAF 2.0 VEX**.
11
+
11
12
 
12
13
  🌐 **[Project site & docs →](https://n8tz.github.io/fad-checker/)**
13
14
 
14
- <p align="center"><img src="docs/assets/cli.png" alt="fad-checker terminal output — a [n/N] checklist warming each vulnerability database, then CVE findings coloured by severity" width="760"></p>
15
+ <p align="center"><img src="docs/assets/cli.png" alt="fad-checker terminal output — a [n/N] checklist warming each vulnerability database, then CVE findings coloured by severity" height="760"></p>
15
16
 
16
17
  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.
17
18
 
18
- > **Supported ecosystems: Maven, npm, Yarn (v1 + Berry/v2+), pnpm, Composer, PyPI, NuGet, Go, Ruby.** 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. **Embedded JARs** committed into the tree — vendored libs, Spring-Boot fat-jars, shaded uber-jars inside `.jar`/`.war`/`.ear` — are unzipped in-memory and their Maven coordinates scanned too (disable with `--no-jars`).
19
+ > **Supported ecosystems: Maven, npm, Yarn (v1 + Berry/v2+), pnpm, Composer, PyPI, NuGet, Go, Ruby + committed native binaries.** 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. **Embedded JARs** committed into the tree — vendored libs, Spring-Boot fat-jars, shaded uber-jars inside `.jar`/`.war`/`.ear` — are unzipped in-memory and their Maven coordinates scanned too (disable with `--no-jars`). **Committed native binaries** (`.dll`/`.exe`/`.so`/`.dylib`) are detected (magic-byte confirmed, so images/assets are never picked up) and **identified by checksum** via deps.dev + CIRCL — to flag tampered/unknown files and libraries that ought to be declared dependencies (disable with `--no-binaries`).
19
20
 
20
21
  ---
21
22
 
@@ -48,12 +49,14 @@ Exactly **one** runtime dependencies must be on PATH (or installed automatically
48
49
  | **0. Warnings** | local heuristics | Missing lockfiles, unresolved Maven versions (BOM-managed), private libs not on Maven Central |
49
50
  | **1. CVE (production)** | CVEProject + OSV.dev + NVD + CPE | Public CVE / GHSA in production deps, per ecosystem, per manifest file — each row **prioritised** by CISA KEV + EPSS + CVSS |
50
51
  | **1B. Embedded binaries** | same, on coords read from archives | CVEs in libraries **shipped inside committed `.jar`/`.war`/`.ear`** (vendored libs, Spring-Boot fat-jars, shaded uber-jars) — not declared in any `pom.xml`. Grouped by containing archive |
51
- | **2. CVE in dev deps** | same | Same, but for `test`/`provided` (Maven) and `dev`/`optional`/`peer` (npm) |
52
- | **3. Vendored JS** | [retire.js](https://retirejs.github.io/) | Old jQuery/Bootstrap/Angular/PDF.js copies sitting in `static/` or `webapp/` with no lockfile |
52
+ | **1C. Unmanaged / vendored binaries** | deps.dev + CIRCL (by checksum) | Committed **native binaries** (`.dll`/`.exe`/`.so`/`.dylib`) no package manager governs — identified by hash, flagged **should-be-managed** (exists in a registry), **name≠checksum** (filename disagrees with the hash), **unknown** (no source knows it) or **malicious** (free CIRCL signal) |
53
+ | **1D. Unmanaged / vendored JavaScript** | [retire.js](https://retirejs.github.io/) (`--verbose`) | **Inventory of every standalone JS lib** committed into the tree (jQuery, Bootstrap, PDF.js, …) that no package manager governs — vulnerable *or not*. A cyber-hygiene constat: unknown provenance/integrity/patch story. `--no-vendored-js-inventory` to skip |
54
+ | **2. Vendored JS (vulnerable)** | [retire.js](https://retirejs.github.io/) | The subset of the above with known CVEs/advisories — old jQuery/Bootstrap/Angular/PDF.js copies with no lockfile |
55
+ | **3. CVE in dev deps** | same | Same as chapter 1, but for `test`/`provided` (Maven) and `dev`/`optional`/`peer` (npm) |
53
56
  | **4. EOL frameworks** | endoflife.date | Spring Boot 2.5, Hibernate 4.x, EOL JDKs, AngularJS, Laravel/Symfony, Django, .NET, etc. |
54
57
  | **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` |
55
58
  | **6. Outdated libraries** | Maven Central + npm / Packagist / PyPI / NuGet registries | Available newer versions, with release dates |
56
- | **7. Licenses** | registry metadata + Maven POMs → SPDX policy | Each dep's license normalised to SPDX and classified; copyleft (GPL/AGPL/LGPL/MPL), proprietary and unknown flagged for review |
59
+ | **7. Licenses** *(opt-in: `--licenses`)* | registry metadata + Maven POMs → SPDX policy | Each dep's license normalised to SPDX and classified; copyleft (GPL/AGPL/LGPL/MPL), proprietary and unknown flagged for review |
57
60
  | **8. Fix Recommendations** | computed | Per-ecosystem pin recipes: Maven `<dependencyManagement>`, npm `overrides`, yarn `resolutions`, `composer require`, `pip install`, `dotnet add package` |
58
61
 
59
62
  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. Every match carries a **composite priority** (KEV-exploited > EPSS likelihood > CVSS severity), and the run can additionally emit a **CycloneDX 1.6 SBOM** (`--report-sbom`, vulnerabilities inline) and a **CSAF 2.0 VEX** (`--report-csaf`) for downstream tooling.
@@ -83,9 +86,13 @@ fad-checker --set-nvd-key YOUR_KEY
83
86
  # Read-only full scan (default: all sources on)
84
87
  fad-checker -s ./proj
85
88
 
86
- # Exclude private/internal libs by groupId regex
89
+ # Exclude private/internal libs by groupId/name regex
87
90
  fad-checker -s ./proj -e "^(com\.acme|org\.private)\."
88
91
 
92
+ # Ignore whole sub-paths during the walk (gitignore-style glob, relative to -s)
93
+ fad-checker -s ./proj --exclude-path "packages/legacy/**" --exclude-path "**/fixtures/**"
94
+ fad-checker -s ./proj --no-default-excludes # walk everything (incl. node_modules/.git)
95
+
89
96
  # Also write cleaned POMs (private deps stripped, ready for Snyk)
90
97
  fad-checker -s ./proj -t ../proj-clean -e "^com\.acme\."
91
98
 
@@ -98,10 +105,19 @@ fad-checker -s ./proj --no-all-libs --no-transitive
98
105
  # Fully offline (uses cached data only)
99
106
  fad-checker -s ./proj --offline
100
107
 
108
+ # License + copyleft-policy chapter (off by default)
109
+ fad-checker -s ./proj --licenses
110
+
101
111
  # Pick ecosystems — --ecosystem is a list: auto (default) | all | comma list
102
112
  fad-checker -s ./proj --ecosystem maven # Maven only
103
113
  fad-checker -s ./proj --ecosystem maven,npm,pypi # several
104
114
  fad-checker -s ./proj --no-nuget --no-composer # or opt out per codec
115
+ fad-checker -s ./proj --no-binaries # skip the native-binary scan
116
+
117
+ # Private registry + reusable defaults (see "Configuration file & environment")
118
+ fad-checker --add-repo npm verdaccio https://npm.acme.com/ --token "$NPM_TOKEN"
119
+ fad-checker --config ./ci/fad-env.json # all options from a JSON file
120
+ fad-checker --source ./proj # --source / --src are aliases
105
121
  ```
106
122
 
107
123
  Run `fad-checker --help` for the full flag list.
@@ -115,36 +131,22 @@ Run `fad-checker --help` for the full flag list.
115
131
  The console prints a summary; the full detail lives in the self-contained HTML/`.doc`:
116
132
 
117
133
  ```
134
+ ╭───────────────────────────────────────────────────╮
135
+ │ fad-checker v2.2.1 · Autonomous Dependency Checker │
136
+ ╰───────────────────────────────────────────────────╯
118
137
  Executive Summary [CRITICAL] — 1708 dependencies scanned
119
138
  • 81 CVE in production deps (critical=5, high=53, medium=12, low=11)
120
- • 32 CVE in dev/test deps
121
- 17 vulnerable vendored JS finding(s) (retire.js)
122
- • 2 end-of-life frameworks
123
- • 13 obsolete / deprecated libs
124
- • 172 outdated libs
139
+ • 32 CVE in dev/test deps · 17 vulnerable vendored JS (retire.js)
140
+ 2 EOL frameworks · 13 obsolete/deprecated · 172 outdated
125
141
  • 4 scan-completeness alerts — see chapter 0
126
-
127
- 0. Warnings & scan-completeness (4)
128
- 1. CVE Vulnerabilities — production (81)
129
- 1.a Maven (49)
130
- 1.a.0 All (49)
131
- By pom.xml (14 files)
132
- build/building/pom.xml (17)
133
- services/api/pom.xml (17)
134
- … 12 more
135
- 1.b npm (package-lock) (32)
136
- 1.b.0 All (32)
137
- By package-lock.json (1 file)
138
- web/package-lock.json (32)
139
- 2. CVE in dev dependencies (32)
140
- 3. Vendored JS scan — retire.js (17)
141
- 4. End-of-Life Frameworks (2)
142
- 5. Obsolete / Deprecated Libraries (13)
143
- 6. Outdated Libraries (172)
144
- 7. Fix Recommendations
145
142
  ```
146
143
 
147
- Each CVE row shows: severity badge · CVE / GHSA id · dep coord & version · which manifest file declares it · source(s) (CVEProject / OSV / NVD / Snyk / retire / fad) · fix-version · summary. Click a row for the full panel (CVSS vectors, NVD references categorised by type, transitive paths, CPE configurations).
144
+ The HTML report organises this into chapters (0 Warnings, 1 CVE prod, 1B embedded JARs,
145
+ 1C native binaries, 1D vendored-JS inventory, 2 vendored-JS vulns, 3 dev CVE, 4 EOL,
146
+ 5 obsolete, 6 outdated, 7 Licenses *(opt-in)*, 8 Fix Recommendations), each grouped by
147
+ ecosystem and manifest. Every CVE row carries: severity badge · CVE/GHSA id · coord &
148
+ version · declaring manifest · source(s) · fix-version · priority (KEV/EPSS) — click for
149
+ the full panel (CVSS vectors, references, transitive paths, CPE configs).
148
150
 
149
151
  ---
150
152
 
@@ -184,52 +186,30 @@ fad-checker --completion zsh > ~/.zsh/completions/_fad-checker
184
186
 
185
187
  ## How it scans without any build tool
186
188
 
187
- This is the surprising bit. The whole point is that you can run `fad-checker` against a *checkout* with no build environment.
188
-
189
- - **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.
190
- - **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`.
191
- - **Composer (PHP)** `composer.lock` (`packages` + `packages-dev`) gives concrete + transitive versions; `composer.json` alone is best-effort.
192
- - **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`).
193
- - **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.
194
- - **Go** `go.mod` `require` entries are the selected versions (full pruned graph on Go ≥1.17; `// indirect` transitive), `go.sum` as fallback. OSV "Go" ecosystem for recall, the Go module proxy for outdated.
195
- - **Ruby** `Gemfile.lock` `specs:` give the resolved gem set. OSV "RubyGems" for recall, the RubyGems API for outdated + licenses.
196
- - **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.
197
- - **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.
198
- - **Embedded JARs** committed `.jar` / `.war` / `.ear` archives are unzipped **in memory** (via `fflate` — nested fat-jar libs are recursed without ever touching disk, so there's no zip-slip risk) and each artifact's Maven coordinate is read from `META-INF/maven/.../pom.properties` (authoritative), then `MANIFEST.MF`, then the file name. Those coordinates run through the same CVE/OSV/NVD matching as declared deps but report in their own **Embedded binaries** chapter, grouped by containing archive. An archive whose coordinate can't be resolved is flagged in chapter 0 rather than scanned blindly. Auto when archives are present; disable with `--no-jars`. (Embedded coords don't trigger Maven Central transitive resolution — a fat-jar already ships its dependencies, which the recursion finds directly.)
199
- - **CVE data** — three independent sources merged:
200
- - **CVEProject** (the canonical `cvelistV5` bundle, filtered to Maven-relevant entries)
201
- - **OSV.dev** (Google + GitHub Security Lab, multi-ecosystem)
202
- - **NVD** (official NIST records, used for enrichment: full CVSS, references, CPE configurations)
203
- - **CPE refinement** — once a CVE is matched, its NVD CPE configurations are checked against the dep version range. A match outside the vulnerable range is flagged `cpeFiltered: true` (likely false positive). A curated `data/cpe-coord-map.json` maps CPE `vendor:product` to Maven `g:a` (60+ entries seeded: log4j, jackson, spring, tomcat, jetty, netty, …).
204
- - **Prioritization** — each matched CVE is enriched with **EPSS** (FIRST.org exploit-prediction percentile) and **CISA KEV** (known-exploited catalogue), then scored: KEV (exploited in the wild) outranks EPSS-weighted CVSS. The report sorts by this composite priority and badges KEV/EPSS.
205
- - **Licenses** — each dependency's license is resolved (registry metadata, no extra request; Maven from cached POMs), normalised to SPDX and classified against a copyleft policy (`data/license-policy.json`) — permissive / weak / strong / network copyleft / proprietary / unknown.
206
- - **Unified outputs** — one `--report-<type>` flag per output, each with an OPTIONAL path (omit it → a default name under `--report-output`): `--report-html`, `--report-doc`, plus the machine-readable `--report-sbom` (**CycloneDX 1.6**, vulnerabilities inline / VDR), `--report-csaf` (**CSAF 2.0 VEX**), `--report-json` (flat findings, diff-friendly) and `--report-sarif` (**SARIF 2.1.0** for GitHub/GitLab code scanning). With no `--report-*` flag, HTML + `.doc` are written by default; `--no-report` writes nothing (gate-only). purls per ecosystem.
207
- - **CI gating & triage** — `--fail-on <low|medium|high|critical|kev>` sets a non-zero exit code (`kev` = fail only on a CISA-known-exploited finding). `--ignore <file>` (CVE/coord/glob rules) and `--vex <file>` (ingest a CSAF VEX) suppress accepted-risk / false-positive findings from the report and the gate, while keeping them flagged in the exports — so re-audits stay signal-rich.
189
+ **TL;DR** `fad-checker` never runs your build. For each ecosystem it reads the **lockfile** (or, failing that, the manifest's pinned versions) straight off disk to learn the exact dependency versions, then matches those coordinates against vulnerability/EOL/registry data over the network (cached, `--offline`-able). No `mvn`, `npm install`, `pip`, `dotnet restore`, `go build` or `bundle` — and no `node_modules/`.
190
+
191
+ | Ecosystem | Read directly | Transitive versions come from |
192
+ | --- | --- | --- |
193
+ | Maven | `pom.xml` (+ parents, BOMs, profiles) | child POMs fetched from Maven Central (cached) |
194
+ | npm / Yarn / pnpm | `package-lock.json` · `yarn.lock` (v1+Berry) · `pnpm-lock.yaml` | the lockfile itself |
195
+ | Composer | `composer.lock` (else `composer.json`) | the lockfile |
196
+ | PyPI | `poetry.lock` · `Pipfile.lock` · `uv.lock` · `pdm.lock` (else `pyproject.toml`/`requirements.txt`) | the lockfile |
197
+ | NuGet | `packages.lock.json` (else `*.csproj`/`packages.config`) | the lockfile |
198
+ | Go | `go.mod` (`// indirect` transitive; `go.sum` fallback) | the module graph in `go.mod` |
199
+ | Ruby | `Gemfile.lock` (`specs:`) | the lockfile |
200
+ | Vendored JS / binaries | the committed `.js` / `.jar` / `.so` files themselves | n/a (read in place) |
201
+
202
+ Highlights of the matching layer: **three CVE sources merged** (CVEProject + OSV.dev + NVD), **CPE/version cross-check** to drop false positives, **EPSS + CISA KEV** prioritisation, lockfile-first with a **best-effort pinned-version fallback** when no lockfile, in-memory **embedded-JAR** unzip (no disk, no zip-slip), and **checksum identity** for native binaries. Outputs: HTML + `.doc` by default, plus opt-in `--report-sbom`/`-csaf`/`-json`/`-sarif`; CI gating via `--fail-on` with `--ignore`/`--vex` triage.
203
+
204
+ > Full per-ecosystem and per-stage detail lives in **[`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md)** and **[`docs/USAGE.md`](docs/USAGE.md)**.
208
205
 
209
206
  ---
210
207
 
211
208
  ## Caching
212
209
 
213
- All cached data lives in `~/.fad-checker/`:
214
-
215
- | Cache | Path | TTL |
216
- | --- | --- | --- |
217
- | Maven CVE index (CVEProject bundle, filtered) | `cve-data/maven-cve-index.json` | 24 h |
218
- | OSV per-dep lookups | `osv-cache/<ecosystem>__<g>__<a>__<v>.json` | 12 h |
219
- | OSV vuln details | `osv-cache/vuln_<id>.json` | 12 h |
220
- | NVD CVE records | `nvd-cache/<cveId>.json` | 7 d |
221
- | EPSS scores (FIRST.org) | `epss-cache.json` | 24 h |
222
- | CISA KEV catalogue | `kev-cache.json` | 24 h |
223
- | Go module proxy (latest) | `go-proxy-cache.json` | 24 h |
224
- | RubyGems (latest + licenses) | `rubygems-cache.json` | 24 h |
225
- | endoflife.date cycles | `eol-cache.json` | 7 d |
226
- | Maven Central latest versions | `version-cache.json` | 24 h |
227
- | Transitive POMs from Maven Central | `poms-cache/<g>__<a>__<v>.pom` | ∞ (immutable) |
228
- | retire.js findings | `retire-cache/<md5(src)>.json` | 24 h |
229
- | retire.js signature DB | `retire-signatures/jsrepository-v5.json` | warmed online, used offline |
230
- | User config (NVD key) | `config.json` (mode 0600) | — |
231
-
232
- Export the lot to share between machines:
210
+ All cached data lives in `~/.fad-checker/` — every source is hit at most once per its
211
+ TTL (12 h–7 d, transitive POMs forever as they're immutable). Full per-cache TTL table
212
+ in [`docs/USAGE.md`](docs/USAGE.md). Export the lot to share between machines:
233
213
 
234
214
  ```bash
235
215
  fad-checker --export-cache fad-cache.tar.gz
@@ -288,24 +268,30 @@ DB is warmed online (phase 2) and carried by `--export-cache`.
288
268
 
289
269
  ---
290
270
 
291
- ## Custom Maven repositories
271
+ ## Custom repositories & registries
272
+
273
+ Register private **Nexus / Artifactory / Verdaccio / devpi / GOPROXY** registries (for **`maven`, `npm`, `pypi`, `ruby`, `go`**) so transitive resolution, outdated/deprecation and license lookups reach them:
274
+
275
+ ```bash
276
+ fad-checker --add-repo maven nexus https://nexus.acme.com/repository/maven-public/ --auth alice:s3cr3t
277
+ fad-checker --add-repo npm verdaccio https://npm.acme.com/ --token "$NPM_TOKEN"
278
+ fad-checker -s ./proj --repo npm=https://npm.acme.com/ # one-off, repeatable
279
+ ```
280
+
281
+ Tried in declared order, public registry last; auth via `--auth user:pass` / `--token TOK` / inline URL; responses cached per coordinate. NuGet/Composer private feeds aren't supported yet. **Full details, the PyPI/Ruby JSON-API caveat and `--list-repos`/`--remove-repo` → [`docs/USAGE.md`](docs/USAGE.md).**
282
+
283
+ ---
284
+
285
+ ## Configuration file & environment
292
286
 
293
- Out of the box `fad-checker` queries Maven Central for transitive POMs and latest versions. If your project depends on artifacts that live on a private Nexus / Artifactory / JBoss repo, add them so transitive resolution and outdated checks work end-to-end.
287
+ Don't retype flags every run. Precedence: **CLI flag > `--config <file.json>` / `./.fad-env.json` (JSON, keys = camelCase options) > `FAD_CHECKER_ENV` (a string of CLI flags) > `~/.fad-checker/config.json` > defaults.** A file/env value only fills an option you didn't pass; **registries are merged across every layer**.
294
288
 
295
289
  ```bash
296
- # Persist a repo (lives in ~/.fad-checker/config.json)
297
- fad-checker --add-repo nexus https://nexus.acme.com/repository/maven-public/
298
- fad-checker --add-repo nexus-priv https://nexus.acme.com/repository/maven-private/ --auth alice:s3cr3t
299
- fad-checker --list-repos
300
- fad-checker --remove-repo nexus-priv
301
-
302
- # One-off (not persisted) — repeatable
303
- fad-checker -s ./proj --repo https://nexus.acme.com/repository/maven-public/
304
- # Inline auth in the URL also works:
305
- fad-checker -s ./proj --repo https://alice:s3cr3t@nexus.acme.com/repository/maven-public/
290
+ fad-checker --config ./ci/fad-env.json
291
+ FAD_CHECKER_ENV='--fail-on high --no-nuget' fad-checker -s ./proj
306
292
  ```
307
293
 
308
- Repos are tried **in declared order, Maven Central last**. Auth is sent as a `Basic <base64>` header. POMs and `maven-metadata.xml` are cached per coord, so subsequent runs are free even against a private repo.
294
+ `-s` / `--src` / `--source` are aliases. **`-e/--exclude`** is a regex on the **coordinate** (drops deps); **`--exclude-path`** is a gitignore-style glob on the **path** (prunes the walk). Full `.fad-env.json` schema [`docs/USAGE.md`](docs/USAGE.md).
309
295
 
310
296
  ---
311
297
 
@@ -328,6 +314,8 @@ Repos are tried **in declared order, Maven Central last**. Auth is sent as a `Ba
328
314
  | [NuGet](https://www.nuget.org/) | Latest stable + per-version `deprecation` | Free public service | `GET api.nuget.org/v3/registration5-gz-semver2/<id>/index.json` |
329
315
  | [Go module proxy](https://proxy.golang.org/) | Latest module version (outdated) | Free public service | `GET proxy.golang.org/<module>/@latest` |
330
316
  | [RubyGems](https://rubygems.org/) | Latest stable + licenses | Free public service | `GET rubygems.org/api/v1/gems/<gem>.json` |
317
+ | [deps.dev](https://deps.dev/) | Native-binary identity by checksum (→ package coordinate) | Free public API (CC-BY) | `GET api.deps.dev/v3/query?hash.type=SHA1&hash.value=<base64>` |
318
+ | [CIRCL hashlookup](https://hashlookup.circl.lu/) | Known-good file identity (NSRL/distro/CDN) + KnownMalicious | Free public service | `GET hashlookup.circl.lu/lookup/sha256/<hash>` |
331
319
  | [retire.js](https://retirejs.github.io/retire.js/) | Vendored-JS signature DB + scanner | Apache-2.0 | npm package `retire`, executed locally |
332
320
  | [Snyk](https://snyk.io/) (optional) | Additional CVE source via `snyk test --all-projects --json` | Per Snyk EULA; needs a Snyk account | Local CLI `snyk` |
333
321
  | [MITRE CWE](https://cwe.mitre.org/) | Weakness category links in the report | Free public reference | Linked by URL only, no API call |
@@ -355,7 +343,7 @@ of thing a security consultant or an ANSSI-PASSI engagement needs.
355
343
 
356
344
  | | **fad-checker** | OSV-Scanner | Trivy | Grype + Syft | OWASP DC | Snyk OSS |
357
345
  | --- | --- | --- | --- | --- | --- | --- |
358
- | Ecosystems it targets¹ | Maven, npm, Yarn, **pnpm**, Composer, PyPI, NuGet, Go, Ruby + vendored JS | 11+ langs / 19+ lockfiles | 20+ | 20+ | Java/.NET (others exp.) | many |
346
+ | Ecosystems it targets¹ | Maven, npm, Yarn, **pnpm**, Composer, PyPI, NuGet, Go, Ruby + vendored JS + **native binaries** | 11+ langs / 19+ lockfiles | 20+ | 20+ | Java/.NET (others exp.) | many |
359
347
  | Reads lockfiles without `install`/build | ✅ | ✅ | ✅ | ✅ | ⚠️ Java needs Maven Central/build | ❌ build required |
360
348
  | Best-effort when **no lockfile** (pinned versions) | ✅ | ❌ | ❌ | ❌ | ⚠️ | ⚠️ |
361
349
  | Vulnerability sources | CVEProject + OSV + NVD + EPSS + KEV + retire.js (+ Snyk), merged | OSV.dev | Aqua DB | Anchore DB | NVD / CPE | Snyk DB |
@@ -6,7 +6,7 @@ _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 --no-epss --no-kev --no-licenses --no-retire --retire-refresh --report-output --report-html --report-doc --report-sbom --report-csaf --report-json --report-sarif --fail-on --ignore --vex --ignore-test --cve-refresh --cve-offline --snyk --transitive-depth --offline --ecosystem --no-maven --no-npm --no-yarn --no-nuget --no-composer --no-pypi --no-go --no-ruby --no-jars --no-js --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-epss --no-kev --licenses --no-retire --retire-refresh --report-output --report-html --report-doc --report-sbom --report-csaf --report-json --report-sarif --fail-on --ignore --vex --ignore-test --cve-refresh --cve-offline --snyk --transitive-depth --offline --ecosystem --no-maven --no-npm --no-yarn --no-nuget --no-composer --no-pypi --no-go --no-ruby --no-jars --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") )
@@ -42,6 +42,7 @@ _fad_check() {
42
42
  '--no-pypi[skip the PyPI codec]'
43
43
  '--no-js[alias: skip JS/npm/yarn]'
44
44
  '--no-retire[skip retire.js vendored-JS scan]'
45
+ '--licenses[run license detection + copyleft policy (off by default)]'
45
46
  '--completion[print shell completion]:shell:(bash zsh)'
46
47
  )
47
48
  _arguments $opts