@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.
Files changed (136) hide show
  1. package/AGENTS.md +232 -0
  2. package/ARCHITECTURE.md +267 -0
  3. package/CHANGELOG.md +616 -0
  4. package/CONTEXT.md +203 -0
  5. package/LICENSE +200 -0
  6. package/NOTICE +82 -0
  7. package/README.md +307 -0
  8. package/SECURITY.md +73 -0
  9. package/agents/README.md +81 -0
  10. package/agents/report-generator.md +156 -0
  11. package/agents/skill-updater.md +102 -0
  12. package/agents/source-validator.md +119 -0
  13. package/agents/threat-researcher.md +149 -0
  14. package/bin/exceptd.js +183 -0
  15. package/data/_indexes/_meta.json +88 -0
  16. package/data/_indexes/activity-feed.json +362 -0
  17. package/data/_indexes/catalog-summaries.json +229 -0
  18. package/data/_indexes/chains.json +7135 -0
  19. package/data/_indexes/currency.json +359 -0
  20. package/data/_indexes/did-ladders.json +451 -0
  21. package/data/_indexes/frequency.json +2072 -0
  22. package/data/_indexes/handoff-dag.json +476 -0
  23. package/data/_indexes/jurisdiction-clocks.json +967 -0
  24. package/data/_indexes/jurisdiction-map.json +536 -0
  25. package/data/_indexes/recipes.json +319 -0
  26. package/data/_indexes/section-offsets.json +3656 -0
  27. package/data/_indexes/stale-content.json +14 -0
  28. package/data/_indexes/summary-cards.json +1736 -0
  29. package/data/_indexes/theater-fingerprints.json +381 -0
  30. package/data/_indexes/token-budget.json +2137 -0
  31. package/data/_indexes/trigger-table.json +1374 -0
  32. package/data/_indexes/xref.json +818 -0
  33. package/data/atlas-ttps.json +282 -0
  34. package/data/cve-catalog.json +496 -0
  35. package/data/cwe-catalog.json +1017 -0
  36. package/data/d3fend-catalog.json +738 -0
  37. package/data/dlp-controls.json +1039 -0
  38. package/data/exploit-availability.json +67 -0
  39. package/data/framework-control-gaps.json +1255 -0
  40. package/data/global-frameworks.json +2913 -0
  41. package/data/rfc-references.json +324 -0
  42. package/data/zeroday-lessons.json +377 -0
  43. package/keys/public.pem +3 -0
  44. package/lib/framework-gap.js +328 -0
  45. package/lib/job-queue.js +195 -0
  46. package/lib/lint-skills.js +536 -0
  47. package/lib/prefetch.js +372 -0
  48. package/lib/refresh-external.js +713 -0
  49. package/lib/schemas/cve-catalog.schema.json +151 -0
  50. package/lib/schemas/manifest.schema.json +106 -0
  51. package/lib/schemas/skill-frontmatter.schema.json +113 -0
  52. package/lib/scoring.js +149 -0
  53. package/lib/sign.js +197 -0
  54. package/lib/ttp-mapper.js +80 -0
  55. package/lib/validate-catalog-meta.js +198 -0
  56. package/lib/validate-cve-catalog.js +213 -0
  57. package/lib/validate-indexes.js +83 -0
  58. package/lib/validate-package.js +162 -0
  59. package/lib/validate-vendor.js +85 -0
  60. package/lib/verify.js +216 -0
  61. package/lib/worker-pool.js +84 -0
  62. package/manifest-snapshot.json +1833 -0
  63. package/manifest.json +2108 -0
  64. package/orchestrator/README.md +124 -0
  65. package/orchestrator/dispatcher.js +140 -0
  66. package/orchestrator/event-bus.js +146 -0
  67. package/orchestrator/index.js +874 -0
  68. package/orchestrator/pipeline.js +201 -0
  69. package/orchestrator/scanner.js +327 -0
  70. package/orchestrator/scheduler.js +137 -0
  71. package/package.json +113 -0
  72. package/sbom.cdx.json +158 -0
  73. package/scripts/audit-cross-skill.js +261 -0
  74. package/scripts/audit-perf.js +160 -0
  75. package/scripts/bootstrap.js +205 -0
  76. package/scripts/build-indexes.js +721 -0
  77. package/scripts/builders/activity-feed.js +79 -0
  78. package/scripts/builders/catalog-summaries.js +67 -0
  79. package/scripts/builders/currency.js +109 -0
  80. package/scripts/builders/cwe-chains.js +105 -0
  81. package/scripts/builders/did-ladders.js +149 -0
  82. package/scripts/builders/frequency.js +89 -0
  83. package/scripts/builders/jurisdiction-clocks.js +126 -0
  84. package/scripts/builders/recipes.js +159 -0
  85. package/scripts/builders/section-offsets.js +162 -0
  86. package/scripts/builders/stale-content.js +171 -0
  87. package/scripts/builders/summary-cards.js +166 -0
  88. package/scripts/builders/theater-fingerprints.js +198 -0
  89. package/scripts/builders/token-budget.js +96 -0
  90. package/scripts/check-manifest-snapshot.js +217 -0
  91. package/scripts/predeploy.js +267 -0
  92. package/scripts/refresh-manifest-snapshot.js +57 -0
  93. package/scripts/refresh-sbom.js +222 -0
  94. package/skills/age-gates-child-safety/skill.md +456 -0
  95. package/skills/ai-attack-surface/skill.md +282 -0
  96. package/skills/ai-c2-detection/skill.md +440 -0
  97. package/skills/ai-risk-management/skill.md +311 -0
  98. package/skills/api-security/skill.md +287 -0
  99. package/skills/attack-surface-pentest/skill.md +381 -0
  100. package/skills/cloud-security/skill.md +384 -0
  101. package/skills/compliance-theater/skill.md +365 -0
  102. package/skills/container-runtime-security/skill.md +379 -0
  103. package/skills/coordinated-vuln-disclosure/skill.md +473 -0
  104. package/skills/defensive-countermeasure-mapping/skill.md +300 -0
  105. package/skills/dlp-gap-analysis/skill.md +337 -0
  106. package/skills/email-security-anti-phishing/skill.md +206 -0
  107. package/skills/exploit-scoring/skill.md +331 -0
  108. package/skills/framework-gap-analysis/skill.md +374 -0
  109. package/skills/fuzz-testing-strategy/skill.md +313 -0
  110. package/skills/global-grc/skill.md +564 -0
  111. package/skills/identity-assurance/skill.md +272 -0
  112. package/skills/incident-response-playbook/skill.md +546 -0
  113. package/skills/kernel-lpe-triage/skill.md +303 -0
  114. package/skills/mcp-agent-trust/skill.md +326 -0
  115. package/skills/mlops-security/skill.md +325 -0
  116. package/skills/ot-ics-security/skill.md +340 -0
  117. package/skills/policy-exception-gen/skill.md +437 -0
  118. package/skills/pqc-first/skill.md +546 -0
  119. package/skills/rag-pipeline-security/skill.md +294 -0
  120. package/skills/researcher/skill.md +310 -0
  121. package/skills/sector-energy/skill.md +409 -0
  122. package/skills/sector-federal-government/skill.md +302 -0
  123. package/skills/sector-financial/skill.md +398 -0
  124. package/skills/sector-healthcare/skill.md +373 -0
  125. package/skills/security-maturity-tiers/skill.md +464 -0
  126. package/skills/skill-update-loop/skill.md +463 -0
  127. package/skills/supply-chain-integrity/skill.md +318 -0
  128. package/skills/threat-model-currency/skill.md +404 -0
  129. package/skills/threat-modeling-methodology/skill.md +312 -0
  130. package/skills/webapp-security/skill.md +281 -0
  131. package/skills/zeroday-gap-learn/skill.md +350 -0
  132. package/vendor/blamejs/LICENSE +201 -0
  133. package/vendor/blamejs/README.md +54 -0
  134. package/vendor/blamejs/_PROVENANCE.json +54 -0
  135. package/vendor/blamejs/retry.js +335 -0
  136. package/vendor/blamejs/worker-pool.js +418 -0
@@ -0,0 +1,374 @@
1
+ ---
2
+ name: framework-gap-analysis
3
+ version: "1.0.0"
4
+ description: Feed a framework control ID and threat scenario — receive the gap between what the control covers and what current TTPs require
5
+ triggers:
6
+ - framework gap
7
+ - control gap
8
+ - nist gap
9
+ - iso 27001 gap
10
+ - soc 2 gap
11
+ - pci gap
12
+ - nis2 gap
13
+ - compliance gap
14
+ - why doesn't this control cover
15
+ data_deps:
16
+ - framework-control-gaps.json
17
+ - atlas-ttps.json
18
+ - cve-catalog.json
19
+ - global-frameworks.json
20
+ atlas_refs: []
21
+ attack_refs: []
22
+ framework_gaps: []
23
+ last_threat_review: "2026-05-01"
24
+ ---
25
+
26
+ # Framework Gap Analysis
27
+
28
+ This skill analyzes the gap between what a compliance framework control was designed to address and what current attacker TTPs require. It is the meta-skill that underlies compliance-theater, global-grc, and policy-exception-gen.
29
+
30
+ ## Threat Context (mid-2026)
31
+
32
+ Compliance frameworks lag the threat environment by years. Most active controls in NIST 800-53, ISO 27001:2022, SOC 2, PCI DSS 4.0, NIS2, and DORA were drafted against assumptions (human-speed exploit development, persistent inventoriable assets, human-controlled accounts) that current attacker TTPs no longer respect. Three concrete mid-2026 instances anchor the lag:
33
+
34
+ - **CVE-2026-31431 (Copy Fail)** — CISA KEV-listed Linux kernel LPE, AI-discovered in roughly one hour, 732-byte deterministic public PoC, no race condition. NIST 800-53 SI-2 and ISO 27001:2022 A.8.8 patch-window language permits 30-day remediation, during which active exploitation is the documented condition. See `data/cve-catalog.json` for the full entry.
35
+ - **CVE-2025-53773** — GitHub Copilot prompt-injection RCE, CVSS 9.6. Bypasses SOC 2 CC6 and NIST 800-53 AC-2 because the action executes under the AI service account's authorized identity; the access control audit shows "passed."
36
+ - **CVE-2026-30615** — Windsurf MCP zero-interaction RCE, 150M+ affected downloads. ISO 27001:2022 A.5.19 / A.5.20 vendor-management language treats MCP servers as SaaS tools, not third-party code executing in production developer environments.
37
+
38
+ This skill exists because every gap-analysis engagement encounters at least one control where a "compliant" auditor finding masks current-TTP exposure. The built-in gap catalog below is the codified evidence base.
39
+
40
+ ## Framework Lag Declaration
41
+
42
+ This skill's entire purpose is to declare framework lag per analysis. The pre-analyzed lag declarations live in `## Built-In Gap Catalog` below — each entry states (a) what the control was designed for, (b) the specific current TTP it fails against, and (c) what a real control would require. When a user supplies a control ID and a threat scenario, the analysis procedure produces a new lag declaration in the same shape. The catalog is authoritative for the controls it lists; the procedure handles novel control/threat pairs. Universal lags that no current framework covers adequately are enumerated in `## Universal Gaps` near the end of this skill.
43
+
44
+ ### Expanded jurisdictional cross-walk requirement (per `data/global-frameworks.json`)
45
+
46
+ AGENTS.md hard rule #5 (global-first) now binds against the full expanded catalog, not the EU+UK+AU+ISO baseline. Every gap declaration produced by this skill must cross-walk the cited control against the equivalent obligations in the expanded jurisdiction set tracked in `data/global-frameworks.json`. The cross-walk set as of mid-2026:
47
+
48
+ - **EU:** GDPR, NIS2 (Directive 2022/2555), DORA (Regulation 2022/2554), EU AI Act (Regulation 2024/1689), EU CRA (Regulation 2024/2847).
49
+ - **UK:** UK GDPR / DPA 2018, NCSC CAF, Cyber Essentials / CE+.
50
+ - **AU:** Privacy Act 1988 / APP, ASD ISM, Essential 8, APRA CPS 234.
51
+ - **Singapore:** MAS TRM, CSA CCoP (CII), PDPA.
52
+ - **Japan (expanded):** APPI, METI Cybersecurity Framework, NISC Basic Policy, FISC Security Guidelines.
53
+ - **India:** CERT-In Directions (Apr 2022), DPDPA 2023, SEBI Cyber Resilience Framework.
54
+ - **Canada:** OSFI B-10, PIPEDA, Quebec Law 25.
55
+ - **Israel (IL):** Privacy Protection Law Amendment 13 (2024), INCD Cyber Defense Methodology v2.0.
56
+ - **Switzerland (CH):** revFADP (in force 2023-09-01), FINMA Circulars (2023/1 operational risks, 2018/3 outsourcing).
57
+ - **Hong Kong (HK):** PDPO + PCPD 2024 cross-border guidance, HKMA SA-2 / TM-G-1 / TM-E-1.
58
+ - **Taiwan (TW):** PDPA TW, Cyber Security Management Act (2018), FSC sector guidance.
59
+ - **Indonesia (ID):** UU PDP (2022, in force 2024-10-17), BSSN guidance.
60
+ - **Vietnam (VN):** Cybersecurity Law 2018 + Decree 53/2022/ND-CP, BCY cryptographic-product certification.
61
+ - **South Korea (KR):** PIPA, Network Act, KISA / K-CSAP / KCMVP.
62
+ - **China (CN):** PIPL, DSL, CSL, Cybersecurity Review Measures (2022).
63
+ - **Brazil (BR):** LGPD + ANPD guidance.
64
+ - **Saudi Arabia (KSA):** PDPL + SDAIA Implementing Regulation 2023.
65
+ - **Global standards:** ISO 27001:2022 / 27002:2022, ISO/IEC 42001:2023, CSA CCM v4, CIS Controls v8, MITRE ATLAS v5.1.0.
66
+ - **US sub-national:** NYDFS 23 NYCRR 500 (amended Nov 2023, phased through Nov 2025); state privacy laws (CA CCPA/CPRA, CO CPA, CT CTDPA, IL BIPA, NY SHIELD, TX DPSA, VA CDPA).
67
+
68
+ A gap declaration that closes section 6 (Global coverage check) without referencing at least the EU, UK, AU, ISO, and a representative selection from {IL, CH, HK, TW, ID, VN, JP-expanded, KR, CN, BR, NYDFS} for any org operating in those jurisdictions fails hard rule #5. The exact set required depends on the org's footprint — but the analyst must consult `data/global-frameworks.json` to enumerate it rather than defaulting to the legacy four-jurisdiction shorthand.
69
+
70
+ ## TTP Mapping (MITRE ATLAS v5.1.0 and ATT&CK)
71
+
72
+ This skill maps framework controls to attacker TTPs on demand rather than statically. The authoritative TTP catalog is `data/atlas-ttps.json` (pinned to MITRE ATLAS v5.1.0, November 2025) supplemented by MITRE ATT&CK Enterprise IDs for non-AI threats. The mapping convention used in every gap declaration this skill produces:
73
+
74
+ | Built-in gap | Primary TTP(s) | Gap flag |
75
+ |---|---|---|
76
+ | NIST 800-53 SI-2 vs. deterministic LPE | T1068 (Exploitation for Privilege Escalation), T1548.001 | Patch SLA permits active exploitation window |
77
+ | NIST 800-53 SC-8/SC-28 vs. Dirty Frag | T1190 (Exploit Public-Facing Application) via IPsec subsystem | Cryptographic control is the attack surface |
78
+ | NIST 800-53 AC-2 vs. prompt injection | AML.T0051 (LLM Prompt Injection), AML.T0054 | Authorized identity executes attacker intent |
79
+ | NIST 800-53 SI-3 vs. AI-generated malware | AML.T0017, AML.T0018 | Signature-based detection has zero coverage |
80
+ | ISO 27001 A.8.8 vs. CISA KEV class | T1068, T1203 | "Appropriate timescales" undefined for AI-accelerated weaponization |
81
+ | SOC 2 CC6 vs. prompt injection | AML.T0051 | Authorization model has no prompt-level granularity |
82
+ | PCI DSS 6.3.3 vs. AI-accelerated weaponization | T1068, T1190 | One-month window predates AI-assisted exploit development |
83
+ | NIS2 Art. 21 vs. AI pipeline integrity | AML.T0020 (Poison Training Data), AML.T0010 | No AI-specific control surface |
84
+ | All frameworks vs. ephemeral inventory | T1610, T1525 | Asset-inventory assumption invalid on serverless/container |
85
+
86
+ For any gap analysis this skill produces, every cited control must be paired with at least one ATLAS or ATT&CK ID drawn from `data/atlas-ttps.json`. Controls without a mapped TTP fail Hard Rule #4 (no orphaned controls).
87
+
88
+ ## Exploit Availability Matrix
89
+
90
+ This skill consumes the matrix produced upstream by the exploit-scoring skill. The authoritative source is `data/exploit-availability.json`; CVE-specific fields (CVSS, RWEP, KEV status, PoC availability, AI-discovery flag, live-patch availability, active exploitation) come from `data/cve-catalog.json`. Every gap declaration must carry the matrix row for the evidence CVE so the "what a real control requires" output is RWEP-justified rather than CVSS-only.
91
+
92
+ | CVE | CVSS | RWEP | KEV | Public PoC | AI-accelerated | Live-patchable | Active exploitation |
93
+ |---|---|---|---|---|---|---|---|
94
+ | CVE-2026-31431 (Copy Fail) | High | Critical | Yes | Yes (732 bytes, deterministic) | Yes (AI-discovered) | Yes (kpatch/livepatch) | Confirmed |
95
+ | CVE-2026-43284 (Dirty Frag) | High | High | Pending | Partial | No | Limited (subsystem-dependent) | Suspected |
96
+ | CVE-2025-53773 (Copilot prompt injection RCE) | 9.6 | High | No | Yes (demonstrated) | Yes (AI tooling enables) | N/A (vendor-side) | Suspected |
97
+ | CVE-2026-30615 (Windsurf MCP RCE) | 9.8 | Critical | No | Partial | No | N/A (vendor-side) | Suspected |
98
+
99
+ When a gap analysis cites a CVE not in this matrix, the analyst must populate the row from `data/cve-catalog.json` before producing the declaration. A declaration without an evidence row is incomplete.
100
+
101
+ ## Built-In Gap Catalog
102
+
103
+ The following gaps are documented with evidence. When a control from this list is referenced, apply the pre-analyzed gap rather than reconstructing the analysis from first principles.
104
+
105
+ ---
106
+
107
+ ### NIST 800-53 SI-2 — Flaw Remediation vs. Deterministic LPE
108
+
109
+ **Control intent:** Identify, report, and correct system flaws; apply security patches within organizationally defined time periods.
110
+
111
+ **Designed for:** Network-centric environments (2013), early cloud (Rev 4), where the assumption was human-speed exploit development and patch deployment cycles measured in weeks.
112
+
113
+ **Fails for:**
114
+ - CVE-2026-31431 (Copy Fail): CISA KEV, 732-byte public PoC, deterministic, no race condition. The "organizationally defined time period" is typically 30 days for High, 7 days for Critical. With a public PoC and CISA KEV, any unpatched system is being actively exploited during that window. SI-2 frames patching as remediation; for this class it must be framed as incident response.
115
+ - AI-discovered vulnerabilities: The 1-hour discovery-to-weaponization timeline means vulnerability windows are defined by AI capability, not human patch cycles.
116
+
117
+ **What a real control requires:** A tiered response with time bounds indexed to: (1) CISA KEV status, (2) PoC public availability, (3) live-patch availability, (4) blast radius. For CISA KEV + public PoC + live-patch available: deploy live patch within 4 hours or document compensating controls. Not "within 30 days."
118
+
119
+ ---
120
+
121
+ ### NIST 800-53 SC-8/SC-28 — Transmission/Data at Rest Protection vs. Dirty Frag
122
+
123
+ **Control intent:** Implement cryptographic mechanisms to prevent unauthorized disclosure during transmission (SC-8) and at rest (SC-28).
124
+
125
+ **Designed for:** Network-centric environments where IPsec, TLS, and disk encryption are reliable cryptographic controls for data protection.
126
+
127
+ **Fails for:**
128
+ - CVE-2026-43284/CVE-2026-43500 (Dirty Frag): The exploit runs through the IPsec implementation. A system using IPsec to satisfy SC-8 compliance cannot claim IPsec as a compensating control for Dirty Frag — the control is the attack surface.
129
+
130
+ **What a real control requires:** Cryptographic controls for SC-8/SC-28 compliance must include integrity assurance for the cryptographic subsystem itself, not just assurance that the subsystem is configured. Kernel subsystem integrity monitoring (eBPF-based, read-only kernel text verification) as a compensating layer.
131
+
132
+ ---
133
+
134
+ ### NIST 800-53 AC-2 — Account Management vs. Prompt Injection
135
+
136
+ **Control intent:** Manage system accounts, group memberships, privileges, and access authorization throughout the account lifecycle.
137
+
138
+ **Designed for:** Human user accounts, service accounts, and machine identities in traditional IAM systems.
139
+
140
+ **Fails for:**
141
+ - Prompt injection (CVE-2025-53773 class): An attacker who successfully injects a prompt into an AI assistant causes the AI to take actions using the AI's service account. The service account is properly managed under AC-2 — it's authorized, monitored, and within least-privilege scope. The unauthorized access is happening through the model's context window, not through account compromise. AC-2 audit trails show the service account performing the action. The attacker's identity is absent from all access logs.
142
+
143
+ **What a real control requires:** Agent identity controls distinct from service account identity: who authorized this specific model invocation, what context was provided, what tools were authorized for this invocation, what did the model actually do. Session-level authorization for AI agent actions, not just account-level.
144
+
145
+ ---
146
+
147
+ ### NIST 800-53 SI-3 — Malicious Code Protection vs. AI-Generated Malware
148
+
149
+ **Control intent:** Implement malicious code protection at system entry/exit points; update detection mechanisms; scan for malicious code.
150
+
151
+ **Designed for:** Signature-based malware detection, behavioral analysis of known malware families.
152
+
153
+ **Fails for:**
154
+ - PROMPTFLUX/PROMPTSTEAL: These families query public LLMs during execution to generate novel evasion code per-execution. Every execution produces a unique code sample. Signature-based detection has zero coverage. Behavioral analysis must detect the LLM-query pattern itself, not the resulting code.
155
+ - AI-assisted exploit development: PoC code generated by AI for a specific target environment is unique per target. Shared signature databases have no coverage until after exploitation.
156
+
157
+ **What a real control requires:** Detection of AI API queries from unexpected processes as a first-order indicator. LLM query monitoring as a security telemetry source, not just an application log.
158
+
159
+ ---
160
+
161
+ ### ISO 27001:2022 A.8.8 — Management of Technical Vulnerabilities vs. CISA KEV
162
+
163
+ **Control intent:** Obtain timely information about technical vulnerabilities; evaluate the organization's exposure; take appropriate measures.
164
+
165
+ **Designed for:** Systematic vulnerability management with "appropriate timescales" determined by vulnerability severity.
166
+
167
+ **Fails for:**
168
+ - "Appropriate timescales" is undefined in ISO 27001. Interpreted by most auditors as: 30 days for High, 90 days for Medium. For Copy Fail (CISA KEV, public 732-byte PoC), these timescales mean active exploitation during the "compliant" remediation period.
169
+ - No guidance on live kernel patching as a required capability. A.8.8 compliance is achievable without ever deploying live patching — this is a structural gap for critical systems that cannot tolerate reboots.
170
+
171
+ **What a real control requires:** Timescales indexed to: CISA KEV status, PoC availability, active exploitation confirmation. For CISA KEV class: hours, not days. Live patching capability as a stated requirement for systems that cannot tolerate reboot-based patching.
172
+
173
+ ---
174
+
175
+ ### SOC 2 CC6 — Logical and Physical Access vs. Prompt Injection
176
+
177
+ **Control intent:** Implement logical access security controls — authentication, authorization, access restrictions.
178
+
179
+ **Designed for:** Traditional access control: who can log in, what can they access, what actions are authorized.
180
+
181
+ **Fails for:**
182
+ - Prompt injection: CC6 controls ensure the AI service account has appropriate permissions. When prompt injection causes the AI to take an action using those permissions, CC6 has no mechanism to detect or prevent it. The action is authorized from CC6's perspective — the right account took an authorized action. The attacker's intent is invisible to CC6.
183
+ - SOC 2 Type II evidence for CC6 will show "passed" even after a prompt injection attack that exfiltrated data using the AI's authorized access.
184
+
185
+ **What a real control requires:** Prompt-level access control: each model invocation must have an authorization context that constrains what tools can be called and what actions can be taken, independent of the service account's overall permissions.
186
+
187
+ ---
188
+
189
+ ### PCI DSS 4.0 Requirement 6.3.3 — Patches vs. AI-Accelerated Weaponization
190
+
191
+ **Control intent:** All system components are protected from known vulnerabilities by installing applicable security patches/updates. Critical patches must be installed within one month.
192
+
193
+ **Designed for:** Human-speed exploit development where a month was once a reasonable window between disclosure and weaponization.
194
+
195
+ **Fails for:**
196
+ - AI-assisted exploit development: 41% of 2025 zero-days were weaponized with AI assistance. The weaponization timeline for AI-discovered vulnerabilities like Copy Fail is hours, not months.
197
+ - One-month critical patch window: For any CVE with CISA KEV listing or public PoC, one month is not a security window. It is an exploitation acceptance window.
198
+
199
+ **What a real control requires:** PCI scoping must include CISA KEV as a separate response category with < 72-hour remediation requirement (or live-patch equivalent). The one-month standard was reasonable in 2004; it is architecturally unsafe in 2026.
200
+
201
+ ---
202
+
203
+ ### NIS2 Art. 21 — Risk Management vs. AI Pipeline Integrity
204
+
205
+ **Control intent:** Essential and important entities must implement appropriate technical and organizational measures to manage risks. Includes patch management, incident response, supply chain security.
206
+
207
+ **Designed for:** Traditional IT risk management for network-connected critical infrastructure.
208
+
209
+ **Fails for:**
210
+ - AI pipeline integrity: NIS2 Art. 21 has no specific measures for AI system risk, ML model integrity, or LLM-specific attack vectors. An essential entity operating AI systems in critical infrastructure has no NIS2 control requirements for prompt injection, model poisoning, or AI-as-C2.
211
+ - Ephemeral infrastructure: NIS2 expects asset inventory and patch management. Serverless functions, containers, and auto-scaling infrastructure make traditional asset inventory architecturally impossible.
212
+
213
+ **What a real control requires:** EU AI Act Art. 9 (risk management for high-risk AI systems) supplements NIS2 for AI systems. For critical infrastructure operators: explicit AI pipeline integrity controls, model versioning, behavioral regression testing as supplemental NIS2 measures.
214
+
215
+ ---
216
+
217
+ ### All Frameworks vs. Ephemeral Infrastructure Asset Inventory
218
+
219
+ **Control intent (multiple frameworks):** Maintain an accurate inventory of all information assets (CM-8, A.5.9, PCI 12.3.4, NIS2 Art. 21).
220
+
221
+ **Designed for:** Persistent, inventoriable assets — servers, workstations, network devices, databases.
222
+
223
+ **Fails for:**
224
+ - Serverless functions (AWS Lambda, Azure Functions, GCP Cloud Run): function instances start and stop in milliseconds, may never be assigned persistent identifiers, and cannot be inventoried by traditional scanners.
225
+ - Container workloads with auto-scaling: containers share a kernel, may run for seconds, and exist in numbers that make individual inventory impossible.
226
+ - AI inference endpoints: auto-scaled ML serving infrastructure where individual instances are ephemeral.
227
+
228
+ **What a real control requires:** Infrastructure-as-Code as the authoritative inventory (the IaC repo is the asset register), supplemented by: image registry scanning (not instance scanning), SBOM per image, IaC drift detection, and runtime behavior monitoring in place of traditional asset inventory.
229
+
230
+ ---
231
+
232
+ ## Analysis Procedure
233
+
234
+ When a user provides a framework control ID and a threat scenario:
235
+
236
+ ### Step 1: Identify the control
237
+
238
+ Parse the control ID to identify:
239
+ - Framework (NIST 800-53, ISO 27001, SOC 2, PCI DSS, NIS2, DORA, CIS v8, etc.)
240
+ - Control name and intent
241
+ - The era and context it was designed for
242
+
243
+ If the control is in the built-in gap catalog above, apply the pre-analyzed gap.
244
+
245
+ ### Step 2: Identify the threat scenario
246
+
247
+ Map the threat scenario to:
248
+ - ATLAS TTP IDs (if AI/ML related)
249
+ - ATT&CK TTP IDs (if traditional threat)
250
+ - CVE ID (if specific vulnerability)
251
+
252
+ ### Step 3: Gap analysis
253
+
254
+ Answer these questions:
255
+ 1. What does the control actually require? (cite the control text, not an interpretation)
256
+ 2. What assumption does the control make about the attacker's capability?
257
+ 3. How does the current threat scenario violate that assumption?
258
+ 4. Could an organization pass an audit of this control while remaining vulnerable to this threat?
259
+ 5. What would a real control look like for this specific threat?
260
+
261
+ ### Step 4: Produce gap declaration
262
+
263
+ Produce a structured gap declaration in this format:
264
+
265
+ ```
266
+ ## Framework Lag Declaration
267
+
268
+ **Control:** [ID] — [Name]
269
+ **Framework:** [Framework name and version]
270
+ **Threat:** [CVE / ATLAS TTP / threat description]
271
+
272
+ ### What the control covers
273
+ [Control intent in plain language]
274
+
275
+ ### What the control misses
276
+ [Specific explanation of why the control is insufficient for this threat]
277
+
278
+ ### Could an org pass an audit while remaining exposed?
279
+ [Yes/No with explanation]
280
+
281
+ ### What a real control requires
282
+ [Specific, actionable requirements that would actually address the threat]
283
+
284
+ ### Evidence
285
+ [CVEs, ATLAS TTPs, real-world incidents that demonstrate the gap]
286
+ ```
287
+
288
+ ---
289
+
290
+ ## Universal Gaps (No Framework Covers These Adequately)
291
+
292
+ These gaps exist in every major framework as of mid-2026:
293
+
294
+ | Gap | No Framework With Adequate Coverage |
295
+ |---|---|
296
+ | AI pipeline integrity (model versioning, behavioral regression, prompt injection prevention) | NIST 800-53, ISO 27001, SOC 2, PCI DSS, NIS2, DORA, ISO 27001:2022, CIS v8, CSA CCM |
297
+ | MCP/agent tool trust boundaries | All of the above |
298
+ | LLM prompt injection as access control failure | All of the above |
299
+ | AI-as-C2 detection and response | All of the above |
300
+ | Live kernel patching as required capability for critical systems | All of the above (ASD Essential 8 ML3 is closest) |
301
+ | Ephemeral infrastructure asset inventory alternatives | All of the above |
302
+ | AI-accelerated exploit weaponization in patch SLAs | All of the above |
303
+ | RAG pipeline integrity and retrieval security | All of the above |
304
+ | AI-generated phishing detection (post-grammar-check era) | All of the above |
305
+
306
+ These universal gaps should be surfaced in every framework gap analysis and explicitly noted in any compliance theater assessment.
307
+
308
+ ---
309
+
310
+ ## Output Format
311
+
312
+ Every framework gap analysis this skill produces uses the following literal template. Sections are mandatory; empty sections fail Hard Rule #11 (no-MVP ban).
313
+
314
+ ```
315
+ ## Framework Lag Declaration
316
+
317
+ **Control:** [Control ID] — [Control name]
318
+ **Framework:** [Framework name, version, and section reference]
319
+ **Threat:** [CVE ID / ATLAS TTP ID / ATT&CK TTP ID / threat scenario description]
320
+
321
+ ### 1. What the control was designed for
322
+ [Plain-language statement of the control's original intent and the era/threat model
323
+ it was drafted against. Cite the control text verbatim where possible.]
324
+
325
+ ### 2. What current TTPs achieve via the same outcome path
326
+ [Specific attacker TTP(s) that produce the same unauthorized outcome the control
327
+ was meant to prevent, but route around the control's mechanism. Reference ATLAS
328
+ or ATT&CK IDs from data/atlas-ttps.json.]
329
+
330
+ ### 3. RWEP-justified real requirement
331
+ [What a real control would require, derived from the RWEP factors of the evidence
332
+ CVE(s): KEV status, public PoC, AI-acceleration, live-patch availability, blast
333
+ radius. Not "tighten the SLA"; concrete time bounds and technical capabilities.]
334
+
335
+ ### 4. Evidence
336
+ - CVE(s): [IDs from data/cve-catalog.json with CVSS + RWEP]
337
+ - ATLAS / ATT&CK refs: [IDs from data/atlas-ttps.json]
338
+ - Real-world incidents: [campaign names, public PoC URLs, KEV listing dates]
339
+
340
+ ### 5. Could an org pass an audit while remaining exposed?
341
+ [Yes/No with explanation. If yes, this declaration is also a compliance-theater
342
+ finding and should be surfaced to the compliance-theater skill.]
343
+
344
+ ### 6. Global coverage check
345
+ [EU (NIS2/DORA/EU AI Act), UK (CAF), AU (ISM/Essential 8), ISO 27001:2022, and
346
+ NIST equivalents for the same lag. Per Hard Rule #5: US-only output is incomplete.]
347
+ ```
348
+
349
+ The output is consumed by: compliance-theater (theater scoring), policy-exception-gen (compensating-control justification), and global-grc (cross-jurisdictional rollup).
350
+
351
+ ---
352
+
353
+ ## Compliance Theater Check
354
+
355
+ For any framework control an organization claims as a compensating control or as "adequate coverage" for a threat scenario, apply this test:
356
+
357
+ > **What is the publicly documented attacker TTP that bypasses this control, and what is its ID in MITRE ATLAS or ATT&CK?**
358
+
359
+ Decision rule:
360
+
361
+ - If the org answers with a documented TTP (an ATLAS or ATT&CK ID resolving in `data/atlas-ttps.json`) **and** the control's mechanism does not address that TTP, the framework lag is real and the control claim is theater. Produce a Framework Lag Declaration per the Output Format.
362
+ - If the org answers "no documented TTP bypasses this control" **and** the analyst can also find no such TTP in `data/atlas-ttps.json`, the gap may be theoretical rather than operational. Note as "no current operational lag" but mark for monitoring under `forward_watch`.
363
+ - If the org cannot answer the question at all, the compensating-control claim is unsubstantiated. This is the most common theater pattern: a control is asserted as compensating without anyone having checked whether current TTPs route around it.
364
+
365
+ Specific high-confidence theater signals (each triggers a mandatory Framework Lag Declaration):
366
+
367
+ | Theater signal | Evidence the control is theater for the cited threat |
368
+ |---|---|
369
+ | Org claims SI-2 / A.8.8 / PCI 6.3.3 30-day patching as adequate for CISA KEV entries | CVE-2026-31431 KEV-listed; deterministic public PoC means active exploitation during the window |
370
+ | Org claims AC-2 / CC6 as adequate for AI-agent access control | CVE-2025-53773 demonstrates AML.T0051 routing around the identity model entirely |
371
+ | Org claims A.5.19 / SA-12 vendor management as adequate for MCP servers | CVE-2026-30615 demonstrates AML.T0010 supply-chain RCE with zero user interaction |
372
+ | Org claims IPsec-based SC-8 segmentation as adequate without a kernel-patch status check | CVE-2026-43284 makes the IPsec implementation the attack surface |
373
+
374
+ When this check fires, hand off to the compliance-theater skill for the theater-pattern detection test and to policy-exception-gen if the org needs to grant a defensible exception with concrete compensating controls.