blitzstrike 1.0.9 → 1.0.11
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 +64 -49
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
2
|
-
// @bun
|
|
1
|
+
#!/usr/bin/env node
|
|
3
2
|
var __create = Object.create;
|
|
4
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
5
4
|
var __defProp = Object.defineProperty;
|
|
@@ -6932,11 +6931,11 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
6932
6931
|
});
|
|
6933
6932
|
|
|
6934
6933
|
// src/sync.ts
|
|
6935
|
-
import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync2, readFileSync as readFileSync8, readdirSync as readdirSync4, statSync as statSync3, rmSync } from "fs";
|
|
6936
|
-
import { join as join8 } from "path";
|
|
6937
|
-
import { homedir as homedir4 } from "os";
|
|
6938
|
-
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
6939
|
-
import { spawnSync as spawnSync3 } from "child_process";
|
|
6934
|
+
import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync2, readFileSync as readFileSync8, readdirSync as readdirSync4, statSync as statSync3, rmSync } from "node:fs";
|
|
6935
|
+
import { join as join8 } from "node:path";
|
|
6936
|
+
import { homedir as homedir4 } from "node:os";
|
|
6937
|
+
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
6938
|
+
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
6940
6939
|
function dirExists(p) {
|
|
6941
6940
|
try {
|
|
6942
6941
|
return statSync3(p).isDirectory();
|
|
@@ -21565,7 +21564,7 @@ var EMPTY_COMPLETION_RESULT = {
|
|
|
21565
21564
|
};
|
|
21566
21565
|
|
|
21567
21566
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
21568
|
-
import process2 from "process";
|
|
21567
|
+
import process2 from "node:process";
|
|
21569
21568
|
|
|
21570
21569
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
21571
21570
|
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
@@ -21671,8 +21670,8 @@ class StdioServerTransport {
|
|
|
21671
21670
|
}
|
|
21672
21671
|
|
|
21673
21672
|
// src/scanner.ts
|
|
21674
|
-
import { readFileSync, readdirSync, statSync } from "fs";
|
|
21675
|
-
import { join } from "path";
|
|
21673
|
+
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
21674
|
+
import { join } from "node:path";
|
|
21676
21675
|
var NOPRIV_HOOKS = [
|
|
21677
21676
|
"wp_ajax_nopriv_",
|
|
21678
21677
|
"admin_post_nopriv_",
|
|
@@ -22003,15 +22002,15 @@ async function nvdLookup(cveId) {
|
|
|
22003
22002
|
}
|
|
22004
22003
|
|
|
22005
22004
|
// src/orchestrator.ts
|
|
22006
|
-
import { readFileSync as readFileSync4, existsSync as existsSync3, statSync as statSync2 } from "fs";
|
|
22007
|
-
import { join as join4 } from "path";
|
|
22008
|
-
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
22005
|
+
import { readFileSync as readFileSync4, existsSync as existsSync3, statSync as statSync2 } from "node:fs";
|
|
22006
|
+
import { join as join4 } from "node:path";
|
|
22007
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
22009
22008
|
|
|
22010
22009
|
// src/memory.ts
|
|
22011
|
-
import { readFileSync as readFileSync2, appendFileSync, mkdirSync, existsSync } from "fs";
|
|
22012
|
-
import { join as join2 } from "path";
|
|
22013
|
-
import { createHash } from "crypto";
|
|
22014
|
-
import { homedir } from "os";
|
|
22010
|
+
import { readFileSync as readFileSync2, appendFileSync, mkdirSync, existsSync } from "node:fs";
|
|
22011
|
+
import { join as join2 } from "node:path";
|
|
22012
|
+
import { createHash } from "node:crypto";
|
|
22013
|
+
import { homedir } from "node:os";
|
|
22015
22014
|
var HOME_DIR = process.env.BLITZSTRIKE_HOME ?? join2(homedir(), ".blitzstrike");
|
|
22016
22015
|
var MEMORY_PATH = join2(HOME_DIR, "memory.jsonl");
|
|
22017
22016
|
function ensureDir() {
|
|
@@ -22126,9 +22125,9 @@ function rememberIfAbsent(topic, content, type, tags, source, verified) {
|
|
|
22126
22125
|
}
|
|
22127
22126
|
|
|
22128
22127
|
// src/manuals.ts
|
|
22129
|
-
import { readFileSync as readFileSync3, existsSync as existsSync2 } from "fs";
|
|
22130
|
-
import { join as join3 } from "path";
|
|
22131
|
-
import { fileURLToPath } from "url";
|
|
22128
|
+
import { readFileSync as readFileSync3, existsSync as existsSync2 } from "node:fs";
|
|
22129
|
+
import { join as join3 } from "node:path";
|
|
22130
|
+
import { fileURLToPath } from "node:url";
|
|
22132
22131
|
var ROOT = join3(fileURLToPath(new URL(".", import.meta.url)), "..");
|
|
22133
22132
|
var _indexCache = null;
|
|
22134
22133
|
function loadManualIndex() {
|
|
@@ -22346,7 +22345,7 @@ function runEngagement(target, scope = "", mode = "bug-bounty", maxFiles = 2000,
|
|
|
22346
22345
|
}
|
|
22347
22346
|
})();
|
|
22348
22347
|
if (isPath) {
|
|
22349
|
-
report.scope = { target, allowed: true, enforcement: "source-audit", reason: "local source path
|
|
22348
|
+
report.scope = { target, allowed: true, enforcement: "source-audit", reason: "local source path — no network scope gate" };
|
|
22350
22349
|
} else {
|
|
22351
22350
|
const sc = scopeCheck(target, scope, mode);
|
|
22352
22351
|
report.scope = sc;
|
|
@@ -22431,10 +22430,10 @@ function listChains() {
|
|
|
22431
22430
|
}
|
|
22432
22431
|
|
|
22433
22432
|
// src/catalog.ts
|
|
22434
|
-
import { readFileSync as readFileSync5, readdirSync as readdirSync2 } from "fs";
|
|
22435
|
-
import { join as join5 } from "path";
|
|
22436
|
-
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
22437
|
-
import { spawnSync } from "child_process";
|
|
22433
|
+
import { readFileSync as readFileSync5, readdirSync as readdirSync2 } from "node:fs";
|
|
22434
|
+
import { join as join5 } from "node:path";
|
|
22435
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
22436
|
+
import { spawnSync } from "node:child_process";
|
|
22438
22437
|
var ROOT2 = join5(fileURLToPath3(new URL(".", import.meta.url)), "..");
|
|
22439
22438
|
var _toolsCache = null;
|
|
22440
22439
|
var _skillsCache = null;
|
|
@@ -22565,11 +22564,11 @@ function ensureTool(name) {
|
|
|
22565
22564
|
}
|
|
22566
22565
|
|
|
22567
22566
|
// src/intel.ts
|
|
22568
|
-
import { readFileSync as readFileSync6, existsSync as existsSync5 } from "fs";
|
|
22569
|
-
import { join as join6 } from "path";
|
|
22570
|
-
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
22571
|
-
import { readdirSync as readdirSync3 } from "fs";
|
|
22572
|
-
import { homedir as homedir2 } from "os";
|
|
22567
|
+
import { readFileSync as readFileSync6, existsSync as existsSync5 } from "node:fs";
|
|
22568
|
+
import { join as join6 } from "node:path";
|
|
22569
|
+
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
22570
|
+
import { readdirSync as readdirSync3 } from "node:fs";
|
|
22571
|
+
import { homedir as homedir2 } from "node:os";
|
|
22573
22572
|
var ROOT3 = join6(fileURLToPath4(new URL(".", import.meta.url)), "..");
|
|
22574
22573
|
var INTEL = join6(ROOT3, "intelligence");
|
|
22575
22574
|
function loadJson(name) {
|
|
@@ -22956,10 +22955,10 @@ async function activeScan(target, scope = "", mode = "bug-bounty", allowed = und
|
|
|
22956
22955
|
result.endpoints = await probeCommonPaths(base);
|
|
22957
22956
|
const recs = [];
|
|
22958
22957
|
if (result.waf?.detected)
|
|
22959
|
-
recs.push(`WAF detected (${result.waf.wafs?.map((w) => w.waf).join(", ")})
|
|
22958
|
+
recs.push(`WAF detected (${result.waf.wafs?.map((w) => w.waf).join(", ")}) — apply WAF bypass before exploitation.`);
|
|
22960
22959
|
const interesting = result.endpoints?.filter((e) => e.status >= 200 && e.status < 400 && !e.path.includes(".well-known"));
|
|
22961
22960
|
if (interesting && interesting.length > 0) {
|
|
22962
|
-
recs.push(`Live endpoints found: ${interesting.map((e) => e.path).join(", ")}
|
|
22961
|
+
recs.push(`Live endpoints found: ${interesting.map((e) => e.path).join(", ")} — trace these with EAGLE-EYE / verify with STRIKE.`);
|
|
22963
22962
|
}
|
|
22964
22963
|
for (const c of result.tech?.correlations ?? []) {
|
|
22965
22964
|
recs.push(`Tech '${c.tech}' maps to known vuln classes: ${(c.vulns ?? []).slice(0, 3).join(", ")}`);
|
|
@@ -22987,7 +22986,7 @@ function createServer() {
|
|
|
22987
22986
|
` + `- read_playbook/read_tool_manual: 270 tool manuals + 17 engagement playbooks.
|
|
22988
22987
|
` + `- remember/memory_lookup: persist + recall verified knowledge across runs.
|
|
22989
22988
|
` + `- scope_check: enforce scope before active testing (bug-bounty/red-team = strict).
|
|
22990
|
-
` + `- active_scan: live black-box scan (fingerprint/WAF/tech/endpoints)
|
|
22989
|
+
` + `- active_scan: live black-box scan (fingerprint/WAF/tech/endpoints) — GATED by scope_check;
|
|
22991
22990
|
` + ` it only probes after scope authorizes the target or the caller sets authorize=true.
|
|
22992
22991
|
` + `- nvd_lookup/fofa_search: CVE + asset recon.
|
|
22993
22992
|
|
|
@@ -23138,7 +23137,7 @@ function createServer() {
|
|
|
23138
23137
|
});
|
|
23139
23138
|
server.registerTool("active_scan", {
|
|
23140
23139
|
title: "STRIKE live black-box scan",
|
|
23141
|
-
description: "STRIKE: live black-box scan of a URL
|
|
23140
|
+
description: "STRIKE: live black-box scan of a URL — fingerprint, WAF detection, tech correlation, endpoint discovery. GATED: runs only after scope_check authorizes the target (approval gate).",
|
|
23142
23141
|
inputSchema: {
|
|
23143
23142
|
target: string2().describe("Target URL/host to scan"),
|
|
23144
23143
|
scope: string2().optional().describe("In-scope patterns (required for strict modes)"),
|
|
@@ -23434,11 +23433,11 @@ async function serve() {
|
|
|
23434
23433
|
}
|
|
23435
23434
|
|
|
23436
23435
|
// src/cli.ts
|
|
23437
|
-
import { readFileSync as readFileSync7, existsSync as existsSync6, writeFileSync, mkdirSync as mkdirSync2 } from "fs";
|
|
23438
|
-
import { join as join7, dirname } from "path";
|
|
23439
|
-
import { homedir as homedir3 } from "os";
|
|
23440
|
-
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
23441
|
-
import { spawnSync as spawnSync2 } from "child_process";
|
|
23436
|
+
import { readFileSync as readFileSync7, existsSync as existsSync6, writeFileSync, mkdirSync as mkdirSync2 } from "node:fs";
|
|
23437
|
+
import { join as join7, dirname } from "node:path";
|
|
23438
|
+
import { homedir as homedir3 } from "node:os";
|
|
23439
|
+
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
23440
|
+
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
23442
23441
|
var ROOT4 = join7(fileURLToPath5(new URL(".", import.meta.url)), "..");
|
|
23443
23442
|
function which(cmd) {
|
|
23444
23443
|
return spawnSync2(`command -v ${cmd}`, { shell: true }).status === 0;
|
|
@@ -23449,7 +23448,7 @@ function installedCount() {
|
|
|
23449
23448
|
return { total: tools.length, installed, missing: tools.map((t) => t.name).filter((n) => !installed.includes(n)) };
|
|
23450
23449
|
}
|
|
23451
23450
|
function runDoctor() {
|
|
23452
|
-
console.log(`BlitzStrike doctor
|
|
23451
|
+
console.log(`BlitzStrike doctor — environment health check
|
|
23453
23452
|
`);
|
|
23454
23453
|
const issues = [];
|
|
23455
23454
|
const bunOk = which("bun") || which("node");
|
|
@@ -23489,13 +23488,13 @@ function runDoctor() {
|
|
|
23489
23488
|
}
|
|
23490
23489
|
if (installed.length > 0) {
|
|
23491
23490
|
console.log(`
|
|
23492
|
-
Installed tools (${installed.length}): ${installed.slice(0, 15).join(", ")}${installed.length > 15 ? ",
|
|
23491
|
+
Installed tools (${installed.length}): ${installed.slice(0, 15).join(", ")}${installed.length > 15 ? ", …" : ""}`);
|
|
23493
23492
|
}
|
|
23494
23493
|
const fails = issues.filter((i) => i.status === "fail").length;
|
|
23495
23494
|
const warns = issues.filter((i) => i.status === "warn").length;
|
|
23496
23495
|
const verdict = fails > 0 ? "degraded" : warns > 0 ? "ready (some warnings)" : "healthy";
|
|
23497
23496
|
console.log(`
|
|
23498
|
-
BlitzStrike
|
|
23497
|
+
BlitzStrike — ${verdict}`);
|
|
23499
23498
|
if (fails > 0)
|
|
23500
23499
|
process.exitCode = 1;
|
|
23501
23500
|
}
|
|
@@ -23505,10 +23504,14 @@ function resolveCommand() {
|
|
|
23505
23504
|
const src = join7(ROOT4, "src", "index.ts");
|
|
23506
23505
|
if (which("bun") && existsSync6(src))
|
|
23507
23506
|
return { command: "bun", args: ["run", src, "serve", "--mcp"] };
|
|
23507
|
+
if (which("npx"))
|
|
23508
|
+
return { command: "npx", args: ["-y", "blitzstrike", "serve", "--mcp"] };
|
|
23509
|
+
if (which("bunx"))
|
|
23510
|
+
return { command: "bunx", args: ["blitzstrike", "serve", "--mcp"] };
|
|
23508
23511
|
const dist = join7(ROOT4, "dist", "index.js");
|
|
23509
23512
|
if (existsSync6(dist))
|
|
23510
23513
|
return { command: "bun", args: [dist, "serve", "--mcp"] };
|
|
23511
|
-
return { command: "
|
|
23514
|
+
return { command: "npx", args: ["-y", "blitzstrike", "serve", "--mcp"] };
|
|
23512
23515
|
}
|
|
23513
23516
|
function readJson(p) {
|
|
23514
23517
|
try {
|
|
@@ -23531,14 +23534,14 @@ function jsonMcpServersWrite(p) {
|
|
|
23531
23534
|
};
|
|
23532
23535
|
}
|
|
23533
23536
|
function opencodeWrite(p) {
|
|
23534
|
-
return (
|
|
23537
|
+
return (_command, _args) => {
|
|
23535
23538
|
const dir = dirname(p);
|
|
23536
23539
|
if (!existsSync6(dir))
|
|
23537
23540
|
mkdirSync2(dir, { recursive: true });
|
|
23538
23541
|
const existing = readJson(p) ?? {};
|
|
23539
23542
|
existing.mcp = {
|
|
23540
23543
|
...existing.mcp ?? {},
|
|
23541
|
-
blitzstrike: { type: "local", command: [
|
|
23544
|
+
blitzstrike: { type: "local", command: ["npx", "-y", "blitzstrike", "serve", "--mcp"], enabled: true }
|
|
23542
23545
|
};
|
|
23543
23546
|
writeFileSync(p, JSON.stringify(existing, null, 2));
|
|
23544
23547
|
copyOpenCodeAgents();
|
|
@@ -23686,7 +23689,7 @@ function runInstall(dryRun = false) {
|
|
|
23686
23689
|
const { command, args } = resolveCommand();
|
|
23687
23690
|
const agents = detectAgents();
|
|
23688
23691
|
const installed = agents.filter((a) => a.installed());
|
|
23689
|
-
console.log(`Blitz Strike install
|
|
23692
|
+
console.log(`Blitz Strike install — register with every detected agent CLI
|
|
23690
23693
|
`);
|
|
23691
23694
|
console.log(`Resolved command: ${command} ${args.join(" ")}
|
|
23692
23695
|
`);
|
|
@@ -23700,7 +23703,7 @@ Agent-specific formats: see docs/installation.md`);
|
|
|
23700
23703
|
console.log(`Detected ${installed.length} agent(s): ${installed.map((a) => a.name).join(", ")}
|
|
23701
23704
|
`);
|
|
23702
23705
|
if (dryRun) {
|
|
23703
|
-
console.log("Dry run
|
|
23706
|
+
console.log("Dry run — would write to each config (no changes made):");
|
|
23704
23707
|
for (const a of installed)
|
|
23705
23708
|
console.log(` - ${a.name} -> ${a.detectPath}`);
|
|
23706
23709
|
return;
|
|
@@ -23721,9 +23724,21 @@ Registered with ${ok}/${installed.length} agent(s).`);
|
|
|
23721
23724
|
}
|
|
23722
23725
|
|
|
23723
23726
|
// src/index.ts
|
|
23724
|
-
|
|
23727
|
+
import { readFileSync as readFileSync9, existsSync as existsSync8 } from "node:fs";
|
|
23728
|
+
import { join as join9 } from "node:path";
|
|
23729
|
+
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
23730
|
+
var ROOT6 = join9(fileURLToPath7(new URL(".", import.meta.url)), "..");
|
|
23731
|
+
function readVersion() {
|
|
23732
|
+
try {
|
|
23733
|
+
const p = join9(ROOT6, "package.json");
|
|
23734
|
+
if (existsSync8(p))
|
|
23735
|
+
return JSON.parse(readFileSync9(p, "utf8")).version ?? "1.0.0";
|
|
23736
|
+
} catch {}
|
|
23737
|
+
return "1.0.0";
|
|
23738
|
+
}
|
|
23739
|
+
var VERSION = readVersion();
|
|
23725
23740
|
function usage() {
|
|
23726
|
-
return `BlitzStrike ${VERSION}
|
|
23741
|
+
return `BlitzStrike ${VERSION} — MCP security-audit toolbelt
|
|
23727
23742
|
|
|
23728
23743
|
Usage:
|
|
23729
23744
|
blitzstrike serve --mcp Start the MCP server over stdio (default transport)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blitzstrike",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
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": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"docs"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "bun build src/index.ts --outdir dist --target
|
|
27
|
+
"build": "bun build src/index.ts --outdir dist --target node --format esm",
|
|
28
28
|
"typecheck": "tsc --noEmit",
|
|
29
29
|
"serve": "bun run src/index.ts serve",
|
|
30
30
|
"doctor": "bun run src/index.ts doctor",
|