blitzstrike 2.4.45 → 2.4.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to Blitz Strike are documented here.
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
+ ## [2.4.46] — 2026-09-14
9
+
10
+ ### Added — SQL injection (raw string-interpolated query) detector
11
+
12
+ - `detectSqlInjection` (in complex-bugs.ts): flags a SQL sink (`$wpdb->get_results/
13
+ get_col/get_var/get_row/query`, `->query`, `DB::unprepared`, `->whereRaw`,
14
+ `->selectRaw`) whose query is built by string concatenation (`. $var`) and NOT
15
+ `->prepare()`d — targeting the CROSS-FILE case the per-file taint engine cannot
16
+ see (source in a caller). Surfaces the raw-concat sink as a lead to trace back.
17
+ - Enterprise fixture `wp-batch-route` corrected to 2 vulns (route confusion +
18
+ the raw SQLi in `get_users`) — the new detector surfaced a real, previously
19
+ uncounted vuln.
20
+
8
21
  ## [2.4.45] — 2026-09-14
9
22
 
10
23
  ### Added — File Upload → RCE detector (from plugin benchmark)
package/dist/index.js CHANGED
@@ -56679,6 +56679,7 @@ function detectComplexBugs(code, file) {
56679
56679
  detectXxe(code, file, out);
56680
56680
  detectSsti(code, file, out);
56681
56681
  detectFileUploadRce(code, file, out);
56682
+ detectSqlInjection(code, file, out);
56682
56683
  out.push(...detectWrongSanitizer(code, file));
56683
56684
  out.push(...detectMissingAuthz(code, file));
56684
56685
  const seen = new Set;
@@ -56864,6 +56865,34 @@ function detectFileUploadRce(code, file, out) {
56864
56865
  });
56865
56866
  }
56866
56867
  }
56868
+ function detectSqlInjection(code, file, out) {
56869
+ const ls = lines2(code);
56870
+ const sinkRe = /\$wpdb->(get_results|get_col|get_var|get_row|query)\s*\(|->query\s*\(|DB::unprepared\s*\(|->whereRaw\s*\(|->selectRaw\s*\(/g;
56871
+ let m;
56872
+ while ((m = sinkRe.exec(code)) !== null) {
56873
+ const ln = lineNo2(code, m.index);
56874
+ const l = ls[ln - 1] ?? "";
56875
+ const scope = ls.slice(Math.max(0, ln - 6), ln + 1).join(`
56876
+ `);
56877
+ if (/->prepare\s*\(/.test(scope))
56878
+ continue;
56879
+ if (SOURCE_TOKENS3.test(scope))
56880
+ continue;
56881
+ const inlineConcat = /\.\s*\$[A-Za-z_]\w*/.test(l);
56882
+ const assignConcat = /(?:^|\n)\s*\$[A-Za-z_]\w*\s*(?:\.=|=)\s*[^;\n]*["'][^"']*["']\s*\.\s*\$[A-Za-z_]\w*/.test(scope);
56883
+ if (!inlineConcat && !assignConcat)
56884
+ continue;
56885
+ out.push({
56886
+ file,
56887
+ line: ln,
56888
+ type: "sql_injection",
56889
+ category: "SQL injection (raw string-interpolated query)",
56890
+ severity: "medium",
56891
+ evidence: l.trim(),
56892
+ detail: "A SQL sink receives a query built by string concatenation (not prepared), with no visible source in this file — trace the concatenated variable back to a request source; if user-controlled, this is SQL injection (CWE-89)."
56893
+ });
56894
+ }
56895
+ }
56867
56896
 
56868
56897
  // src/guidance.ts
56869
56898
  var SINK_DIRECTIVES = {
@@ -57887,7 +57916,7 @@ var ENTERPRISE_FIXTURES = [
57887
57916
  { id: "js-express", dir: join18(ROOT6, "js-express"), expected_vulns: 2 },
57888
57917
  { id: "py-django", dir: join18(ROOT6, "py-django"), expected_vulns: 2 },
57889
57918
  { id: "java-spring", dir: join18(ROOT6, "java-spring"), expected_vulns: 2 },
57890
- { id: "wp-batch-route", dir: join18(ROOT6, "wp-batch-route"), expected_vulns: 1 },
57919
+ { id: "wp-batch-route", dir: join18(ROOT6, "wp-batch-route"), expected_vulns: 2 },
57891
57920
  { id: "php-complex", dir: join18(ROOT6, "php-complex"), expected_vulns: 4 }
57892
57921
  ];
57893
57922
  function sourceFiles(root) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blitzstrike",
3
- "version": "2.4.45",
3
+ "version": "2.4.46",
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": {