@blamejs/exceptd-skills 0.9.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/AGENTS.md +232 -0
- package/ARCHITECTURE.md +267 -0
- package/CHANGELOG.md +616 -0
- package/CONTEXT.md +203 -0
- package/LICENSE +200 -0
- package/NOTICE +82 -0
- package/README.md +307 -0
- package/SECURITY.md +73 -0
- package/agents/README.md +81 -0
- package/agents/report-generator.md +156 -0
- package/agents/skill-updater.md +102 -0
- package/agents/source-validator.md +119 -0
- package/agents/threat-researcher.md +149 -0
- package/bin/exceptd.js +183 -0
- package/data/_indexes/_meta.json +88 -0
- package/data/_indexes/activity-feed.json +362 -0
- package/data/_indexes/catalog-summaries.json +229 -0
- package/data/_indexes/chains.json +7135 -0
- package/data/_indexes/currency.json +359 -0
- package/data/_indexes/did-ladders.json +451 -0
- package/data/_indexes/frequency.json +2072 -0
- package/data/_indexes/handoff-dag.json +476 -0
- package/data/_indexes/jurisdiction-clocks.json +967 -0
- package/data/_indexes/jurisdiction-map.json +536 -0
- package/data/_indexes/recipes.json +319 -0
- package/data/_indexes/section-offsets.json +3656 -0
- package/data/_indexes/stale-content.json +14 -0
- package/data/_indexes/summary-cards.json +1736 -0
- package/data/_indexes/theater-fingerprints.json +381 -0
- package/data/_indexes/token-budget.json +2137 -0
- package/data/_indexes/trigger-table.json +1374 -0
- package/data/_indexes/xref.json +818 -0
- package/data/atlas-ttps.json +282 -0
- package/data/cve-catalog.json +496 -0
- package/data/cwe-catalog.json +1017 -0
- package/data/d3fend-catalog.json +738 -0
- package/data/dlp-controls.json +1039 -0
- package/data/exploit-availability.json +67 -0
- package/data/framework-control-gaps.json +1255 -0
- package/data/global-frameworks.json +2913 -0
- package/data/rfc-references.json +324 -0
- package/data/zeroday-lessons.json +377 -0
- package/keys/public.pem +3 -0
- package/lib/framework-gap.js +328 -0
- package/lib/job-queue.js +195 -0
- package/lib/lint-skills.js +536 -0
- package/lib/prefetch.js +372 -0
- package/lib/refresh-external.js +713 -0
- package/lib/schemas/cve-catalog.schema.json +151 -0
- package/lib/schemas/manifest.schema.json +106 -0
- package/lib/schemas/skill-frontmatter.schema.json +113 -0
- package/lib/scoring.js +149 -0
- package/lib/sign.js +197 -0
- package/lib/ttp-mapper.js +80 -0
- package/lib/validate-catalog-meta.js +198 -0
- package/lib/validate-cve-catalog.js +213 -0
- package/lib/validate-indexes.js +83 -0
- package/lib/validate-package.js +162 -0
- package/lib/validate-vendor.js +85 -0
- package/lib/verify.js +216 -0
- package/lib/worker-pool.js +84 -0
- package/manifest-snapshot.json +1833 -0
- package/manifest.json +2108 -0
- package/orchestrator/README.md +124 -0
- package/orchestrator/dispatcher.js +140 -0
- package/orchestrator/event-bus.js +146 -0
- package/orchestrator/index.js +874 -0
- package/orchestrator/pipeline.js +201 -0
- package/orchestrator/scanner.js +327 -0
- package/orchestrator/scheduler.js +137 -0
- package/package.json +113 -0
- package/sbom.cdx.json +158 -0
- package/scripts/audit-cross-skill.js +261 -0
- package/scripts/audit-perf.js +160 -0
- package/scripts/bootstrap.js +205 -0
- package/scripts/build-indexes.js +721 -0
- package/scripts/builders/activity-feed.js +79 -0
- package/scripts/builders/catalog-summaries.js +67 -0
- package/scripts/builders/currency.js +109 -0
- package/scripts/builders/cwe-chains.js +105 -0
- package/scripts/builders/did-ladders.js +149 -0
- package/scripts/builders/frequency.js +89 -0
- package/scripts/builders/jurisdiction-clocks.js +126 -0
- package/scripts/builders/recipes.js +159 -0
- package/scripts/builders/section-offsets.js +162 -0
- package/scripts/builders/stale-content.js +171 -0
- package/scripts/builders/summary-cards.js +166 -0
- package/scripts/builders/theater-fingerprints.js +198 -0
- package/scripts/builders/token-budget.js +96 -0
- package/scripts/check-manifest-snapshot.js +217 -0
- package/scripts/predeploy.js +267 -0
- package/scripts/refresh-manifest-snapshot.js +57 -0
- package/scripts/refresh-sbom.js +222 -0
- package/skills/age-gates-child-safety/skill.md +456 -0
- package/skills/ai-attack-surface/skill.md +282 -0
- package/skills/ai-c2-detection/skill.md +440 -0
- package/skills/ai-risk-management/skill.md +311 -0
- package/skills/api-security/skill.md +287 -0
- package/skills/attack-surface-pentest/skill.md +381 -0
- package/skills/cloud-security/skill.md +384 -0
- package/skills/compliance-theater/skill.md +365 -0
- package/skills/container-runtime-security/skill.md +379 -0
- package/skills/coordinated-vuln-disclosure/skill.md +473 -0
- package/skills/defensive-countermeasure-mapping/skill.md +300 -0
- package/skills/dlp-gap-analysis/skill.md +337 -0
- package/skills/email-security-anti-phishing/skill.md +206 -0
- package/skills/exploit-scoring/skill.md +331 -0
- package/skills/framework-gap-analysis/skill.md +374 -0
- package/skills/fuzz-testing-strategy/skill.md +313 -0
- package/skills/global-grc/skill.md +564 -0
- package/skills/identity-assurance/skill.md +272 -0
- package/skills/incident-response-playbook/skill.md +546 -0
- package/skills/kernel-lpe-triage/skill.md +303 -0
- package/skills/mcp-agent-trust/skill.md +326 -0
- package/skills/mlops-security/skill.md +325 -0
- package/skills/ot-ics-security/skill.md +340 -0
- package/skills/policy-exception-gen/skill.md +437 -0
- package/skills/pqc-first/skill.md +546 -0
- package/skills/rag-pipeline-security/skill.md +294 -0
- package/skills/researcher/skill.md +310 -0
- package/skills/sector-energy/skill.md +409 -0
- package/skills/sector-federal-government/skill.md +302 -0
- package/skills/sector-financial/skill.md +398 -0
- package/skills/sector-healthcare/skill.md +373 -0
- package/skills/security-maturity-tiers/skill.md +464 -0
- package/skills/skill-update-loop/skill.md +463 -0
- package/skills/supply-chain-integrity/skill.md +318 -0
- package/skills/threat-model-currency/skill.md +404 -0
- package/skills/threat-modeling-methodology/skill.md +312 -0
- package/skills/webapp-security/skill.md +281 -0
- package/skills/zeroday-gap-learn/skill.md +350 -0
- package/vendor/blamejs/LICENSE +201 -0
- package/vendor/blamejs/README.md +54 -0
- package/vendor/blamejs/_PROVENANCE.json +54 -0
- package/vendor/blamejs/retry.js +335 -0
- package/vendor/blamejs/worker-pool.js +418 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zeroday-gap-learn
|
|
3
|
+
version: "1.0.0"
|
|
4
|
+
description: Run the zero-day learning loop — CVE to attack vector to control gap to framework gap to new control requirement
|
|
5
|
+
triggers:
|
|
6
|
+
- zero day lesson
|
|
7
|
+
- zeroday gap
|
|
8
|
+
- what control gap enabled this
|
|
9
|
+
- learn from exploit
|
|
10
|
+
- exploit to control gap
|
|
11
|
+
- what should have caught this
|
|
12
|
+
- 0day learning
|
|
13
|
+
data_deps:
|
|
14
|
+
- cve-catalog.json
|
|
15
|
+
- zeroday-lessons.json
|
|
16
|
+
- framework-control-gaps.json
|
|
17
|
+
- atlas-ttps.json
|
|
18
|
+
atlas_refs: []
|
|
19
|
+
attack_refs: []
|
|
20
|
+
framework_gaps: []
|
|
21
|
+
forward_watch:
|
|
22
|
+
- New CISA KEV entries
|
|
23
|
+
- New ATLAS TTP additions in each ATLAS release
|
|
24
|
+
- Framework updates that close previously open gaps
|
|
25
|
+
- Vendor advisories for MCP/AI tool supply chain CVEs
|
|
26
|
+
last_threat_review: "2026-05-01"
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# Zero-Day Learning Loop
|
|
30
|
+
|
|
31
|
+
Every significant zero-day is a test of the control landscape. The question is not only "how do we patch this?" — it is "what control, if it had existed and been implemented, would have prevented or detected this?" The answer tells us what frameworks are missing.
|
|
32
|
+
|
|
33
|
+
This skill runs the full learning loop: zero-day description → attack vector extraction → control gap identification → framework coverage assessment → new control requirement generation → exposure scoring.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Threat Context (mid-2026)
|
|
38
|
+
|
|
39
|
+
The zero-day learning cycle has compressed. The frameworks have not.
|
|
40
|
+
|
|
41
|
+
- **41% of 2025 zero-days were discovered by attackers using AI-assisted reverse engineering** (AGENTS.md DR-5). Copy Fail (CVE-2026-31431) was AI-found in approximately one hour. The historical learning rhythm — researcher disclosure → industry analysis → framework update cycle measured in quarters or years — is incompatible with AI-discovery cadence measured in weeks.
|
|
42
|
+
- **The compounding consequence**: when a zero-day is announced, the relevant question is no longer "when will the patch ship?" but "what control, if it had existed, would have stopped this, and how do we add that control to the next thousand systems before the AI-generated variant lands?" Without a running learning loop, every novel TTP becomes a one-off incident response rather than a control-system improvement.
|
|
43
|
+
- **AI-acceleration also compresses variant generation.** A single disclosed primitive (Copy Fail's deterministic page-cache CoW; SesameOp's AI-API C2 channel) can be re-applied by AI tooling to adjacent code paths within days. Frameworks that only respond to specific CVE-IDs miss the class-level lesson entirely.
|
|
44
|
+
- **Compliance frameworks do not include zero-day learning as a required control category.** The "learn from incidents" language in NIST CSF 2.0 IMPROVE and ISO 27001:2022 A.5.7 is process-only, no required artifact. An org can be fully compliant while patching every CVE and learning nothing.
|
|
45
|
+
|
|
46
|
+
This skill exists because the gap between AI-accelerated zero-day production and framework-driven control evolution is the dominant mid-2026 risk multiplier.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Framework Lag Declaration
|
|
51
|
+
|
|
52
|
+
Frameworks do not require a zero-day learning loop as a control. The closest analogs are process controls without learning artifacts.
|
|
53
|
+
|
|
54
|
+
| Framework | Control | What It Says | Why It Fails as a Learning Loop |
|
|
55
|
+
|---|---|---|---|
|
|
56
|
+
| NIST CSF 2.0 | IMPROVE function (ID.IM) | "Identify improvements to organizational cybersecurity risk management processes, procedures, and activities." | Process-level guidance only. Does not require: (a) per-zero-day attack-vector extraction, (b) framework-gap mapping, (c) new-control-requirement generation, (d) measurable closure of identified gaps. Compliance is satisfied by having "an improvement process" without showing it produced any specific control. |
|
|
57
|
+
| NIST 800-53 Rev 5 | CA-7 (Continuous Monitoring) + IR-4 (Incident Handling — Lessons Learned) | Lessons learned from incidents and continuous monitoring. | Lessons-learned is required after incidents, but not after public zero-days the org wasn't directly hit by. The most valuable learning surface — other people's incidents — is outside the control's scope. |
|
|
58
|
+
| ISO 27001:2022 | A.5.7 (Threat intelligence) | Information about information security threats shall be collected and analyzed. | Threat-intel collection is required; learning-loop output (new control requirements, framework-gap artifacts) is not. Process compliance with zero learning output is auditable as "compliant." |
|
|
59
|
+
| ISO 27001:2022 | A.5.27 (Learning from information security incidents) | Knowledge gained from incidents shall be used to strengthen controls. | Limited to incidents the org experienced. Does not require learning from industry-wide zero-days that didn't hit the org. |
|
|
60
|
+
| SOC 2 | CC4 (Monitoring Activities) | Ongoing/separate evaluations of internal controls. | Evaluation cadence is internal-controls focused, not threat-landscape focused. No requirement to re-evaluate controls against newly-disclosed TTPs. |
|
|
61
|
+
| NIS2 Directive | Art. 21 — incident handling and crisis management | Essential/important entities must handle incidents. | Same scope problem: incidents the org experienced, not zero-days landing across the sector. |
|
|
62
|
+
| MITRE ATT&CK / ATLAS | TTP catalogs | Reference taxonomies. | Not frameworks of required controls — they describe TTPs, they do not require an org to maintain a learning loop against them. |
|
|
63
|
+
|
|
64
|
+
Across all of these: **the learning loop is not a required control output, only an implied behavior.** An org can pass every audit while patching CVEs and absorbing zero TTP-level lessons.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## TTP Mapping
|
|
69
|
+
|
|
70
|
+
This skill is meta — it does not pin to a single TTP class. The learning loop iterates over the full corpus declared in this skill's `data_deps`. Frontmatter `atlas_refs` and `attack_refs` are intentionally empty.
|
|
71
|
+
|
|
72
|
+
| Input Catalog | Role in the Learning Loop |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `data/cve-catalog.json` | The CVE-level corpus: each entry is a candidate lesson input. New entries trigger a new loop run per AGENTS.md DR-8. |
|
|
75
|
+
| `data/atlas-ttps.json` (MITRE ATLAS v5.1.0) | The AI/ML TTP taxonomy. Attack-vector extraction maps the CVE's mechanism to an ATLAS ID (e.g., AML.T0096 for SesameOp AI-as-C2). |
|
|
76
|
+
| `data/framework-control-gaps.json` | The control-gap corpus. Framework-coverage assessment writes into this file via new entries or `status` updates. |
|
|
77
|
+
| `data/zeroday-lessons.json` | The output corpus. Each completed loop produces one entry here — the durable artifact of the lesson. |
|
|
78
|
+
|
|
79
|
+
The skill consumes all four and produces a delta against `zeroday-lessons.json` and `framework-control-gaps.json`. Coverage of any one specific TTP is the responsibility of the topic-specific skills (`kernel-lpe-triage`, `ai-attack-surface`, `mcp-agent-trust`, `ai-c2-detection`).
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Exploit Availability Matrix
|
|
84
|
+
|
|
85
|
+
Status of the learning-loop entry for each CVE currently in `data/cve-catalog.json`:
|
|
86
|
+
|
|
87
|
+
| CVE | KEV | PoC | AI-Discovered / AI-Enabled | RWEP | Lesson-Entry Status in `zeroday-lessons.json` |
|
|
88
|
+
|---|---|---|---|---|---|
|
|
89
|
+
| CVE-2026-31431 (Copy Fail) | Yes | Yes (732-byte) | Yes (AI-discovered ~1h) | 90 | Complete — pre-run lesson encoded below; new control requirements CISA-KEV-RESPONSE-SLA, LIVE-PATCH-CAPABILITY, KERNEL-EXPLOITATION-DETECTION generated |
|
|
90
|
+
| CVE-2026-43284 (Dirty Frag — ESP/IPsec) | No | Yes (chain) | No | 38 | Complete — pre-run lesson encoded; new control requirements CRYPTO-SUBSYSTEM-INTEGRITY, PRE-PATCH-DISCLOSURE-RESPONSE generated |
|
|
91
|
+
| CVE-2026-43500 (Dirty Frag — RxRPC) | No | Yes (chain) | No | 32 | Complete — covered jointly with CVE-2026-43284 (chain partner) |
|
|
92
|
+
| CVE-2025-53773 (Copilot prompt-injection RCE) | No | Yes (demonstrated) | Yes (AI tooling enables) | 42 | Complete — pre-run lesson encoded; new control requirements AI-TOOL-ACTION-AUTHORIZATION, AI-TOOL-INPUT-SANITIZATION, PROMPT-INJECTION-MONITORING generated |
|
|
93
|
+
| CVE-2026-30615 (Windsurf MCP RCE) | No | Partial | No (supply-chain) | 35 | Complete — pre-run lesson encoded; new control requirements MCP-SERVER-SIGNING, MCP-TOOL-ALLOWLIST, MCP-SUPPLY-CHAIN-AUDIT generated |
|
|
94
|
+
|
|
95
|
+
Per AGENTS.md DR-8: every new entry added to `data/cve-catalog.json` must produce a corresponding entry here and in `data/zeroday-lessons.json` before the catalog change ships. Any CVE in the catalog without a complete lesson entry is a pre-ship-checklist failure.
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## The Learning Loop
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Input: zero-day (CVE ID, description, or vulnerability class)
|
|
103
|
+
↓
|
|
104
|
+
Step 1: Attack vector extraction
|
|
105
|
+
— What technical mechanism was used?
|
|
106
|
+
— What privileges were required?
|
|
107
|
+
— What was the exploitation complexity?
|
|
108
|
+
↓
|
|
109
|
+
Step 2: Defense chain analysis
|
|
110
|
+
— What control SHOULD have prevented this exploitation?
|
|
111
|
+
— What control SHOULD have detected this exploitation?
|
|
112
|
+
— Was that control in any major framework?
|
|
113
|
+
— Was it typically implemented?
|
|
114
|
+
↓
|
|
115
|
+
Step 3: Framework coverage assessment
|
|
116
|
+
— For each major framework: does it have a control that covers this?
|
|
117
|
+
— Is the control adequate (specific enough, actionable enough)?
|
|
118
|
+
— Or is the control present but insufficient (too vague, wrong time horizon)?
|
|
119
|
+
↓
|
|
120
|
+
Step 4: Gap classification
|
|
121
|
+
— Missing entirely: no framework has a control for this attack class
|
|
122
|
+
— Insufficient: controls exist but are inadequate for this specific TTP
|
|
123
|
+
— Compliant-but-exposed: org can pass audit of the control and still be vulnerable
|
|
124
|
+
↓
|
|
125
|
+
Step 5: New control requirement generation
|
|
126
|
+
— What specific, testable control would actually address this?
|
|
127
|
+
— What evidence would demonstrate the control is working?
|
|
128
|
+
↓
|
|
129
|
+
Step 6: Exposure scoring
|
|
130
|
+
— How many compliance-passing orgs are still exposed?
|
|
131
|
+
— What is the RWEP for this zero-day?
|
|
132
|
+
Output: Lesson entry for data/zeroday-lessons.json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Pre-Run Lessons (Encoded from Documented Zero-Days)
|
|
138
|
+
|
|
139
|
+
### Lesson: CVE-2026-31431 (Copy Fail)
|
|
140
|
+
|
|
141
|
+
**Attack vector:** Page-cache copy-on-write primitive in the Linux kernel. Unprivileged local user. Deterministic. No race condition. Single-stage. 732 bytes.
|
|
142
|
+
|
|
143
|
+
**What control should have prevented this:**
|
|
144
|
+
- Prevention: No local code execution → no LPE opportunity. But local code execution is baseline in any multi-user system or container environment. Prevention at this layer is not realistic.
|
|
145
|
+
- Mitigation before patch: seccomp profile blocking `userfaultfd`, user namespace restrictions, kernel hardening. These reduce attack surface but do not eliminate it.
|
|
146
|
+
- Patch: Apply kernel update. Live patching (kpatch/livepatch/kGraft) enables patching without service interruption.
|
|
147
|
+
|
|
148
|
+
**What control should have detected this:**
|
|
149
|
+
- Detection: auditd/eBPF monitoring for exploitation patterns — privilege escalation from unprivileged context, unusual /proc/self/mem writes, userfaultfd usage outside known applications.
|
|
150
|
+
- None of these are required by any major framework.
|
|
151
|
+
|
|
152
|
+
**Framework coverage assessment:**
|
|
153
|
+
|
|
154
|
+
| Framework | Control | Assessment |
|
|
155
|
+
|---|---|---|
|
|
156
|
+
| NIST 800-53 SI-2 | Flaw Remediation | Present but insufficient: 30-day SLA is exploitation window for CISA KEV + public PoC |
|
|
157
|
+
| ISO 27001 A.8.8 | Technical vulnerability management | Present but insufficient: "appropriate timescales" undefined; no live-patch requirement |
|
|
158
|
+
| PCI DSS 6.3.3 | Critical patches within 1 month | Present but insufficient: same problem |
|
|
159
|
+
| ASD ISM-1623 | Patch within 48h with exploit | Closest to adequate, but: no live-patch mandate, 48h window still long for 732-byte public exploit |
|
|
160
|
+
| Any framework | Detection for LPE exploitation patterns | Missing entirely: no framework requires auditd/eBPF exploitation detection |
|
|
161
|
+
| Any framework | Live kernel patching as required capability | Missing entirely |
|
|
162
|
+
|
|
163
|
+
**New control requirements generated:**
|
|
164
|
+
|
|
165
|
+
1. **CISA-KEV-RESPONSE-SLA**: For any CVE on the CISA KEV catalog: deploy verified mitigation (patch, live patch, or documented compensating controls) within 4 hours of KEV listing or patch availability, whichever is later.
|
|
166
|
+
|
|
167
|
+
2. **LIVE-PATCH-CAPABILITY**: For any system that processes production workloads and cannot tolerate unplanned reboots: live kernel patching capability (kpatch, livepatch, kGraft, or equivalent) must be deployed and tested quarterly.
|
|
168
|
+
|
|
169
|
+
3. **KERNEL-EXPLOITATION-DETECTION**: Deploy auditd or eBPF-based monitoring rules for kernel privilege escalation indicators. Alert within 60 seconds of pattern detection.
|
|
170
|
+
|
|
171
|
+
**Exposure scoring:**
|
|
172
|
+
- RWEP: 90 (current, with patch+live-patch available)
|
|
173
|
+
- Organizations compliant with standard patch management controls but still exposed: estimated 80%+ during the first week after KEV listing (based on industry patch deployment lag data)
|
|
174
|
+
- Coverage failure: standard controls allow full exploitation window while displaying "compliant" status
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
### Lesson: CVE-2026-43284/43500 (Dirty Frag)
|
|
179
|
+
|
|
180
|
+
**Attack vector:** Page-cache write primitive chain through ESP/IPsec (CVE-2026-43284) and RxRPC (CVE-2026-43500) subsystems. Chained — requires fingerprinting to select correct gadget. Disclosed before patches existed.
|
|
181
|
+
|
|
182
|
+
**What control should have prevented/detected this:**
|
|
183
|
+
- Critical insight: the exploitation path runs through the IPsec subsystem → controls that rely on IPsec for network isolation are not compensating controls for Dirty Frag exposure
|
|
184
|
+
|
|
185
|
+
**New control requirements generated:**
|
|
186
|
+
|
|
187
|
+
1. **CRYPTO-SUBSYSTEM-INTEGRITY**: Network controls claiming compliance via IPsec must include: kernel CVE status for IPsec-related CVEs, and explicit acknowledgment if IPsec-based controls are degraded by an unpatched IPsec CVE.
|
|
188
|
+
|
|
189
|
+
2. **PRE-PATCH-DISCLOSURE-RESPONSE**: For vulnerabilities disclosed before patches exist: immediately inventory affected systems, isolate high-risk systems at network layer, deploy detection rules, commit to patch timeline.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### Lesson: CVE-2025-53773 (GitHub Copilot Prompt Injection RCE)
|
|
194
|
+
|
|
195
|
+
**Attack vector:** Hidden prompt injection in GitHub Copilot PR descriptions. Developer reviews PR with Copilot → injected instructions execute in developer session → RCE. CVSS 9.6.
|
|
196
|
+
|
|
197
|
+
**What control should have prevented this:**
|
|
198
|
+
- Access control for AI tool actions: the developer's GitHub session was correctly authenticated. The RCE happened because the AI tool executed adversarial instructions with the developer's authorization context.
|
|
199
|
+
- There is no framework control for "AI tool authorization scope at the action level."
|
|
200
|
+
|
|
201
|
+
**New control requirements generated:**
|
|
202
|
+
|
|
203
|
+
1. **AI-TOOL-ACTION-AUTHORIZATION**: AI coding assistants must have explicitly scoped permissions. Any action taken by an AI tool (file write, terminal command, API call) requires explicit user approval unless within a pre-approved action whitelist. Implied authorization from context is insufficient.
|
|
204
|
+
|
|
205
|
+
2. **AI-TOOL-INPUT-SANITIZATION**: Content ingested by AI tools from external sources (PR descriptions, code comments, documentation, web pages) must be treated as potentially adversarial. AI tools should apply adversarial instruction classifiers to externally sourced content before including it in model context.
|
|
206
|
+
|
|
207
|
+
3. **PROMPT-INJECTION-MONITORING**: Log all AI tool actions, including the content of prompts that triggered those actions. Alert on AI actions that deviate from the user's stated intent or that weren't preceded by an explicit user request.
|
|
208
|
+
|
|
209
|
+
**Framework coverage:** Missing entirely in all major frameworks. CVSS 9.6 with active exploitation demonstrated and no framework control category for this attack class.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
### Lesson: CVE-2026-30615 (Windsurf MCP Zero-Interaction RCE)
|
|
214
|
+
|
|
215
|
+
**Attack vector:** Malicious MCP server achieves RCE without user interaction. AI coding assistant autonomously calls malicious tool, code executes. 150M+ affected.
|
|
216
|
+
|
|
217
|
+
**New control requirements generated:**
|
|
218
|
+
|
|
219
|
+
1. **MCP-SERVER-SIGNING**: All MCP servers must have verifiable provenance (npm provenance attestation, signed manifest, or equivalent). AI coding assistants must refuse to load unsigned MCP servers.
|
|
220
|
+
|
|
221
|
+
2. **MCP-TOOL-ALLOWLIST**: AI clients must implement explicit tool allowlists. Default deny — only tools in the allowlist may be called, regardless of what the MCP server exposes.
|
|
222
|
+
|
|
223
|
+
3. **MCP-SUPPLY-CHAIN-AUDIT**: MCP server installations must go through the organization's third-party software audit process. Automated installation of MCP packages without review is equivalent to installing unaudited dependencies.
|
|
224
|
+
|
|
225
|
+
**Framework coverage:** Missing entirely. Supply chain security controls (SA-12, A.5.19) don't address MCP servers as a category.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
### Lesson: SesameOp (ATLAS AML.T0096 — AI as C2)
|
|
230
|
+
|
|
231
|
+
**Attack vector:** Compromised host encodes C2 commands in LLM API prompt fields. Exfiltrated data returned in completion fields. Traffic indistinguishable from legitimate AI API usage.
|
|
232
|
+
|
|
233
|
+
**New control requirements generated:**
|
|
234
|
+
|
|
235
|
+
1. **AI-API-BEHAVIORAL-BASELINE**: All AI API usage from organizational networks must be baselined (which processes, which users, what volumes, what times). Deviations from baseline must trigger alerts.
|
|
236
|
+
|
|
237
|
+
2. **AI-API-PROCESS-ALLOWLIST**: Maintain an allowlist of processes authorized to make AI API calls. AI API calls from unlisted processes must alert.
|
|
238
|
+
|
|
239
|
+
3. **AI-API-CORRELATION**: Correlate AI API call events with security-relevant host events (file access, credential access, lateral movement). AI API calls correlated with security events within defined time windows must escalate.
|
|
240
|
+
|
|
241
|
+
**Framework coverage:** Missing entirely. SI-4 (system monitoring) and A.8.16 (monitoring activities) don't address AI API behavioral baselines.
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Analysis Procedure for New Zero-Days
|
|
246
|
+
|
|
247
|
+
When a user provides a new CVE or vulnerability description:
|
|
248
|
+
|
|
249
|
+
### Step 1: Extract attack vector
|
|
250
|
+
|
|
251
|
+
Document:
|
|
252
|
+
- What technical capability does the attacker need to execute this?
|
|
253
|
+
- What system components are used in the attack path?
|
|
254
|
+
- What is the exploitation complexity? (deterministic / race condition / heap spray / etc.)
|
|
255
|
+
- Is the exploit AI-assisted or AI-discovered?
|
|
256
|
+
- What is the blast radius? (specific config / default config / all major distros)
|
|
257
|
+
|
|
258
|
+
### Step 2: Defense chain analysis
|
|
259
|
+
|
|
260
|
+
Ask and answer:
|
|
261
|
+
1. **Prevention control:** What configuration, capability, or process would have prevented this exploit from being possible?
|
|
262
|
+
2. **Detection control:** What monitoring rule or anomaly detection would have fired during exploitation?
|
|
263
|
+
3. **Response trigger:** What evidence would appear in logs or alerts during/after exploitation?
|
|
264
|
+
|
|
265
|
+
For each: Is this control required by any major framework?
|
|
266
|
+
|
|
267
|
+
### Step 3: Framework coverage matrix
|
|
268
|
+
|
|
269
|
+
Run through each applicable framework:
|
|
270
|
+
- NIST 800-53 (which control family?)
|
|
271
|
+
- ISO 27001:2022 (which Annex A control?)
|
|
272
|
+
- SOC 2 (which trust service criterion?)
|
|
273
|
+
- PCI DSS 4.0 (which requirement?)
|
|
274
|
+
- NIS2 (which Art. 21 measure?)
|
|
275
|
+
- CIS Controls v8 (which control?)
|
|
276
|
+
- ASD Essential 8 (which mitigation?)
|
|
277
|
+
- ISO 27001:2022 (which control?)
|
|
278
|
+
- MITRE ATLAS v5.1.0 (which TTP? Is it covered?)
|
|
279
|
+
|
|
280
|
+
For each: Covered (adequate) / Covered (insufficient) / Missing entirely
|
|
281
|
+
|
|
282
|
+
### Step 4: Generate new control requirements
|
|
283
|
+
|
|
284
|
+
Write new control requirements in the format:
|
|
285
|
+
```
|
|
286
|
+
[CONTROL-ID]: [One-line control name]
|
|
287
|
+
Description: [Specific, testable requirement]
|
|
288
|
+
Evidence: [What demonstrates compliance]
|
|
289
|
+
Framework gap it closes: [Which framework controls are insufficient]
|
|
290
|
+
CVE evidence: [Which CVEs demonstrate this gap]
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Step 5: Calculate exposure score
|
|
294
|
+
|
|
295
|
+
Estimate: What percentage of organizations that pass audits of existing controls are still exposed to this vulnerability?
|
|
296
|
+
|
|
297
|
+
Use: Known patch deployment lag statistics + framework SLA vs. RWEP gap analysis.
|
|
298
|
+
|
|
299
|
+
### Step 6: Produce lesson entry
|
|
300
|
+
|
|
301
|
+
Format the output for addition to `data/zeroday-lessons.json`.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Output Format
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
## Zero-Day Learning Loop: [CVE-ID / Vulnerability Name]
|
|
309
|
+
|
|
310
|
+
**Date:** YYYY-MM-DD
|
|
311
|
+
**RWEP:** [score]
|
|
312
|
+
|
|
313
|
+
### Attack Vector
|
|
314
|
+
[Extracted attack vector analysis]
|
|
315
|
+
|
|
316
|
+
### Defense Chain Analysis
|
|
317
|
+
| Layer | Required Control | Framework Coverage |
|
|
318
|
+
|---|---|---|
|
|
319
|
+
| Prevention | [control] | [Covered/Insufficient/Missing] |
|
|
320
|
+
| Detection | [control] | [Covered/Insufficient/Missing] |
|
|
321
|
+
| Response | [control] | [Covered/Insufficient/Missing] |
|
|
322
|
+
|
|
323
|
+
### Framework Coverage Matrix
|
|
324
|
+
[Per-framework table]
|
|
325
|
+
|
|
326
|
+
### Gap Classification
|
|
327
|
+
[Missing entirely / Insufficient / Compliant-but-exposed]
|
|
328
|
+
|
|
329
|
+
### New Control Requirements
|
|
330
|
+
[Generated requirements in standard format]
|
|
331
|
+
|
|
332
|
+
### Exposure Scoring
|
|
333
|
+
Estimated % of audit-passing orgs still exposed: [X]%
|
|
334
|
+
Reason: [RWEP vs. framework SLA gap analysis]
|
|
335
|
+
|
|
336
|
+
### Lesson Entry (for data/zeroday-lessons.json)
|
|
337
|
+
[Ready-to-add JSON entry]
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## Compliance Theater Check
|
|
343
|
+
|
|
344
|
+
Run this check against any organization claiming a mature vulnerability-management or threat-intelligence program:
|
|
345
|
+
|
|
346
|
+
> "Pull the org's vulnerability-management runbook for the most recent five CISA-KEV-listed zero-days. For each: was the CVE patched? Almost certainly yes. Now ask the harder question: for each, where is the artifact that says (a) what attack vector this zero-day used, (b) what control would have caught it pre-patch, (c) which framework control was responsible for that detection/prevention, (d) was that framework control adequate, and (e) what new internal control requirement, if any, was created? If the answer is `we patched it, ticket closed` with no artifact, the program is patching CVEs and learning nothing. The next AI-generated variant of the same primitive will land against the same unchanged control surface. That is compliance theater for the threat-intel function — process compliance (A.5.7) with zero learning-loop output."
|
|
347
|
+
|
|
348
|
+
> "Open `data/zeroday-lessons.json` (or the org's equivalent). Count the entries. Compare to the count of CVEs the org actually responded to in the same period. If the lesson-entry count is < CVE-response count, the loop is partial. Per AGENTS.md DR-8, partial is failure: every zero-day-in-scope must produce a lesson entry. The gap between CVEs-patched and lessons-learned is the size of the theater. The org's `Improve` function (NIST CSF 2.0) is not running."
|
|
349
|
+
|
|
350
|
+
> "Ask: in the last 12 months, has a single internal control requirement been created or modified as a result of a public zero-day the org was NOT directly hit by? If no, the org's threat-intelligence control (ISO A.5.7) is consumption-only — collecting feeds, not changing controls. Threat-intel without control-system change is library subscription, not security capability."
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 blamejs contributors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
200
|
+
implied. See the License for the specific language governing
|
|
201
|
+
permissions and limitations under the License.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Vendored from blamejs
|
|
2
|
+
|
|
3
|
+
Subset of [blamejs](https://github.com/blamejs/blamejs), Apache-2.0, pinned to
|
|
4
|
+
upstream commit [`1442f17`](https://github.com/blamejs/blamejs/commit/1442f17758a4bd511c63877561c0ffa759f66a87).
|
|
5
|
+
|
|
6
|
+
## What's here
|
|
7
|
+
|
|
8
|
+
| File | Upstream | Why vendored |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| `retry.js` | `lib/retry.js` | Battle-tested exponential backoff + crypto jitter + AbortSignal + circuit-breaker. Used by `lib/job-queue.js` and `lib/refresh-external.js` for HTTP retry semantics on KEV/EPSS/NVD/IETF/GitHub fetches. |
|
|
11
|
+
| `worker-pool.js` | `lib/worker-pool.js` | Generic worker_threads pool with bounded queue, per-task timeout, worker recycle. Used by `scripts/build-indexes.js --parallel` and any future CPU-bound fan-out work. |
|
|
12
|
+
| `LICENSE` | `LICENSE` | Apache-2.0 license text (identical to exceptd's). |
|
|
13
|
+
| `_PROVENANCE.json` | — | sha256 of each vendored file + upstream file at pin, plus the strip rules applied. `lib/validate-vendor.js` re-hashes on every predeploy run. |
|
|
14
|
+
|
|
15
|
+
## Flatten-and-inline strategy
|
|
16
|
+
|
|
17
|
+
Each vendored file is a single-file leaf:
|
|
18
|
+
|
|
19
|
+
- No imports of upstream blamejs siblings (`framework-error`, `constants`,
|
|
20
|
+
`validate-opts`, `numeric-bounds`, `lazy-require`, `audit`,
|
|
21
|
+
`observability`, `safe-async`).
|
|
22
|
+
- Public surface preserved verbatim where possible. Behavior preserved
|
|
23
|
+
verbatim where preserved. Audit/observability sinks become no-op stubs
|
|
24
|
+
so call-site code from upstream patterns drops in cleanly.
|
|
25
|
+
- Error envelope: upstream uses typed `XxxError` classes with stable
|
|
26
|
+
`code` strings. We replace the class with vanilla `Error` carrying the
|
|
27
|
+
same `code` field. Callers that switch on `err.code` keep working;
|
|
28
|
+
callers that did `instanceof WorkerPoolError` must switch to `err.code`.
|
|
29
|
+
|
|
30
|
+
Every file lists its specific strip rules in its header banner and in
|
|
31
|
+
`_PROVENANCE.json`.
|
|
32
|
+
|
|
33
|
+
## Updating the pin
|
|
34
|
+
|
|
35
|
+
1. Note the new upstream commit hash.
|
|
36
|
+
2. Copy the upstream file into this directory.
|
|
37
|
+
3. Re-apply the strip rules in the file header (the diff against the
|
|
38
|
+
raw upstream file is small).
|
|
39
|
+
4. Update `_PROVENANCE.json` with the new commit, vendored sha256, and
|
|
40
|
+
upstream sha256 at pin.
|
|
41
|
+
5. Run `npm run validate-vendor` — it confirms the recorded hashes
|
|
42
|
+
match the on-disk vendored copies.
|
|
43
|
+
6. Bump the project version per the cadence rules. Pin updates are
|
|
44
|
+
patch-level; a structural change to the vendored surface is minor.
|
|
45
|
+
|
|
46
|
+
## What we DON'T vendor
|
|
47
|
+
|
|
48
|
+
| Upstream module | Why skipped |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `lib/queue.js`, `lib/queue-local.js`, `lib/queue-redis.js`, `lib/queue-sqs.js` | DB-backed / cluster-aware / cloud-queue adapters. exceptd is an offline-first static-data CLI corpus with no database. The in-memory `lib/job-queue.js` covers the actual use case. |
|
|
51
|
+
| `lib/http-client.js`, `lib/http-client-cache.js`, `lib/http-client-cookie-jar.js`, `lib/http-message-signature.js` | Full production HTTP client. Our needs are bounded to `fetch` + 10s `AbortController` timeout; stdlib is sufficient. |
|
|
52
|
+
| `lib/cache.js`, `lib/cache-redis.js`, `lib/cache-status.js`, `lib/cdn-cache-control.js` | HTTP-layer cache with negotiation. The exceptd cache (`.cache/upstream/`) is a simple JSON file-per-entry layout with a flat index, a different problem. |
|
|
53
|
+
| `lib/circuit-breaker.js` (standalone) | The `CircuitBreaker` class is already part of `retry.js` and is what we use; the standalone module is for callers that want only the breaker without the retry surface. |
|
|
54
|
+
| `lib/audit.js`, `lib/observability.js`, `lib/framework-error.js`, etc. | exceptd has no audit chain, no metrics sink, and no framework-error infrastructure. The relevant call sites in the vendored files have been replaced with no-op stubs or vanilla `Error` objects. |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_schema_version": "1.0.0",
|
|
3
|
+
"_note": "Provenance manifest for vendored blamejs subset. lib/validate-vendor.js re-hashes each vendored file and verifies the recorded sha256 — silent hand-edits to a vendored copy fail the build. To re-vendor, copy the upstream file, re-apply the strip rules documented in each vendored file's header, refresh sha256 here, then re-run `npm run validate-vendor`.",
|
|
4
|
+
"source_repo": "https://github.com/blamejs/blamejs",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"license_file": "LICENSE",
|
|
7
|
+
"license_sha256": "812075be5abe785284e823a97d09b5d1515b0221e3128059e1f5065de3c907d5",
|
|
8
|
+
"pinned_commit": "1442f17758a4bd511c63877561c0ffa759f66a87",
|
|
9
|
+
"pinned_at": "2026-05-11",
|
|
10
|
+
"files": {
|
|
11
|
+
"retry.js": {
|
|
12
|
+
"vendored_path": "vendor/blamejs/retry.js",
|
|
13
|
+
"vendored_sha256": "2b9a7d99a8477740dade4e4490e436817c250a3d63e9d91898a9cdaaeff82ac4",
|
|
14
|
+
"upstream_path": "lib/retry.js",
|
|
15
|
+
"upstream_sha256_at_pin": "e307f19a9012265d71f25fcf8e43e595479d38d1358f4b607b052d0ce053abb0",
|
|
16
|
+
"stripped": [
|
|
17
|
+
"observability event sink (_emitEvent → no-op)",
|
|
18
|
+
"audit chain hooks",
|
|
19
|
+
"lazy-require for safeAsync (replaced with stdlib AbortSignal-aware sleep)",
|
|
20
|
+
"numeric-checks dep (replaced with two inline predicates)",
|
|
21
|
+
"constants C.TIME.seconds(...) (replaced with literal ms values)"
|
|
22
|
+
],
|
|
23
|
+
"exceptd_deltas": [
|
|
24
|
+
"_sleep timer is NOT unref'd — preserves event-loop liveness for one-shot CLI callers (refresh-external, prefetch, build-indexes --parallel). Upstream's safeAsync.sleep semantics around unref are not guaranteed; this delta is documented inline."
|
|
25
|
+
],
|
|
26
|
+
"surface_preserved": [
|
|
27
|
+
"withRetry(fn, opts)",
|
|
28
|
+
"isRetryable(err)",
|
|
29
|
+
"backoffDelay(attempt, opts)",
|
|
30
|
+
"CircuitBreaker",
|
|
31
|
+
"DEFAULT_RETRY",
|
|
32
|
+
"DEFAULT_BREAKER"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"worker-pool.js": {
|
|
36
|
+
"vendored_path": "vendor/blamejs/worker-pool.js",
|
|
37
|
+
"vendored_sha256": "57d8f5c3bca23cd4ef2a16adf4107bc60c4da3fbc9bb861580edc76ed9a2d132",
|
|
38
|
+
"upstream_path": "lib/worker-pool.js",
|
|
39
|
+
"upstream_sha256_at_pin": "262f99e9cc3d4a8f4eba9ad3e28401e8a1f47f78040afa63c9b17eb998437171",
|
|
40
|
+
"stripped": [
|
|
41
|
+
"WorkerPoolError class (replaced with vanilla Error with `code` field)",
|
|
42
|
+
"validate-opts dep (replaced with inline whitelist + type checks)",
|
|
43
|
+
"numeric-bounds dep (replaced with inline predicates)",
|
|
44
|
+
"audit event sink (_emitAudit → no-op stub)",
|
|
45
|
+
"constants C.BYTES.kib / C.TIME.minutes (replaced with literal int values)"
|
|
46
|
+
],
|
|
47
|
+
"surface_preserved": [
|
|
48
|
+
"create(scriptPath, opts) -> { run, drain, terminate, stats }",
|
|
49
|
+
"bounded size + maxQueueDepth + taskTimeoutMs",
|
|
50
|
+
"worker recycle on uncaught error / timeout / exit"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|