blitzstrike 1.0.34 → 1.0.36

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 (72) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/bench/corpus/java-cmd-vuln.md +8 -0
  3. package/bench/corpus/java-deser-vuln.md +8 -0
  4. package/bench/corpus/java-sqli-prep.md +9 -0
  5. package/bench/corpus/java-sqli-vuln.md +9 -0
  6. package/bench/corpus/java-ssrf-vuln.md +9 -0
  7. package/bench/corpus/java-xss-vuln.md +8 -0
  8. package/bench/corpus/java-xxe-vuln.md +10 -0
  9. package/bench/corpus/js-cmd-spawn.md +8 -0
  10. package/bench/corpus/js-cmd-vuln.md +8 -0
  11. package/bench/corpus/js-eval-vuln.md +8 -0
  12. package/bench/corpus/js-pathtraversal-vuln.md +8 -0
  13. package/bench/corpus/js-redirect-vuln.md +8 -0
  14. package/bench/corpus/js-sqli-param.md +8 -0
  15. package/bench/corpus/js-ssrf-vuln.md +8 -0
  16. package/bench/corpus/{js-xss-sanitized.md → js-xss-escape.md} +1 -1
  17. package/bench/corpus/js-xss-vuln.md +8 -0
  18. package/bench/corpus/php-cmd-authgated.md +8 -0
  19. package/bench/corpus/php-cmd-byref.md +11 -0
  20. package/bench/corpus/php-cmd-escaped.md +9 -0
  21. package/bench/corpus/php-cmd-escapeshellcmd.md +9 -0
  22. package/bench/corpus/php-cmd-intval.md +9 -0
  23. package/bench/corpus/php-cmd-passthru.md +9 -0
  24. package/bench/corpus/php-cmd-shell-exec.md +9 -0
  25. package/bench/corpus/php-cmd-transitive.md +10 -0
  26. package/bench/corpus/{php-command-injection-vuln.md → php-cmd-vuln.md} +1 -1
  27. package/bench/corpus/php-codeexec-assert.md +9 -0
  28. package/bench/corpus/php-codeexec-vuln.md +9 -0
  29. package/bench/corpus/php-fileupload-name.md +9 -0
  30. package/bench/corpus/php-fileupload-sanitized.md +9 -0
  31. package/bench/corpus/php-fileupload-vuln.md +9 -0
  32. package/bench/corpus/php-filewrite-vuln.md +9 -0
  33. package/bench/corpus/php-include-intval.md +9 -0
  34. package/bench/corpus/php-include-require.md +9 -0
  35. package/bench/corpus/php-include-vuln.md +9 -0
  36. package/bench/corpus/php-include-whitelist.md +10 -0
  37. package/bench/corpus/php-redirect-safe.md +9 -0
  38. package/bench/corpus/php-redirect-vuln.md +9 -0
  39. package/bench/corpus/php-sqli-authgated.md +9 -0
  40. package/bench/corpus/php-sqli-esc.md +9 -0
  41. package/bench/corpus/php-sqli-filter.md +9 -0
  42. package/bench/corpus/php-sqli-getvar.md +9 -0
  43. package/bench/corpus/php-sqli-interproc.md +10 -0
  44. package/bench/corpus/php-sqli-whereraw.md +9 -0
  45. package/bench/corpus/php-ssrf-curl.md +11 -0
  46. package/bench/corpus/php-ssrf-vuln.md +9 -0
  47. package/bench/corpus/php-ssrf-wpremote.md +9 -0
  48. package/bench/corpus/php-unserialize-vuln.md +9 -0
  49. package/bench/corpus/php-xss-attr.md +9 -0
  50. package/bench/corpus/php-xss-authgated.md +8 -0
  51. package/bench/corpus/php-xss-eschtml.md +9 -0
  52. package/bench/corpus/php-xss-htmlentities.md +9 -0
  53. package/bench/corpus/php-xss-return.md +9 -0
  54. package/bench/corpus/php-xss-ternary.md +9 -0
  55. package/bench/corpus/php-xss-vuln.md +9 -0
  56. package/bench/corpus/php-xxe-vuln.md +9 -0
  57. package/bench/corpus/php-zipslip-vuln.md +10 -0
  58. package/bench/corpus/py-cmd-subprocess.md +9 -0
  59. package/bench/corpus/{py-command-injection-vuln.md → py-cmd-vuln.md} +3 -3
  60. package/bench/corpus/py-deser-json.md +9 -0
  61. package/bench/corpus/py-deser-vuln.md +9 -0
  62. package/bench/corpus/py-eval-vuln.md +8 -0
  63. package/bench/corpus/py-pathtraversal-vuln.md +8 -0
  64. package/bench/corpus/py-sqli-param.md +9 -0
  65. package/bench/corpus/py-sqli-vuln.md +9 -0
  66. package/bench/corpus/py-ssrf-vuln.md +9 -0
  67. package/bench/corpus/py-xss-vuln.md +8 -0
  68. package/dist/index.js +812 -29
  69. package/package.json +1 -1
  70. package/bench/corpus/java-command-injection-vuln.md +0 -7
  71. package/bench/corpus/php-file-upload-vuln.md +0 -9
  72. package/bench/corpus/py-command-injection-sanitized.md +0 -9
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";
@@ -31067,16 +31067,16 @@ function classifySource(line) {
31067
31067
  }
31068
31068
  var SINK_CLASS_MAP = [
31069
31069
  [/->query\(|\$wpdb->query|\$wpdb->get_var|\$wpdb->get_results|->whereRaw|->selectRaw/, { id: "sql_execution", category: "SQL execution", cwe: "CWE-89" }],
31070
- [/eval\(|assert\(|create_function\(|call_user_func\(|preg_replace\(/, { id: "code_execution", category: "Dynamic evaluation / code execution", cwe: "CWE-94" }],
31071
- [/system\(|exec\(|shell_exec\(|passthru\(|proc_open\(|popen\(/, { id: "command_execution", category: "Command execution", cwe: "CWE-78" }],
31072
- [/move_uploaded_file\(|file_put_contents\(|fwrite\(|fopen\(|unlink\(/, { id: "file_operations", category: "File operations", cwe: "CWE-434" }],
31073
- [/include\(|require\(|include_once\(|require_once\(/, { id: "file_inclusion", category: "File inclusion", cwe: "CWE-98" }],
31074
- [/unserialize\(|maybe_unserialize\(/, { id: "deserialization", category: "Deserialization", cwe: "CWE-502" }],
31075
- [/wp_remote_get\(|wp_remote_post\(|file_get_contents\(|curl_exec\(/, { id: "http_request", category: "HTTP request (SSRF)", cwe: "CWE-918" }],
31076
- [/header\(|wp_redirect\(|wp_safe_redirect\(/, { id: "redirect", category: "Redirect handling", cwe: "CWE-601" }],
31077
- [/echo\s|print\s|printf\(/, { id: "html_render", category: "HTML rendering (XSS)", cwe: "CWE-79" }],
31078
- [/simplexml_load_string\(|new SimpleXMLElement|DOMDocument/, { id: "xml_processing", category: "XML processing (XXE)", cwe: "CWE-611" }],
31079
- [/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\(|\bcurl_setopt\(/, { id: "http_request", category: "HTTP request (SSRF)", cwe: "CWE-918" }],
31076
+ [/\bheader\(|\bwp_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" }]
31080
31080
  ];
31081
31081
  function classifySink2(sink) {
31082
31082
  for (const [re, cls] of SINK_CLASS_MAP) {
@@ -31593,6 +31593,739 @@ function taintTree(root, maxFiles = 2000) {
31593
31593
  return files.map((f) => analyzeTaint(f));
31594
31594
  }
31595
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 baseNode = what.what;
31863
+ const base = rootVarName2(baseNode);
31864
+ const method = what.offset?.name ?? what.offset?.value;
31865
+ const baseStr = isNode3(baseNode) && (baseNode.kind === "variable" || baseNode.kind === "offsetlookup") ? `$${base}` : base;
31866
+ token = `${baseStr}->${method}(`;
31867
+ } else if (what.kind === "name") {
31868
+ token = `${what.name}(`;
31869
+ }
31870
+ if (!token)
31871
+ return null;
31872
+ const cls = classifySink2(token) ?? classifySink2(what.name ?? "");
31873
+ if (!cls)
31874
+ return null;
31875
+ return { token, cls };
31876
+ }
31877
+ var CLEAN = { tainted: false, sources: [], sanitizers: [] };
31878
+ function mergeTaint(...states) {
31879
+ const taintedStates = states.filter((s) => s.tainted);
31880
+ if (taintedStates.length === 0)
31881
+ return CLEAN;
31882
+ const sources = [...new Set(taintedStates.flatMap((s) => s.sources))];
31883
+ let sanitizers = taintedStates[0].sanitizers;
31884
+ for (const s of taintedStates.slice(1)) {
31885
+ sanitizers = sanitizers.filter((san) => s.sanitizers.some((x) => x.id === san.id));
31886
+ }
31887
+ return {
31888
+ tainted: true,
31889
+ sources,
31890
+ sanitizers,
31891
+ sourceLine: taintedStates.find((s) => s.sourceLine !== undefined)?.sourceLine
31892
+ };
31893
+ }
31894
+ function summarizeFunction(fn, id, name, summaries) {
31895
+ const params = (fn.arguments ?? []).map((a) => nameOf2(a) ?? "?");
31896
+ const byrefParams = new Set;
31897
+ (fn.arguments ?? []).forEach((a, i) => {
31898
+ if (a.byref === true)
31899
+ byrefParams.add(params[i]);
31900
+ });
31901
+ const summary = { id, name, params, byrefParams, paramSinks: new Map, paramReturns: new Set, paramCalls: new Map, paramWrites: new Map };
31902
+ const bodyStmts = fn.body?.kind === "block" ? fn.body.children ?? [] : [fn.body];
31903
+ for (const p of params) {
31904
+ const env = new Map;
31905
+ for (const q of params)
31906
+ env.set(q, CLEAN);
31907
+ env.set(p, { tainted: true, sources: [`arg:${p}`], sanitizers: [] });
31908
+ const ctx = { sinks: [], returnsTainted: false, calls: [] };
31909
+ analyzeBody(bodyStmts, env, summary, ctx, p, new Map, [], summaries);
31910
+ summary.paramSinks.set(p, ctx.sinks);
31911
+ if (ctx.returnsTainted)
31912
+ summary.paramReturns.add(p);
31913
+ summary.paramCalls.set(p, ctx.calls);
31914
+ if (byrefParams.has(p)) {
31915
+ const finalTaint = env.get(p);
31916
+ const written = finalTaint?.sources.filter((s) => !s.startsWith("arg:")) ?? [];
31917
+ if (written.length > 0)
31918
+ summary.paramWrites.set(p, written);
31919
+ }
31920
+ }
31921
+ return summary;
31922
+ }
31923
+ function analyzeBody(statements, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating = false) {
31924
+ for (const stmt of statements) {
31925
+ if (!isNode3(stmt))
31926
+ continue;
31927
+ const kind = stmt.kind;
31928
+ if (kind === "expressionstatement") {
31929
+ analyzeExpr(stmt.expression, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
31930
+ } else if (kind === "if") {
31931
+ const condGates = authGatesOf(stmt.test);
31932
+ const branchAuth = [...activeAuth, ...condGates];
31933
+ const condValidating = validationGatesOf(stmt.test);
31934
+ const thenStmts = stmt.body?.kind === "block" ? stmt.body.children ?? [] : [stmt.body];
31935
+ const thenEnv = cloneEnv(env);
31936
+ const thenCtx = { sinks: [], returnsTainted: false, calls: [] };
31937
+ analyzeBody(thenStmts, thenEnv, summary, thenCtx, taintedParam, cloneProps(props), branchAuth, summaries, validating || condValidating);
31938
+ mergeCtx(ctx, thenCtx);
31939
+ if (stmt.alternate) {
31940
+ const altStmts = stmt.alternate.kind === "block" ? stmt.alternate.children ?? [] : [stmt.alternate];
31941
+ const altEnv = cloneEnv(env);
31942
+ const altCtx = { sinks: [], returnsTainted: false, calls: [] };
31943
+ analyzeBody(altStmts, altEnv, summary, altCtx, taintedParam, cloneProps(props), activeAuth, summaries, validating);
31944
+ mergeCtx(ctx, altCtx);
31945
+ for (const [k, v] of thenEnv) {
31946
+ const alt = altEnv.get(k);
31947
+ env.set(k, alt ? mergeTaint(v, alt) : v);
31948
+ }
31949
+ } else {
31950
+ for (const [k, v] of thenEnv)
31951
+ env.set(k, v);
31952
+ }
31953
+ } else if (kind === "block") {
31954
+ analyzeBody(stmt.children ?? [], env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
31955
+ } else if (kind === "return") {
31956
+ const t = analyzeExpr(stmt.expr, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
31957
+ if (t.tainted)
31958
+ ctx.returnsTainted = true;
31959
+ } else if (kind === "echo" || kind === "print") {
31960
+ analyzeExpr(stmt, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
31961
+ } else {
31962
+ for (const c of children3(stmt)) {
31963
+ if (c.kind === "block" || c.kind === "if") {
31964
+ analyzeBody([c], env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
31965
+ } else {
31966
+ analyzeExpr(c, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
31967
+ }
31968
+ }
31969
+ }
31970
+ }
31971
+ }
31972
+ function analyzeExpr(node, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating = false) {
31973
+ if (!isNode3(node))
31974
+ return CLEAN;
31975
+ const src = sourceOf2(node);
31976
+ if (src)
31977
+ return { tainted: true, sources: [src], sanitizers: [], sourceLine: node.loc?.start?.line };
31978
+ if (node.kind === "assign") {
31979
+ const byref = node.operator === "=&";
31980
+ const rhs = analyzeExpr(node.right, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
31981
+ const lhs = node.left;
31982
+ if (isNode3(lhs) && lhs.kind === "variable") {
31983
+ const varName = lhs.name;
31984
+ if (byref) {
31985
+ const refVar = rootVarName2(node.right);
31986
+ if (refVar) {
31987
+ const refTaint = env.get(refVar) ?? rhs;
31988
+ env.set(varName, refTaint);
31989
+ env.set(refVar, refTaint);
31990
+ } else {
31991
+ env.set(varName, rhs);
31992
+ }
31993
+ } else {
31994
+ env.set(varName, rhs);
31995
+ }
31996
+ } else if (isNode3(lhs) && lhs.kind === "propertylookup") {
31997
+ const objName = rootVarName2(lhs.what);
31998
+ const propName = lhs.offset?.name ?? "?";
31999
+ if (objName) {
32000
+ let oprops = props.get(objName);
32001
+ if (!oprops) {
32002
+ oprops = new Map;
32003
+ props.set(objName, oprops);
32004
+ }
32005
+ oprops.set(propName, rhs);
32006
+ }
32007
+ }
32008
+ return rhs;
32009
+ }
32010
+ if (node.kind === "call") {
32011
+ const sink = sinkClassOf2(node);
32012
+ const argTaints = node.arguments.map((a) => analyzeExpr(a, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating));
32013
+ const taintedArgs = argTaints.filter((t) => t.tainted);
32014
+ if (sink) {
32015
+ if (taintedArgs.length > 0) {
32016
+ const san = [...taintedArgs.flatMap((t) => t.sanitizers), ...findSanitizers(JSON.stringify(node))];
32017
+ const sanitized = isSanitized(san, sink.cls.id);
32018
+ const gates = activeAuth;
32019
+ ctx.sinks.push({ sink: sink.token, line: node.loc?.start?.line ?? 0, sanitized, authGated: gates.length > 0, authGates: gates });
32020
+ }
32021
+ for (const a of node.arguments)
32022
+ analyzeExpr(a, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
32023
+ return taintedArgs.length > 0 ? mergeTaint(...taintedArgs) : CLEAN;
32024
+ }
32025
+ const fnName = rootVarName2(node.what);
32026
+ if (fnName) {
32027
+ const san = findSanitizers(fnName + "(");
32028
+ if (san.length > 0) {
32029
+ if (taintedArgs.length > 0) {
32030
+ return mergeTaint(...taintedArgs.map((t) => ({ ...t, sanitizers: [...t.sanitizers, ...san] })));
32031
+ }
32032
+ return CLEAN;
32033
+ }
32034
+ for (let i = 0;i < node.arguments.length; i++) {
32035
+ const argVar = rootVarName2(node.arguments[i]);
32036
+ if (argVar === taintedParam) {
32037
+ ctx.calls.push({ callee: fnName, argIndex: i, line: node.loc?.start?.line ?? 0 });
32038
+ }
32039
+ }
32040
+ const helperId = resolveFuncId(fnName, summaries);
32041
+ const helperSum = helperId ? summaries.get(helperId) : undefined;
32042
+ if (helperSum && taintedArgs.length > 0) {
32043
+ for (let i = 0;i < node.arguments.length; i++) {
32044
+ if (argTaints[i]?.tainted) {
32045
+ const paramName = helperSum.params[i];
32046
+ if (paramName && helperSum.paramReturns.has(paramName)) {
32047
+ return mergeTaint(...taintedArgs);
32048
+ }
32049
+ }
32050
+ }
32051
+ }
32052
+ if (helperSum && helperSum.paramWrites.size > 0) {
32053
+ for (let i = 0;i < node.arguments.length; i++) {
32054
+ const paramName = helperSum.params[i];
32055
+ if (!paramName || !helperSum.paramWrites.has(paramName))
32056
+ continue;
32057
+ const argVar = rootVarName2(node.arguments[i]);
32058
+ const written = helperSum.paramWrites.get(paramName);
32059
+ if (argVar) {
32060
+ env.set(argVar, { tainted: true, sources: written, sanitizers: [] });
32061
+ }
32062
+ }
32063
+ }
32064
+ }
32065
+ if (isNode3(node.what) && node.what.kind === "propertylookup") {
32066
+ analyzeExpr(node.what, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
32067
+ }
32068
+ return CLEAN;
32069
+ }
32070
+ if (node.kind === "variable") {
32071
+ const t = env.get(node.name);
32072
+ return t ? { ...t } : CLEAN;
32073
+ }
32074
+ if (node.kind === "offsetlookup") {
32075
+ const root = rootVarName2(node);
32076
+ if (root) {
32077
+ const t = env.get(root);
32078
+ if (t)
32079
+ return { ...t };
32080
+ }
32081
+ return analyzeExpr(node.what, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
32082
+ }
32083
+ if (node.kind === "propertylookup") {
32084
+ const objName = rootVarName2(node.what);
32085
+ const propName = node.offset?.name ?? "?";
32086
+ if (objName) {
32087
+ const pt = props.get(objName)?.get(propName);
32088
+ if (pt)
32089
+ return { ...pt };
32090
+ }
32091
+ return analyzeExpr(node.what, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
32092
+ }
32093
+ if (node.kind === "retif") {
32094
+ const t = analyzeExpr(node.trueExpr ?? node.test, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
32095
+ const f = node.falseExpr ? analyzeExpr(node.falseExpr, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating) : CLEAN;
32096
+ return mergeTaint(t, f);
32097
+ }
32098
+ if (node.kind === "bin" || node.kind === "concat" || node.kind === "encapsed") {
32099
+ const parts = children3(node);
32100
+ const taints = parts.map((p) => analyzeExpr(p, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating));
32101
+ return mergeTaint(...taints);
32102
+ }
32103
+ if (node.kind === "encapsedpart") {
32104
+ return analyzeExpr(node.expression, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
32105
+ }
32106
+ if (node.kind === "echo" || node.kind === "print") {
32107
+ const exprs = node.expressions ?? [node.expression];
32108
+ const cls = classifySink2(node.kind === "echo" ? "echo " : "print ");
32109
+ let ret = CLEAN;
32110
+ for (const e of exprs) {
32111
+ const t = analyzeExpr(e, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
32112
+ if (t.tainted && cls) {
32113
+ const san = [...t.sanitizers, ...findSanitizers(JSON.stringify(e))];
32114
+ ctx.sinks.push({ sink: node.kind + " ", line: node.loc?.start?.line ?? 0, sanitized: isSanitized(san, cls.id) || validating, authGated: activeAuth.length > 0, authGates: activeAuth });
32115
+ }
32116
+ ret = mergeTaint(ret, t);
32117
+ }
32118
+ return ret;
32119
+ }
32120
+ if (node.kind === "include") {
32121
+ const base = node.require ? "require" : "include";
32122
+ const suffix = node.once ? "_once" : "";
32123
+ const sinkToken = base + suffix + "(";
32124
+ const cls = classifySink2(sinkToken);
32125
+ const t = analyzeExpr(node.target, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
32126
+ if (t.tainted && cls) {
32127
+ const san = [...t.sanitizers, ...findSanitizers(JSON.stringify(node))];
32128
+ ctx.sinks.push({ sink: sinkToken, line: node.loc?.start?.line ?? 0, sanitized: isSanitized(san, cls.id) || validating, authGated: activeAuth.length > 0, authGates: activeAuth });
32129
+ }
32130
+ return t;
32131
+ }
32132
+ if (node.kind === "eval") {
32133
+ const cls = classifySink2("eval(");
32134
+ const t = analyzeExpr(node.source, env, summary, ctx, taintedParam, props, activeAuth, summaries, validating);
32135
+ if (t.tainted && cls) {
32136
+ ctx.sinks.push({ sink: "eval(", line: node.loc?.start?.line ?? 0, sanitized: false, authGated: activeAuth.length > 0, authGates: activeAuth });
32137
+ }
32138
+ return t;
32139
+ }
32140
+ return CLEAN;
32141
+ }
32142
+ function cloneEnv(env) {
32143
+ return new Map([...env.entries()].map(([k, v]) => [k, { ...v, sources: [...v.sources], sanitizers: [...v.sanitizers] }]));
32144
+ }
32145
+ function cloneProps(props) {
32146
+ const out = new Map;
32147
+ for (const [k, v] of props)
32148
+ out.set(k, new Map(v));
32149
+ return out;
32150
+ }
32151
+ function mergeCtx(ctx, other) {
32152
+ ctx.sinks.push(...other.sinks);
32153
+ if (other.returnsTainted)
32154
+ ctx.returnsTainted = true;
32155
+ ctx.calls.push(...other.calls);
32156
+ }
32157
+ function authGatesOf(node) {
32158
+ if (!isNode3(node))
32159
+ return [];
32160
+ return AUTH_GATES.filter((g) => JSON.stringify(node).includes(g));
32161
+ }
32162
+ var VALIDATION_GATES = ["in_array", "preg_match", "ctype_digit", "ctype_alnum", "is_numeric"];
32163
+ function validationGatesOf(node) {
32164
+ if (!isNode3(node))
32165
+ return false;
32166
+ const text = JSON.stringify(node);
32167
+ return VALIDATION_GATES.some((g) => text.includes(g));
32168
+ }
32169
+ function collectDecls(ast, out) {
32170
+ walkDecls(ast, out);
32171
+ }
32172
+ function walkDecls(node, out, className) {
32173
+ if (!isNode3(node))
32174
+ return;
32175
+ if (node.kind === "function") {
32176
+ const name = nameOf2(node.name);
32177
+ if (name)
32178
+ out.push({ id: `func:${name}`, name, node, kind: "function" });
32179
+ } else if (node.kind === "class") {
32180
+ const cn = nameOf2(node.name);
32181
+ for (const c of children3(node)) {
32182
+ if (c.kind === "method") {
32183
+ const mn = nameOf2(c.name);
32184
+ if (mn && cn)
32185
+ out.push({ id: `method:${cn}::${mn}`, name: mn, node: c, kind: "method" });
32186
+ }
32187
+ }
32188
+ return;
32189
+ } else if (node.kind === "method") {
32190
+ const mn = nameOf2(node.name);
32191
+ if (mn && className)
32192
+ out.push({ id: `method:${className}::${mn}`, name: mn, node, kind: "method" });
32193
+ }
32194
+ const childCtx = node.kind === "class" ? nameOf2(node.name) ?? className : className;
32195
+ for (const c of children3(node))
32196
+ walkDecls(c, out, childCtx);
32197
+ }
32198
+ function resolveFuncId(name, summaries) {
32199
+ if (summaries.has(`func:${name}`))
32200
+ return `func:${name}`;
32201
+ for (const [id, s] of summaries) {
32202
+ if (s.name === name && id.startsWith("method:"))
32203
+ return id;
32204
+ }
32205
+ return null;
32206
+ }
32207
+ function analyzeDataFlow2(path) {
32208
+ const cg = buildCallGraph(path);
32209
+ const result = {
32210
+ file: path,
32211
+ findings: [],
32212
+ suppressed: 0,
32213
+ summary: { functions: 0, methods: 0, edges: cg.edges.length, call_graph: cg }
32214
+ };
32215
+ let code;
32216
+ try {
32217
+ code = readFileSync12(path, "utf8");
32218
+ } catch {
32219
+ return result;
32220
+ }
32221
+ let ast;
32222
+ try {
32223
+ ast = parser3.parseCode(code, path);
32224
+ } catch {
32225
+ return result;
32226
+ }
32227
+ const summaries = new Map;
32228
+ const decls = [];
32229
+ collectDecls(ast, decls);
32230
+ for (const d of decls) {
32231
+ summaries.set(d.id, summarizeFunction(d.node, d.id, d.name, summaries));
32232
+ if (d.kind === "function")
32233
+ result.summary.functions += 1;
32234
+ else
32235
+ result.summary.methods += 1;
32236
+ }
32237
+ const topStmts = [];
32238
+ for (const s of ast.children ?? []) {
32239
+ if (isNode3(s) && s.kind !== "function" && s.kind !== "class")
32240
+ topStmts.push(s);
32241
+ }
32242
+ const mainSummary = { id: "main", name: "main", params: [], byrefParams: new Set, paramSinks: new Map, paramReturns: new Set, paramCalls: new Map, paramWrites: new Map };
32243
+ const mainEnv = new Map;
32244
+ const mainCtx = { sinks: [], returnsTainted: false, calls: [] };
32245
+ const mainProps = new Map;
32246
+ analyzeBody(topStmts, mainEnv, mainSummary, mainCtx, "", mainProps, [], summaries);
32247
+ for (const hit of mainCtx.sinks) {
32248
+ const cls = classifySink2(hit.sink);
32249
+ if (!cls)
32250
+ continue;
32251
+ if (hit.sanitized) {
32252
+ result.suppressed += 1;
32253
+ continue;
32254
+ }
32255
+ result.findings.push({
32256
+ sink: hit.sink,
32257
+ sink_line: hit.line,
32258
+ category: cls.category,
32259
+ cwe: cls.cwe,
32260
+ sanitized: false,
32261
+ auth_gated: hit.authGated,
32262
+ auth_gates: hit.authGates,
32263
+ interprocedural: false,
32264
+ via_return: false
32265
+ });
32266
+ }
32267
+ const queue = [];
32268
+ const seen = new Set;
32269
+ const mainCalls = topStmts.flatMap((s) => findKind2(s, "call"));
32270
+ for (const call of mainCalls) {
32271
+ const fnName = rootVarName2(call.what);
32272
+ if (!fnName || sinkClassOf2(call))
32273
+ continue;
32274
+ const target = resolveFuncId(fnName, summaries);
32275
+ if (!target)
32276
+ continue;
32277
+ for (let i = 0;i < call.arguments.length; i++) {
32278
+ const argTaint = analyzeExpr(call.arguments[i], mainEnv, mainSummary, mainCtx, "", mainProps, [], summaries);
32279
+ if (argTaint.tainted) {
32280
+ const param = summaries.get(target).params[i];
32281
+ if (param)
32282
+ queue.push({ funcId: target, param, source: argTaint.sources[0], sourceLine: argTaint.sourceLine, viaReturn: false });
32283
+ }
32284
+ }
32285
+ }
32286
+ while (queue.length) {
32287
+ const item = queue.shift();
32288
+ const key = `${item.funcId}:${item.param}`;
32289
+ if (seen.has(key))
32290
+ continue;
32291
+ seen.add(key);
32292
+ const sum = summaries.get(item.funcId);
32293
+ if (!sum)
32294
+ continue;
32295
+ for (const hit of sum.paramSinks.get(item.param) ?? []) {
32296
+ const cls = classifySink2(hit.sink);
32297
+ if (!cls)
32298
+ continue;
32299
+ if (hit.sanitized) {
32300
+ result.suppressed += 1;
32301
+ continue;
32302
+ }
32303
+ result.findings.push({
32304
+ sink: hit.sink,
32305
+ sink_line: hit.line,
32306
+ category: cls.category,
32307
+ cwe: cls.cwe,
32308
+ source: item.source,
32309
+ source_line: item.sourceLine,
32310
+ sanitized: false,
32311
+ auth_gated: hit.authGated,
32312
+ auth_gates: hit.authGates,
32313
+ interprocedural: true,
32314
+ via_return: item.viaReturn
32315
+ });
32316
+ }
32317
+ for (const c of sum.paramCalls.get(item.param) ?? []) {
32318
+ const calleeId = resolveFuncId(c.callee, summaries);
32319
+ if (!calleeId)
32320
+ continue;
32321
+ const calleeParam = summaries.get(calleeId).params[c.argIndex];
32322
+ if (calleeParam)
32323
+ queue.push({ funcId: calleeId, param: calleeParam, source: item.source, sourceLine: item.sourceLine, viaReturn: false });
32324
+ }
32325
+ }
32326
+ return result;
32327
+ }
32328
+
31596
32329
  // src/universal-taint.ts
31597
32330
  function runTaintEngine(adapter, code, file) {
31598
32331
  const result = { file, language: adapter.language, findings: [], suppressed: 0 };
@@ -31694,7 +32427,7 @@ function analyzeTaintUniversal(code, file) {
31694
32427
  }
31695
32428
 
31696
32429
  // src/adapters.ts
31697
- var import_php_parser2 = __toESM(require_src(), 1);
32430
+ var import_php_parser4 = __toESM(require_src(), 1);
31698
32431
 
31699
32432
  // node_modules/@babel/parser/lib/index.js
31700
32433
  class Position {
@@ -49473,7 +50206,7 @@ var pythonHighlighting = styleTags({
49473
50206
  ", ;": tags.separator
49474
50207
  });
49475
50208
  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 };
49476
- var parser2 = LRParser.deserialize({
50209
+ var parser4 = LRParser.deserialize({
49477
50210
  version: 14,
49478
50211
  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'#DvO.[QtO'#GuOOQS'#Gu'#GuO'vQdO'#GtO0ZQtO'#GtOOQS'#Eb'#EbO0rQdO'#EcOOQS'#Gs'#GsO0|QdO'#GrOOQV'#Gr'#GrO1XQdO'#FYOOQS'#G^'#G^O1^QdO'#FXOOQV'#IS'#ISOOQV'#Gq'#GqOOQV'#Fq'#FqQ`QeOOO'vQdO'#CqO1lQdO'#C}O1sQdO'#DRO2RQdO'#HYO2cQtO'#EVO'vQdO'#EWOOQS'#EY'#EYOOQS'#E['#E[OOQS'#E^'#E^O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a0UO!['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~",
@@ -49498,7 +50231,7 @@ var parser2 = LRParser.deserialize({
49498
50231
  });
49499
50232
 
49500
50233
  // src/adapters.ts
49501
- var phpEngine = new import_php_parser2.Engine({ parser: { extractDoc: false, php7: true }, ast: { withPositions: true, withSource: false } });
50234
+ var phpEngine = new import_php_parser4.Engine({ parser: { extractDoc: false, php7: true }, ast: { withPositions: true, withSource: false } });
49502
50235
  var PHP_SOURCES = [
49503
50236
  ["_GET", "http_parameter"],
49504
50237
  ["_POST", "http_body"],
@@ -49646,8 +50379,13 @@ var JS_SINKS = [
49646
50379
  [/document\.write/i, "html_render", "CWE-79"],
49647
50380
  [/fs\.writeFile/i, "file_operations", "CWE-434"],
49648
50381
  [/fs\.appendFile/i, "file_operations", "CWE-434"],
50382
+ [/fs\.readFile/i, "path_traversal", "CWE-22"],
50383
+ [/fs\.readFileSync/i, "path_traversal", "CWE-22"],
50384
+ [/fs\.unlink/i, "file_operations", "CWE-434"],
49649
50385
  [/require\s*\(/i, "file_inclusion", "CWE-98"],
49650
50386
  [/fetch\s*\(/i, "http_request", "CWE-918"],
50387
+ [/http\.get|https\.get|axios/i, "http_request", "CWE-918"],
50388
+ [/http\.request|https\.request/i, "http_request", "CWE-918"],
49651
50389
  [/redirect\s*\(/i, "redirect", "CWE-601"],
49652
50390
  [/res\.redirect/i, "redirect", "CWE-601"]
49653
50391
  ];
@@ -49734,6 +50472,8 @@ var jsAdapter = {
49734
50472
  argVars.push(c.name);
49735
50473
  for (const [re, kind, cwe] of JS_SINKS) {
49736
50474
  if (re.test(fullCallText) || re.test(calleeText + "(")) {
50475
+ if (kind === "sql_execution" && /\?/.test(fullCallText) && /,\s*\[/.test(fullCallText))
50476
+ continue;
49737
50477
  for (const v of argVars)
49738
50478
  sinks.push({ variable: v, kind, line: n.loc?.start?.line ?? 0, cwe });
49739
50479
  }
@@ -49772,6 +50512,8 @@ var PY_SINKS = [
49772
50512
  [/\.save\s*\(/i, "file_operations", "CWE-434"],
49773
50513
  [/render_template/i, "html_render", "CWE-79"],
49774
50514
  [/redirect\s*\(/i, "redirect", "CWE-601"],
50515
+ [/requests\.(get|post|put|head|request)\s*\(/i, "http_request", "CWE-918"],
50516
+ [/urllib\.request/i, "http_request", "CWE-918"],
49775
50517
  [/pickle\.loads\s*\(/i, "deserialization", "CWE-502"],
49776
50518
  [/yaml\.load\s*\(/i, "deserialization", "CWE-502"],
49777
50519
  [/os\.popen\s*\(/i, "command_execution", "CWE-78"],
@@ -49791,7 +50533,7 @@ var pythonAdapter = {
49791
50533
  language: "python",
49792
50534
  extensions: [".py", ".pyw"],
49793
50535
  parse(code, _file) {
49794
- const tree = parser2.parse(code);
50536
+ const tree = parser4.parse(code);
49795
50537
  const sources = [];
49796
50538
  const sinks = [];
49797
50539
  const sanitizers = [];
@@ -49856,9 +50598,14 @@ var pythonAdapter = {
49856
50598
  if (m[1] !== callee.trim().split(".").pop())
49857
50599
  argVars.push(m[1]);
49858
50600
  for (const [re, kind, cwe] of PY_SINKS) {
49859
- if (re.test(full))
49860
- for (const v of argVars)
49861
- sinks.push({ variable: v, kind, line: lineOf(n), cwe });
50601
+ if (!re.test(full))
50602
+ continue;
50603
+ if (kind === "sql_execution" && /\?/.test(full) && /,\s*\(/.test(full))
50604
+ continue;
50605
+ if (kind === "command_execution" && /subprocess/.test(full) && /\[/.test(full))
50606
+ continue;
50607
+ for (const v of argVars)
50608
+ sinks.push({ variable: v, kind, line: lineOf(n), cwe });
49862
50609
  }
49863
50610
  for (const [re, kinds] of PY_SANITIZERS) {
49864
50611
  if (re.test(full))
@@ -49894,6 +50641,10 @@ var JAVA_SINKS = [
49894
50641
  [/readObject\s*\(/i, "deserialization", "CWE-502"],
49895
50642
  [/new File\s*\(/i, "file_operations", "CWE-434"],
49896
50643
  [/\.getInputStream\s*\(/i, "http_request", "CWE-918"],
50644
+ [/new URL\s*\(/i, "http_request", "CWE-918"],
50645
+ [/openConnection\s*\(/i, "http_request", "CWE-918"],
50646
+ [/DocumentBuilder|SAXParser|XMLReader/i, "xml_processing", "CWE-611"],
50647
+ [/\.parse\s*\(/i, "xml_processing", "CWE-611"],
49897
50648
  [/sendRedirect\s*\(/i, "redirect", "CWE-601"],
49898
50649
  [/\.forward\s*\(/i, "redirect", "CWE-601"]
49899
50650
  ];
@@ -50774,7 +51525,7 @@ function reportJson(findings, opts = {}) {
50774
51525
  }
50775
51526
 
50776
51527
  // src/benchmark.ts
50777
- import { readFileSync as readFileSync11, readdirSync as readdirSync4, writeFileSync as writeFileSync2, rmSync } from "node:fs";
51528
+ import { readFileSync as readFileSync13, readdirSync as readdirSync4, writeFileSync as writeFileSync2, rmSync } from "node:fs";
50778
51529
  import { join as join9 } from "node:path";
50779
51530
  import { fileURLToPath as fileURLToPath6 } from "node:url";
50780
51531
  import { tmpdir } from "node:os";
@@ -50783,7 +51534,7 @@ var CORPUS = join9(ROOT4, "bench", "corpus");
50783
51534
  function parseCorpusFile(path) {
50784
51535
  let text;
50785
51536
  try {
50786
- text = readFileSync11(path, "utf8");
51537
+ text = readFileSync13(path, "utf8");
50787
51538
  } catch {
50788
51539
  return null;
50789
51540
  }
@@ -50847,7 +51598,7 @@ function detect(entry) {
50847
51598
  if (lang === "php") {
50848
51599
  const tmp = join9(tmpdir(), `blitzstrike-bench-${entry.id}-${process.pid}.php`);
50849
51600
  writeFileSync2(tmp, entry.code);
50850
- const r = analyzeTaint(tmp);
51601
+ const r = analyzeDataFlow2(tmp);
50851
51602
  rmSync(tmp, { force: true });
50852
51603
  if (r.findings.length > 0)
50853
51604
  return { detected: true, sinkKind: r.findings[0].sink };
@@ -51631,6 +52382,38 @@ function createServer() {
51631
52382
  });
51632
52383
  return { content: [{ type: "text", text: JSON.stringify({ ...r, next_steps: guidance }) }] };
51633
52384
  });
52385
+ server.registerTool("eagle_eye2", {
52386
+ title: "Whole-program interprocedural taint (EAGLE-EYE 2.0)",
52387
+ 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.",
52388
+ inputSchema: { path: string2().describe("Source file path (PHP)") }
52389
+ }, async ({ path }) => {
52390
+ const r = analyzeDataFlow2(path);
52391
+ const taintedSinks = [...new Set(r.findings.map((f) => f.sink))];
52392
+ const authGated = r.findings.filter((f) => f.auth_gated).length;
52393
+ const guidance = nextSteps({
52394
+ tier: "eagle-eye",
52395
+ hasFindings: r.findings.length > 0,
52396
+ sanitizedCount: r.suppressed,
52397
+ taintedSinks
52398
+ });
52399
+ return {
52400
+ content: [{
52401
+ type: "text",
52402
+ text: JSON.stringify({
52403
+ file: r.file,
52404
+ findings: r.findings.length,
52405
+ suppressed: r.suppressed,
52406
+ auth_gated: authGated,
52407
+ interprocedural: r.findings.filter((f) => f.interprocedural).length,
52408
+ functions: r.summary.functions,
52409
+ methods: r.summary.methods,
52410
+ call_edges: r.summary.edges,
52411
+ results: r.findings,
52412
+ next_steps: guidance
52413
+ })
52414
+ }]
52415
+ };
52416
+ });
51634
52417
  server.registerTool("taint_tree", {
51635
52418
  title: "Whole-tree taint scan",
51636
52419
  description: "EAGLE-EYE: run inter-procedural taint analysis across an entire source tree.",
@@ -51784,7 +52567,7 @@ async function serve() {
51784
52567
  }
51785
52568
 
51786
52569
  // src/cli.ts
51787
- import { readFileSync as readFileSync13, existsSync as existsSync6, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4 } from "node:fs";
52570
+ import { readFileSync as readFileSync15, existsSync as existsSync6, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4 } from "node:fs";
51788
52571
  import { join as join11, dirname as dirname2 } from "node:path";
51789
52572
  import { homedir as homedir5 } from "node:os";
51790
52573
  import { fileURLToPath as fileURLToPath8 } from "node:url";
@@ -51866,7 +52649,7 @@ function resolveCommand() {
51866
52649
  }
51867
52650
  function readJson(p) {
51868
52651
  try {
51869
- return JSON.parse(readFileSync13(p, "utf8"));
52652
+ return JSON.parse(readFileSync15(p, "utf8"));
51870
52653
  } catch {
51871
52654
  return null;
51872
52655
  }
@@ -51909,7 +52692,7 @@ function copyOpenCodeAgents() {
51909
52692
  const src = join11(srcDir, f);
51910
52693
  const dst = join11(dstDir, f);
51911
52694
  if (existsSync6(src)) {
51912
- writeFileSync4(dst, readFileSync13(src, "utf8"));
52695
+ writeFileSync4(dst, readFileSync15(src, "utf8"));
51913
52696
  }
51914
52697
  }
51915
52698
  }
@@ -51918,7 +52701,7 @@ function codexWrite(p) {
51918
52701
  const dir = dirname2(p);
51919
52702
  if (!existsSync6(dir))
51920
52703
  mkdirSync4(dir, { recursive: true });
51921
- let existing = existsSync6(p) ? readFileSync13(p, "utf8") : "";
52704
+ let existing = existsSync6(p) ? readFileSync15(p, "utf8") : "";
51922
52705
  if (!existing.trimEnd().endsWith(`
51923
52706
  `))
51924
52707
  existing += `
@@ -51937,7 +52720,7 @@ function hermesWrite(p) {
51937
52720
  const dir = dirname2(p);
51938
52721
  if (!existsSync6(dir))
51939
52722
  mkdirSync4(dir, { recursive: true });
51940
- let existing = existsSync6(p) ? readFileSync13(p, "utf8") : "";
52723
+ let existing = existsSync6(p) ? readFileSync15(p, "utf8") : "";
51941
52724
  existing = existing.replace(/^ blitzstrike:\n(?: .*\n?)*/m, "");
51942
52725
  if (!existing.trimEnd().endsWith(`
51943
52726
  `))
@@ -52075,7 +52858,7 @@ Registered with ${ok}/${installed.length} agent(s).`);
52075
52858
  }
52076
52859
 
52077
52860
  // src/index.ts
52078
- import { readFileSync as readFileSync14, existsSync as existsSync7 } from "node:fs";
52861
+ import { readFileSync as readFileSync16, existsSync as existsSync7 } from "node:fs";
52079
52862
  import { join as join12 } from "node:path";
52080
52863
  import { fileURLToPath as fileURLToPath9 } from "node:url";
52081
52864
  var ROOT7 = join12(fileURLToPath9(new URL(".", import.meta.url)), "..");
@@ -52083,7 +52866,7 @@ function readVersion() {
52083
52866
  try {
52084
52867
  const p = join12(ROOT7, "package.json");
52085
52868
  if (existsSync7(p))
52086
- return JSON.parse(readFileSync14(p, "utf8")).version ?? "1.0.0";
52869
+ return JSON.parse(readFileSync16(p, "utf8")).version ?? "1.0.0";
52087
52870
  } catch {}
52088
52871
  return "1.0.0";
52089
52872
  }