blitzstrike 1.0.33 → 1.0.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/index.js +759 -30
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,33 @@ 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
+ ## [1.0.35] — 2026-09-13
9
+
10
+ ### Added
11
+
12
+ - **Phase 2 — EAGLE-EYE 2.0** (`src/callgraph.ts` + `src/eagle2.ts`):
13
+ - **Call graph** — sound (over-approximate) function/method resolution on a
14
+ PHP AST: name calls, `$this->m()`, static calls, and Class Hierarchy
15
+ Analysis (CHA) for `$obj->m()`.
16
+ - **Whole-program interprocedural taint** — call-graph worklist propagates
17
+ taint transitively across function boundaries (`outer -> inner -> sink`).
18
+ - **Return propagation** — `$x = helper($tainted)` taints `$x` iff the helper
19
+ returns a value derived from its parameter.
20
+ - **By-reference alias tracking** — `&$out` output params that write a source
21
+ taint the caller's variable.
22
+ - **Conditional flow** — ternary (`retif`) + if/else branches are merged
23
+ (sources unioned, sanitizers intersected — sound).
24
+ - **Authorization flow** — sinks guarded by a capability/nonce check are
25
+ flagged `auth_gated` with the *specific* gate name.
26
+ - New MCP tool `eagle_eye2` — prefer over `taint_scan` for accurate
27
+ cross-function reachability.
28
+
29
+ ### Fixed
30
+
31
+ - Sink classification false positives: bare function-name sinks (`system(`, `exec(`, …)
32
+ now use `\b` word boundaries, so `outer_exec(...)` is no longer misclassified
33
+ as command execution.
34
+
8
35
  ## [1.0.33] — 2026-09-13
9
36
 
10
37
  ### Added
package/dist/index.js CHANGED
@@ -14820,7 +14820,7 @@ var require_src = __commonJS(function(exports, module) {
14820
14820
  });
14821
14821
 
14822
14822
  // src/sync.ts
14823
- import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync3, readFileSync as readFileSync12, readdirSync as readdirSync5, statSync as statSync3, rmSync as rmSync2 } from "node:fs";
14823
+ import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync3, readFileSync as readFileSync14, readdirSync as readdirSync5, statSync as statSync3, rmSync as rmSync2 } from "node:fs";
14824
14824
  import { join as join10 } from "node:path";
14825
14825
  import { homedir as homedir4 } from "node:os";
14826
14826
  import { fileURLToPath as fileURLToPath7 } from "node:url";
@@ -14916,7 +14916,7 @@ function manualCopy(src, dst) {
14916
14916
  if (e.isDirectory())
14917
14917
  manualCopy(s, d);
14918
14918
  else
14919
- writeFileSync3(d, readFileSync12(s));
14919
+ writeFileSync3(d, readFileSync14(s));
14920
14920
  }
14921
14921
  }
14922
14922
  var ROOT5, DATA_ROOT2, GITHUB_REPO = "https://github.com/shinthink/blitzstrike.git";
@@ -29985,11 +29985,7 @@ function redactSecrets(text) {
29985
29985
  return out;
29986
29986
  }
29987
29987
  function hasSecrets(text) {
29988
- for (const [re] of REDACTION_PATTERNS) {
29989
- if (re.test(text))
29990
- return true;
29991
- }
29992
- return false;
29988
+ return redactSecrets(text) !== text;
29993
29989
  }
29994
29990
  function redactObject(value) {
29995
29991
  if (typeof value === "string")
@@ -30181,6 +30177,7 @@ function transition(finding, to) {
30181
30177
  if (!canTransition(finding.status, to)) {
30182
30178
  throw new Error(`illegal transition ${finding.status} -> ${to}`);
30183
30179
  }
30180
+ recordAudit("finding_updated", { tool: "blitzstrike", target: finding.target.host ?? finding.target.endpoint, result: `${finding.status} -> ${to}`, correlationId: finding.id });
30184
30181
  const updated = { ...finding, status: to, timestamps: { ...finding.timestamps, updated: new Date().toISOString() } };
30185
30182
  return updated;
30186
30183
  }
@@ -31070,16 +31067,16 @@ function classifySource(line) {
31070
31067
  }
31071
31068
  var SINK_CLASS_MAP = [
31072
31069
  [/->query\(|\$wpdb->query|\$wpdb->get_var|\$wpdb->get_results|->whereRaw|->selectRaw/, { id: "sql_execution", category: "SQL execution", cwe: "CWE-89" }],
31073
- [/eval\(|assert\(|create_function\(|call_user_func\(|preg_replace\(/, { id: "code_execution", category: "Dynamic evaluation / code execution", cwe: "CWE-94" }],
31074
- [/system\(|exec\(|shell_exec\(|passthru\(|proc_open\(|popen\(/, { id: "command_execution", category: "Command execution", cwe: "CWE-78" }],
31075
- [/move_uploaded_file\(|file_put_contents\(|fwrite\(|fopen\(|unlink\(/, { id: "file_operations", category: "File operations", cwe: "CWE-434" }],
31076
- [/include\(|require\(|include_once\(|require_once\(/, { id: "file_inclusion", category: "File inclusion", cwe: "CWE-98" }],
31077
- [/unserialize\(|maybe_unserialize\(/, { id: "deserialization", category: "Deserialization", cwe: "CWE-502" }],
31078
- [/wp_remote_get\(|wp_remote_post\(|file_get_contents\(|curl_exec\(/, { id: "http_request", category: "HTTP request (SSRF)", cwe: "CWE-918" }],
31079
- [/header\(|wp_redirect\(|wp_safe_redirect\(/, { id: "redirect", category: "Redirect handling", cwe: "CWE-601" }],
31080
- [/echo\s|print\s|printf\(/, { id: "html_render", category: "HTML rendering (XSS)", cwe: "CWE-79" }],
31081
- [/simplexml_load_string\(|new SimpleXMLElement|DOMDocument/, { id: "xml_processing", category: "XML processing (XXE)", cwe: "CWE-611" }],
31082
- [/ZipArchive|PharData|->extractTo\(/, { id: "archive_extraction", category: "Archive extraction (zip slip)", cwe: "CWE-22" }]
31070
+ [/\beval\(|\bassert\(|\bcreate_function\(|\bcall_user_func\(|\bpreg_replace\(/, { id: "code_execution", category: "Dynamic evaluation / code execution", cwe: "CWE-94" }],
31071
+ [/\bsystem\(|\bexec\(|\bshell_exec\(|\bpassthru\(|\bproc_open\(|\bpopen\(/, { id: "command_execution", category: "Command execution", cwe: "CWE-78" }],
31072
+ [/\bmove_uploaded_file\(|\bfile_put_contents\(|\bfwrite\(|\bfopen\(|\bunlink\(/, { id: "file_operations", category: "File operations", cwe: "CWE-434" }],
31073
+ [/\binclude\(|\brequire\(|\binclude_once\(|\brequire_once\(/, { id: "file_inclusion", category: "File inclusion", cwe: "CWE-98" }],
31074
+ [/\bunserialize\(|\bmaybe_unserialize\(/, { id: "deserialization", category: "Deserialization", cwe: "CWE-502" }],
31075
+ [/\bwp_remote_get\(|\bwp_remote_post\(|\bfile_get_contents\(|\bcurl_exec\(/, { id: "http_request", category: "HTTP request (SSRF)", cwe: "CWE-918" }],
31076
+ [/\bheader\(|\bwp_redirect\(|\bwp_safe_redirect\(/, { id: "redirect", category: "Redirect handling", cwe: "CWE-601" }],
31077
+ [/echo\s|print\s|\bprintf\(/, { id: "html_render", category: "HTML rendering (XSS)", cwe: "CWE-79" }],
31078
+ [/\bsimplexml_load_string\(|new SimpleXMLElement|DOMDocument/, { id: "xml_processing", category: "XML processing (XXE)", cwe: "CWE-611" }],
31079
+ [/\bZipArchive|\bPharData|->extractTo\(/, { id: "archive_extraction", category: "Archive extraction (zip slip)", cwe: "CWE-22" }]
31083
31080
  ];
31084
31081
  function classifySink2(sink) {
31085
31082
  for (const [re, cls] of SINK_CLASS_MAP) {
@@ -31596,6 +31593,706 @@ function taintTree(root, maxFiles = 2000) {
31596
31593
  return files.map((f) => analyzeTaint(f));
31597
31594
  }
31598
31595
 
31596
+ // src/eagle2.ts
31597
+ var import_php_parser3 = __toESM(require_src(), 1);
31598
+ import { readFileSync as readFileSync12 } from "node:fs";
31599
+ init_scanner();
31600
+
31601
+ // src/callgraph.ts
31602
+ var import_php_parser2 = __toESM(require_src(), 1);
31603
+ import { readFileSync as readFileSync11 } from "node:fs";
31604
+ var parser2 = new import_php_parser2.Engine({
31605
+ parser: { extractDoc: false, php7: true },
31606
+ ast: { withPositions: true, withSource: false }
31607
+ });
31608
+ function isNode2(v) {
31609
+ return !!v && typeof v === "object" && typeof v.kind === "string";
31610
+ }
31611
+ function children2(node) {
31612
+ const out = [];
31613
+ for (const k of Object.keys(node)) {
31614
+ if (k === "loc")
31615
+ continue;
31616
+ const v = node[k];
31617
+ if (Array.isArray(v)) {
31618
+ for (const c of v)
31619
+ if (isNode2(c))
31620
+ out.push(c);
31621
+ } else if (isNode2(v)) {
31622
+ out.push(v);
31623
+ }
31624
+ }
31625
+ return out;
31626
+ }
31627
+ function nameOf(node) {
31628
+ if (!isNode2(node))
31629
+ return null;
31630
+ if (typeof node.name === "string")
31631
+ return node.name;
31632
+ if (isNode2(node.name))
31633
+ return nameOf(node.name);
31634
+ return null;
31635
+ }
31636
+ function nodeId(kind, name, cls) {
31637
+ if (kind === "function")
31638
+ return `func:${name}`;
31639
+ if (kind === "method")
31640
+ return `method:${cls ?? "?"}::${name}`;
31641
+ return "main";
31642
+ }
31643
+ function ensureNode(g, id, name, kind, file, line, cls) {
31644
+ let n = g.nodes.get(id);
31645
+ if (!n) {
31646
+ n = { id, name, kind, class: cls, file, line, callees: new Set, callers: new Set };
31647
+ g.nodes.set(id, n);
31648
+ }
31649
+ return n;
31650
+ }
31651
+ function addEdge(g, caller, callee, name, line, file) {
31652
+ g.edges.push({ caller, callee, name, line, file });
31653
+ const c = g.nodes.get(caller);
31654
+ const t = g.nodes.get(callee);
31655
+ if (c)
31656
+ c.callees.add(callee);
31657
+ if (t)
31658
+ t.callers.add(caller);
31659
+ }
31660
+ function buildCallGraph(path) {
31661
+ const g = { nodes: new Map, edges: [] };
31662
+ let code;
31663
+ try {
31664
+ code = readFileSync11(path, "utf8");
31665
+ } catch {
31666
+ return g;
31667
+ }
31668
+ let ast;
31669
+ try {
31670
+ ast = parser2.parseCode(code, path);
31671
+ } catch {
31672
+ return g;
31673
+ }
31674
+ const mainId = nodeId("main", "main");
31675
+ ensureNode(g, mainId, "<main>", "main", path, 0);
31676
+ const funcs = [];
31677
+ const methods = [];
31678
+ walk(ast, path, (n, ctx) => {
31679
+ if (n.kind === "function") {
31680
+ const name = nameOf(n.name);
31681
+ if (name)
31682
+ funcs.push({ name, node: n });
31683
+ } else if (n.kind === "method" && ctx.className) {
31684
+ const mname = nameOf(n.name);
31685
+ if (mname)
31686
+ methods.push({ cls: ctx.className, name: mname, node: n });
31687
+ }
31688
+ });
31689
+ for (const f of funcs) {
31690
+ const id = nodeId("function", f.name);
31691
+ ensureNode(g, id, f.name, "function", path, f.node.loc?.start?.line ?? 0);
31692
+ }
31693
+ for (const m of methods) {
31694
+ const id = nodeId("method", m.name, m.cls);
31695
+ ensureNode(g, id, m.name, "method", path, m.node.loc?.start?.line ?? 0, m.cls);
31696
+ }
31697
+ walk(ast, path, (n, ctx) => {
31698
+ if (n.kind !== "call")
31699
+ return;
31700
+ const line = n.loc?.start?.line ?? 0;
31701
+ const callerId = ctx.enclosing ?? mainId;
31702
+ resolveCall(g, n, callerId, ctx, path, line);
31703
+ });
31704
+ return g;
31705
+ }
31706
+ function walk(node, file, visit, ctx = {}) {
31707
+ if (!isNode2(node))
31708
+ return;
31709
+ let childCtx = ctx;
31710
+ if (node.kind === "class") {
31711
+ childCtx = { ...ctx, className: nameOf(node.name) ?? undefined };
31712
+ } else if (node.kind === "function") {
31713
+ const name = nameOf(node.name);
31714
+ childCtx = { ...ctx, enclosing: name ? nodeId("function", name) : ctx.enclosing };
31715
+ } else if (node.kind === "method") {
31716
+ const name = nameOf(node.name);
31717
+ childCtx = { ...ctx, enclosing: name ? nodeId("method", name, ctx.className) : ctx.enclosing };
31718
+ }
31719
+ visit(node, ctx);
31720
+ for (const c of children2(node))
31721
+ walk(c, file, visit, childCtx);
31722
+ }
31723
+ function resolveCall(g, call, callerId, ctx, file, line) {
31724
+ const what = call.what;
31725
+ if (!isNode2(what))
31726
+ return;
31727
+ if (what.kind === "name") {
31728
+ const fn = nameOf(what);
31729
+ if (!fn)
31730
+ return;
31731
+ const id = nodeId("function", fn);
31732
+ if (g.nodes.has(id)) {
31733
+ addEdge(g, callerId, id, fn, line, file);
31734
+ } else {
31735
+ addEdge(g, callerId, `unknown:${fn}`, fn, line, file);
31736
+ }
31737
+ return;
31738
+ }
31739
+ if (what.kind === "staticlookup") {
31740
+ const base = what.what;
31741
+ const baseName = nameOf(base) ?? (isNode2(base) && base.kind === "variable" ? base.name : null);
31742
+ const method = nameOf(what.offset);
31743
+ if (!method)
31744
+ return;
31745
+ let cls = baseName;
31746
+ if (cls === "self" || cls === "static")
31747
+ cls = ctx.className ?? "?";
31748
+ if (cls && cls !== "?") {
31749
+ const id = nodeId("method", method, cls);
31750
+ if (g.nodes.has(id))
31751
+ addEdge(g, callerId, id, method, line, file);
31752
+ }
31753
+ return;
31754
+ }
31755
+ if (what.kind === "propertylookup") {
31756
+ const base = what.what;
31757
+ const method = nameOf(what.offset);
31758
+ if (!method)
31759
+ return;
31760
+ if (isNode2(base) && base.kind === "variable" && base.name === "this") {
31761
+ if (ctx.className) {
31762
+ const id = nodeId("method", method, ctx.className);
31763
+ if (g.nodes.has(id))
31764
+ addEdge(g, callerId, id, method, line, file);
31765
+ }
31766
+ return;
31767
+ }
31768
+ let matched = false;
31769
+ for (const [id, n] of g.nodes) {
31770
+ if (n.kind === "method" && n.name === method) {
31771
+ addEdge(g, callerId, id, method, line, file);
31772
+ matched = true;
31773
+ }
31774
+ }
31775
+ if (!matched)
31776
+ addEdge(g, callerId, `unknown:${method}`, method, line, file);
31777
+ return;
31778
+ }
31779
+ }
31780
+
31781
+ // src/eagle2.ts
31782
+ var parser3 = new import_php_parser3.Engine({
31783
+ parser: { extractDoc: false, php7: true },
31784
+ ast: { withPositions: true, withSource: false }
31785
+ });
31786
+ function isNode3(v) {
31787
+ return !!v && typeof v === "object" && typeof v.kind === "string";
31788
+ }
31789
+ function children3(node) {
31790
+ const out = [];
31791
+ for (const k of Object.keys(node)) {
31792
+ if (k === "loc")
31793
+ continue;
31794
+ const v = node[k];
31795
+ if (Array.isArray(v)) {
31796
+ for (const c of v)
31797
+ if (isNode3(c))
31798
+ out.push(c);
31799
+ } else if (isNode3(v)) {
31800
+ out.push(v);
31801
+ }
31802
+ }
31803
+ return out;
31804
+ }
31805
+ function findKind2(node, kind, out = []) {
31806
+ if (!isNode3(node))
31807
+ return out;
31808
+ if (node.kind === kind)
31809
+ out.push(node);
31810
+ for (const c of children3(node))
31811
+ findKind2(c, kind, out);
31812
+ return out;
31813
+ }
31814
+ function nameOf2(node) {
31815
+ if (!isNode3(node))
31816
+ return null;
31817
+ if (typeof node.name === "string")
31818
+ return node.name;
31819
+ if (isNode3(node.name))
31820
+ return nameOf2(node.name);
31821
+ return null;
31822
+ }
31823
+ function rootVarName2(node) {
31824
+ if (!isNode3(node))
31825
+ return null;
31826
+ if (node.kind === "variable")
31827
+ return node.name ?? null;
31828
+ if (node.kind === "name")
31829
+ return typeof node.name === "string" ? node.name : node.name?.name ?? null;
31830
+ if (node.kind === "offsetlookup" || node.kind === "propertylookup")
31831
+ return rootVarName2(node.what);
31832
+ return null;
31833
+ }
31834
+ function sourceOf2(node) {
31835
+ if (!isNode3(node))
31836
+ return null;
31837
+ if (node.kind === "offsetlookup" && node.what?.kind === "variable") {
31838
+ const n = node.what.name;
31839
+ if (["_GET", "_POST", "_REQUEST", "_COOKIE", "_FILES", "_SERVER"].includes(n))
31840
+ return "$" + n;
31841
+ }
31842
+ if (node.kind === "variable") {
31843
+ const n = node.name;
31844
+ if (["_GET", "_POST", "_REQUEST", "_COOKIE", "_FILES", "_SERVER"].includes(n))
31845
+ return "$" + n;
31846
+ }
31847
+ if (node.kind === "call") {
31848
+ const n = rootVarName2(node.what);
31849
+ if (n === "getallheaders")
31850
+ return "getallheaders";
31851
+ if (n === "file_get_contents" && JSON.stringify(node).includes("php://input"))
31852
+ return "php://input";
31853
+ }
31854
+ return null;
31855
+ }
31856
+ function sinkClassOf2(call) {
31857
+ const what = call.what;
31858
+ if (!isNode3(what))
31859
+ return null;
31860
+ let token = "";
31861
+ if (what.kind === "propertylookup") {
31862
+ const base = rootVarName2(what.what);
31863
+ const method = what.offset?.name ?? what.offset?.value;
31864
+ token = `${base}->${method}(`;
31865
+ } else if (what.kind === "name") {
31866
+ token = `${what.name}(`;
31867
+ }
31868
+ if (!token)
31869
+ return null;
31870
+ const cls = classifySink2(token) ?? classifySink2(what.name ?? "");
31871
+ if (!cls)
31872
+ return null;
31873
+ return { token, cls };
31874
+ }
31875
+ var CLEAN = { tainted: false, sources: [], sanitizers: [] };
31876
+ function mergeTaint(...states) {
31877
+ const taintedStates = states.filter((s) => s.tainted);
31878
+ if (taintedStates.length === 0)
31879
+ return CLEAN;
31880
+ const sources = [...new Set(taintedStates.flatMap((s) => s.sources))];
31881
+ let sanitizers = taintedStates[0].sanitizers;
31882
+ for (const s of taintedStates.slice(1)) {
31883
+ sanitizers = sanitizers.filter((san) => s.sanitizers.some((x) => x.id === san.id));
31884
+ }
31885
+ return {
31886
+ tainted: true,
31887
+ sources,
31888
+ sanitizers,
31889
+ sourceLine: taintedStates.find((s) => s.sourceLine !== undefined)?.sourceLine
31890
+ };
31891
+ }
31892
+ function summarizeFunction(fn, id, name, summaries) {
31893
+ const params = (fn.arguments ?? []).map((a) => nameOf2(a) ?? "?");
31894
+ const byrefParams = new Set;
31895
+ (fn.arguments ?? []).forEach((a, i) => {
31896
+ if (a.byref === true)
31897
+ byrefParams.add(params[i]);
31898
+ });
31899
+ const summary = { id, name, params, byrefParams, paramSinks: new Map, paramReturns: new Set, paramCalls: new Map, paramWrites: new Map };
31900
+ const bodyStmts = fn.body?.kind === "block" ? fn.body.children ?? [] : [fn.body];
31901
+ for (const p of params) {
31902
+ const env = new Map;
31903
+ for (const q of params)
31904
+ env.set(q, CLEAN);
31905
+ env.set(p, { tainted: true, sources: [`arg:${p}`], sanitizers: [] });
31906
+ const ctx = { sinks: [], returnsTainted: false, calls: [] };
31907
+ analyzeBody(bodyStmts, env, summary, ctx, p, new Map, [], summaries);
31908
+ summary.paramSinks.set(p, ctx.sinks);
31909
+ if (ctx.returnsTainted)
31910
+ summary.paramReturns.add(p);
31911
+ summary.paramCalls.set(p, ctx.calls);
31912
+ if (byrefParams.has(p)) {
31913
+ const finalTaint = env.get(p);
31914
+ const written = finalTaint?.sources.filter((s) => !s.startsWith("arg:")) ?? [];
31915
+ if (written.length > 0)
31916
+ summary.paramWrites.set(p, written);
31917
+ }
31918
+ }
31919
+ return summary;
31920
+ }
31921
+ function analyzeBody(statements, env, summary, ctx, taintedParam, props, activeAuth, summaries) {
31922
+ for (const stmt of statements) {
31923
+ if (!isNode3(stmt))
31924
+ continue;
31925
+ const kind = stmt.kind;
31926
+ if (kind === "expressionstatement") {
31927
+ analyzeExpr(stmt.expression, env, summary, ctx, taintedParam, props, activeAuth, summaries);
31928
+ } else if (kind === "if") {
31929
+ const condGates = authGatesOf(stmt.test);
31930
+ const branchAuth = [...activeAuth, ...condGates];
31931
+ const thenStmts = stmt.body?.kind === "block" ? stmt.body.children ?? [] : [stmt.body];
31932
+ const thenEnv = cloneEnv(env);
31933
+ const thenCtx = { sinks: [], returnsTainted: false, calls: [] };
31934
+ analyzeBody(thenStmts, thenEnv, summary, thenCtx, taintedParam, cloneProps(props), branchAuth, summaries);
31935
+ mergeCtx(ctx, thenCtx);
31936
+ if (stmt.alternate) {
31937
+ const altStmts = stmt.alternate.kind === "block" ? stmt.alternate.children ?? [] : [stmt.alternate];
31938
+ const altEnv = cloneEnv(env);
31939
+ const altCtx = { sinks: [], returnsTainted: false, calls: [] };
31940
+ analyzeBody(altStmts, altEnv, summary, altCtx, taintedParam, cloneProps(props), activeAuth, summaries);
31941
+ mergeCtx(ctx, altCtx);
31942
+ for (const [k, v] of thenEnv) {
31943
+ const alt = altEnv.get(k);
31944
+ env.set(k, alt ? mergeTaint(v, alt) : v);
31945
+ }
31946
+ } else {
31947
+ for (const [k, v] of thenEnv)
31948
+ env.set(k, v);
31949
+ }
31950
+ } else if (kind === "block") {
31951
+ analyzeBody(stmt.children ?? [], env, summary, ctx, taintedParam, props, activeAuth, summaries);
31952
+ } else if (kind === "return") {
31953
+ const t = analyzeExpr(stmt.expr, env, summary, ctx, taintedParam, props, activeAuth, summaries);
31954
+ if (t.tainted)
31955
+ ctx.returnsTainted = true;
31956
+ } else if (kind === "echo" || kind === "print") {
31957
+ analyzeExpr(stmt, env, summary, ctx, taintedParam, props, activeAuth, summaries);
31958
+ } else {
31959
+ for (const c of children3(stmt)) {
31960
+ if (c.kind === "block" || c.kind === "if") {
31961
+ analyzeBody([c], env, summary, ctx, taintedParam, props, activeAuth, summaries);
31962
+ } else {
31963
+ analyzeExpr(c, env, summary, ctx, taintedParam, props, activeAuth, summaries);
31964
+ }
31965
+ }
31966
+ }
31967
+ }
31968
+ }
31969
+ function analyzeExpr(node, env, summary, ctx, taintedParam, props, activeAuth, summaries) {
31970
+ if (!isNode3(node))
31971
+ return CLEAN;
31972
+ const src = sourceOf2(node);
31973
+ if (src)
31974
+ return { tainted: true, sources: [src], sanitizers: [], sourceLine: node.loc?.start?.line };
31975
+ if (node.kind === "assign") {
31976
+ const byref = node.operator === "=&";
31977
+ const rhs = analyzeExpr(node.right, env, summary, ctx, taintedParam, props, activeAuth, summaries);
31978
+ const lhs = node.left;
31979
+ if (isNode3(lhs) && lhs.kind === "variable") {
31980
+ const varName = lhs.name;
31981
+ if (byref) {
31982
+ const refVar = rootVarName2(node.right);
31983
+ if (refVar) {
31984
+ const refTaint = env.get(refVar) ?? rhs;
31985
+ env.set(varName, refTaint);
31986
+ env.set(refVar, refTaint);
31987
+ } else {
31988
+ env.set(varName, rhs);
31989
+ }
31990
+ } else {
31991
+ env.set(varName, rhs);
31992
+ }
31993
+ } else if (isNode3(lhs) && lhs.kind === "propertylookup") {
31994
+ const objName = rootVarName2(lhs.what);
31995
+ const propName = lhs.offset?.name ?? "?";
31996
+ if (objName) {
31997
+ let oprops = props.get(objName);
31998
+ if (!oprops) {
31999
+ oprops = new Map;
32000
+ props.set(objName, oprops);
32001
+ }
32002
+ oprops.set(propName, rhs);
32003
+ }
32004
+ }
32005
+ return rhs;
32006
+ }
32007
+ if (node.kind === "call") {
32008
+ const sink = sinkClassOf2(node);
32009
+ const argTaints = node.arguments.map((a) => analyzeExpr(a, env, summary, ctx, taintedParam, props, activeAuth, summaries));
32010
+ const taintedArgs = argTaints.filter((t) => t.tainted);
32011
+ if (sink) {
32012
+ if (taintedArgs.length > 0) {
32013
+ const san = [...taintedArgs.flatMap((t) => t.sanitizers), ...findSanitizers(JSON.stringify(node))];
32014
+ const sanitized = isSanitized(san, sink.cls.id);
32015
+ const gates = activeAuth;
32016
+ ctx.sinks.push({ sink: sink.token, line: node.loc?.start?.line ?? 0, sanitized, authGated: gates.length > 0, authGates: gates });
32017
+ }
32018
+ for (const a of node.arguments)
32019
+ analyzeExpr(a, env, summary, ctx, taintedParam, props, activeAuth, summaries);
32020
+ return taintedArgs.length > 0 ? mergeTaint(...taintedArgs) : CLEAN;
32021
+ }
32022
+ const fnName = rootVarName2(node.what);
32023
+ if (fnName) {
32024
+ const san = findSanitizers(fnName + "(");
32025
+ if (san.length > 0) {
32026
+ if (taintedArgs.length > 0) {
32027
+ return mergeTaint(...taintedArgs.map((t) => ({ ...t, sanitizers: [...t.sanitizers, ...san] })));
32028
+ }
32029
+ return CLEAN;
32030
+ }
32031
+ for (let i = 0;i < node.arguments.length; i++) {
32032
+ const argVar = rootVarName2(node.arguments[i]);
32033
+ if (argVar === taintedParam) {
32034
+ ctx.calls.push({ callee: fnName, argIndex: i, line: node.loc?.start?.line ?? 0 });
32035
+ }
32036
+ }
32037
+ const helperId = resolveFuncId(fnName, summaries);
32038
+ const helperSum = helperId ? summaries.get(helperId) : undefined;
32039
+ if (helperSum && taintedArgs.length > 0) {
32040
+ for (let i = 0;i < node.arguments.length; i++) {
32041
+ if (argTaints[i]?.tainted) {
32042
+ const paramName = helperSum.params[i];
32043
+ if (paramName && helperSum.paramReturns.has(paramName)) {
32044
+ return mergeTaint(...taintedArgs);
32045
+ }
32046
+ }
32047
+ }
32048
+ }
32049
+ if (helperSum && helperSum.paramWrites.size > 0) {
32050
+ for (let i = 0;i < node.arguments.length; i++) {
32051
+ const paramName = helperSum.params[i];
32052
+ if (!paramName || !helperSum.paramWrites.has(paramName))
32053
+ continue;
32054
+ const argVar = rootVarName2(node.arguments[i]);
32055
+ const written = helperSum.paramWrites.get(paramName);
32056
+ if (argVar) {
32057
+ env.set(argVar, { tainted: true, sources: written, sanitizers: [] });
32058
+ }
32059
+ }
32060
+ }
32061
+ }
32062
+ return CLEAN;
32063
+ }
32064
+ if (node.kind === "variable") {
32065
+ const t = env.get(node.name);
32066
+ return t ? { ...t } : CLEAN;
32067
+ }
32068
+ if (node.kind === "offsetlookup") {
32069
+ const root = rootVarName2(node);
32070
+ if (root) {
32071
+ const t = env.get(root);
32072
+ if (t)
32073
+ return { ...t };
32074
+ }
32075
+ return analyzeExpr(node.what, env, summary, ctx, taintedParam, props, activeAuth, summaries);
32076
+ }
32077
+ if (node.kind === "propertylookup") {
32078
+ const objName = rootVarName2(node.what);
32079
+ const propName = node.offset?.name ?? "?";
32080
+ if (objName) {
32081
+ const pt = props.get(objName)?.get(propName);
32082
+ if (pt)
32083
+ return { ...pt };
32084
+ }
32085
+ return analyzeExpr(node.what, env, summary, ctx, taintedParam, props, activeAuth, summaries);
32086
+ }
32087
+ if (node.kind === "retif") {
32088
+ const t = analyzeExpr(node.trueExpr ?? node.test, env, summary, ctx, taintedParam, props, activeAuth, summaries);
32089
+ const f = node.falseExpr ? analyzeExpr(node.falseExpr, env, summary, ctx, taintedParam, props, activeAuth, summaries) : CLEAN;
32090
+ return mergeTaint(t, f);
32091
+ }
32092
+ if (node.kind === "bin" || node.kind === "concat" || node.kind === "encapsed") {
32093
+ const parts = children3(node);
32094
+ const taints = parts.map((p) => analyzeExpr(p, env, summary, ctx, taintedParam, props, activeAuth, summaries));
32095
+ return mergeTaint(...taints);
32096
+ }
32097
+ if (node.kind === "encapsedpart") {
32098
+ return analyzeExpr(node.expression, env, summary, ctx, taintedParam, props, activeAuth, summaries);
32099
+ }
32100
+ if (node.kind === "echo" || node.kind === "print") {
32101
+ const exprs = node.expressions ?? [node.expression];
32102
+ const cls = classifySink2(node.kind === "echo" ? "echo " : "print ");
32103
+ let ret = CLEAN;
32104
+ for (const e of exprs) {
32105
+ const t = analyzeExpr(e, env, summary, ctx, taintedParam, props, activeAuth, summaries);
32106
+ if (t.tainted && cls) {
32107
+ const san = [...t.sanitizers, ...findSanitizers(JSON.stringify(e))];
32108
+ ctx.sinks.push({ sink: node.kind + " ", line: node.loc?.start?.line ?? 0, sanitized: isSanitized(san, cls.id), authGated: activeAuth.length > 0, authGates: activeAuth });
32109
+ }
32110
+ ret = mergeTaint(ret, t);
32111
+ }
32112
+ return ret;
32113
+ }
32114
+ return CLEAN;
32115
+ }
32116
+ function cloneEnv(env) {
32117
+ return new Map([...env.entries()].map(([k, v]) => [k, { ...v, sources: [...v.sources], sanitizers: [...v.sanitizers] }]));
32118
+ }
32119
+ function cloneProps(props) {
32120
+ const out = new Map;
32121
+ for (const [k, v] of props)
32122
+ out.set(k, new Map(v));
32123
+ return out;
32124
+ }
32125
+ function mergeCtx(ctx, other) {
32126
+ ctx.sinks.push(...other.sinks);
32127
+ if (other.returnsTainted)
32128
+ ctx.returnsTainted = true;
32129
+ ctx.calls.push(...other.calls);
32130
+ }
32131
+ function authGatesOf(node) {
32132
+ if (!isNode3(node))
32133
+ return [];
32134
+ return AUTH_GATES.filter((g) => JSON.stringify(node).includes(g));
32135
+ }
32136
+ function collectDecls(ast, out) {
32137
+ walkDecls(ast, out);
32138
+ }
32139
+ function walkDecls(node, out, className) {
32140
+ if (!isNode3(node))
32141
+ return;
32142
+ if (node.kind === "function") {
32143
+ const name = nameOf2(node.name);
32144
+ if (name)
32145
+ out.push({ id: `func:${name}`, name, node, kind: "function" });
32146
+ } else if (node.kind === "class") {
32147
+ const cn = nameOf2(node.name);
32148
+ for (const c of children3(node)) {
32149
+ if (c.kind === "method") {
32150
+ const mn = nameOf2(c.name);
32151
+ if (mn && cn)
32152
+ out.push({ id: `method:${cn}::${mn}`, name: mn, node: c, kind: "method" });
32153
+ }
32154
+ }
32155
+ return;
32156
+ } else if (node.kind === "method") {
32157
+ const mn = nameOf2(node.name);
32158
+ if (mn && className)
32159
+ out.push({ id: `method:${className}::${mn}`, name: mn, node, kind: "method" });
32160
+ }
32161
+ const childCtx = node.kind === "class" ? nameOf2(node.name) ?? className : className;
32162
+ for (const c of children3(node))
32163
+ walkDecls(c, out, childCtx);
32164
+ }
32165
+ function resolveFuncId(name, summaries) {
32166
+ if (summaries.has(`func:${name}`))
32167
+ return `func:${name}`;
32168
+ for (const [id, s] of summaries) {
32169
+ if (s.name === name && id.startsWith("method:"))
32170
+ return id;
32171
+ }
32172
+ return null;
32173
+ }
32174
+ function analyzeDataFlow2(path) {
32175
+ const cg = buildCallGraph(path);
32176
+ const result = {
32177
+ file: path,
32178
+ findings: [],
32179
+ suppressed: 0,
32180
+ summary: { functions: 0, methods: 0, edges: cg.edges.length, call_graph: cg }
32181
+ };
32182
+ let code;
32183
+ try {
32184
+ code = readFileSync12(path, "utf8");
32185
+ } catch {
32186
+ return result;
32187
+ }
32188
+ let ast;
32189
+ try {
32190
+ ast = parser3.parseCode(code, path);
32191
+ } catch {
32192
+ return result;
32193
+ }
32194
+ const summaries = new Map;
32195
+ const decls = [];
32196
+ collectDecls(ast, decls);
32197
+ for (const d of decls) {
32198
+ summaries.set(d.id, summarizeFunction(d.node, d.id, d.name, summaries));
32199
+ if (d.kind === "function")
32200
+ result.summary.functions += 1;
32201
+ else
32202
+ result.summary.methods += 1;
32203
+ }
32204
+ const topStmts = [];
32205
+ for (const s of ast.children ?? []) {
32206
+ if (isNode3(s) && s.kind !== "function" && s.kind !== "class")
32207
+ topStmts.push(s);
32208
+ }
32209
+ const mainSummary = { id: "main", name: "main", params: [], byrefParams: new Set, paramSinks: new Map, paramReturns: new Set, paramCalls: new Map, paramWrites: new Map };
32210
+ const mainEnv = new Map;
32211
+ const mainCtx = { sinks: [], returnsTainted: false, calls: [] };
32212
+ const mainProps = new Map;
32213
+ analyzeBody(topStmts, mainEnv, mainSummary, mainCtx, "", mainProps, [], summaries);
32214
+ for (const hit of mainCtx.sinks) {
32215
+ const cls = classifySink2(hit.sink);
32216
+ if (!cls)
32217
+ continue;
32218
+ if (hit.sanitized) {
32219
+ result.suppressed += 1;
32220
+ continue;
32221
+ }
32222
+ result.findings.push({
32223
+ sink: hit.sink,
32224
+ sink_line: hit.line,
32225
+ category: cls.category,
32226
+ cwe: cls.cwe,
32227
+ sanitized: false,
32228
+ auth_gated: hit.authGated,
32229
+ auth_gates: hit.authGates,
32230
+ interprocedural: false,
32231
+ via_return: false
32232
+ });
32233
+ }
32234
+ const queue = [];
32235
+ const seen = new Set;
32236
+ const mainCalls = topStmts.flatMap((s) => findKind2(s, "call"));
32237
+ for (const call of mainCalls) {
32238
+ const fnName = rootVarName2(call.what);
32239
+ if (!fnName || sinkClassOf2(call))
32240
+ continue;
32241
+ const target = resolveFuncId(fnName, summaries);
32242
+ if (!target)
32243
+ continue;
32244
+ for (let i = 0;i < call.arguments.length; i++) {
32245
+ const argTaint = analyzeExpr(call.arguments[i], mainEnv, mainSummary, mainCtx, "", mainProps, [], summaries);
32246
+ if (argTaint.tainted) {
32247
+ const param = summaries.get(target).params[i];
32248
+ if (param)
32249
+ queue.push({ funcId: target, param, source: argTaint.sources[0], sourceLine: argTaint.sourceLine, viaReturn: false });
32250
+ }
32251
+ }
32252
+ }
32253
+ while (queue.length) {
32254
+ const item = queue.shift();
32255
+ const key = `${item.funcId}:${item.param}`;
32256
+ if (seen.has(key))
32257
+ continue;
32258
+ seen.add(key);
32259
+ const sum = summaries.get(item.funcId);
32260
+ if (!sum)
32261
+ continue;
32262
+ for (const hit of sum.paramSinks.get(item.param) ?? []) {
32263
+ const cls = classifySink2(hit.sink);
32264
+ if (!cls)
32265
+ continue;
32266
+ if (hit.sanitized) {
32267
+ result.suppressed += 1;
32268
+ continue;
32269
+ }
32270
+ result.findings.push({
32271
+ sink: hit.sink,
32272
+ sink_line: hit.line,
32273
+ category: cls.category,
32274
+ cwe: cls.cwe,
32275
+ source: item.source,
32276
+ source_line: item.sourceLine,
32277
+ sanitized: false,
32278
+ auth_gated: hit.authGated,
32279
+ auth_gates: hit.authGates,
32280
+ interprocedural: true,
32281
+ via_return: item.viaReturn
32282
+ });
32283
+ }
32284
+ for (const c of sum.paramCalls.get(item.param) ?? []) {
32285
+ const calleeId = resolveFuncId(c.callee, summaries);
32286
+ if (!calleeId)
32287
+ continue;
32288
+ const calleeParam = summaries.get(calleeId).params[c.argIndex];
32289
+ if (calleeParam)
32290
+ queue.push({ funcId: calleeId, param: calleeParam, source: item.source, sourceLine: item.sourceLine, viaReturn: false });
32291
+ }
32292
+ }
32293
+ return result;
32294
+ }
32295
+
31599
32296
  // src/universal-taint.ts
31600
32297
  function runTaintEngine(adapter, code, file) {
31601
32298
  const result = { file, language: adapter.language, findings: [], suppressed: 0 };
@@ -31697,7 +32394,7 @@ function analyzeTaintUniversal(code, file) {
31697
32394
  }
31698
32395
 
31699
32396
  // src/adapters.ts
31700
- var import_php_parser2 = __toESM(require_src(), 1);
32397
+ var import_php_parser4 = __toESM(require_src(), 1);
31701
32398
 
31702
32399
  // node_modules/@babel/parser/lib/index.js
31703
32400
  class Position {
@@ -49476,7 +50173,7 @@ var pythonHighlighting = styleTags({
49476
50173
  ", ;": tags.separator
49477
50174
  });
49478
50175
  var spec_identifier = { __proto__: null, await: 44, or: 54, and: 56, in: 60, not: 62, is: 64, if: 70, else: 72, lambda: 76, yield: 94, from: 96, async: 102, for: 104, None: 162, True: 164, False: 164, del: 178, pass: 182, break: 186, continue: 190, return: 194, raise: 202, import: 206, as: 208, global: 212, nonlocal: 214, assert: 218, type: 223, elif: 236, while: 240, try: 246, except: 248, finally: 250, with: 254, def: 258, class: 268, match: 279, case: 285 };
49479
- var parser2 = LRParser.deserialize({
50176
+ var parser4 = LRParser.deserialize({
49480
50177
  version: 14,
49481
50178
  states: "##jQ`QeOOP$}OSOOO&WQtO'#HUOOQS'#Co'#CoOOQS'#Cp'#CpO'vQdO'#CnO*UQtO'#HTOOQS'#HU'#HUOOQS'#DU'#DUOOQS'#HT'#HTO*rQdO'#D_O+VQdO'#DfO+gQdO'#DjO+zOWO'#DuO,VOWO'#Dv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og/wO~O!h/xO~O#[/OOs%Saz%Sa{%Sa%j%Sa!W%Sag%Sa![%Sa~O#[/OO%j.yOs%Waz%Wa{%Wa!W%Wag%Wa~Os&|i{&|i!W&|ig&|i~P$)nOz/zO#[/OO%j.yO!['Oa~Og'Pa~P$)nOz0SOg'Pa~Oa0UO!['Oi~P$)zOz0WO!['Oi~Oz0WO#[/OO%j.yO!['Oi~O#[/OO%j.yOg$biz$bi~O%z0ZO~P$-bO#[/OO%j.yOg%Vaz%Va~Og'Pi~P$)nO{0^O~Oa0UO!['Oq~P$)zOz0`O!['Oq~O#[/OO%j.yOz%Ui![%Ui~Oa0UO~P$)zOa0UO!['Oy~P$)zO#[/OO%j.yOg$ciz$ci~O#[/OO%j.yOz%Uq![%Uq~Oz+aO#g%ha%[%ha%_%ha%z%ha~P%SOV&OOo0cOv0qO~P'vOn0hO~Oo0hO~P'vO{0iO~Ot0jO~P!/jO&]&Z&j&h&i&g&f&d&e&c&b&`&a&_&^&[%u~",
@@ -49501,7 +50198,7 @@ var parser2 = LRParser.deserialize({
49501
50198
  });
49502
50199
 
49503
50200
  // src/adapters.ts
49504
- var phpEngine = new import_php_parser2.Engine({ parser: { extractDoc: false, php7: true }, ast: { withPositions: true, withSource: false } });
50201
+ var phpEngine = new import_php_parser4.Engine({ parser: { extractDoc: false, php7: true }, ast: { withPositions: true, withSource: false } });
49505
50202
  var PHP_SOURCES = [
49506
50203
  ["_GET", "http_parameter"],
49507
50204
  ["_POST", "http_body"],
@@ -49794,7 +50491,7 @@ var pythonAdapter = {
49794
50491
  language: "python",
49795
50492
  extensions: [".py", ".pyw"],
49796
50493
  parse(code, _file) {
49797
- const tree = parser2.parse(code);
50494
+ const tree = parser4.parse(code);
49798
50495
  const sources = [];
49799
50496
  const sinks = [];
49800
50497
  const sanitizers = [];
@@ -50777,7 +51474,7 @@ function reportJson(findings, opts = {}) {
50777
51474
  }
50778
51475
 
50779
51476
  // src/benchmark.ts
50780
- import { readFileSync as readFileSync11, readdirSync as readdirSync4, writeFileSync as writeFileSync2, rmSync } from "node:fs";
51477
+ import { readFileSync as readFileSync13, readdirSync as readdirSync4, writeFileSync as writeFileSync2, rmSync } from "node:fs";
50781
51478
  import { join as join9 } from "node:path";
50782
51479
  import { fileURLToPath as fileURLToPath6 } from "node:url";
50783
51480
  import { tmpdir } from "node:os";
@@ -50786,7 +51483,7 @@ var CORPUS = join9(ROOT4, "bench", "corpus");
50786
51483
  function parseCorpusFile(path) {
50787
51484
  let text;
50788
51485
  try {
50789
- text = readFileSync11(path, "utf8");
51486
+ text = readFileSync13(path, "utf8");
50790
51487
  } catch {
50791
51488
  return null;
50792
51489
  }
@@ -51634,6 +52331,38 @@ function createServer() {
51634
52331
  });
51635
52332
  return { content: [{ type: "text", text: JSON.stringify({ ...r, next_steps: guidance }) }] };
51636
52333
  });
52334
+ server.registerTool("eagle_eye2", {
52335
+ title: "Whole-program interprocedural taint (EAGLE-EYE 2.0)",
52336
+ description: "EAGLE-EYE 2.0: whole-program data-flow on a PHP AST — call-graph-aware interprocedural taint with return propagation, by-reference alias tracking, ternary/conditional merge, context-sensitive sanitizers, and authorization-gate detection. Prefer this over taint_scan for accurate cross-function reachability.",
52337
+ inputSchema: { path: string2().describe("Source file path (PHP)") }
52338
+ }, async ({ path }) => {
52339
+ const r = analyzeDataFlow2(path);
52340
+ const taintedSinks = [...new Set(r.findings.map((f) => f.sink))];
52341
+ const authGated = r.findings.filter((f) => f.auth_gated).length;
52342
+ const guidance = nextSteps({
52343
+ tier: "eagle-eye",
52344
+ hasFindings: r.findings.length > 0,
52345
+ sanitizedCount: r.suppressed,
52346
+ taintedSinks
52347
+ });
52348
+ return {
52349
+ content: [{
52350
+ type: "text",
52351
+ text: JSON.stringify({
52352
+ file: r.file,
52353
+ findings: r.findings.length,
52354
+ suppressed: r.suppressed,
52355
+ auth_gated: authGated,
52356
+ interprocedural: r.findings.filter((f) => f.interprocedural).length,
52357
+ functions: r.summary.functions,
52358
+ methods: r.summary.methods,
52359
+ call_edges: r.summary.edges,
52360
+ results: r.findings,
52361
+ next_steps: guidance
52362
+ })
52363
+ }]
52364
+ };
52365
+ });
51637
52366
  server.registerTool("taint_tree", {
51638
52367
  title: "Whole-tree taint scan",
51639
52368
  description: "EAGLE-EYE: run inter-procedural taint analysis across an entire source tree.",
@@ -51787,7 +52516,7 @@ async function serve() {
51787
52516
  }
51788
52517
 
51789
52518
  // src/cli.ts
51790
- import { readFileSync as readFileSync13, existsSync as existsSync6, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4 } from "node:fs";
52519
+ import { readFileSync as readFileSync15, existsSync as existsSync6, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4 } from "node:fs";
51791
52520
  import { join as join11, dirname as dirname2 } from "node:path";
51792
52521
  import { homedir as homedir5 } from "node:os";
51793
52522
  import { fileURLToPath as fileURLToPath8 } from "node:url";
@@ -51869,7 +52598,7 @@ function resolveCommand() {
51869
52598
  }
51870
52599
  function readJson(p) {
51871
52600
  try {
51872
- return JSON.parse(readFileSync13(p, "utf8"));
52601
+ return JSON.parse(readFileSync15(p, "utf8"));
51873
52602
  } catch {
51874
52603
  return null;
51875
52604
  }
@@ -51912,7 +52641,7 @@ function copyOpenCodeAgents() {
51912
52641
  const src = join11(srcDir, f);
51913
52642
  const dst = join11(dstDir, f);
51914
52643
  if (existsSync6(src)) {
51915
- writeFileSync4(dst, readFileSync13(src, "utf8"));
52644
+ writeFileSync4(dst, readFileSync15(src, "utf8"));
51916
52645
  }
51917
52646
  }
51918
52647
  }
@@ -51921,7 +52650,7 @@ function codexWrite(p) {
51921
52650
  const dir = dirname2(p);
51922
52651
  if (!existsSync6(dir))
51923
52652
  mkdirSync4(dir, { recursive: true });
51924
- let existing = existsSync6(p) ? readFileSync13(p, "utf8") : "";
52653
+ let existing = existsSync6(p) ? readFileSync15(p, "utf8") : "";
51925
52654
  if (!existing.trimEnd().endsWith(`
51926
52655
  `))
51927
52656
  existing += `
@@ -51940,7 +52669,7 @@ function hermesWrite(p) {
51940
52669
  const dir = dirname2(p);
51941
52670
  if (!existsSync6(dir))
51942
52671
  mkdirSync4(dir, { recursive: true });
51943
- let existing = existsSync6(p) ? readFileSync13(p, "utf8") : "";
52672
+ let existing = existsSync6(p) ? readFileSync15(p, "utf8") : "";
51944
52673
  existing = existing.replace(/^ blitzstrike:\n(?: .*\n?)*/m, "");
51945
52674
  if (!existing.trimEnd().endsWith(`
51946
52675
  `))
@@ -52078,7 +52807,7 @@ Registered with ${ok}/${installed.length} agent(s).`);
52078
52807
  }
52079
52808
 
52080
52809
  // src/index.ts
52081
- import { readFileSync as readFileSync14, existsSync as existsSync7 } from "node:fs";
52810
+ import { readFileSync as readFileSync16, existsSync as existsSync7 } from "node:fs";
52082
52811
  import { join as join12 } from "node:path";
52083
52812
  import { fileURLToPath as fileURLToPath9 } from "node:url";
52084
52813
  var ROOT7 = join12(fileURLToPath9(new URL(".", import.meta.url)), "..");
@@ -52086,7 +52815,7 @@ function readVersion() {
52086
52815
  try {
52087
52816
  const p = join12(ROOT7, "package.json");
52088
52817
  if (existsSync7(p))
52089
- return JSON.parse(readFileSync14(p, "utf8")).version ?? "1.0.0";
52818
+ return JSON.parse(readFileSync16(p, "utf8")).version ?? "1.0.0";
52090
52819
  } catch {}
52091
52820
  return "1.0.0";
52092
52821
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blitzstrike",
3
- "version": "1.0.33",
3
+ "version": "1.0.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": {