@blamejs/exceptd-skills 0.18.27 → 0.18.29

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.
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * lib/currency-severity.js
5
+ *
6
+ * Pure function used by the `exceptd doctor` verb to turn a currency report
7
+ * into a health verdict.
8
+ *
9
+ * The scoring model in orchestrator/pipeline.js grades every skill on four
10
+ * labels — current (score >= 90), acceptable (70-89), stale (50-69),
11
+ * critical_stale (< 50) — and raises `action_required` only below 70. The
12
+ * pre-extraction predicate in the doctor ignored that ladder and failed on
13
+ * `currency_label !== "current"`, which folded the acceptable tier in with
14
+ * genuine staleness.
15
+ *
16
+ * That made the health check a scheduled failure rather than a signal: a
17
+ * skill's score drops from 90 to 80 the day it crosses 90 days since
18
+ * `last_threat_review`, so any skill will turn `doctor` red on a fixed
19
+ * cadence with no code change and nothing actually wrong.
20
+ *
21
+ * The tiers now map to severity the way the model defines them:
22
+ *
23
+ * current → healthy, no entry in either bucket
24
+ * acceptable (drifting) → severity:"warn", ok:true, exit 0
25
+ * stale / critical_stale → ok:false (error), exit 1
26
+ *
27
+ * `stale_skills` keeps its original meaning — every skill that is not
28
+ * `current` — so an existing consumer reading it still sees the full picture.
29
+ * `drifting_skills` and `action_required_skills` split that list along the
30
+ * boundary the exit code now respects.
31
+ */
32
+
33
+ /**
34
+ * @param {object[]} report currency_report rows from currencyCheck()
35
+ * @param {boolean} actionRequired the report-level action_required flag
36
+ * @returns {{ok: boolean, severity: string|null, stale: object[], drifting: object[], actionable: object[], critical: object[]}}
37
+ */
38
+ function classifyCurrency(report, actionRequired) {
39
+ const rows = Array.isArray(report) ? report.filter(r => r && typeof r === "object") : [];
40
+
41
+ const stale = rows.filter(s => s.action_required || s.currency_label !== "current");
42
+ const drifting = rows.filter(s => !s.action_required && s.currency_label !== "current");
43
+ const actionable = rows.filter(s => s.action_required);
44
+ const critical = rows.filter(s => s.currency_score !== undefined && s.currency_score < 50);
45
+
46
+ // The report-level flag is honored even when no row carries action_required,
47
+ // so an upstream that raises the flag some other way still fails closed.
48
+ const ok = actionable.length === 0 && !actionRequired;
49
+
50
+ return {
51
+ ok,
52
+ severity: ok && drifting.length > 0 ? "warn" : null,
53
+ stale,
54
+ drifting,
55
+ actionable,
56
+ critical,
57
+ };
58
+ }
59
+
60
+ module.exports = { classifyCurrency };
@@ -29,9 +29,11 @@ const ABS = (p) => path.join(ROOT, p);
29
29
  // index spans the full series. Packed size crossed 5 MB through that gradual
30
30
  // growth; 7 MB restored headroom. Completing five-jurisdiction framework-gap
31
31
  // coverage across the whole catalog added ~1,100 curated statements plus their
32
- // reverse-reference index, crossing 7 MB; 8 MB restores headroom while still
33
- // catching a gross-bloat accident.
34
- const SIZE_BUDGET_BYTES = 8 * 1024 * 1024;
32
+ // reverse-reference index, crossing 7 MB; 8 MB restored headroom. Curating a
33
+ // further hundred KEV CVEs — each with its indicators, five framework-gap
34
+ // statements and a paired zero-day lesson — crossed 8 MB; 9 MB restores
35
+ // headroom while still catching a gross-bloat accident.
36
+ const SIZE_BUDGET_BYTES = 9 * 1024 * 1024;
35
37
 
36
38
  const REQUIRED_PATHS = [
37
39
  "package.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "_comment": "Auto-generated by scripts/refresh-manifest-snapshot.js — do not hand-edit. Public skill surface used by check-manifest-snapshot.js to detect breaking removals.",
3
- "_generated_at": "2026-07-03T23:19:50.905Z",
3
+ "_generated_at": "2026-08-07T01:15:16.284Z",
4
4
  "atlas_version": "2026.06",
5
5
  "skill_count": 51,
6
6
  "skills": [
@@ -1093,6 +1093,7 @@
1093
1093
  ],
1094
1094
  "data_deps": [
1095
1095
  "atlas-ttps.json",
1096
+ "d3fend-catalog.json",
1096
1097
  "exploit-availability.json",
1097
1098
  "framework-control-gaps.json",
1098
1099
  "global-frameworks.json"
@@ -1102,7 +1103,21 @@
1102
1103
  "framework_gaps": [],
1103
1104
  "rfc_refs": [],
1104
1105
  "cwe_refs": [],
1105
- "d3fend_refs": [],
1106
+ "d3fend_refs": [
1107
+ "D3-CSPP",
1108
+ "D3-EAL",
1109
+ "D3-EFA",
1110
+ "D3-FAPA",
1111
+ "D3-FE",
1112
+ "D3-IOPR",
1113
+ "D3-KBPI",
1114
+ "D3-MENCR",
1115
+ "D3-MFA",
1116
+ "D3-NI",
1117
+ "D3-NTA",
1118
+ "D3-OTF",
1119
+ "D3-SCA"
1120
+ ],
1106
1121
  "dlp_refs": []
1107
1122
  },
1108
1123
  {
@@ -1847,7 +1862,8 @@
1847
1862
  "RFC-9106",
1848
1863
  "RFC-9180",
1849
1864
  "RFC-9420",
1850
- "RFC-9794"
1865
+ "RFC-9794",
1866
+ "RFC-9954"
1851
1867
  ],
1852
1868
  "cwe_refs": [
1853
1869
  "CWE-327"
@@ -2403,17 +2419,35 @@
2403
2419
  "data_deps": [
2404
2420
  "atlas-ttps.json",
2405
2421
  "cve-catalog.json",
2422
+ "d3fend-catalog.json",
2406
2423
  "framework-control-gaps.json",
2407
- "global-frameworks.json"
2424
+ "global-frameworks.json",
2425
+ "rfc-references.json"
2408
2426
  ],
2409
2427
  "atlas_refs": [],
2410
2428
  "attack_refs": [],
2411
2429
  "framework_gaps": [],
2412
- "rfc_refs": [],
2430
+ "rfc_refs": [
2431
+ "RFC-9954"
2432
+ ],
2413
2433
  "cwe_refs": [
2414
2434
  "CWE-1188"
2415
2435
  ],
2416
- "d3fend_refs": [],
2436
+ "d3fend_refs": [
2437
+ "D3-CSPP",
2438
+ "D3-EAL",
2439
+ "D3-EFA",
2440
+ "D3-FAPA",
2441
+ "D3-IOPR",
2442
+ "D3-ITF",
2443
+ "D3-KBPI",
2444
+ "D3-MENCR",
2445
+ "D3-MFA",
2446
+ "D3-NI",
2447
+ "D3-NTA",
2448
+ "D3-OTF",
2449
+ "D3-SCA"
2450
+ ],
2417
2451
  "dlp_refs": []
2418
2452
  },
2419
2453
  {
@@ -1 +1 @@
1
- 40e7936868a38317067bbb0fef5ec1d7b3b09b7bbbdf0af236fffb95bcf1d3fd manifest-snapshot.json
1
+ 6e9e98ec4fdb230cabdb7493dd35490de7e8f20cbc840886e339cfa1bf7507e2 manifest-snapshot.json