cra-audit 2.4.1 → 2.4.2
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 +7 -0
- package/README.md +8 -5
- package/package.json +1 -1
- package/src/core/auditor.js +1 -1
- package/src/reporters/console.js +7 -7
- package/src/reporters/sarif.js +1 -1
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.2] — Art. 14 notice: assess exploitability first
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- The Art. 14 notice now reads **"applies if this known exploited (CISA KEV) vulnerability is exploitable in your product"** and leads with the assessment: not exploitable → record a `not_affected` VEX statement; exploitable → notify the coordinating CSIRT and ENISA within 24 h / 72 h / 14 days of becoming aware.
|
|
16
|
+
- The audit check label and the SARIF message say "CRA Art. 14 reporting applies if exploitable in your product" instead of "may apply".
|
|
17
|
+
|
|
11
18
|
## [2.4.1] — Clearer CRA Art. 14 notice
|
|
12
19
|
|
|
13
20
|
### Changed
|
package/README.md
CHANGED
|
@@ -55,16 +55,19 @@ 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 shows the CRA Art. 14 deadlines that apply if it
|
|
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 is exploitable in 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 —
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
⚠ CRA Art. 14 — applies if this known exploited (CISA KEV) vulnerability is exploitable in your product
|
|
65
|
+
Assess first: is the vulnerable code shipped and exploitable in your product?
|
|
66
|
+
• Not exploitable ...... record it as not_affected with VEX (cra-audit vex)
|
|
67
|
+
• Exploitable .......... notify the coordinating CSIRT and ENISA through the Single Reporting Platform (SRP):
|
|
68
|
+
Early warning ...... within 24 hours of becoming aware
|
|
69
|
+
Notification ....... within 72 hours
|
|
70
|
+
Final report ....... within 14 days after a corrective measure is available
|
|
68
71
|
```
|
|
69
72
|
|
|
70
73
|
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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cra-audit",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
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/auditor.js
CHANGED
|
@@ -189,7 +189,7 @@ function exploitationReasons(vulns, policy) {
|
|
|
189
189
|
reasons.push({
|
|
190
190
|
label: exploited.length === 0
|
|
191
191
|
? 'No actively exploited vulnerabilities (CISA KEV)'
|
|
192
|
-
: `${exploited.length} component(s) with actively exploited vulnerabilities (CISA KEV) — CRA Art. 14 reporting
|
|
192
|
+
: `${exploited.length} component(s) with actively exploited vulnerabilities (CISA KEV) — CRA Art. 14 reporting applies if exploitable in your product`,
|
|
193
193
|
passed: exploited.length === 0 || policy.failOnKev === false,
|
|
194
194
|
warning: exploited.length > 0 && policy.failOnKev === false,
|
|
195
195
|
});
|
package/src/reporters/console.js
CHANGED
|
@@ -100,13 +100,13 @@ 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 —
|
|
104
|
-
logger.detail('
|
|
105
|
-
logger.detail(
|
|
106
|
-
logger.detail(
|
|
107
|
-
logger.detail('
|
|
108
|
-
logger.detail('
|
|
109
|
-
logger.detail('
|
|
103
|
+
logger.warn(color.bold('CRA Art. 14 — applies if this known exploited (CISA KEV) vulnerability is exploitable in your product'));
|
|
104
|
+
logger.detail('Assess first: is the vulnerable code shipped and exploitable in your product?');
|
|
105
|
+
logger.detail(' • Not exploitable ...... record it as not_affected with VEX (cra-audit vex)');
|
|
106
|
+
logger.detail(` • Exploitable .......... notify ${local ? `${local.csirt} and ENISA` : 'the coordinating CSIRT and ENISA'} through the Single Reporting Platform (SRP):`);
|
|
107
|
+
logger.detail(' Early warning ...... within 24 hours of becoming aware');
|
|
108
|
+
logger.detail(' Notification ....... within 72 hours');
|
|
109
|
+
logger.detail(' Final report ....... within 14 days after a corrective measure is available');
|
|
110
110
|
if (local) {
|
|
111
111
|
logger.log('');
|
|
112
112
|
logger.detail(color.bold(`${local.csirt} (${local.country}) — access to the SRP:`));
|
package/src/reporters/sarif.js
CHANGED
|
@@ -142,7 +142,7 @@ function vulnerabilityMessage(finding, source) {
|
|
|
142
142
|
return `[MALICIOUS] ${pkg} is a known compromised release (${source.id}). Remove it and rotate exposed credentials.`;
|
|
143
143
|
}
|
|
144
144
|
const parts = [];
|
|
145
|
-
if (source.kev) parts.push(`[ACTIVELY EXPLOITED — CISA KEV since ${source.kev.dateAdded}; CRA Art. 14 reporting
|
|
145
|
+
if (source.kev) parts.push(`[ACTIVELY EXPLOITED — CISA KEV since ${source.kev.dateAdded}; CRA Art. 14 reporting applies if exploitable in your product]`);
|
|
146
146
|
parts.push(`${pkg}: ${source.title || source.id}`);
|
|
147
147
|
const cves = (source.aliases || []).filter((a) => /^CVE-/i.test(a));
|
|
148
148
|
if (cves.length) parts.push(`(${cves.join(', ')})`);
|