blitzstrike 1.0.13 → 1.0.14
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 +41 -23
- 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) {
|
|
@@ -7156,7 +7154,12 @@ var init_scanner = __esm(() => {
|
|
|
7156
7154
|
"call_user_func(": "Dynamic dispatch (attacker-controlled callback)",
|
|
7157
7155
|
"call_user_func_array(": "Dynamic dispatch",
|
|
7158
7156
|
"create_function(": "RCE (deprecated eval wrapper)",
|
|
7159
|
-
"preg_replace(": "RCE (if /e modifier or code in pattern)"
|
|
7157
|
+
"preg_replace(": "RCE (if /e modifier or code in pattern)",
|
|
7158
|
+
"echo ": "XSS (reflected output)",
|
|
7159
|
+
"print ": "XSS (reflected output)",
|
|
7160
|
+
"printf(": "XSS (reflected output)",
|
|
7161
|
+
"header(": "Open redirect / header injection",
|
|
7162
|
+
"wp_redirect(": "Open redirect"
|
|
7160
7163
|
};
|
|
7161
7164
|
AUTH_GATES = [
|
|
7162
7165
|
"check_ajax_referer",
|
|
@@ -7189,7 +7192,7 @@ var init_scanner = __esm(() => {
|
|
|
7189
7192
|
});
|
|
7190
7193
|
|
|
7191
7194
|
// src/sync.ts
|
|
7192
|
-
import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync2, readFileSync as
|
|
7195
|
+
import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync2, readFileSync as readFileSync9, readdirSync as readdirSync4, statSync as statSync3, rmSync } from "node:fs";
|
|
7193
7196
|
import { join as join8 } from "node:path";
|
|
7194
7197
|
import { homedir as homedir4 } from "node:os";
|
|
7195
7198
|
import { fileURLToPath as fileURLToPath6 } from "node:url";
|
|
@@ -7285,7 +7288,7 @@ function manualCopy(src, dst) {
|
|
|
7285
7288
|
if (e.isDirectory())
|
|
7286
7289
|
manualCopy(s, d);
|
|
7287
7290
|
else
|
|
7288
|
-
writeFileSync2(d,
|
|
7291
|
+
writeFileSync2(d, readFileSync9(s));
|
|
7289
7292
|
}
|
|
7290
7293
|
}
|
|
7291
7294
|
var ROOT5, DATA_ROOT2, GITHUB_REPO = "https://github.com/shinthink/blitzstrike.git";
|
|
@@ -23157,6 +23160,7 @@ async function activeScan(target, scope = "", mode = "bug-bounty", allowed = und
|
|
|
23157
23160
|
|
|
23158
23161
|
// src/dataflow.ts
|
|
23159
23162
|
init_scanner();
|
|
23163
|
+
import { readFileSync as readFileSync7 } from "node:fs";
|
|
23160
23164
|
var SOURCES = {
|
|
23161
23165
|
$_GET: { id: "http_get", label: "HTTP GET parameter", attacker_controlled: true },
|
|
23162
23166
|
$_POST: { id: "http_post", label: "HTTP POST body", attacker_controlled: true },
|
|
@@ -23238,23 +23242,37 @@ function traceDataFlow(path) {
|
|
|
23238
23242
|
return result;
|
|
23239
23243
|
let text;
|
|
23240
23244
|
try {
|
|
23241
|
-
|
|
23242
|
-
text = readFileSync(path, "utf8");
|
|
23245
|
+
text = readFileSync7(path, "utf8");
|
|
23243
23246
|
} catch {
|
|
23244
23247
|
return result;
|
|
23245
23248
|
}
|
|
23246
23249
|
const lines = text.split(`
|
|
23247
23250
|
`);
|
|
23248
|
-
|
|
23251
|
+
const seen = new Set;
|
|
23252
|
+
const sinks = scan.sinks.filter((s) => {
|
|
23253
|
+
const cls = classifySink2(s.sink);
|
|
23254
|
+
if (!cls)
|
|
23255
|
+
return false;
|
|
23256
|
+
const key = `${cls.id}|${s.line}`;
|
|
23257
|
+
if (seen.has(key))
|
|
23258
|
+
return false;
|
|
23259
|
+
seen.add(key);
|
|
23260
|
+
return true;
|
|
23261
|
+
});
|
|
23262
|
+
for (const s of sinks) {
|
|
23249
23263
|
const sinkClass = classifySink2(s.sink);
|
|
23250
|
-
|
|
23251
|
-
|
|
23252
|
-
|
|
23253
|
-
const
|
|
23264
|
+
const wideStart = Math.max(0, s.line - 15);
|
|
23265
|
+
const wideWindow = lines.slice(wideStart, s.line).join(`
|
|
23266
|
+
`);
|
|
23267
|
+
const sanitizerWindow = lines.slice(Math.max(0, s.line - 3), s.line + 1).join(`
|
|
23254
23268
|
`);
|
|
23255
|
-
const
|
|
23256
|
-
const
|
|
23257
|
-
const
|
|
23269
|
+
const sinkLine = lines[s.line - 1] ?? "";
|
|
23270
|
+
const prevLine = lines[s.line - 2] ?? "";
|
|
23271
|
+
const authContext = sinkLine + `
|
|
23272
|
+
` + prevLine;
|
|
23273
|
+
const source = classifySource(wideWindow);
|
|
23274
|
+
const sanitizers = findSanitizers(sanitizerWindow);
|
|
23275
|
+
const authGates = AUTH_GATES.filter((g) => authContext.includes(g));
|
|
23258
23276
|
const edge = {
|
|
23259
23277
|
source,
|
|
23260
23278
|
sanitizers,
|
|
@@ -23267,7 +23285,7 @@ function traceDataFlow(path) {
|
|
|
23267
23285
|
result.authorized.push(edge);
|
|
23268
23286
|
continue;
|
|
23269
23287
|
}
|
|
23270
|
-
if (isSanitized(sanitizers, sinkClass.
|
|
23288
|
+
if (isSanitized(sanitizers, sinkClass.id)) {
|
|
23271
23289
|
result.sanitized.push(edge);
|
|
23272
23290
|
continue;
|
|
23273
23291
|
}
|
|
@@ -23857,7 +23875,7 @@ async function serve() {
|
|
|
23857
23875
|
}
|
|
23858
23876
|
|
|
23859
23877
|
// src/cli.ts
|
|
23860
|
-
import { readFileSync as
|
|
23878
|
+
import { readFileSync as readFileSync8, existsSync as existsSync6, writeFileSync, mkdirSync as mkdirSync2 } from "node:fs";
|
|
23861
23879
|
import { join as join7, dirname } from "node:path";
|
|
23862
23880
|
import { homedir as homedir3 } from "node:os";
|
|
23863
23881
|
import { fileURLToPath as fileURLToPath5 } from "node:url";
|
|
@@ -23939,7 +23957,7 @@ function resolveCommand() {
|
|
|
23939
23957
|
}
|
|
23940
23958
|
function readJson(p) {
|
|
23941
23959
|
try {
|
|
23942
|
-
return JSON.parse(
|
|
23960
|
+
return JSON.parse(readFileSync8(p, "utf8"));
|
|
23943
23961
|
} catch {
|
|
23944
23962
|
return null;
|
|
23945
23963
|
}
|
|
@@ -23982,7 +24000,7 @@ function copyOpenCodeAgents() {
|
|
|
23982
24000
|
const src = join7(srcDir, f);
|
|
23983
24001
|
const dst = join7(dstDir, f);
|
|
23984
24002
|
if (existsSync6(src)) {
|
|
23985
|
-
writeFileSync(dst,
|
|
24003
|
+
writeFileSync(dst, readFileSync8(src, "utf8"));
|
|
23986
24004
|
}
|
|
23987
24005
|
}
|
|
23988
24006
|
}
|
|
@@ -23991,7 +24009,7 @@ function codexWrite(p) {
|
|
|
23991
24009
|
const dir = dirname(p);
|
|
23992
24010
|
if (!existsSync6(dir))
|
|
23993
24011
|
mkdirSync2(dir, { recursive: true });
|
|
23994
|
-
let existing = existsSync6(p) ?
|
|
24012
|
+
let existing = existsSync6(p) ? readFileSync8(p, "utf8") : "";
|
|
23995
24013
|
if (!existing.trimEnd().endsWith(`
|
|
23996
24014
|
`))
|
|
23997
24015
|
existing += `
|
|
@@ -24010,7 +24028,7 @@ function hermesWrite(p) {
|
|
|
24010
24028
|
const dir = dirname(p);
|
|
24011
24029
|
if (!existsSync6(dir))
|
|
24012
24030
|
mkdirSync2(dir, { recursive: true });
|
|
24013
|
-
let existing = existsSync6(p) ?
|
|
24031
|
+
let existing = existsSync6(p) ? readFileSync8(p, "utf8") : "";
|
|
24014
24032
|
existing = existing.replace(/^ blitzstrike:\n(?: .*\n?)*/m, "");
|
|
24015
24033
|
if (!existing.trimEnd().endsWith(`
|
|
24016
24034
|
`))
|
|
@@ -24148,7 +24166,7 @@ Registered with ${ok}/${installed.length} agent(s).`);
|
|
|
24148
24166
|
}
|
|
24149
24167
|
|
|
24150
24168
|
// src/index.ts
|
|
24151
|
-
import { readFileSync as
|
|
24169
|
+
import { readFileSync as readFileSync10, existsSync as existsSync8 } from "node:fs";
|
|
24152
24170
|
import { join as join9 } from "node:path";
|
|
24153
24171
|
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
24154
24172
|
var ROOT6 = join9(fileURLToPath7(new URL(".", import.meta.url)), "..");
|
|
@@ -24156,7 +24174,7 @@ function readVersion() {
|
|
|
24156
24174
|
try {
|
|
24157
24175
|
const p = join9(ROOT6, "package.json");
|
|
24158
24176
|
if (existsSync8(p))
|
|
24159
|
-
return JSON.parse(
|
|
24177
|
+
return JSON.parse(readFileSync10(p, "utf8")).version ?? "1.0.0";
|
|
24160
24178
|
} catch {}
|
|
24161
24179
|
return "1.0.0";
|
|
24162
24180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blitzstrike",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
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": {
|