blitzstrike 1.0.24 → 1.0.25

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 (2) hide show
  1. package/dist/index.js +18 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire } from "node:module";
3
2
  var __create = Object.create;
4
3
  var __getProtoOf = Object.getPrototypeOf;
5
4
  var __defProp = Object.defineProperty;
@@ -44,7 +43,6 @@ var __esm = (fn, res, err) => () => {
44
43
  throw err[0];
45
44
  return res;
46
45
  };
47
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
48
46
 
49
47
  // node_modules/ajv/dist/compile/codegen/code.js
50
48
  var require_code = __commonJS(function(exports) {
@@ -14822,7 +14820,7 @@ var require_src = __commonJS(function(exports, module) {
14822
14820
  });
14823
14821
 
14824
14822
  // src/sync.ts
14825
- import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync2, readFileSync as readFileSync11, readdirSync as readdirSync5, statSync as statSync3, rmSync } from "node:fs";
14823
+ import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync4, readFileSync as readFileSync11, readdirSync as readdirSync5, statSync as statSync3, rmSync as rmSync2 } from "node:fs";
14826
14824
  import { join as join9 } from "node:path";
14827
14825
  import { homedir as homedir4 } from "node:os";
14828
14826
  import { fileURLToPath as fileURLToPath7 } from "node:url";
@@ -14881,7 +14879,7 @@ function syncData() {
14881
14879
  if (gitOk && (!dirExists(payloadsPath) || countFiles(payloadsPath) === 0 || !dirExists(templatesPath) || countFiles(templatesPath) === 0)) {
14882
14880
  const tmp = join9(DATA_ROOT2, ".tmp-clone");
14883
14881
  if (dirExists(tmp))
14884
- rmSync(tmp, { recursive: true, force: true });
14882
+ rmSync2(tmp, { recursive: true, force: true });
14885
14883
  const r = spawnSync3("git", ["clone", "--depth", "1", "--filter=blob:none", "--sparse", GITHUB_REPO, tmp], { timeout: 120000 });
14886
14884
  if (r.status === 0) {
14887
14885
  const sparse = spawnSync3("git", ["-C", tmp, "sparse-checkout", "set", "payloads", "templates"], { timeout: 120000 });
@@ -14895,7 +14893,7 @@ function syncData() {
14895
14893
  templatesSynced = true;
14896
14894
  }
14897
14895
  }
14898
- rmSync(tmp, { recursive: true, force: true });
14896
+ rmSync2(tmp, { recursive: true, force: true });
14899
14897
  }
14900
14898
  }
14901
14899
  return {
@@ -14918,7 +14916,7 @@ function manualCopy(src, dst) {
14918
14916
  if (e.isDirectory())
14919
14917
  manualCopy(s, d);
14920
14918
  else
14921
- writeFileSync2(d, readFileSync11(s));
14919
+ writeFileSync4(d, readFileSync11(s));
14922
14920
  }
14923
14921
  }
14924
14922
  var ROOT6, DATA_ROOT2, GITHUB_REPO = "https://github.com/shinthink/blitzstrike.git";
@@ -29649,7 +29647,7 @@ import { join as join4 } from "node:path";
29649
29647
  import { fileURLToPath as fileURLToPath2 } from "node:url";
29650
29648
 
29651
29649
  // src/memory.ts
29652
- import { readFileSync as readFileSync2, appendFileSync, mkdirSync, existsSync } from "node:fs";
29650
+ import { readFileSync as readFileSync2, appendFileSync, mkdirSync, existsSync, writeFileSync } from "node:fs";
29653
29651
  import { join as join2 } from "node:path";
29654
29652
  import { createHash } from "node:crypto";
29655
29653
  import { homedir } from "node:os";
@@ -29762,7 +29760,6 @@ function listMemory() {
29762
29760
  };
29763
29761
  }
29764
29762
  function forget(id) {
29765
- const { writeFileSync } = __require("node:fs");
29766
29763
  const entries = loadMemory();
29767
29764
  const kept = entries.filter((e) => e.id !== id);
29768
29765
  if (kept.length === entries.length) {
@@ -50478,6 +50475,9 @@ function dedupFindings(findings) {
50478
50475
  }
50479
50476
  return [...groups.values()];
50480
50477
  }
50478
+ function uniqueFindings(findings) {
50479
+ return dedupFindings(findings).map((g) => g.representative);
50480
+ }
50481
50481
 
50482
50482
  // src/report.ts
50483
50483
  function summarize(findings) {
@@ -50590,7 +50590,7 @@ function reportJson(findings, opts = {}) {
50590
50590
  }
50591
50591
 
50592
50592
  // src/benchmark.ts
50593
- import { readFileSync as readFileSync9, readdirSync as readdirSync4 } from "node:fs";
50593
+ import { readFileSync as readFileSync9, readdirSync as readdirSync4, writeFileSync as writeFileSync2, rmSync } from "node:fs";
50594
50594
  import { join as join7 } from "node:path";
50595
50595
  import { fileURLToPath as fileURLToPath5 } from "node:url";
50596
50596
  var ROOT4 = join7(fileURLToPath5(new URL(".", import.meta.url)), "..");
@@ -50661,8 +50661,7 @@ function detect(entry) {
50661
50661
  const lang = entry.language;
50662
50662
  if (lang === "php") {
50663
50663
  const tmp = join7(ROOT4, "bench", ".tmp.php");
50664
- const { writeFileSync, rmSync } = __require("node:fs");
50665
- writeFileSync(tmp, entry.code);
50664
+ writeFileSync2(tmp, entry.code);
50666
50665
  const r = analyzeTaint(tmp);
50667
50666
  rmSync(tmp, { force: true });
50668
50667
  if (r.findings.length > 0)
@@ -51529,7 +51528,8 @@ function createServer() {
51529
51528
  return { content: [{ type: "text", text: JSON.stringify({ error: "invalid JSON" }) }] };
51530
51529
  }
51531
51530
  const groups = dedupFindings(list);
51532
- return { content: [{ type: "text", text: JSON.stringify(groups.map((g) => ({ signature: g.signature, count: g.count, representative: g.representative.id }))) }] };
51531
+ const unique = uniqueFindings(list);
51532
+ return { content: [{ type: "text", text: JSON.stringify({ groups: groups.map((g) => ({ signature: g.signature, count: g.count, representative: g.representative.id })), unique_findings: unique.map((f) => f.id) }) }] };
51533
51533
  });
51534
51534
  server.registerTool("generate_report", {
51535
51535
  title: "Generate a reproducible report",
@@ -51574,7 +51574,7 @@ async function serve() {
51574
51574
  }
51575
51575
 
51576
51576
  // src/cli.ts
51577
- import { readFileSync as readFileSync10, existsSync as existsSync5, writeFileSync, mkdirSync as mkdirSync2 } from "node:fs";
51577
+ import { readFileSync as readFileSync10, existsSync as existsSync5, writeFileSync as writeFileSync3, mkdirSync as mkdirSync2 } from "node:fs";
51578
51578
  import { join as join8, dirname } from "node:path";
51579
51579
  import { homedir as homedir3 } from "node:os";
51580
51580
  import { fileURLToPath as fileURLToPath6 } from "node:url";
@@ -51671,7 +51671,7 @@ function jsonMcpServersWrite(p) {
51671
51671
  ...existing.mcpServers ?? {},
51672
51672
  blitzstrike: { command, args }
51673
51673
  };
51674
- writeFileSync(p, JSON.stringify(existing, null, 2));
51674
+ writeFileSync3(p, JSON.stringify(existing, null, 2));
51675
51675
  };
51676
51676
  }
51677
51677
  function opencodeWrite(p) {
@@ -51684,7 +51684,7 @@ function opencodeWrite(p) {
51684
51684
  ...existing.mcp ?? {},
51685
51685
  blitzstrike: { type: "local", command: ["npx", "-y", "blitzstrike", "serve", "--mcp"], enabled: true }
51686
51686
  };
51687
- writeFileSync(p, JSON.stringify(existing, null, 2));
51687
+ writeFileSync3(p, JSON.stringify(existing, null, 2));
51688
51688
  copyOpenCodeAgents();
51689
51689
  };
51690
51690
  }
@@ -51699,7 +51699,7 @@ function copyOpenCodeAgents() {
51699
51699
  const src = join8(srcDir, f);
51700
51700
  const dst = join8(dstDir, f);
51701
51701
  if (existsSync5(src)) {
51702
- writeFileSync(dst, readFileSync10(src, "utf8"));
51702
+ writeFileSync3(dst, readFileSync10(src, "utf8"));
51703
51703
  }
51704
51704
  }
51705
51705
  }
@@ -51719,7 +51719,7 @@ function codexWrite(p) {
51719
51719
  command = "${command}"
51720
51720
  args = ${JSON.stringify(args)}
51721
51721
  `;
51722
- writeFileSync(p, existing);
51722
+ writeFileSync3(p, existing);
51723
51723
  };
51724
51724
  }
51725
51725
  function hermesWrite(p) {
@@ -51748,7 +51748,7 @@ mcp_servers:
51748
51748
  args: ${JSON.stringify(args)}
51749
51749
  `;
51750
51750
  }
51751
- writeFileSync(p, existing);
51751
+ writeFileSync3(p, existing);
51752
51752
  };
51753
51753
  }
51754
51754
  function detectAgents() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blitzstrike",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
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": {