blitzstrike 2.4.79 → 2.4.81

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/dist/index.js CHANGED
@@ -32555,9 +32555,9 @@ async function nvdLookup(cveId) {
32555
32555
 
32556
32556
  // src/orchestrator.ts
32557
32557
  init_scanner();
32558
- import { readFileSync as readFileSync9, existsSync as existsSync8, statSync as statSync2 } from "node:fs";
32559
- import { join as join11 } from "node:path";
32560
- import { fileURLToPath as fileURLToPath5 } from "node:url";
32558
+ import { readFileSync as readFileSync10, existsSync as existsSync8, statSync as statSync2 } from "node:fs";
32559
+ import { join as join12 } from "node:path";
32560
+ import { fileURLToPath as fileURLToPath6 } from "node:url";
32561
32561
 
32562
32562
  // src/memory.ts
32563
32563
  import { readFileSync as readFileSync2, appendFileSync, mkdirSync, existsSync, writeFileSync } from "node:fs";
@@ -34109,9 +34109,9 @@ function uniqueFindings(findings) {
34109
34109
  }
34110
34110
 
34111
34111
  // src/intel.ts
34112
- import { readFileSync as readFileSync8, existsSync as existsSync7 } from "node:fs";
34113
- import { join as join9 } from "node:path";
34114
- import { fileURLToPath as fileURLToPath4 } from "node:url";
34112
+ import { readFileSync as readFileSync9, existsSync as existsSync7 } from "node:fs";
34113
+ import { join as join10 } from "node:path";
34114
+ import { fileURLToPath as fileURLToPath5 } from "node:url";
34115
34115
 
34116
34116
  // src/intelligence.ts
34117
34117
  import { readFileSync as readFileSync7, appendFileSync as appendFileSync3, mkdirSync as mkdirSync4, existsSync as existsSync6 } from "node:fs";
@@ -34292,17 +34292,196 @@ function queryIntel(filter = {}) {
34292
34292
  };
34293
34293
  }
34294
34294
 
34295
+ // src/patterns.ts
34296
+ import { readFileSync as readFileSync8 } from "node:fs";
34297
+ import { join as join9, dirname as dirname2 } from "node:path";
34298
+ import { fileURLToPath as fileURLToPath4 } from "node:url";
34299
+
34300
+ // src/synonyms.ts
34301
+ var ALIASES = {
34302
+ idor: "missing_authz",
34303
+ bola: "missing_authz",
34304
+ "broken object level authorization": "missing_authz",
34305
+ "insecure direct object reference": "missing_authz",
34306
+ "broken access control": "missing_authz",
34307
+ authorization: "missing_authz",
34308
+ csrf: "missing_nonce",
34309
+ xsrf: "missing_nonce",
34310
+ "cross site request forgery": "missing_nonce",
34311
+ "cross-site request forgery": "missing_nonce",
34312
+ sqli: "sql_injection",
34313
+ "sql injection": "sql_injection",
34314
+ "sql-injection": "sql_injection",
34315
+ ssti: "ssti",
34316
+ "template injection": "ssti",
34317
+ "server side template injection": "ssti",
34318
+ xxe: "xxe",
34319
+ "xml external entity": "xxe",
34320
+ "xxe injection": "xxe",
34321
+ bpla: "mass_assignment",
34322
+ "broken property level authorization": "mass_assignment",
34323
+ "mass assignment": "mass_assignment",
34324
+ lfi: "path_confusion",
34325
+ rfi: "path_confusion",
34326
+ "path traversal": "path_confusion",
34327
+ "directory traversal": "path_confusion",
34328
+ "local file inclusion": "path_confusion",
34329
+ "remote file inclusion": "path_confusion",
34330
+ ssrf: "ssrf",
34331
+ "server side request forgery": "ssrf",
34332
+ "server-side request forgery": "ssrf",
34333
+ "prompt injection": "llm_injection",
34334
+ llm: "llm_injection",
34335
+ llm01: "llm_injection",
34336
+ "llm prompt injection": "llm_injection",
34337
+ graphql: "graphql_exposure",
34338
+ oauth: "oauth_misconfig",
34339
+ "open redirect": "oauth_misconfig",
34340
+ grpc: "grpc_reflection",
34341
+ "hardcoded credential": "hardcoded_secret",
34342
+ "hardcoded secret": "hardcoded_secret",
34343
+ "credential leak": "hardcoded_secret",
34344
+ "hard coded credentials": "hardcoded_secret",
34345
+ "priv esc": "priv_esc",
34346
+ privesc: "priv_esc",
34347
+ "privilege escalation": "priv_esc",
34348
+ "file upload": "file_upload",
34349
+ "unrestricted upload": "file_upload",
34350
+ "unrestricted file upload": "file_upload",
34351
+ deserialization: "deserialization",
34352
+ "insecure deserialization": "deserialization",
34353
+ unserialize: "deserialization",
34354
+ "type juggling": "type_juggling",
34355
+ "php type juggling": "type_juggling",
34356
+ "prototype pollution": "prototype_pollution",
34357
+ crlf: "crlf_injection",
34358
+ "header injection": "crlf_injection",
34359
+ "http response splitting": "crlf_injection",
34360
+ "wrong sanitizer": "wrong_sanitizer",
34361
+ "wrong context sanitization": "wrong_sanitizer",
34362
+ "dependency confusion": "dependency_confusion",
34363
+ "dep confusion": "dependency_confusion",
34364
+ "supply chain": "dependency_confusion",
34365
+ "supply chain attack": "dependency_confusion",
34366
+ "ml supply chain": "ml_supply_chain",
34367
+ "ai supply chain": "ml_supply_chain",
34368
+ "model poisoning": "ml_supply_chain",
34369
+ "ml security": "ml_supply_chain",
34370
+ "ai ml security": "ml_supply_chain",
34371
+ "rust unsafe": "rust_unsafe",
34372
+ "unsafe rust": "rust_unsafe",
34373
+ "rust memory safety": "rust_unsafe",
34374
+ transmute: "rust_unsafe",
34375
+ "rust format string": "rust_format_string",
34376
+ "format string": "rust_format_string",
34377
+ "format string injection": "rust_format_string",
34378
+ "jwt algorithm confusion": "jwt_alg_confusion",
34379
+ "jwt alg confusion": "jwt_alg_confusion",
34380
+ "alg confusion": "jwt_alg_confusion",
34381
+ "rs256 hs256": "jwt_alg_confusion",
34382
+ "web cache deception": "cache_deception",
34383
+ "cache deception": "cache_deception",
34384
+ "cache poisoning": "cache_deception",
34385
+ "cache key injection": "cache_deception"
34386
+ };
34387
+ function normalize(term) {
34388
+ return term.trim().toLowerCase().replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
34389
+ }
34390
+ function canonicalId(term) {
34391
+ const key = normalize(term);
34392
+ if (ALIASES[key])
34393
+ return ALIASES[key];
34394
+ return key.replace(/ /g, "_");
34395
+ }
34396
+ function synonymsFor(term) {
34397
+ const canonical = canonicalId(term);
34398
+ const aliases = Object.entries(ALIASES).filter(([, v]) => v === canonical).map(([k]) => k);
34399
+ return { canonical, aliases };
34400
+ }
34401
+ function listAliases() {
34402
+ return Object.entries(ALIASES).map(([alias, canonical]) => ({ alias, canonical }));
34403
+ }
34404
+
34405
+ // src/patterns.ts
34406
+ var __dirname2 = dirname2(fileURLToPath4(import.meta.url));
34407
+ var _doc = null;
34408
+ function load() {
34409
+ if (_doc)
34410
+ return _doc;
34411
+ try {
34412
+ _doc = JSON.parse(readFileSync8(join9(__dirname2, "..", "intelligence", "patterns.json"), "utf8"));
34413
+ } catch {
34414
+ _doc = { patterns: [] };
34415
+ }
34416
+ return _doc;
34417
+ }
34418
+ function patternLookup(id) {
34419
+ const canonical = canonicalId(id);
34420
+ const p = load().patterns.find((x) => x.id === canonical);
34421
+ return p ?? null;
34422
+ }
34423
+ function listPatterns() {
34424
+ return load().patterns;
34425
+ }
34426
+ function submissionGate(input) {
34427
+ const questions = [
34428
+ {
34429
+ q: "Reproducible — a copy-paste-ready request or step list triggers it?",
34430
+ pass: input.reproducible === true,
34431
+ reason: "Without an exact reproduction the finding is a hypothesis, not a result."
34432
+ },
34433
+ {
34434
+ q: "In scope — the vulnerable asset is in the engagement scope?",
34435
+ pass: input.in_scope === true,
34436
+ reason: "Out-of-scope assets must not be submitted."
34437
+ },
34438
+ {
34439
+ q: "Real impact — maps to an accepted-impact class, not informational?",
34440
+ pass: input.real_impact === true,
34441
+ reason: "Informational-only findings dilute the validity ratio."
34442
+ },
34443
+ {
34444
+ q: "No privileged assumption — works without unrealistic attacker prerequisites?",
34445
+ pass: input.no_privileged_assumption === true,
34446
+ reason: "'Admin can do X' is a centralization risk, not a vulnerability."
34447
+ },
34448
+ {
34449
+ q: "Verified live — confirmed with a marker + negative control, not just a static hint?",
34450
+ pass: input.verified_live === true,
34451
+ reason: "A static hit is a hypothesis until verified live (strike_verify / browser_validate)."
34452
+ },
34453
+ {
34454
+ q: "Evidence attached AND redacted — secrets/PII stripped, integrity-tagged?",
34455
+ pass: input.evidence_redacted === true,
34456
+ reason: "Evidence must carry SHA-256-tagged, redacted records — no leaked secrets or victim PII."
34457
+ },
34458
+ {
34459
+ q: "Severity derived — CVSS/confidence computed, not guessed?",
34460
+ pass: input.severity_derived === true,
34461
+ reason: "Severity is not confidence; derive it, don't assert it."
34462
+ }
34463
+ ];
34464
+ const failed = questions.find((q) => !q.pass);
34465
+ return {
34466
+ verdict: failed ? "fail" : "pass",
34467
+ passed: questions.filter((q) => q.pass).length,
34468
+ total: questions.length,
34469
+ questions,
34470
+ ...failed ? { blocker: failed.q } : {}
34471
+ };
34472
+ }
34473
+
34295
34474
  // src/intel.ts
34296
34475
  import { readdirSync as readdirSync4 } from "node:fs";
34297
34476
  import { homedir as homedir6 } from "node:os";
34298
- var ROOT3 = join9(fileURLToPath4(new URL(".", import.meta.url)), "..");
34299
- var INTEL = join9(ROOT3, "intelligence");
34477
+ var ROOT3 = join10(fileURLToPath5(new URL(".", import.meta.url)), "..");
34478
+ var INTEL = join10(ROOT3, "intelligence");
34300
34479
  function loadJson(name) {
34301
- const p = join9(INTEL, `${name}.json`);
34480
+ const p = join10(INTEL, `${name}.json`);
34302
34481
  if (!existsSync7(p))
34303
34482
  return null;
34304
34483
  try {
34305
- return JSON.parse(readFileSync8(p, "utf8"));
34484
+ return JSON.parse(readFileSync9(p, "utf8"));
34306
34485
  } catch {
34307
34486
  return null;
34308
34487
  }
@@ -34534,6 +34713,38 @@ function successProbability(priority, vector, tech) {
34534
34713
  function estimateTime(vector) {
34535
34714
  return VECTOR_TIME[vector] ?? DEFAULT_VECTOR_TIME;
34536
34715
  }
34716
+ var PAYOUT_FALLBACK = {
34717
+ xss: [500, 5000],
34718
+ command_injection: [1000, 1e4],
34719
+ open_redirect: [300, 3000],
34720
+ cors_misconfiguration: [300, 3000],
34721
+ business_logic: [500, 1e4],
34722
+ lfi: [1000, 1e4],
34723
+ nosql_injection: [1000, 15000],
34724
+ pickle_deserialization: [5000, 30000],
34725
+ upload_rce: [500, 1e4],
34726
+ auth_bypass: [1000, 1e4],
34727
+ idor: [500, 5000],
34728
+ wp_plugin_audit: [500, 1e4],
34729
+ xmlrpc: [300, 3000],
34730
+ rest_api_auth: [500, 5000],
34731
+ debug_mode: [200, 2000],
34732
+ actuator_exposure: [500, 5000],
34733
+ viewstate: [1000, 5000]
34734
+ };
34735
+ function fmtUsd(v) {
34736
+ return v >= 1000 ? `$${v / 1000}K` : `$${v}`;
34737
+ }
34738
+ function payoutFor(vector) {
34739
+ const pat = patternLookup(canonicalId(vector));
34740
+ if (pat && pat.payout_min != null && pat.payout_max != null) {
34741
+ return { min: pat.payout_min, max: pat.payout_max, display: pat.typical_payout ?? `${fmtUsd(pat.payout_min)}–${fmtUsd(pat.payout_max)}` };
34742
+ }
34743
+ const fb = PAYOUT_FALLBACK[vector];
34744
+ if (fb)
34745
+ return { min: fb[0], max: fb[1], display: `${fmtUsd(fb[0])}–${fmtUsd(fb[1])}` };
34746
+ return null;
34747
+ }
34537
34748
  function attackPlan(target, tech = [], params = [], mode = "full") {
34538
34749
  const data = loadJson("attack_vectors");
34539
34750
  const totalCategories = data?.categories.length ?? 0;
@@ -34569,31 +34780,37 @@ function attackPlan(target, tech = [], params = [], mode = "full") {
34569
34780
  target,
34570
34781
  mode,
34571
34782
  taxonomy: { total_categories: totalCategories, total_vectors_here: sorted.length },
34572
- plan: sorted.map((p, i) => ({
34573
- order: i + 1,
34574
- vector: p.vector,
34575
- priority: p.priority,
34576
- success_probability: successProbability(p.priority, p.vector, techKey),
34577
- estimated_time_sec: estimateTime(p.vector),
34578
- reason: p.reason,
34579
- tool: p.tool,
34580
- source: p.source
34581
- })),
34783
+ plan: sorted.map((p, i) => {
34784
+ const sp = successProbability(p.priority, p.vector, techKey);
34785
+ const payout = payoutFor(p.vector);
34786
+ return {
34787
+ order: i + 1,
34788
+ vector: p.vector,
34789
+ priority: p.priority,
34790
+ success_probability: sp,
34791
+ typical_payout: payout?.display ?? null,
34792
+ expected_value_usd: payout ? Math.round(sp * (payout.min + payout.max) / 2) : null,
34793
+ estimated_time_sec: estimateTime(p.vector),
34794
+ reason: p.reason,
34795
+ tool: p.tool,
34796
+ source: p.source
34797
+ };
34798
+ }),
34582
34799
  total_estimated_time_sec: totalTime
34583
34800
  };
34584
34801
  }
34585
- var PACKAGE_PAYLOADS = join9(ROOT3, "payloads");
34586
- var PACKAGE_TEMPLATES = join9(ROOT3, "templates");
34587
- var DATA_ROOT = process.env.BLITZSTRIKE_DATA ?? join9(homedir6(), ".blitzstrike", "data");
34802
+ var PACKAGE_PAYLOADS = join10(ROOT3, "payloads");
34803
+ var PACKAGE_TEMPLATES = join10(ROOT3, "templates");
34804
+ var DATA_ROOT = process.env.BLITZSTRIKE_DATA ?? join10(homedir6(), ".blitzstrike", "data");
34588
34805
  function payloadsDir() {
34589
34806
  if (existsSync7(PACKAGE_PAYLOADS))
34590
34807
  return PACKAGE_PAYLOADS;
34591
- return join9(DATA_ROOT, "payloads");
34808
+ return join10(DATA_ROOT, "payloads");
34592
34809
  }
34593
34810
  function templatesDir() {
34594
34811
  if (existsSync7(PACKAGE_TEMPLATES))
34595
34812
  return PACKAGE_TEMPLATES;
34596
- return join9(DATA_ROOT, "templates");
34813
+ return join10(DATA_ROOT, "templates");
34597
34814
  }
34598
34815
  var PAYLOADS = payloadsDir();
34599
34816
  var TEMPLATES = templatesDir();
@@ -34629,7 +34846,7 @@ function payloadLookup(topic) {
34629
34846
  const normalized = ALIASES[key] ?? key;
34630
34847
  const exact = cats.find((c) => c.toLowerCase() === normalized);
34631
34848
  if (exact) {
34632
- return { found: true, category: exact, files: listFiles(join9(PAYLOADS, exact)) };
34849
+ return { found: true, category: exact, files: listFiles(join10(PAYLOADS, exact)) };
34633
34850
  }
34634
34851
  const keyTokens = normalized.split(/[^a-z0-9]+/).filter((t) => t.length >= 3);
34635
34852
  const matches = cats.filter((c) => {
@@ -34639,7 +34856,7 @@ function payloadLookup(topic) {
34639
34856
  return keyTokens.some((tok) => new RegExp(`(^|[^a-z0-9])${tok}`).test(cl));
34640
34857
  });
34641
34858
  if (matches.length > 0) {
34642
- return { found: true, category: matches[0], files: listFiles(join9(PAYLOADS, matches[0])), alternatives: matches.slice(0, 10) };
34859
+ return { found: true, category: matches[0], files: listFiles(join10(PAYLOADS, matches[0])), alternatives: matches.slice(0, 10) };
34643
34860
  }
34644
34861
  return { found: false, topic, suggestions: cats.slice(0, 20) };
34645
34862
  }
@@ -34648,19 +34865,19 @@ function readPayload(category, file) {
34648
34865
  const exact = cats.find((c) => c.toLowerCase() === category.toLowerCase());
34649
34866
  if (!exact)
34650
34867
  return { found: false, category, suggestions: cats.slice(0, 20) };
34651
- const dir = join9(PAYLOADS, exact);
34868
+ const dir = join10(PAYLOADS, exact);
34652
34869
  const files = listFiles(dir);
34653
34870
  if (!file) {
34654
34871
  const readme = files.find((f) => f.toLowerCase() === "readme.md");
34655
34872
  if (readme) {
34656
- return { found: true, category: exact, file: readme, content: readFileSync8(join9(dir, readme), "utf8").slice(0, 20000) };
34873
+ return { found: true, category: exact, file: readme, content: readFileSync9(join10(dir, readme), "utf8").slice(0, 20000) };
34657
34874
  }
34658
34875
  return { found: true, category: exact, files };
34659
34876
  }
34660
34877
  const f = files.find((x) => x.toLowerCase() === file.toLowerCase());
34661
34878
  if (!f)
34662
34879
  return { found: false, category: exact, file, suggestions: files };
34663
- return { found: true, category: exact, file: f, content: readFileSync8(join9(dir, f), "utf8").slice(0, 20000) };
34880
+ return { found: true, category: exact, file: f, content: readFileSync9(join10(dir, f), "utf8").slice(0, 20000) };
34664
34881
  }
34665
34882
  function listFiles(dir) {
34666
34883
  try {
@@ -34675,7 +34892,7 @@ function countTemplates() {
34675
34892
  const walk = (dir) => {
34676
34893
  for (const e of readdirSync4(dir, { withFileTypes: true })) {
34677
34894
  if (e.isDirectory())
34678
- walk(join9(dir, e.name));
34895
+ walk(join10(dir, e.name));
34679
34896
  else if (e.name.endsWith(".yaml"))
34680
34897
  n++;
34681
34898
  }
@@ -34700,14 +34917,14 @@ function templateLookup(topic, limit = 10) {
34700
34917
  }
34701
34918
  for (const e of entries) {
34702
34919
  if (e.isDirectory())
34703
- walk(join9(dir, e.name), depth + 1);
34920
+ walk(join10(dir, e.name), depth + 1);
34704
34921
  else if (e.name.endsWith(".yaml")) {
34705
34922
  const name = e.name.toLowerCase();
34706
34923
  if (name.includes(key)) {
34707
- const full = join9(dir, e.name);
34924
+ const full = join10(dir, e.name);
34708
34925
  let id = "";
34709
34926
  try {
34710
- const content = readFileSync8(full, "utf8");
34927
+ const content = readFileSync9(full, "utf8");
34711
34928
  const m = content.match(/^\s*id:\s*(.+)$/m);
34712
34929
  if (m)
34713
34930
  id = m[1].trim();
@@ -35253,7 +35470,7 @@ function complianceSummary(cwes) {
35253
35470
 
35254
35471
  // src/report.ts
35255
35472
  import { writeFileSync as writeFileSync2, mkdirSync as mkdirSync5 } from "node:fs";
35256
- import { join as join10 } from "node:path";
35473
+ import { join as join11 } from "node:path";
35257
35474
  import { homedir as homedir7 } from "node:os";
35258
35475
  var SEVERITY_METRICS = {
35259
35476
  critical: { AV: "N", AC: "L", PR: "N", UI: "N", S: "U", C: "H", I: "H", A: "H" },
@@ -35484,7 +35701,7 @@ function reportJson(findings, opts = {}) {
35484
35701
  };
35485
35702
  return JSON.stringify(payload, null, 2);
35486
35703
  }
35487
- var REPORT_DIR = process.env.BLITZSTRIKE_REPORT_DIR ?? join10(homedir7(), ".blitzstrike", "reports");
35704
+ var REPORT_DIR = process.env.BLITZSTRIKE_REPORT_DIR ?? join11(homedir7(), ".blitzstrike", "reports");
35488
35705
  function slugify2(s) {
35489
35706
  const slug = s.toLowerCase().replace(/^https?:\/\//, "").replace(/[^a-z0-9.-]+/g, "-").replace(/^-+|-+$/g, "").replace(/\./g, "_").slice(0, 60);
35490
35707
  return slug || "engagement";
@@ -35495,7 +35712,7 @@ function saveReport(content, opts = {}) {
35495
35712
  const ts = new Date().toISOString().replace(/[:.]/g, "-").slice(0, 19);
35496
35713
  const ext = opts.format === "json" ? "json" : "md";
35497
35714
  const filename = `${slug}-${ts}.${ext}`;
35498
- const path = join10(REPORT_DIR, filename);
35715
+ const path = join11(REPORT_DIR, filename);
35499
35716
  writeFileSync2(path, content, "utf8");
35500
35717
  return { path, dir: REPORT_DIR, filename };
35501
35718
  }
@@ -35564,14 +35781,14 @@ function findingReport(f) {
35564
35781
  }
35565
35782
  function perFindingReports(findings, opts = {}) {
35566
35783
  const slug = slugify2(opts.scope ?? opts.title ?? "engagement");
35567
- const dir = join10(REPORT_DIR, slug);
35568
- const findingsDir = join10(dir, "findings");
35784
+ const dir = join11(REPORT_DIR, slug);
35785
+ const findingsDir = join11(dir, "findings");
35569
35786
  mkdirSync5(findingsDir, { recursive: true });
35570
35787
  const files = [];
35571
35788
  for (const f of findings) {
35572
35789
  const sev = f.classification?.severity ?? "informational";
35573
35790
  const filename = `${sev}_${findingSlug(f.title)}.md`;
35574
- const path = join10(findingsDir, filename);
35791
+ const path = join11(findingsDir, filename);
35575
35792
  writeFileSync2(path, findingReport(f), "utf8");
35576
35793
  files.push({ path, filename, severity: sev, title: f.title });
35577
35794
  }
@@ -35599,7 +35816,7 @@ function perFindingReports(findings, opts = {}) {
35599
35816
  summaryLines.push(`| ${i + 1} | ${fl.title} | ${fl.severity} | [${fl.filename}](findings/${fl.filename}) |`);
35600
35817
  });
35601
35818
  summaryLines.push("");
35602
- const summaryPath = join10(dir, "SUMMARY.md");
35819
+ const summaryPath = join11(dir, "SUMMARY.md");
35603
35820
  writeFileSync2(summaryPath, summaryLines.join(`
35604
35821
  `), "utf8");
35605
35822
  const meta = {
@@ -35608,9 +35825,9 @@ function perFindingReports(findings, opts = {}) {
35608
35825
  version: opts.version ?? null,
35609
35826
  total_findings: findings.length,
35610
35827
  by_severity: bySeverity,
35611
- findings: files.map((fl) => ({ title: fl.title, severity: fl.severity, file: join10("findings", fl.filename) }))
35828
+ findings: files.map((fl) => ({ title: fl.title, severity: fl.severity, file: join11("findings", fl.filename) }))
35612
35829
  };
35613
- const metadataPath = join10(dir, "metadata.json");
35830
+ const metadataPath = join11(dir, "metadata.json");
35614
35831
  writeFileSync2(metadataPath, JSON.stringify(meta, null, 2) + `
35615
35832
  `, "utf8");
35616
35833
  return {
@@ -36247,9 +36464,9 @@ function loadChains() {
36247
36464
  if (_chainsCache)
36248
36465
  return _chainsCache;
36249
36466
  try {
36250
- const dir = join11(fileURLToPath5(new URL(".", import.meta.url)), "..");
36251
- const path = join11(dir, "chains.json");
36252
- const raw = JSON.parse(readFileSync9(path, "utf8"));
36467
+ const dir = join12(fileURLToPath6(new URL(".", import.meta.url)), "..");
36468
+ const path = join12(dir, "chains.json");
36469
+ const raw = JSON.parse(readFileSync10(path, "utf8"));
36253
36470
  _chainsCache = raw.chains ?? [];
36254
36471
  return _chainsCache;
36255
36472
  } catch {
@@ -37019,6 +37236,9 @@ var CHAIN_ID_TO_ESCALATION = {
37019
37236
  xxe: "xxe_to_ssrf_and_file_read",
37020
37237
  deserialization: "deserialization_to_rce",
37021
37238
  jwt: "jwt_alg_confusion_forgery",
37239
+ jwt_alg_confusion: "jwt_alg_confusion_forgery",
37240
+ cache_deception: "cache_deception",
37241
+ cache_poisoning: "cache_poisoning_xss",
37022
37242
  nosql_injection: "nosql_injection_to_data_theft",
37023
37243
  mass_assignment: "mass_assignment_to_admin_takeover",
37024
37244
  prototype_pollution: "prototype_pollution_to_rce",
@@ -37027,8 +37247,8 @@ var CHAIN_ID_TO_ESCALATION = {
37027
37247
  };
37028
37248
  function loadChainLinks() {
37029
37249
  try {
37030
- const dir = join11(fileURLToPath5(new URL(".", import.meta.url)), "..");
37031
- const data = JSON.parse(readFileSync9(join11(dir, "intelligence", "chain_links.json"), "utf8"));
37250
+ const dir = join12(fileURLToPath6(new URL(".", import.meta.url)), "..");
37251
+ const data = JSON.parse(readFileSync10(join12(dir, "intelligence", "chain_links.json"), "utf8"));
37032
37252
  return data.links ?? [];
37033
37253
  } catch {
37034
37254
  return [];
@@ -37184,18 +37404,18 @@ function compactState(phase, findings) {
37184
37404
  }
37185
37405
 
37186
37406
  // src/tasks.ts
37187
- import { mkdirSync as mkdirSync6, readFileSync as readFileSync10, writeFileSync as writeFileSync3 } from "node:fs";
37188
- import { join as join12 } from "node:path";
37189
- import { fileURLToPath as fileURLToPath6 } from "node:url";
37407
+ import { mkdirSync as mkdirSync6, readFileSync as readFileSync11, writeFileSync as writeFileSync3 } from "node:fs";
37408
+ import { join as join13 } from "node:path";
37409
+ import { fileURLToPath as fileURLToPath7 } from "node:url";
37190
37410
  function tasksDir() {
37191
- return join12(fileURLToPath6(new URL(".", import.meta.url)), "..", ".blitzstrike", "tasks");
37411
+ return join13(fileURLToPath7(new URL(".", import.meta.url)), "..", ".blitzstrike", "tasks");
37192
37412
  }
37193
37413
  function taskPath(id) {
37194
- return join12(tasksDir(), `${id}.json`);
37414
+ return join13(tasksDir(), `${id}.json`);
37195
37415
  }
37196
- function load(id) {
37416
+ function load2(id) {
37197
37417
  try {
37198
- return JSON.parse(readFileSync10(taskPath(id), "utf8"));
37418
+ return JSON.parse(readFileSync11(taskPath(id), "utf8"));
37199
37419
  } catch {
37200
37420
  return null;
37201
37421
  }
@@ -37220,7 +37440,7 @@ function taskStart(id, objective, plan) {
37220
37440
  return { ...t, progress: `0/${plan.length}`, next: t.current_step };
37221
37441
  }
37222
37442
  function taskCheckpoint(id, step, status, note, outputHash) {
37223
- const t = load(id);
37443
+ const t = load2(id);
37224
37444
  if (!t)
37225
37445
  return { ok: false, error: `task '${id}' not found — call task_start first` };
37226
37446
  t.checkpoints.push({ step, status, output_hash: outputHash, note, ts: Date.now() });
@@ -37246,7 +37466,7 @@ function taskCheckpoint(id, step, status, note, outputHash) {
37246
37466
  };
37247
37467
  }
37248
37468
  function taskStatus(id) {
37249
- const t = load(id);
37469
+ const t = load2(id);
37250
37470
  if (!t)
37251
37471
  return { found: false, error: `task '${id}' not found` };
37252
37472
  const done = t.checkpoints.filter((c) => c.status === "done").length;
@@ -37262,7 +37482,7 @@ function taskStatus(id) {
37262
37482
  };
37263
37483
  }
37264
37484
  function taskResume(id) {
37265
- const t = load(id);
37485
+ const t = load2(id);
37266
37486
  if (!t)
37267
37487
  return { found: false, error: `task '${id}' not found` };
37268
37488
  const doneSteps = t.checkpoints.filter((c) => c.status === "done").map((c) => c.step);
@@ -37535,16 +37755,16 @@ function scaffoldEngagement(target, scope = [], out_of_scope = []) {
37535
37755
  // src/incremental.ts
37536
37756
  import { execFileSync as execFileSync2 } from "node:child_process";
37537
37757
  import { writeFileSync as writeFileSync4, mkdtempSync, rmSync } from "node:fs";
37538
- import { join as join13 } from "node:path";
37758
+ import { join as join14 } from "node:path";
37539
37759
  import { tmpdir } from "node:os";
37540
37760
 
37541
37761
  // src/eagle2.ts
37542
37762
  var import_php_parser2 = __toESM(require_src(), 1);
37543
- import { readFileSync as readFileSync13 } from "node:fs";
37763
+ import { readFileSync as readFileSync14 } from "node:fs";
37544
37764
 
37545
37765
  // src/dataflow.ts
37546
37766
  init_scanner();
37547
- import { readFileSync as readFileSync11 } from "node:fs";
37767
+ import { readFileSync as readFileSync12 } from "node:fs";
37548
37768
  var SOURCES = {
37549
37769
  $_GET: { id: "http_get", label: "HTTP GET parameter", attacker_controlled: true },
37550
37770
  $_POST: { id: "http_post", label: "HTTP POST body", attacker_controlled: true },
@@ -37629,7 +37849,7 @@ function traceDataFlow(path) {
37629
37849
  return result;
37630
37850
  let text;
37631
37851
  try {
37632
- text = readFileSync11(path, "utf8");
37852
+ text = readFileSync12(path, "utf8");
37633
37853
  } catch {
37634
37854
  return result;
37635
37855
  }
@@ -37710,7 +37930,7 @@ init_scanner();
37710
37930
 
37711
37931
  // src/callgraph.ts
37712
37932
  var import_php_parser = __toESM(require_src(), 1);
37713
- import { readFileSync as readFileSync12 } from "node:fs";
37933
+ import { readFileSync as readFileSync13 } from "node:fs";
37714
37934
  var parser = new import_php_parser.Engine({
37715
37935
  parser: { extractDoc: false, php7: true },
37716
37936
  ast: { withPositions: true, withSource: false }
@@ -37771,7 +37991,7 @@ function buildCallGraph(path) {
37771
37991
  const g = { nodes: new Map, edges: [] };
37772
37992
  let code;
37773
37993
  try {
37774
- code = readFileSync12(path, "utf8");
37994
+ code = readFileSync13(path, "utf8");
37775
37995
  } catch {
37776
37996
  return g;
37777
37997
  }
@@ -38433,7 +38653,7 @@ function resolveFuncId(name, summaries) {
38433
38653
  function analyzeDataFlow2(path) {
38434
38654
  let cacheCode = "";
38435
38655
  try {
38436
- cacheCode = readFileSync13(path, "utf8");
38656
+ cacheCode = readFileSync14(path, "utf8");
38437
38657
  } catch {}
38438
38658
  if (cacheCode) {
38439
38659
  const cached = getCache("eagle2", cacheCode);
@@ -38455,7 +38675,7 @@ function analyzeDataFlow2(path) {
38455
38675
  };
38456
38676
  let code;
38457
38677
  try {
38458
- code = cacheCode || readFileSync13(path, "utf8");
38678
+ code = cacheCode || readFileSync14(path, "utf8");
38459
38679
  } catch {
38460
38680
  return result;
38461
38681
  }
@@ -57141,8 +57361,8 @@ function analyzeChangedFiles(repo, base = "HEAD~1", head = "HEAD") {
57141
57361
  continue;
57142
57362
  const lang = detectLanguage(file)?.language;
57143
57363
  if (lang === "php") {
57144
- const dir = mkdtempSync(join13(tmpdir(), "blitz-incr-"));
57145
- const tmp = join13(dir, "changed.php");
57364
+ const dir = mkdtempSync(join14(tmpdir(), "blitz-incr-"));
57365
+ const tmp = join14(dir, "changed.php");
57146
57366
  writeFileSync4(tmp, code);
57147
57367
  try {
57148
57368
  const r = analyzeDataFlow2(tmp);
@@ -57163,7 +57383,7 @@ function analyzeChangedFiles(repo, base = "HEAD~1", head = "HEAD") {
57163
57383
  // src/taint.ts
57164
57384
  init_scanner();
57165
57385
  var import_php_parser4 = __toESM(require_src(), 1);
57166
- import { readFileSync as readFileSync14 } from "node:fs";
57386
+ import { readFileSync as readFileSync15 } from "node:fs";
57167
57387
  var parser4 = new import_php_parser4.Engine({
57168
57388
  parser: { extractDoc: false, php7: true },
57169
57389
  ast: { withPositions: true, withSource: false }
@@ -57461,7 +57681,7 @@ function analyzeTaint(path) {
57461
57681
  const result = { file: path, findings: [], suppressed: 0 };
57462
57682
  let code;
57463
57683
  try {
57464
- code = readFileSync14(path, "utf8");
57684
+ code = readFileSync15(path, "utf8");
57465
57685
  } catch {
57466
57686
  return result;
57467
57687
  }
@@ -57555,15 +57775,15 @@ function taintTree(root, maxFiles = 2000) {
57555
57775
  }
57556
57776
 
57557
57777
  // src/differential.ts
57558
- import { writeFileSync as writeFileSync5, rmSync as rmSync2, mkdtempSync as mkdtempSync2, readFileSync as readFileSync15 } from "node:fs";
57559
- import { join as join14 } from "node:path";
57778
+ import { writeFileSync as writeFileSync5, rmSync as rmSync2, mkdtempSync as mkdtempSync2, readFileSync as readFileSync16 } from "node:fs";
57779
+ import { join as join15 } from "node:path";
57560
57780
  import { tmpdir as tmpdir2 } from "node:os";
57561
57781
  import { execFileSync as execFileSync3 } from "node:child_process";
57562
57782
  init_scanner();
57563
57783
  function runEngine(code, language, file) {
57564
57784
  if (language === "php") {
57565
- const dir = mkdtempSync2(join14(tmpdir2(), "blitz-diff-"));
57566
- const tmp = join14(dir, "old.php");
57785
+ const dir = mkdtempSync2(join15(tmpdir2(), "blitz-diff-"));
57786
+ const tmp = join15(dir, "old.php");
57567
57787
  writeFileSync5(tmp, code);
57568
57788
  try {
57569
57789
  const r = analyzeDataFlow2(tmp);
@@ -57717,8 +57937,8 @@ function languageOf(file) {
57717
57937
  return adapter?.language ?? "php";
57718
57938
  }
57719
57939
  function analyzeDifferentialFiles(oldPath, newPath, language) {
57720
- const oldCode = readFileSync15(oldPath, "utf8");
57721
- const newCode = readFileSync15(newPath, "utf8");
57940
+ const oldCode = readFileSync16(oldPath, "utf8");
57941
+ const newCode = readFileSync16(newPath, "utf8");
57722
57942
  const lang = language ?? languageOf(newPath);
57723
57943
  return analyzeDifferential(oldCode, newCode, lang, newPath);
57724
57944
  }
@@ -57845,46 +58065,46 @@ function analyzePatch(oldCode, newCode, language = "php") {
57845
58065
  };
57846
58066
  }
57847
58067
  function analyzePatchFiles(oldPath, newPath, language) {
57848
- const oldCode = readFileSync15(oldPath, "utf8");
57849
- const newCode = readFileSync15(newPath, "utf8");
58068
+ const oldCode = readFileSync16(oldPath, "utf8");
58069
+ const newCode = readFileSync16(newPath, "utf8");
57850
58070
  const lang = language ?? languageOf(newPath);
57851
58071
  return analyzePatch(oldCode, newCode, lang);
57852
58072
  }
57853
58073
 
57854
58074
  // src/frameworks.ts
57855
- import { readFileSync as readFileSync16, existsSync as existsSync9 } from "node:fs";
57856
- import { join as join15 } from "node:path";
57857
- import { fileURLToPath as fileURLToPath7 } from "node:url";
57858
- var ROOT4 = join15(fileURLToPath7(new URL(".", import.meta.url)), "..");
57859
- var INTEL2 = join15(ROOT4, "intelligence");
58075
+ import { readFileSync as readFileSync17, existsSync as existsSync9 } from "node:fs";
58076
+ import { join as join16 } from "node:path";
58077
+ import { fileURLToPath as fileURLToPath8 } from "node:url";
58078
+ var ROOT4 = join16(fileURLToPath8(new URL(".", import.meta.url)), "..");
58079
+ var INTEL2 = join16(ROOT4, "intelligence");
57860
58080
  var cache = null;
57861
- function load2() {
58081
+ function load3() {
57862
58082
  if (cache)
57863
58083
  return cache;
57864
- const p = join15(INTEL2, "frameworks.json");
58084
+ const p = join16(INTEL2, "frameworks.json");
57865
58085
  if (!existsSync9(p))
57866
58086
  return null;
57867
58087
  try {
57868
- cache = JSON.parse(readFileSync16(p, "utf8"));
58088
+ cache = JSON.parse(readFileSync17(p, "utf8"));
57869
58089
  return cache;
57870
58090
  } catch {
57871
58091
  return null;
57872
58092
  }
57873
58093
  }
57874
58094
  function listFrameworks() {
57875
- const data = load2();
58095
+ const data = load3();
57876
58096
  if (!data)
57877
58097
  return [];
57878
58098
  return data.frameworks.map((f) => ({ id: f.id, name: f.name, language: f.language }));
57879
58099
  }
57880
58100
  function frameworkProfile(id) {
57881
- const data = load2();
58101
+ const data = load3();
57882
58102
  if (!data)
57883
58103
  return null;
57884
58104
  return data.frameworks.find((f) => f.id === id) ?? null;
57885
58105
  }
57886
58106
  function detectFramework(code, language) {
57887
- const data = load2();
58107
+ const data = load3();
57888
58108
  const hay = code.toLowerCase();
57889
58109
  const candidates = [];
57890
58110
  if (data) {
@@ -58373,185 +58593,6 @@ function nextSteps(ctx) {
58373
58593
  return steps;
58374
58594
  }
58375
58595
 
58376
- // src/patterns.ts
58377
- import { readFileSync as readFileSync17 } from "node:fs";
58378
- import { join as join16, dirname as dirname2 } from "node:path";
58379
- import { fileURLToPath as fileURLToPath8 } from "node:url";
58380
-
58381
- // src/synonyms.ts
58382
- var ALIASES = {
58383
- idor: "missing_authz",
58384
- bola: "missing_authz",
58385
- "broken object level authorization": "missing_authz",
58386
- "insecure direct object reference": "missing_authz",
58387
- "broken access control": "missing_authz",
58388
- authorization: "missing_authz",
58389
- csrf: "missing_nonce",
58390
- xsrf: "missing_nonce",
58391
- "cross site request forgery": "missing_nonce",
58392
- "cross-site request forgery": "missing_nonce",
58393
- sqli: "sql_injection",
58394
- "sql injection": "sql_injection",
58395
- "sql-injection": "sql_injection",
58396
- ssti: "ssti",
58397
- "template injection": "ssti",
58398
- "server side template injection": "ssti",
58399
- xxe: "xxe",
58400
- "xml external entity": "xxe",
58401
- "xxe injection": "xxe",
58402
- bpla: "mass_assignment",
58403
- "broken property level authorization": "mass_assignment",
58404
- "mass assignment": "mass_assignment",
58405
- lfi: "path_confusion",
58406
- rfi: "path_confusion",
58407
- "path traversal": "path_confusion",
58408
- "directory traversal": "path_confusion",
58409
- "local file inclusion": "path_confusion",
58410
- "remote file inclusion": "path_confusion",
58411
- ssrf: "ssrf",
58412
- "server side request forgery": "ssrf",
58413
- "server-side request forgery": "ssrf",
58414
- "prompt injection": "llm_injection",
58415
- llm: "llm_injection",
58416
- llm01: "llm_injection",
58417
- "llm prompt injection": "llm_injection",
58418
- graphql: "graphql_exposure",
58419
- oauth: "oauth_misconfig",
58420
- "open redirect": "oauth_misconfig",
58421
- grpc: "grpc_reflection",
58422
- "hardcoded credential": "hardcoded_secret",
58423
- "hardcoded secret": "hardcoded_secret",
58424
- "credential leak": "hardcoded_secret",
58425
- "hard coded credentials": "hardcoded_secret",
58426
- "priv esc": "priv_esc",
58427
- privesc: "priv_esc",
58428
- "privilege escalation": "priv_esc",
58429
- "file upload": "file_upload",
58430
- "unrestricted upload": "file_upload",
58431
- "unrestricted file upload": "file_upload",
58432
- deserialization: "deserialization",
58433
- "insecure deserialization": "deserialization",
58434
- unserialize: "deserialization",
58435
- "type juggling": "type_juggling",
58436
- "php type juggling": "type_juggling",
58437
- "prototype pollution": "prototype_pollution",
58438
- crlf: "crlf_injection",
58439
- "header injection": "crlf_injection",
58440
- "http response splitting": "crlf_injection",
58441
- "wrong sanitizer": "wrong_sanitizer",
58442
- "wrong context sanitization": "wrong_sanitizer",
58443
- "dependency confusion": "dependency_confusion",
58444
- "dep confusion": "dependency_confusion",
58445
- "supply chain": "dependency_confusion",
58446
- "supply chain attack": "dependency_confusion",
58447
- "ml supply chain": "ml_supply_chain",
58448
- "ai supply chain": "ml_supply_chain",
58449
- "model poisoning": "ml_supply_chain",
58450
- "ml security": "ml_supply_chain",
58451
- "ai ml security": "ml_supply_chain",
58452
- "rust unsafe": "rust_unsafe",
58453
- "unsafe rust": "rust_unsafe",
58454
- "rust memory safety": "rust_unsafe",
58455
- transmute: "rust_unsafe",
58456
- "rust format string": "rust_format_string",
58457
- "format string": "rust_format_string",
58458
- "format string injection": "rust_format_string",
58459
- "jwt algorithm confusion": "jwt_alg_confusion",
58460
- "jwt alg confusion": "jwt_alg_confusion",
58461
- "alg confusion": "jwt_alg_confusion",
58462
- "rs256 hs256": "jwt_alg_confusion",
58463
- "web cache deception": "cache_deception",
58464
- "cache deception": "cache_deception",
58465
- "cache poisoning": "cache_deception",
58466
- "cache key injection": "cache_deception"
58467
- };
58468
- function normalize(term) {
58469
- return term.trim().toLowerCase().replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
58470
- }
58471
- function canonicalId(term) {
58472
- const key = normalize(term);
58473
- if (ALIASES[key])
58474
- return ALIASES[key];
58475
- return key.replace(/ /g, "_");
58476
- }
58477
- function synonymsFor(term) {
58478
- const canonical = canonicalId(term);
58479
- const aliases = Object.entries(ALIASES).filter(([, v]) => v === canonical).map(([k]) => k);
58480
- return { canonical, aliases };
58481
- }
58482
- function listAliases() {
58483
- return Object.entries(ALIASES).map(([alias, canonical]) => ({ alias, canonical }));
58484
- }
58485
-
58486
- // src/patterns.ts
58487
- var __dirname2 = dirname2(fileURLToPath8(import.meta.url));
58488
- var _doc = null;
58489
- function load3() {
58490
- if (_doc)
58491
- return _doc;
58492
- try {
58493
- _doc = JSON.parse(readFileSync17(join16(__dirname2, "..", "intelligence", "patterns.json"), "utf8"));
58494
- } catch {
58495
- _doc = { patterns: [] };
58496
- }
58497
- return _doc;
58498
- }
58499
- function patternLookup(id) {
58500
- const canonical = canonicalId(id);
58501
- const p = load3().patterns.find((x) => x.id === canonical);
58502
- return p ?? null;
58503
- }
58504
- function listPatterns() {
58505
- return load3().patterns;
58506
- }
58507
- function submissionGate(input) {
58508
- const questions = [
58509
- {
58510
- q: "Reproducible — a copy-paste-ready request or step list triggers it?",
58511
- pass: input.reproducible === true,
58512
- reason: "Without an exact reproduction the finding is a hypothesis, not a result."
58513
- },
58514
- {
58515
- q: "In scope — the vulnerable asset is in the engagement scope?",
58516
- pass: input.in_scope === true,
58517
- reason: "Out-of-scope assets must not be submitted."
58518
- },
58519
- {
58520
- q: "Real impact — maps to an accepted-impact class, not informational?",
58521
- pass: input.real_impact === true,
58522
- reason: "Informational-only findings dilute the validity ratio."
58523
- },
58524
- {
58525
- q: "No privileged assumption — works without unrealistic attacker prerequisites?",
58526
- pass: input.no_privileged_assumption === true,
58527
- reason: "'Admin can do X' is a centralization risk, not a vulnerability."
58528
- },
58529
- {
58530
- q: "Verified live — confirmed with a marker + negative control, not just a static hint?",
58531
- pass: input.verified_live === true,
58532
- reason: "A static hit is a hypothesis until verified live (strike_verify / browser_validate)."
58533
- },
58534
- {
58535
- q: "Evidence attached AND redacted — secrets/PII stripped, integrity-tagged?",
58536
- pass: input.evidence_redacted === true,
58537
- reason: "Evidence must carry SHA-256-tagged, redacted records — no leaked secrets or victim PII."
58538
- },
58539
- {
58540
- q: "Severity derived — CVSS/confidence computed, not guessed?",
58541
- pass: input.severity_derived === true,
58542
- reason: "Severity is not confidence; derive it, don't assert it."
58543
- }
58544
- ];
58545
- const failed = questions.find((q) => !q.pass);
58546
- return {
58547
- verdict: failed ? "fail" : "pass",
58548
- passed: questions.filter((q) => q.pass).length,
58549
- total: questions.length,
58550
- questions,
58551
- ...failed ? { blocker: failed.q } : {}
58552
- };
58553
- }
58554
-
58555
58596
  // src/git-history.ts
58556
58597
  init_complex_bugs();
58557
58598
  import { execFileSync as execFileSync4 } from "node:child_process";
@@ -60393,7 +60434,7 @@ function createServer() {
60393
60434
  ` + `- A hard block (Cloudflare/WAF/IP-block/captcha) is NOT the end: mark the finding blocked + note the required vantage (residential / authorized / correct-SNI / --resolve direct-to-origin), then CONTINUE to the next lead (origin bypass, non-prod cluster, mobile APK, subdomain).
60394
60435
  ` + `- Keep trying every lead AND every chain step until each is verified/executed or blocked, THEN generate_report. Never deliver a bare surface map, and never stop at 'found X' when X enables more.
60395
60436
 
60396
- ` + "TWO PATHS:\\n" + "- Source path on disk -> blitz_scan / taint_file / eagle_eye2 (static).\\n" + "- Live URL -> live_recon / active_scan / strike_verify (web-hunting).\\n\\n" + "DEEPEN A FINDING: attack_plan(target, tech, params) to get the prioritized vector plan (decide what to test next with data); list_chains (escalation), chain_links (compose), technique_lookup(cls), payload_lookup, bypass_lookup (blocked). Ground any detector hit empirically with pattern_lookup(id) — it returns the class's CWE, real-world signature, escalation chains, citable references, per-class bypass techniques, and the high-value assets (crown jewels) that class hits, so a raw hit becomes a class-aware finding. Resolve free-form terminology first with synonym_lookup(term) (IDOR/BOLA/SQLi/prompt-injection → canonical id). For an llm_injection hit, its pattern carries a validation discipline — the RUN-TWICE RULE (reproduce token-for-token across two fresh sessions), NON-GUESSABLE ANCHOR (must leak a real key/URL, not a plausible guess), and OOB PROOF (a verifiable callback log) — apply all three before reporting. BEFORE generating a report, run submission_gate(...) and only ship a finding that passes all 7 questions (reproducible, in-scope, real-impact, no-privileged-assumption, verified-live, evidence-redacted, severity-derived); one false = kill it. Calibrate severity with severity_calibrate(type, cvss) to get a P1–P5 tier + VRT-style category. Start each engagement with engagement_scaffold(target, scope) for the folder + scope.md structure, and check data_refresh() to confirm the data layers are consistent. Phase doctrine: read_skill(bs-orchestrate-engagement | bs-web-hunting | bs-source-audit | bs-verify-finding). Campaign plan: read_playbook(target-type). On any failure call retry_guidance(signal) / model_fallback(signal) before giving up.\n" + "KNOWLEDGE BASE (discover, don't guess): skillLookup(topic) / listSkills for the 40 attack-path + hunting skills (ap-*, hp-*, bs-*); list_attack_vectors / attack_vectors(cat) for the 34-category vector taxonomy; taxonomy(kind) for OWASP/CWE/ASVS/API-top-10; read_playbook(type) for the 17 campaign playbooks; list_manuals / read_tool_manual for 317 tool references; list_tools / run_catalog_tool for the 141-tool catalog. Every tool, skill, and data layer is reachable from these. CROSS-TARGET INTELLIGENCE: strike_resolve auto-records confirmed/false_positive verdicts into the empirical ledger; query it with intelligence(action=hit_rates/top_vectors/recall) so a new target on a known tech inherits historical hit-rates (attack_plan already blends them into success_probability). intelligence(action=recall, tech, target) is the per-engagement pattern recall — it returns which patterns historically CONFIRMED on that tech (prioritize them) versus which only ever produced false positives (avoid them), so a new engagement starts from the empirical playbook of past ones. LIVE PENTEST + TARGETING (black-box, WAF-safe): cache_gap(base_url, endpoint) fuzzes path-normalization + static-extension variants for cache deception/poisoning; blind_oracle(base_url, param, value) detects which SINK a param reaches (sql/ssti/xss) via benign arithmetic (id=1+0, test${7*7}) WITHOUT a malicious payload; param_precedence(base_url, param, A, B) maps duplicate-parameter precedence (first/last-wins) for WAF-bypass. SOURCE TARGETING: action_surface(code) maps every wp_ajax_* action to its vuln class + DERIVED priority (what to look for WHERE); security_state(sanitizers, sink) gives a wrong-context sanitization verdict; framework_knowledge(framework) returns auth/nonce primitives for 9 frameworks; variant_scan(root, signature) mass-sweeps an install base for ONE bug family; patch_analyze(old, new) REVERSES a security patch into the 0-day, and its mine_signature feeds variant_scan to sweep unpatched copies. All of these are DETECTION HINTS — verify each live (strike_verify / browser_validate) before it enters the report. NEWEST DETECTORS — understand AND try them: variant_scan also emits priv_esc (privilege escalation — a role/capability/user change fed by request input, traced cross-file via reverse call-graph, e.g. set_role($id, sanitize_key($_POST['um-role'])) or update_user_meta(...,'wp_capabilities', $_POST[...])) and flags uploadAllow=>array('all') unrestricted-upload configs as file_upload (the file-manager/connector shape). TO TRY a priv_esc hit: submit the role field with 'administrator' (or send wp_capabilities meta) and confirm the account actually gains admin. TO TRY an unrestricted-upload hit: POST a .php/.phtml and confirm it lands web-reachable + executes. variant_scan also emits hardcoded_secret (CWE-798) in three tiers: a secret field (api_key/db_password/access_token/aws_*) assigned a literal (HIGH), a known secret FORMAT (JWT eyJ…/AWS AKIA…/GitHub ghp_…/Slack xoxb-…/…) regardless of name (HIGH), or a high-entropy suspect token (MEDIUM — verify before reporting). Verify a frontend/JS secret live via drive_devtools (inspect the JS bundle / network response and confirm the key is actually exposed), and for a backend secret confirm it is reachable/valid. A static hit is a HYPOTHESIS until verified live — never report unverified. For a repo, also scan_git_history(root) — secrets DELETED from HEAD still live in .git history (the removed-later-is-not-fixed trap), and it feeds every recovered pre-deletion blob through the same secret detector. Once you recover a credential, prove it is still ACTIVE with validate_leaked_key(apiBase, endpoints, key|blobUrl) — a READ-ONLY differential test (401-without-key vs 200-with-key = auth bypass PROVEN). Two supply-chain detectors: dependency_confusion (a manifest/build file resolving a package from a public registry — pypi.org/npmjs.org --extra-index-url, or a scoped @company/pkg with no private registry) and ml_supply_chain (torch.load without weights_only=True / joblib.load / np.load(allow_pickle=True) / keras load_model on an untrusted model → pickle RCE). Rust is supported end-to-end: the taint engine (blitz_scan / taint_file) maps Rust sinks (std::process::Command, sqlx/diesel, reqwest/hyper, std::fs, serde/bincode) to the classic classes, plus two Rust-specific detectors — rust_unsafe (transmute / assume_init / from_raw_parts / ptr::* — memory-unsafety surface, CWE-119) and rust_format_string (println!/format! with a variable as the format string — CWE-134). The sqlx query! compile-time macro is treated as safe (suppressed).\n" + `PRECISION ANALYSIS — chrome-devtools MCP is MANDATORY, not optional:
60437
+ ` + "TWO PATHS:\\n" + "- Source path on disk -> blitz_scan / taint_file / eagle_eye2 (static).\\n" + "- Live URL -> live_recon / active_scan / strike_verify (web-hunting).\\n\\n" + "DEEPEN A FINDING: attack_plan(target, tech, params) to get the prioritized vector plan (decide what to test next with data); list_chains (escalation), chain_links (compose), technique_lookup(cls), payload_lookup, bypass_lookup (blocked). Ground any detector hit empirically with pattern_lookup(id) — it returns the class's CWE, real-world signature, escalation chains, citable references, per-class bypass techniques, and the high-value assets (crown jewels) that class hits, so a raw hit becomes a class-aware finding. Resolve free-form terminology first with synonym_lookup(term) (IDOR/BOLA/SQLi/prompt-injection → canonical id). For an llm_injection hit, its pattern carries a validation discipline — the RUN-TWICE RULE (reproduce token-for-token across two fresh sessions), NON-GUESSABLE ANCHOR (must leak a real key/URL, not a plausible guess), and OOB PROOF (a verifiable callback log) — apply all three before reporting. BEFORE generating a report, run submission_gate(...) and only ship a finding that passes all 7 questions (reproducible, in-scope, real-impact, no-privileged-assumption, verified-live, evidence-redacted, severity-derived); one false = kill it. Calibrate severity with severity_calibrate(type, cvss) to get a P1–P5 tier + VRT-style category. Start each engagement with engagement_scaffold(target, scope) for the folder + scope.md structure, and check data_refresh() to confirm the data layers are consistent. Phase doctrine: read_skill(bs-orchestrate-engagement | bs-web-hunting | bs-source-audit | bs-verify-finding). Campaign plan: read_playbook(target-type). On any failure call retry_guidance(signal) / model_fallback(signal) before giving up.\n" + "KNOWLEDGE BASE (discover, don't guess): skillLookup(topic) / listSkills for the 40 attack-path + hunting skills (ap-*, hp-*, bs-*); list_attack_vectors / attack_vectors(cat) for the 34-category vector taxonomy; taxonomy(kind) for OWASP/CWE/ASVS/API-top-10; read_playbook(type) for the 17 campaign playbooks; list_manuals / read_tool_manual for 317 tool references; list_tools / run_catalog_tool for the 141-tool catalog. Every tool, skill, and data layer is reachable from these. CROSS-TARGET INTELLIGENCE: strike_resolve auto-records confirmed/false_positive verdicts into the empirical ledger; query it with intelligence(action=hit_rates/top_vectors/recall) so a new target on a known tech inherits historical hit-rates (attack_plan already blends them into success_probability). intelligence(action=recall, tech, target) is the per-engagement pattern recall — it returns which patterns historically CONFIRMED on that tech (prioritize them) versus which only ever produced false positives (avoid them), so a new engagement starts from the empirical playbook of past ones. LIVE PENTEST + TARGETING (black-box, WAF-safe): cache_gap(base_url, endpoint) fuzzes path-normalization + static-extension variants for cache deception/poisoning; blind_oracle(base_url, param, value) detects which SINK a param reaches (sql/ssti/xss) via benign arithmetic (id=1+0, test${7*7}) WITHOUT a malicious payload; param_precedence(base_url, param, A, B) maps duplicate-parameter precedence (first/last-wins) for WAF-bypass. SOURCE TARGETING: action_surface(code) maps every wp_ajax_* action to its vuln class + DERIVED priority (what to look for WHERE); security_state(sanitizers, sink) gives a wrong-context sanitization verdict; framework_knowledge(framework) returns auth/nonce primitives for 9 frameworks; variant_scan(root, signature) mass-sweeps an install base for ONE bug family; patch_analyze(old, new) REVERSES a security patch into the 0-day, and its mine_signature feeds variant_scan to sweep unpatched copies. All of these are DETECTION HINTS — verify each live (strike_verify / browser_validate) before it enters the report. NEWEST DETECTORS — understand AND try them: variant_scan also emits priv_esc (privilege escalation — a role/capability/user change fed by request input, traced cross-file via reverse call-graph, e.g. set_role($id, sanitize_key($_POST['um-role'])) or update_user_meta(...,'wp_capabilities', $_POST[...])) and flags uploadAllow=>array('all') unrestricted-upload configs as file_upload (the file-manager/connector shape). TO TRY a priv_esc hit: submit the role field with 'administrator' (or send wp_capabilities meta) and confirm the account actually gains admin. TO TRY an unrestricted-upload hit: POST a .php/.phtml and confirm it lands web-reachable + executes. variant_scan also emits hardcoded_secret (CWE-798) in three tiers: a secret field (api_key/db_password/access_token/aws_*) assigned a literal (HIGH), a known secret FORMAT (JWT eyJ…/AWS AKIA…/GitHub ghp_…/Slack xoxb-…/…) regardless of name (HIGH), or a high-entropy suspect token (MEDIUM — verify before reporting). Verify a frontend/JS secret live via drive_devtools (inspect the JS bundle / network response and confirm the key is actually exposed), and for a backend secret confirm it is reachable/valid. A static hit is a HYPOTHESIS until verified live — never report unverified. For a repo, also scan_git_history(root) — secrets DELETED from HEAD still live in .git history (the removed-later-is-not-fixed trap), and it feeds every recovered pre-deletion blob through the same secret detector. Once you recover a credential, prove it is still ACTIVE with validate_leaked_key(apiBase, endpoints, key|blobUrl) — a READ-ONLY differential test (401-without-key vs 200-with-key = auth bypass PROVEN). Two supply-chain detectors: dependency_confusion (a manifest/build file resolving a package from a public registry — pypi.org/npmjs.org --extra-index-url, or a scoped @company/pkg with no private registry) and ml_supply_chain (torch.load without weights_only=True / joblib.load / np.load(allow_pickle=True) / keras load_model on an untrusted model → pickle RCE). Rust is supported end-to-end: the taint engine (blitz_scan / taint_file) maps Rust sinks (std::process::Command, sqlx/diesel, reqwest/hyper, std::fs, serde/bincode) to the classic classes, plus two Rust-specific detectors — rust_unsafe (transmute / assume_init / from_raw_parts / ptr::* — memory-unsafety surface, CWE-119) and rust_format_string (println!/format! with a variable as the format string — CWE-134). The sqlx query! compile-time macro is treated as safe (suppressed). Two more web-class detectors: jwt_alg_confusion (a JWT verifier that dispatches on the token's alg header and accepts BOTH RS256 and HS256, with the HS256 HMAC secret derived from public/shared key material — CWE-347; the attacker sets alg=HS256 and signs with the public key to forge admin tokens) and cache_deception (a reverse proxy caching static-extension URLs with a cache key that omits the session cookie, over a session-authenticated backend — CWE-525; the victim's cached private response is re-fetched anonymously). TO TRY a jwt_alg_confusion hit: fetch the public key (/.well-known/jwks.json), forge an HS256 token signed with that public key, and confirm admin access. TO TRY a cache_deception hit: request an authenticated path with a static extension appended (.css/.js) and re-fetch it anonymously.\n" + `PRECISION ANALYSIS — chrome-devtools MCP is MANDATORY, not optional:
60397
60438
  ` + `- When a lead needs DOM/JS precision — DOM-XSS sink execution, AJAX endpoint + payload interception, JS runtime errors, redirect chains, SSO/token flow, or anything a static HTML glance cannot prove — call drive_devtools(target). It spawns chrome-devtools-mcp and drives a REAL headless browser (navigate -> list_network_requests -> list_console_messages -> evaluate_script), giving reproducible evidence instead of a guess.
60398
60439
  ` + `- Before calling it, check_mcp() to confirm the browser MCP is available; if not, blitzstrike install-tools or npm i -g chrome-devtools-mcp. Never substitute eyeballing minified JS or a static sink guess when a live browser can PROVE it. This is the precision + consistency layer.
60399
60440
  ` + "EXTERNAL MCP SERVERS (verified, connect them — NOT one-shot CLIs): chrome-devtools-mcp (29 tools: list_network_requests/get_network_request for raw HTTP interception, list_console_messages for JS errors + DOM-XSS, evaluate_script to run JS, take_screenshot) -> stdio chrome-devtools-mcp --headless --chromeArg=--no-sandbox --chromeArg=--disable-gpu (as root/container this is MANDATORY or the browser crashes; add --proxyServer http://127.0.0.1:8080 to route through Burp, --acceptInsecureCerts for bad TLS). burp-suite-mcp (proxy history + active scan + repeater) -> NOT npm: build the JAR (git clone https://github.com/PortSwigger/mcp-server.git && cd mcp-server && ./gradlew embedProxyJar), load it in Burp Extensions, then connect the client to http://127.0.0.1:9876 (SSE) or the stdio proxy java -jar mcp-proxy-all.jar --sse-url http://127.0.0.1:9876."
@@ -60753,7 +60794,7 @@ ${statusLine}` : statusLine },
60753
60794
  });
60754
60795
  server.registerTool("pattern_lookup", {
60755
60796
  title: "Empirical pattern lookup",
60756
- description: "GROUNDING: return the empirical grounding for a detector type / vuln class — its CWE, its real-world signature, the escalation chains it composes into (cross-ref chains.json), and citable references. Use to turn a raw detector hit into a grounded, class-aware finding. Pass 'list' to enumerate all grounded classes.",
60797
+ description: "GROUNDING: return the empirical grounding for a detector type / vuln class — its CWE, its real-world signature, the escalation chains it composes into (cross-ref chains.json), citable references, and its typical bug-bounty payout range (typical_payout / payout_min / payout_max) for impact-first prioritization. Use to turn a raw detector hit into a grounded, class-aware finding. Pass 'list' to enumerate all grounded classes.",
60757
60798
  inputSchema: {
60758
60799
  id: string2().describe("Detector/vuln class id (sql_injection, ssrf, idor-like missing_authz, …), or 'list'")
60759
60800
  }