blitzstrike 2.4.28 → 2.4.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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to Blitz Strike are documented here.
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
+ ## [2.4.29] — 2026-09-14
9
+
10
+ ### Added — Enterprise compliance mapping (CWE -> frameworks)
11
+
12
+ - New `src/compliance.ts`: data-driven mapping of 25 web/app CWEs to OWASP
13
+ Top 10 (2021), OWASP ASVS v4.0, PCI DSS v4.0, ISO 27001:2022 Annex A, and
14
+ NIST SP 800-53.
15
+ - New `compliance` tool: map a single CWE or an aggregate list.
16
+ - `generate_report` now emits a "## 6. Compliance Mapping" section — a CISO/
17
+ auditor can see which controls every finding violates, not just a CVSS.
18
+
8
19
  ## [2.4.28] — 2026-09-14
9
20
 
10
21
  ### Added — Enterprise Empirical Intelligence Ledger (LOOP 2, cross-target)
package/dist/index.js CHANGED
@@ -33320,6 +33320,79 @@ function cvssAssess(input) {
33320
33320
  return { score, vector: cvssVector(input), severity: cvssSeverity(score) };
33321
33321
  }
33322
33322
 
33323
+ // src/compliance.ts
33324
+ var CWE_COMPLIANCE = {
33325
+ "79": { name: "Cross-site Scripting (XSS)", owasp_top10: "A03:2021 Injection", asvs: ["V5.3.3"], pci: ["6.5.7"], iso: ["A.8.26"], nist: ["SI-10"] },
33326
+ "89": { name: "SQL Injection", owasp_top10: "A03:2021 Injection", asvs: ["V5.3.4"], pci: ["6.5.1"], iso: ["A.8.26"], nist: ["SI-10"] },
33327
+ "78": { name: "OS Command Injection", owasp_top10: "A03:2021 Injection", asvs: ["V5.3.8"], pci: ["6.5.1"], iso: ["A.8.9"], nist: ["SI-10"] },
33328
+ "94": { name: "Code Injection", owasp_top10: "A03:2021 Injection", asvs: ["V5.2.4"], pci: ["6.5.1"], iso: ["A.8.9"], nist: ["SI-10"] },
33329
+ "918": { name: "Server-Side Request Forgery (SSRF)", owasp_top10: "A10:2021 SSRF", asvs: ["V5.2.6"], pci: ["6.5.6"], iso: ["A.8.20"], nist: ["SC-7"] },
33330
+ "611": { name: "XXE", owasp_top10: "A05:2021 Security Misconfiguration", asvs: ["V5.5.2"], pci: ["6.5.3"], iso: ["A.8.26"], nist: ["SI-10"] },
33331
+ "502": { name: "Insecure Deserialization", owasp_top10: "A08:2021 Software and Data Integrity Failures", asvs: ["V5.5.1"], pci: ["6.5.2"], iso: ["A.8.26"], nist: ["SI-10"] },
33332
+ "22": { name: "Path Traversal", owasp_top10: "A01:2021 Broken Access Control", asvs: ["V12.3.1"], pci: ["6.5.8"], iso: ["A.8.12"], nist: ["AC-3"] },
33333
+ "601": { name: "Open Redirect", owasp_top10: "A01:2021 Broken Access Control", asvs: ["V5.1.5"], pci: ["6.5.9"], iso: ["A.8.20"], nist: ["AC-3"] },
33334
+ "434": { name: "Unrestricted File Upload", owasp_top10: "A03:2021 Injection", asvs: ["V12.3.2"], pci: ["6.5.5"], iso: ["A.8.12"], nist: ["SI-10"] },
33335
+ "942": { name: "Permissive Cross-Origin Policy (CORS)", owasp_top10: "A01:2021 Broken Access Control", asvs: ["V4.2.2"], pci: ["6.5.9"], iso: ["A.8.20"], nist: ["AC-4"] },
33336
+ "287": { name: "Improper Authentication", owasp_top10: "A07:2021 Identification and Authentication Failures", asvs: ["V2.1.1"], pci: ["7.1.1", "8.1.1"], iso: ["A.8.5"], nist: ["IA-2"] },
33337
+ "1336": { name: "Server-Side Template Injection (SSTI)", owasp_top10: "A03:2021 Injection", asvs: ["V5.3.12"], pci: ["6.5.1"], iso: ["A.8.26"], nist: ["SI-10"] },
33338
+ "915": { name: "Mass Assignment", owasp_top10: "A04:2021 Insecure Design", asvs: ["V5.1.2"], pci: ["6.5.4"], iso: ["A.8.2"], nist: ["AC-3"] },
33339
+ "1321": { name: "Prototype Pollution", owasp_top10: "A03:2021 Injection", asvs: ["V5.3.12"], pci: ["6.5.2"], iso: ["A.8.26"], nist: ["SI-10"] },
33340
+ "352": { name: "Cross-Site Request Forgery (CSRF)", owasp_top10: "A01:2021 Broken Access Control", asvs: ["V4.2.2"], pci: ["6.5.9"], iso: ["A.8.5"], nist: ["AC-3"] },
33341
+ "319": { name: "Cleartext Transmission of Sensitive Information", owasp_top10: "A02:2021 Cryptographic Failures", asvs: ["V9.1.1"], pci: ["4.1.1"], iso: ["A.8.24"], nist: ["SC-8"] },
33342
+ "693": { name: "Protection Mechanism Failure", owasp_top10: "A05:2021 Security Misconfiguration", asvs: ["V14.2.1"], pci: ["6.5.x"], iso: ["A.8.8"], nist: ["SI-2"] },
33343
+ "200": { name: "Exposure of Sensitive Information", owasp_top10: "A01:2021 Broken Access Control", asvs: ["V7.4.1"], pci: ["6.5.x"], iso: ["A.8.11"], nist: ["AC-4"] },
33344
+ "862": { name: "Missing Authorization", owasp_top10: "A01:2021 Broken Access Control", asvs: ["V4.1.1"], pci: ["7.1.1"], iso: ["A.8.2"], nist: ["AC-3"] },
33345
+ "639": { name: "Insecure Direct Object Reference (IDOR)", owasp_top10: "A01:2021 Broken Access Control", asvs: ["V4.1.2"], pci: ["7.1.1"], iso: ["A.8.2"], nist: ["AC-3"] },
33346
+ "640": { name: "Weak Password Recovery", owasp_top10: "A07:2021 Identification and Authentication Failures", asvs: ["V2.5.2"], pci: ["8.3.6"], iso: ["A.8.5"], nist: ["IA-5"] },
33347
+ "798": { name: "Hard-coded Credentials", owasp_top10: "A07:2021 Identification and Authentication Failures", asvs: ["V2.10.4"], pci: ["8.3.8"], iso: ["A.8.5"], nist: ["IA-5"] },
33348
+ "327": { name: "Weak Cryptography", owasp_top10: "A02:2021 Cryptographic Failures", asvs: ["V6.2.1"], pci: ["3.5.1"], iso: ["A.8.24"], nist: ["SC-13"] },
33349
+ "306": { name: "Missing Authentication for Critical Function", owasp_top10: "A07:2021 Identification and Authentication Failures", asvs: ["V1.2.1"], pci: ["8.1.1"], iso: ["A.8.5"], nist: ["IA-2"] }
33350
+ };
33351
+ function complianceMap(cwe) {
33352
+ const id = (cwe ?? "").toUpperCase().replace(/^CWE-?/, "");
33353
+ const m = CWE_COMPLIANCE[id];
33354
+ if (!m)
33355
+ return null;
33356
+ return { cwe: `CWE-${id}`, ...m };
33357
+ }
33358
+ function complianceSummary(cwes) {
33359
+ const by_owasp = {};
33360
+ const by_asvs = {};
33361
+ const by_pci = {};
33362
+ const by_iso = {};
33363
+ const by_nist = {};
33364
+ const mappings = [];
33365
+ let mapped = 0;
33366
+ let unmapped = 0;
33367
+ for (const cwe of cwes) {
33368
+ if (!cwe) {
33369
+ unmapped += 1;
33370
+ continue;
33371
+ }
33372
+ const m = complianceMap(cwe);
33373
+ if (!m) {
33374
+ unmapped += 1;
33375
+ continue;
33376
+ }
33377
+ mapped += 1;
33378
+ if (m.owasp_top10)
33379
+ by_owasp[m.owasp_top10] = (by_owasp[m.owasp_top10] ?? 0) + 1;
33380
+ for (const a of m.asvs ?? [])
33381
+ by_asvs[a] = (by_asvs[a] ?? 0) + 1;
33382
+ for (const p of m.pci ?? [])
33383
+ by_pci[p] = (by_pci[p] ?? 0) + 1;
33384
+ for (const i of m.iso ?? [])
33385
+ by_iso[i] = (by_iso[i] ?? 0) + 1;
33386
+ for (const n of m.nist ?? [])
33387
+ by_nist[n] = (by_nist[n] ?? 0) + 1;
33388
+ if (!mappings.some((x) => x.cwe === m.cwe)) {
33389
+ mappings.push({ cwe: m.cwe, name: m.name, owasp_top10: m.owasp_top10 ?? null, asvs: m.asvs ?? [], pci: m.pci ?? [], iso: m.iso ?? [], nist: m.nist ?? [] });
33390
+ }
33391
+ }
33392
+ mappings.sort((a, b) => a.cwe.localeCompare(b.cwe));
33393
+ return { total_mapped: mapped, total_unmapped: unmapped, by_owasp, by_asvs, by_pci, by_iso, by_nist, mappings };
33394
+ }
33395
+
33323
33396
  // src/report.ts
33324
33397
  import { writeFileSync as writeFileSync2, mkdirSync as mkdirSync5 } from "node:fs";
33325
33398
  import { join as join10 } from "node:path";
@@ -33482,7 +33555,34 @@ function reportMarkdown(findings, opts = {}) {
33482
33555
  lines.push("");
33483
33556
  });
33484
33557
  }
33485
- lines.push("## 6. Recommendations");
33558
+ lines.push("## 6. Compliance Mapping");
33559
+ lines.push("");
33560
+ const comp = complianceSummary(findings.map((f) => f.classification?.cwe ?? null));
33561
+ if (comp.total_mapped === 0) {
33562
+ lines.push("No CWE-tagged findings to map.");
33563
+ } else {
33564
+ lines.push("Maps each finding's CWE to OWASP Top 10 (2021), OWASP ASVS v4.0, PCI DSS v4.0, ISO 27001:2022 (Annex A), and NIST SP 800-53.");
33565
+ lines.push("");
33566
+ for (const m of comp.mappings) {
33567
+ lines.push(`- **${m.cwe}** ${m.name}`);
33568
+ if (m.owasp_top10)
33569
+ lines.push(` - OWASP Top 10: \`${m.owasp_top10}\``);
33570
+ if (m.asvs.length)
33571
+ lines.push(` - ASVS v4.0: \`${m.asvs.join(", ")}\``);
33572
+ if (m.pci.length)
33573
+ lines.push(` - PCI DSS v4.0: \`${m.pci.join(", ")}\``);
33574
+ if (m.iso.length)
33575
+ lines.push(` - ISO 27001:2022: \`${m.iso.join(", ")}\``);
33576
+ if (m.nist.length)
33577
+ lines.push(` - NIST 800-53: \`${m.nist.join(", ")}\``);
33578
+ }
33579
+ if (comp.total_unmapped > 0) {
33580
+ lines.push("");
33581
+ lines.push(`_${comp.total_unmapped} finding(s) had no CWE and were not mapped._`);
33582
+ }
33583
+ }
33584
+ lines.push("");
33585
+ lines.push("## 7. Recommendations");
33486
33586
  lines.push("");
33487
33587
  if (findings.length === 0) {
33488
33588
  lines.push("No findings — no remediation required.");
@@ -33493,7 +33593,7 @@ function reportMarkdown(findings, opts = {}) {
33493
33593
  });
33494
33594
  }
33495
33595
  lines.push("");
33496
- lines.push("## 7. Appendix");
33596
+ lines.push("## 8. Appendix");
33497
33597
  lines.push("");
33498
33598
  if (hypotheses.length) {
33499
33599
  lines.push("### Unverified hypotheses (kept for follow-up)");
@@ -57383,6 +57483,29 @@ ${statusLine}` : statusLine },
57383
57483
  const out = action === "hit_rates" ? hitRates(tech) : action === "top_vectors" ? topVectors(tech ?? "unknown", 10) : queryIntel({ vector, tech, outcome });
57384
57484
  return { content: [{ type: "text", text: JSON.stringify(out) }] };
57385
57485
  });
57486
+ server.registerTool("compliance", {
57487
+ title: "Map CWE(s) to compliance frameworks",
57488
+ description: "COMPLIANCE: map a CWE (or a JSON array of CWEs from findings) to OWASP Top 10 (2021), OWASP ASVS v4.0, PCI DSS v4.0, ISO 27001:2022 Annex A, and NIST SP 800-53. Pass a single `cwe` for one mapping, or `cwes` (JSON array) for an aggregate summary. Tells a CISO/auditor which controls a finding violates.",
57489
+ inputSchema: {
57490
+ cwe: string2().optional().describe("A single CWE id (e.g. CWE-89 or 89)"),
57491
+ cwes: string2().optional().describe("JSON array of CWE ids for an aggregate summary")
57492
+ }
57493
+ }, async ({ cwe, cwes }) => {
57494
+ if (cwes) {
57495
+ let arr;
57496
+ try {
57497
+ arr = JSON.parse(cwes);
57498
+ } catch {
57499
+ return { content: [{ type: "text", text: JSON.stringify({ error: "invalid cwes JSON" }) }] };
57500
+ }
57501
+ return { content: [{ type: "text", text: JSON.stringify(complianceSummary(arr)) }] };
57502
+ }
57503
+ const m = complianceMap(cwe ?? "");
57504
+ if (!m) {
57505
+ return { content: [{ type: "text", text: JSON.stringify({ error: "CWE not in the compliance table", cwe, hint: "supported ids: 79, 89, 78, 94, 918, 611, 502, 22, 601, 434, 942, 287, 1336, 915, 1321, 352, 319, 693, 200, 862, 639, 640, 798, 327, 306" }) }] };
57506
+ }
57507
+ return { content: [{ type: "text", text: JSON.stringify(m) }] };
57508
+ });
57386
57509
  server.registerTool("payload_lookup", {
57387
57510
  title: "Look up exploit payloads",
57388
57511
  description: "INTEL: find a payload collection (66 categories from PayloadsAllTheThings).",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blitzstrike",
3
- "version": "2.4.28",
3
+ "version": "2.4.29",
4
4
  "description": "Blitz Strike — a universal MCP security-audit toolbelt. BLITZ sweeps the attack surface, EAGLE-EYE traces source-to-sink, STRIKE verifies live. 57 attack chains, 130-tool catalog, intelligence data layer. One server, every agent.",
5
5
  "type": "module",
6
6
  "bin": {