cra-audit 2.4.0 → 2.4.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
@@ -8,6 +8,13 @@ Releases are automated: pushing a `vX.Y.Z` tag publishes the package to npm
8
8
  (with provenance) and creates the GitHub Release from the matching section
9
9
  below, so add the section before running `npm version`.
10
10
 
11
+ ## [2.4.1] — Clearer CRA Art. 14 notice
12
+
13
+ ### Changed
14
+
15
+ - The Art. 14 notice is now headed **"dependency with a known exploited vulnerability (CISA KEV)"** instead of "actively exploited vulnerability in a dependency". A KEV match means the vulnerability has been exploited somewhere; the reporting duty applies once you are aware that it is exploitable in your product (CRA Art. 3(42) and Art. 14(1)). The 24 h / 72 h / 14 days deadlines run from that awareness, not from the KEV listing.
16
+ - README and the Spanish INCIBE-CERT guide describe KEV matches as a trigger to assess and document with VEX, not as a started reporting clock.
17
+
11
18
  ## [2.4.0] — Report to your country's CSIRT (INCIBE-CERT for Spain)
12
19
 
13
20
  ### Highlights
package/README.md CHANGED
@@ -55,13 +55,13 @@ Checks every **direct and transitive** dependency, at the exact version pinned i
55
55
  | --- | --- | --- |
56
56
  | [OSV.dev](https://osv.dev) — GitHub Advisory Database | Known vulnerabilities, with severity, CVE aliases and the version that fixes them | Fails at or above `--fail-on` (default `high`) |
57
57
  | OSV.dev — [OpenSSF malicious packages](https://github.com/ossf/malicious-packages) | Compromised releases (`MAL-*`), e.g. the Shai-Hulud worm versions | **Always fails**; cannot be allowlisted |
58
- | [CISA KEV](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) | Vulnerabilities with evidence of **active exploitation** | Fails by default (`--no-fail-on-kev` to only warn) and prints the CRA Art. 14 reporting clock |
58
+ | [CISA KEV](https://www.cisa.gov/known-exploited-vulnerabilities-catalog) | Vulnerabilities with evidence of **active exploitation** | Fails by default (`--no-fail-on-kev` to only warn) and shows the CRA Art. 14 deadlines that apply if it affects your product |
59
59
 
60
60
  ```text
61
61
  HIGH [KEV] vite@6.2.3 (fix: vite@6.4.3)
62
62
  GHSA-4r4m-qw57-chr8 / CVE-2025-31125 Vite has a `server.fs.deny` bypassed … [KEV since 2026-01-22]
63
63
 
64
- ⚠ CRA Art. 14 — actively exploited vulnerability in a dependency
64
+ ⚠ CRA Art. 14 — dependency with a known exploited vulnerability (CISA KEV)
65
65
  • Early warning ........ within 24 hours of becoming aware
66
66
  • Notification ......... within 72 hours
67
67
  • Final report ......... within 14 days after a corrective measure is available
@@ -69,7 +69,7 @@ Checks every **direct and transitive** dependency, at the exact version pinned i
69
69
 
70
70
  Only package names and versions are sent to `api.osv.dev`; the KEV catalogue is downloaded from cisa.gov (or CISA's GitHub mirror). If KEV cannot be reached the report says so instead of silently passing, and if OSV.dev is unreachable the audit falls back to `npm audit`. `--vuln-source npm` uses `npm audit` directly.
71
71
 
72
- > CRA Annex I Part I (2)(a) — *placed on the market without known exploitable vulnerabilities*. Art. 14 — *actively exploited vulnerabilities must be reported within 24 hours*.
72
+ > CRA Annex I Part I (2)(a) — *placed on the market without known exploitable vulnerabilities*. Art. 14 — *any actively exploited vulnerability contained in the product* must be notified, with an early warning within 24 hours of becoming aware. A KEV match means the vulnerability has been exploited somewhere: assess whether it is exploitable in your product and record the decision with VEX.
73
73
 
74
74
  ### 3. Third-party component check
75
75
 
@@ -171,7 +171,7 @@ Findings point at the exact line of the manifest (in the console and in SARIF).
171
171
 
172
172
  **Input SBOM (`-i`), any language:**
173
173
 
174
- `audit`, `vuln`, `licenses` and `vex` accept an existing **CycloneDX JSON**, **SPDX 2.x JSON** or **SPDX 3.0 JSON-LD** SBOM instead of the npm lockfile. Every component is looked up in OSV.dev by its **Package URL**, so you get the same checks — known vulnerabilities, **malicious packages**, **CISA KEV** with the Art. 14 clock, licenses, VEX and SARIF — for any ecosystem OSV covers (Maven, PyPI, Go, crates.io, NuGet, Packagist, RubyGems, Hex, Pub, npm…).
174
+ `audit`, `vuln`, `licenses` and `vex` accept an existing **CycloneDX JSON**, **SPDX 2.x JSON** or **SPDX 3.0 JSON-LD** SBOM instead of the npm lockfile. Every component is looked up in OSV.dev by its **Package URL**, so you get the same checks — known vulnerabilities, **malicious packages**, **CISA KEV** with the Art. 14 deadlines, licenses, VEX and SARIF — for any ecosystem OSV covers (Maven, PyPI, Go, crates.io, NuGet, Packagist, RubyGems, Hex, Pub, npm…).
175
175
 
176
176
  ```bash
177
177
  # Generate the SBOM with the tool of your ecosystem…
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cra-audit",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Audits npm, yarn, and pnpm projects for compliance with the European Cyber Resilience Act (CRA, EU Regulation 2024/2847) and BSI TR-03183: SBOM (CycloneDX/SPDX), known vulnerabilities, third-party components, and licenses.",
5
5
  "homepage": "https://github.com/migohe14/cra-audit#readme",
6
6
  "repository": {
package/src/core/kev.js CHANGED
@@ -6,7 +6,9 @@ const { fetchJson } = require('../utils/http');
6
6
  * CISA Known Exploited Vulnerabilities catalogue: the most complete public
7
7
  * list of vulnerabilities with evidence of active exploitation. Under CRA
8
8
  * Art. 14 (applicable since 11 September 2026) manufacturers must report
9
- * actively exploited vulnerabilities in their products within 24 hours.
9
+ * actively exploited vulnerabilities contained in their products within 24
10
+ * hours of becoming aware. A KEV match is a signal to assess, not a report
11
+ * by itself: the vulnerability must be exploitable in the product.
10
12
  *
11
13
  * The GitHub mirror maintained by CISA is used when the primary feed fails.
12
14
  */
@@ -20,8 +20,8 @@ const DEFAULT_POLICY = {
20
20
  sbomCreator: null,
21
21
  // Vulnerability source: `osv` (OSV.dev + CISA KEV) or `npm` (npm audit).
22
22
  vulnerabilitySource: 'osv',
23
- // Fail when a dependency has an actively exploited vulnerability (CISA KEV),
24
- // the trigger of the CRA Art. 14 reporting obligation.
23
+ // Fail when a dependency has an actively exploited vulnerability (CISA KEV):
24
+ // if it is exploitable in the product, CRA Art. 14 reporting applies.
25
25
  failOnKev: true,
26
26
  // ISO 3166-1 alpha-2 country of the manufacturer's main establishment: it
27
27
  // decides the CSIRT that receives CRA Art. 14 notifications (e.g. "ES").
@@ -100,7 +100,7 @@ function describeSources(section) {
100
100
  function renderArticle14Notice(reporting) {
101
101
  const local = reporting && reporting.local;
102
102
  logger.log('');
103
- logger.warn(color.bold('CRA Art. 14 — actively exploited vulnerability in a dependency'));
103
+ logger.warn(color.bold('CRA Art. 14 — dependency with a known exploited vulnerability (CISA KEV)'));
104
104
  logger.detail('If it affects a product with digital elements you place on the EU market, notify');
105
105
  logger.detail(`${local ? `${local.csirt} and ENISA` : 'the coordinating CSIRT and ENISA'} through the Single Reporting Platform (SRP):`);
106
106
  logger.detail(' • Early warning ........ within 24 hours of becoming aware');