blitzstrike 2.4.59 → 2.4.60

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,20 @@ 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.60] — 2026-09-14
9
+
10
+ ### Added — Modern attack-surface detectors + verification corpus
11
+
12
+ - Four new detector classes (the "next-gen" 2026 surface beyond classic web):
13
+ `llm_injection` (request input reaches an LLM call — OWASP LLM01), `graphql_exposure`
14
+ (introspection/playground left on), `oauth_misconfig` (redirect_uri fed by request
15
+ input with no allowlist), and `grpc_reflection` (reflection enabled). Each carries
16
+ CWE mapping + empirical pattern grounding.
17
+ - New `bench/verification/` — an auditable verification corpus: every detector that
18
+ was verified against a real vulnerable target gets a writeup (detector → ground
19
+ truth → result → evidence). "Battle-tested" is now a claim with an audit trail,
20
+ not an assertion.
21
+
8
22
  ## [2.4.59] — 2026-09-14
9
23
 
10
24
  ### Added — Severity calibration + engagement scaffold + data health
package/dist/index.js CHANGED
@@ -56852,6 +56852,10 @@ function detectComplexBugs(code, file) {
56852
56852
  detectUnrestrictedUpload(code, file, out);
56853
56853
  detectSqlInjection(code, file, out);
56854
56854
  detectHardcodedSecret(code, file, out);
56855
+ detectLlmInjection(code, file, out);
56856
+ detectGraphqlExposure(code, file, out);
56857
+ detectOauthMisconfig(code, file, out);
56858
+ detectGrpcReflection(code, file, out);
56855
56859
  out.push(...detectWrongSanitizer(code, file));
56856
56860
  out.push(...detectMissingAuthz(code, file));
56857
56861
  const seen = new Set;
@@ -57174,6 +57178,91 @@ function detectHardcodedSecret(code, file, out) {
57174
57178
  }
57175
57179
  }
57176
57180
  }
57181
+ function detectLlmInjection(code, file, out) {
57182
+ const ls = lines2(code);
57183
+ const clean = stripCommentsOnly(code);
57184
+ const llmCallRe = /\b(?:openai|anthropic|langchain|llama_index)\.[A-Za-z_.]+\s*\(|\b(?:ChatCompletion|completion|messages)\.create\s*\(|\bllm\.invoke\s*\(|\.chat\.completions\.create\s*\(/g;
57185
+ let m;
57186
+ while ((m = llmCallRe.exec(clean)) !== null) {
57187
+ const ln = lineNo2(code, m.index);
57188
+ const scope = ls.slice(Math.max(0, ln - 6), ln + 3).join(`
57189
+ `);
57190
+ if (!SOURCE_TOKENS3.test(scope))
57191
+ continue;
57192
+ out.push({
57193
+ file,
57194
+ line: ln,
57195
+ type: "llm_injection",
57196
+ category: "LLM prompt injection surface",
57197
+ severity: "medium",
57198
+ evidence: (ls[ln - 1] ?? "").trim(),
57199
+ detail: "Request input reaches an LLM call (chat/completion/invoke) with no visible prompt-injection boundary — untrusted text may override instructions or exfiltrate context (OWASP LLM01 Prompt Injection). Verify the prompt is sandboxed and output is not used for privileged actions."
57200
+ });
57201
+ }
57202
+ }
57203
+ function detectGraphqlExposure(code, file, out) {
57204
+ const ls = lines2(code);
57205
+ const clean = stripCommentsOnly(code);
57206
+ const re = /\b(introspection|playground|graphiql)\s*[:=]\s*(true|1)\b/gi;
57207
+ let m;
57208
+ while ((m = re.exec(clean)) !== null) {
57209
+ const ln = lineNo2(code, m.index);
57210
+ out.push({
57211
+ file,
57212
+ line: ln,
57213
+ type: "graphql_exposure",
57214
+ category: "GraphQL introspection/playground exposed",
57215
+ severity: "medium",
57216
+ evidence: (ls[ln - 1] ?? "").trim(),
57217
+ detail: `GraphQL ${m[1].toLowerCase()} is enabled (${m[2]}) in a configuration that appears production-reachable — introspection exposes the full schema/fields, and a playground enables interactive querying (CWE-200 Information Exposure). Disable in production.`
57218
+ });
57219
+ }
57220
+ }
57221
+ function detectOauthMisconfig(code, file, out) {
57222
+ const ls = lines2(code);
57223
+ const clean = stripCommentsOnly(code);
57224
+ const re = /\b(redirect_uri|redirectUrl|return_url|returnUrl|callback_url)\s*[:=]\s*/gi;
57225
+ let m;
57226
+ while ((m = re.exec(clean)) !== null) {
57227
+ const ln = lineNo2(code, m.index);
57228
+ const rest = clean.slice(m.index + m[0].length);
57229
+ const lineEnd = rest.search(/\r?\n/);
57230
+ const line = lineEnd === -1 ? rest : rest.slice(0, lineEnd);
57231
+ if (!/(request|params|query|\$_(?:GET|POST|REQUEST)|req\.)/i.test(line))
57232
+ continue;
57233
+ const scope = ls.slice(Math.max(0, ln - 6), ln + 3).join(`
57234
+ `);
57235
+ if (/(allowlist|whitelist|allowed_|in_array|startsWith|===\s*['"])/.test(scope))
57236
+ continue;
57237
+ out.push({
57238
+ file,
57239
+ line: ln,
57240
+ type: "oauth_misconfig",
57241
+ category: "OAuth redirect_uri misconfiguration",
57242
+ severity: "high",
57243
+ evidence: (ls[ln - 1] ?? "").trim(),
57244
+ detail: "An OAuth redirect_uri/callback is fed by request input with no allowlist validation — an attacker can redirect the authorization code/token to an attacker-controlled endpoint (CWE-601 Open Redirect → token theft). Validate the redirect target against a static allowlist."
57245
+ });
57246
+ }
57247
+ }
57248
+ function detectGrpcReflection(code, file, out) {
57249
+ const ls = lines2(code);
57250
+ const clean = stripCommentsOnly(code);
57251
+ const re = /\b(enable_server_reflection|RegisterReflectionService|reflection\.enable|grpc_reflection|reflection\.Register)\b/gi;
57252
+ let m;
57253
+ while ((m = re.exec(clean)) !== null) {
57254
+ const ln = lineNo2(code, m.index);
57255
+ out.push({
57256
+ file,
57257
+ line: ln,
57258
+ type: "grpc_reflection",
57259
+ category: "gRPC reflection exposed",
57260
+ severity: "low",
57261
+ evidence: (ls[ln - 1] ?? "").trim(),
57262
+ detail: "gRPC server reflection is enabled — it enumerates every service/method to any caller, expanding the attack surface and leaking the API contract (CWE-200 Information Exposure). Disable reflection in production."
57263
+ });
57264
+ }
57265
+ }
57177
57266
 
57178
57267
  // src/guidance.ts
57179
57268
  var SINK_DIRECTIVES = {
@@ -58,6 +58,10 @@
58
58
  {"id": "hardcoded_secret", "cwe": "CWE-798", "name": "Use of Hard-coded Credentials"},
59
59
  {"id": "type_juggling", "cwe": "CWE-697", "name": "Incorrect Comparison"},
60
60
  {"id": "path_confusion", "cwe": "CWE-22", "name": "Improper Limitation of a Pathname to a Restricted Directory (Path Traversal)"},
61
- {"id": "wrong_sanitizer", "cwe": "CWE-20", "name": "Improper Input Validation"}
61
+ {"id": "wrong_sanitizer", "cwe": "CWE-20", "name": "Improper Input Validation"},
62
+ {"id": "llm_injection", "cwe": "CWE-77", "name": "Improper Neutralization of Special Elements used in a Command (LLM Prompt Injection)"},
63
+ {"id": "graphql_exposure", "cwe": "CWE-200", "name": "Exposure of Sensitive Information"},
64
+ {"id": "oauth_misconfig", "cwe": "CWE-601", "name": "URL Redirection to Untrusted Site (Open Redirect)"},
65
+ {"id": "grpc_reflection", "cwe": "CWE-200", "name": "Exposure of Sensitive Information"}
62
66
  ]
63
67
  }
@@ -146,6 +146,42 @@
146
146
  "detection_signatures": ["secret field assigned a literal", "known secret format (JWT/AWS/GitHub/Slack/…) in source", "high-entropy token under a non-obvious name"],
147
147
  "chain_templates": ["api_key_leak_to_account_takeover", "appkey_leak_deserialization_rce", "default_creds_to_internal_pivot"],
148
148
  "references": ["CWE-798", "OWASP A02:2021 Cryptographic Failures"]
149
+ },
150
+ {
151
+ "id": "llm_injection",
152
+ "name": "LLM Prompt Injection",
153
+ "cwe": "CWE-77",
154
+ "real_world": "Untrusted text reaches an LLM call (chat/completion/invoke) without a prompt-injection boundary, letting the input override instructions, leak the system prompt, or steer the model into a privileged action.",
155
+ "detection_signatures": ["an LLM provider call (openai/anthropic/langchain/llm) with request input in scope", "no visible system-prompt boundary or output filtering"],
156
+ "chain_templates": [],
157
+ "references": ["CWE-77", "OWASP LLM01:2025 Prompt Injection"]
158
+ },
159
+ {
160
+ "id": "graphql_exposure",
161
+ "name": "GraphQL Introspection / Playground Exposure",
162
+ "cwe": "CWE-200",
163
+ "real_world": "GraphQL introspection or a playground is left enabled in production, exposing the full schema (every query/mutation/field) and enabling interactive querying for recon.",
164
+ "detection_signatures": ["introspection/playground/graphiql set true in a production-reachable config"],
165
+ "chain_templates": ["graphql_idor_to_data_theft", "graphql_batching_to_credential_stuffing"],
166
+ "references": ["CWE-200", "OWASP API2:2023 Broken Authentication"]
167
+ },
168
+ {
169
+ "id": "oauth_misconfig",
170
+ "name": "OAuth Redirect URI Misconfiguration",
171
+ "cwe": "CWE-601",
172
+ "real_world": "An OAuth redirect_uri/callback is fed by request input with no static allowlist, letting an attacker redirect the authorization code or token to an attacker-controlled endpoint.",
173
+ "detection_signatures": ["redirect_uri/callback fed by request input", "no allowlist/whitelist validation nearby"],
174
+ "chain_templates": ["oauth_redirect_bypass", "open_redirect_to_oauth_theft"],
175
+ "references": ["CWE-601", "OWASP A07:2021 Identification and Authentication Failures"]
176
+ },
177
+ {
178
+ "id": "grpc_reflection",
179
+ "name": "gRPC Reflection Exposed",
180
+ "cwe": "CWE-200",
181
+ "real_world": "gRPC server reflection is enabled, enumerating every service and method to any caller and leaking the API contract.",
182
+ "detection_signatures": ["enable_server_reflection / RegisterReflectionService in production code"],
183
+ "chain_templates": [],
184
+ "references": ["CWE-200"]
149
185
  }
150
186
  ]
151
187
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blitzstrike",
3
- "version": "2.4.59",
3
+ "version": "2.4.60",
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": {