blitzstrike 2.4.34 → 2.4.35
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 +12 -0
- package/dist/index.js +107 -19
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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.35] — 2026-09-14
|
|
9
|
+
|
|
10
|
+
### Added — Variant Mining (confirm once, weaponize everywhere)
|
|
11
|
+
|
|
12
|
+
- New `src/variant-scan.ts`: mass-scan an install base (plugin/theme/repo tree)
|
|
13
|
+
with ALL detectors (taint, complex-bugs incl. wrong-context sanitization +
|
|
14
|
+
missing authz/nonce, route-confusion) and report hits grouped by a DERIVED
|
|
15
|
+
signature (`<detector>:<type>`).
|
|
16
|
+
- New `variant_scan` tool: pass `signature` to mine for ONE bug family — the
|
|
17
|
+
pattern that turns one confirmed CVE into hundreds of variants across 10k+
|
|
18
|
+
files.
|
|
19
|
+
|
|
8
20
|
## [2.4.34] — 2026-09-14
|
|
9
21
|
|
|
10
22
|
### Added — Framework Security Knowledge Graph (WordPress authz/nonce)
|
package/dist/index.js
CHANGED
|
@@ -15493,7 +15493,7 @@ async function checkMcpServers() {
|
|
|
15493
15493
|
var init_mcp_status = () => {};
|
|
15494
15494
|
|
|
15495
15495
|
// src/sync.ts
|
|
15496
|
-
import { mkdirSync as mkdirSync9, writeFileSync as writeFileSync8, readFileSync as
|
|
15496
|
+
import { mkdirSync as mkdirSync9, writeFileSync as writeFileSync8, readFileSync as readFileSync21, readdirSync as readdirSync7, statSync as statSync4, rmSync as rmSync4 } from "node:fs";
|
|
15497
15497
|
import { join as join19 } from "node:path";
|
|
15498
15498
|
import { homedir as homedir10 } from "node:os";
|
|
15499
15499
|
import { fileURLToPath as fileURLToPath9 } from "node:url";
|
|
@@ -15589,7 +15589,7 @@ function manualCopy(src, dst) {
|
|
|
15589
15589
|
if (e.isDirectory())
|
|
15590
15590
|
manualCopy(s, d);
|
|
15591
15591
|
else
|
|
15592
|
-
writeFileSync8(d,
|
|
15592
|
+
writeFileSync8(d, readFileSync21(s));
|
|
15593
15593
|
}
|
|
15594
15594
|
}
|
|
15595
15595
|
var ROOT7, DATA_ROOT2, GITHUB_REPO = "https://github.com/shinthink/blitzstrike.git";
|
|
@@ -15640,7 +15640,7 @@ var init_update = __esm(() => {
|
|
|
15640
15640
|
});
|
|
15641
15641
|
|
|
15642
15642
|
// src/release.ts
|
|
15643
|
-
import { readFileSync as
|
|
15643
|
+
import { readFileSync as readFileSync23, existsSync as existsSync12 } from "node:fs";
|
|
15644
15644
|
import { join as join20 } from "node:path";
|
|
15645
15645
|
import { fileURLToPath as fileURLToPath10 } from "node:url";
|
|
15646
15646
|
import { execSync as execSync2 } from "node:child_process";
|
|
@@ -15648,7 +15648,7 @@ function validateRelease() {
|
|
|
15648
15648
|
const checks = [];
|
|
15649
15649
|
checks.push({ name: "package.json version", ok: true, detail: VERSION });
|
|
15650
15650
|
try {
|
|
15651
|
-
const changelog =
|
|
15651
|
+
const changelog = readFileSync23(join20(ROOT8, "CHANGELOG.md"), "utf8");
|
|
15652
15652
|
const m = changelog.match(/^##\s+\[([0-9]+\.[0-9]+\.[0-9]+)\]/m);
|
|
15653
15653
|
const changelogVersion = m?.[1] ?? null;
|
|
15654
15654
|
checks.push({
|
|
@@ -15689,13 +15689,13 @@ var init_release = __esm(() => {
|
|
|
15689
15689
|
});
|
|
15690
15690
|
|
|
15691
15691
|
// src/dependency.ts
|
|
15692
|
-
import { readFileSync as
|
|
15692
|
+
import { readFileSync as readFileSync24 } from "node:fs";
|
|
15693
15693
|
import { join as join21 } from "node:path";
|
|
15694
15694
|
import { fileURLToPath as fileURLToPath11 } from "node:url";
|
|
15695
15695
|
function checkDependencies() {
|
|
15696
15696
|
let pkg = {};
|
|
15697
15697
|
try {
|
|
15698
|
-
pkg = JSON.parse(
|
|
15698
|
+
pkg = JSON.parse(readFileSync24(join21(ROOT9, "package.json"), "utf8"));
|
|
15699
15699
|
} catch {
|
|
15700
15700
|
return { install_scripts: [], git_dependencies: [], total_dependencies: 0, safe: false };
|
|
15701
15701
|
}
|
|
@@ -15722,7 +15722,7 @@ var init_dependency = __esm(() => {
|
|
|
15722
15722
|
});
|
|
15723
15723
|
|
|
15724
15724
|
// src/cli.ts
|
|
15725
|
-
import { readFileSync as
|
|
15725
|
+
import { readFileSync as readFileSync25, existsSync as existsSync13, writeFileSync as writeFileSync9, mkdirSync as mkdirSync10 } from "node:fs";
|
|
15726
15726
|
import { join as join22, dirname as dirname2 } from "node:path";
|
|
15727
15727
|
import { homedir as homedir11 } from "node:os";
|
|
15728
15728
|
import { fileURLToPath as fileURLToPath12 } from "node:url";
|
|
@@ -15833,7 +15833,7 @@ function resolveCommand() {
|
|
|
15833
15833
|
}
|
|
15834
15834
|
function readJson(p) {
|
|
15835
15835
|
try {
|
|
15836
|
-
return JSON.parse(
|
|
15836
|
+
return JSON.parse(readFileSync25(p, "utf8"));
|
|
15837
15837
|
} catch {
|
|
15838
15838
|
return null;
|
|
15839
15839
|
}
|
|
@@ -15876,7 +15876,7 @@ function copyOpenCodeAgents() {
|
|
|
15876
15876
|
const src = join22(srcDir, f);
|
|
15877
15877
|
const dst = join22(dstDir, f);
|
|
15878
15878
|
if (existsSync13(src)) {
|
|
15879
|
-
writeFileSync9(dst,
|
|
15879
|
+
writeFileSync9(dst, readFileSync25(src, "utf8"));
|
|
15880
15880
|
}
|
|
15881
15881
|
}
|
|
15882
15882
|
}
|
|
@@ -15885,7 +15885,7 @@ function codexWrite(p) {
|
|
|
15885
15885
|
const dir = dirname2(p);
|
|
15886
15886
|
if (!existsSync13(dir))
|
|
15887
15887
|
mkdirSync10(dir, { recursive: true });
|
|
15888
|
-
let existing = existsSync13(p) ?
|
|
15888
|
+
let existing = existsSync13(p) ? readFileSync25(p, "utf8") : "";
|
|
15889
15889
|
if (!existing.trimEnd().endsWith(`
|
|
15890
15890
|
`))
|
|
15891
15891
|
existing += `
|
|
@@ -15904,7 +15904,7 @@ function hermesWrite(p) {
|
|
|
15904
15904
|
const dir = dirname2(p);
|
|
15905
15905
|
if (!existsSync13(dir))
|
|
15906
15906
|
mkdirSync10(dir, { recursive: true });
|
|
15907
|
-
let existing = existsSync13(p) ?
|
|
15907
|
+
let existing = existsSync13(p) ? readFileSync25(p, "utf8") : "";
|
|
15908
15908
|
existing = existing.replace(/^ blitzstrike:\n(?: .*\n?)*/m, "");
|
|
15909
15909
|
if (!existing.trimEnd().endsWith(`
|
|
15910
15910
|
`))
|
|
@@ -30754,7 +30754,7 @@ class StdioServerTransport {
|
|
|
30754
30754
|
|
|
30755
30755
|
// src/server.ts
|
|
30756
30756
|
init_scanner();
|
|
30757
|
-
import { readFileSync as
|
|
30757
|
+
import { readFileSync as readFileSync22 } from "node:fs";
|
|
30758
30758
|
|
|
30759
30759
|
// src/recon.ts
|
|
30760
30760
|
var TIMEOUT_MS = 25000;
|
|
@@ -57054,8 +57054,85 @@ function openCount() {
|
|
|
57054
57054
|
return loadObligations().filter((o) => o.status === "open").length;
|
|
57055
57055
|
}
|
|
57056
57056
|
|
|
57057
|
+
// src/variant-scan.ts
|
|
57058
|
+
init_scanner();
|
|
57059
|
+
import { readFileSync as readFileSync19 } from "node:fs";
|
|
57060
|
+
function deriveSignature(detector, type) {
|
|
57061
|
+
return `${detector}:${type}`;
|
|
57062
|
+
}
|
|
57063
|
+
function variantScan(root, opts = {}) {
|
|
57064
|
+
const files = iterSourceFiles(root, opts.maxFiles ?? 5000);
|
|
57065
|
+
const hits = [];
|
|
57066
|
+
for (const file of files) {
|
|
57067
|
+
let code;
|
|
57068
|
+
try {
|
|
57069
|
+
code = readFileSync19(file, "utf8");
|
|
57070
|
+
} catch {
|
|
57071
|
+
continue;
|
|
57072
|
+
}
|
|
57073
|
+
try {
|
|
57074
|
+
const taint = analyzeTaint(file);
|
|
57075
|
+
for (const f of taint.findings) {
|
|
57076
|
+
const type = f.category ?? f.sink ?? "taint";
|
|
57077
|
+
hits.push({
|
|
57078
|
+
file,
|
|
57079
|
+
detector: "taint",
|
|
57080
|
+
type,
|
|
57081
|
+
signature: deriveSignature("taint", type),
|
|
57082
|
+
line: f.sink_line ?? 0,
|
|
57083
|
+
severity: "high",
|
|
57084
|
+
evidence: f.sink ?? ""
|
|
57085
|
+
});
|
|
57086
|
+
}
|
|
57087
|
+
} catch {}
|
|
57088
|
+
for (const f of detectComplexBugs(code, file)) {
|
|
57089
|
+
hits.push({
|
|
57090
|
+
file,
|
|
57091
|
+
detector: "complex_bugs",
|
|
57092
|
+
type: f.type,
|
|
57093
|
+
signature: deriveSignature("complex_bugs", f.type),
|
|
57094
|
+
line: f.line,
|
|
57095
|
+
severity: f.severity,
|
|
57096
|
+
evidence: f.evidence
|
|
57097
|
+
});
|
|
57098
|
+
}
|
|
57099
|
+
for (const f of detectRouteConfusion(code, file)) {
|
|
57100
|
+
hits.push({
|
|
57101
|
+
file,
|
|
57102
|
+
detector: "route_confusion",
|
|
57103
|
+
type: f.type,
|
|
57104
|
+
signature: deriveSignature("route_confusion", f.type),
|
|
57105
|
+
line: f.line,
|
|
57106
|
+
severity: f.severity,
|
|
57107
|
+
evidence: f.evidence
|
|
57108
|
+
});
|
|
57109
|
+
}
|
|
57110
|
+
}
|
|
57111
|
+
const bySignature = {};
|
|
57112
|
+
for (const h of hits)
|
|
57113
|
+
bySignature[h.signature] = (bySignature[h.signature] ?? 0) + 1;
|
|
57114
|
+
const filtered = opts.signature ? hits.filter((h) => h.signature === opts.signature) : hits;
|
|
57115
|
+
const filesWithFindings = new Set(filtered.map((h) => h.file));
|
|
57116
|
+
return {
|
|
57117
|
+
root,
|
|
57118
|
+
files_scanned: files.length,
|
|
57119
|
+
files_with_findings: filesWithFindings.size,
|
|
57120
|
+
total_findings: filtered.length,
|
|
57121
|
+
signature: opts.signature ?? null,
|
|
57122
|
+
by_signature: bySignature,
|
|
57123
|
+
hits: filtered.map((h) => ({
|
|
57124
|
+
file: h.file,
|
|
57125
|
+
detector: h.detector,
|
|
57126
|
+
type: h.type,
|
|
57127
|
+
signature: h.signature,
|
|
57128
|
+
line: h.line,
|
|
57129
|
+
severity: h.severity
|
|
57130
|
+
}))
|
|
57131
|
+
};
|
|
57132
|
+
}
|
|
57133
|
+
|
|
57057
57134
|
// src/enterprise-benchmark.ts
|
|
57058
|
-
import { existsSync as existsSync11, readFileSync as
|
|
57135
|
+
import { existsSync as existsSync11, readFileSync as readFileSync20, readdirSync as readdirSync6, statSync as statSync3 } from "node:fs";
|
|
57059
57136
|
import { join as join18, resolve } from "node:path";
|
|
57060
57137
|
var ROOT6 = resolve(process.cwd(), "bench", "enterprise");
|
|
57061
57138
|
var ENTERPRISE_FIXTURES = [
|
|
@@ -57097,7 +57174,7 @@ function detectFixture(dir) {
|
|
|
57097
57174
|
for (const f of sourceFiles(dir)) {
|
|
57098
57175
|
let code;
|
|
57099
57176
|
try {
|
|
57100
|
-
code =
|
|
57177
|
+
code = readFileSync20(f, "utf8");
|
|
57101
57178
|
} catch {
|
|
57102
57179
|
continue;
|
|
57103
57180
|
}
|
|
@@ -58008,6 +58085,17 @@ ${statusLine}` : statusLine },
|
|
|
58008
58085
|
const k = frameworkKnowledge(framework ?? "wordpress");
|
|
58009
58086
|
return { content: [{ type: "text", text: JSON.stringify(k ?? { error: "framework not in the knowledge graph", framework }) }] };
|
|
58010
58087
|
});
|
|
58088
|
+
server.registerTool("variant_scan", {
|
|
58089
|
+
title: "Mass variant-mining scan of an install base",
|
|
58090
|
+
description: "VARIANT-MINING: mass-scan a source tree (plugin/theme/repo install base) with ALL detectors (taint, complex-bugs incl. wrong-context sanitization + missing authz/nonce, route-confusion) and report hits grouped by DERIVED signature (<detector>:<type>). Pass `signature` to mine for ONE bug family (e.g. complex_bugs:missing_authz) — the 'confirm once, weaponize everywhere' pattern that turns one CVE into hundreds of variants across an install base.",
|
|
58091
|
+
inputSchema: {
|
|
58092
|
+
root: string2().describe("Root directory to scan"),
|
|
58093
|
+
max_files: number2().optional().describe("Max files to scan (default 5000)"),
|
|
58094
|
+
signature: string2().optional().describe("Filter to one bug family (e.g. complex_bugs:missing_authz)")
|
|
58095
|
+
}
|
|
58096
|
+
}, async ({ root, max_files, signature }) => {
|
|
58097
|
+
return { content: [{ type: "text", text: JSON.stringify(variantScan(root, { maxFiles: max_files, signature })) }] };
|
|
58098
|
+
});
|
|
58011
58099
|
server.registerTool("payload_lookup", {
|
|
58012
58100
|
title: "Look up exploit payloads",
|
|
58013
58101
|
description: "INTEL: find a payload collection (66 categories from PayloadsAllTheThings).",
|
|
@@ -58546,7 +58634,7 @@ ${statusLine}` : statusLine },
|
|
|
58546
58634
|
description: "Route confusion (separate class from source→sink taint): detect attacker-controlled dispatch (call_user_func/forward/dispatch), dynamic method calls ($obj->$m()), dynamic include (LFI), batch/proxy forwarding without per-route auth re-check, and route matching without path normalization.",
|
|
58547
58635
|
inputSchema: { path: string2().describe("Source file path (PHP)") }
|
|
58548
58636
|
}, async ({ path }) => {
|
|
58549
|
-
const code =
|
|
58637
|
+
const code = readFileSync22(path, "utf8");
|
|
58550
58638
|
const findings = detectRouteConfusion(code, path);
|
|
58551
58639
|
return {
|
|
58552
58640
|
content: [{
|
|
@@ -58560,7 +58648,7 @@ ${statusLine}` : statusLine },
|
|
|
58560
58648
|
description: "Complex-bug detection beyond taint: deserialization→POP gadget chain (unserialize + magic method), type juggling (loose ==/!= vs hash/secret), mass assignment (extract/parse_str without a safe flag), prototype pollution (unsafe merge of request data), CRLF/header injection (user input into a header), path confusion (user input into a file path without canonicalization), SSRF (user-controlled URL with no host allowlist), XXE (user XML parsed without disabling entities), SSTI (user input into a template render with no sandbox), wrong-context sanitization (sanitize_text_field() into a SQL query), and missing authorization/nonce on WordPress entry points (wp_ajax_* / admin_post_* / register_rest_route without current_user_can, nonce verification, or permission_callback).",
|
|
58561
58649
|
inputSchema: { path: string2().describe("Source file path") }
|
|
58562
58650
|
}, async ({ path }) => {
|
|
58563
|
-
const code =
|
|
58651
|
+
const code = readFileSync22(path, "utf8");
|
|
58564
58652
|
const findings = detectComplexBugs(code, path);
|
|
58565
58653
|
return {
|
|
58566
58654
|
content: [{
|
|
@@ -58627,7 +58715,7 @@ ${statusLine}` : statusLine },
|
|
|
58627
58715
|
let lang = language;
|
|
58628
58716
|
if (path && !code) {
|
|
58629
58717
|
try {
|
|
58630
|
-
src =
|
|
58718
|
+
src = readFileSync22(path, "utf8");
|
|
58631
58719
|
} catch {
|
|
58632
58720
|
return { content: [{ type: "text", text: JSON.stringify({ error: `cannot read ${path}` }) }] };
|
|
58633
58721
|
}
|
|
@@ -58868,7 +58956,7 @@ async function serve() {
|
|
|
58868
58956
|
|
|
58869
58957
|
// src/index.ts
|
|
58870
58958
|
init_cli();
|
|
58871
|
-
import { readFileSync as
|
|
58959
|
+
import { readFileSync as readFileSync26, existsSync as existsSync14 } from "node:fs";
|
|
58872
58960
|
import { join as join23 } from "node:path";
|
|
58873
58961
|
import { fileURLToPath as fileURLToPath13 } from "node:url";
|
|
58874
58962
|
var ROOT11 = join23(fileURLToPath13(new URL(".", import.meta.url)), "..");
|
|
@@ -58876,7 +58964,7 @@ function readVersion() {
|
|
|
58876
58964
|
try {
|
|
58877
58965
|
const p = join23(ROOT11, "package.json");
|
|
58878
58966
|
if (existsSync14(p))
|
|
58879
|
-
return JSON.parse(
|
|
58967
|
+
return JSON.parse(readFileSync26(p, "utf8")).version ?? "1.0.0";
|
|
58880
58968
|
} catch {}
|
|
58881
58969
|
return "1.0.0";
|
|
58882
58970
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blitzstrike",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.35",
|
|
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": {
|