blitzstrike 1.0.26 → 1.0.27

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,75 @@ 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.26] — 2026-09-13
9
+
10
+ The first hardening milestone: the whole roadmap is implemented, measured, and
11
+ type-safe. "A scan hit is a hypothesis; a live test is the verdict" is now a
12
+ code path, not a slogan.
13
+
14
+ ### Added
15
+
16
+ - **STRIKE validation engine** (`src/strike.ts`) — baseline + marker +
17
+ negative-control requests produce a deterministic verdict (`confirmed` /
18
+ `false_positive` / `unconfirmed` / `blocked`), wired into the finding
19
+ lifecycle via `resolveFinding` (`hypothesis → validating → confirmed`).
20
+ - **`strike_verify`** rewritten and **`strike_resolve`** added — attach a live
21
+ verdict to a finding, advancing its lifecycle + attaching SHA-256 evidence.
22
+ - **CVSS v3.1 calculator** (`src/cvss.ts`) + `cvss_score` tool — self-computed
23
+ base score, vector, and severity (verified against known NVD values), not
24
+ read from NVD.
25
+ - **Finding deduplication** (`src/dedup.ts`) + `dedup_findings` tool — collapse
26
+ findings that share a root cause (sink × source × CWE) across engagements.
27
+ - **Reproducible report generator** (`src/report.ts`) + `generate_report` tool —
28
+ deterministic markdown/JSON report with summary + SHA-256 integrity hash.
29
+ - **Benchmark framework** (`src/benchmark.ts` + `bench/corpus/`) + `run_benchmark`
30
+ tool — labelled vulnerable/safe corpus across 4 languages measuring detection
31
+ rate, false-positive rate, and precision.
32
+ - **Coverage matrix** (`src/coverage.ts`) + `coverage_matrix` tool — enumerates
33
+ language × sink-class coverage (4 languages × 12 sink classes).
34
+ - **Dynamic guidance** (`src/guidance.ts`) — every trace/scan/verify result
35
+ returns `next_steps` directives so a driving agent knows the next move.
36
+ - **Modular live reconnaissance** (`src/live-recon.ts`) + `live_recon` tool —
37
+ fingerprint, WAF/tech/version detection, crawler, parameter discovery,
38
+ subdomain enumeration, Wayback CDX, API discovery, port scan, intel correlation.
39
+ - **Universal multi-language taint** (`src/universal-taint.ts` + `src/adapters.ts`)
40
+ — PHP (php-parser), JavaScript/TS (@babel/parser), Python (@lezer/python),
41
+ Java (java-parser), all pure-JS (no tree-sitter native addons).
42
+ - **3 memory/confidence tools** — `memory_forget`, `confidence_weights`,
43
+ `finding_attach_evidence` (wired previously-dead exports into the surface).
44
+ - **CI workflow** (`.github/workflows/ci.yml`) — typecheck + build + regression
45
+ suite on every push and pull request.
46
+ - **47 missing tool manuals** generated (`scripts/generate-manuals.py`) —
47
+ manual coverage went 270 → 317 indexed manuals (334 files), 100% of the
48
+ 130-tool catalog is now documented.
49
+
50
+ ### Changed
51
+
52
+ - **MCP surface grew 33 → 54 tools.**
53
+ - `bun run test` now runs the formal regression + benchmark suite
54
+ (106 checks), replacing the ad-hoc `test/verify.ts` invocation.
55
+
56
+ ### Fixed
57
+
58
+ - **Node crash (latent)** — `require("node:fs")` inside ESM modules
59
+ (`memory.ts`, `benchmark.ts`) worked under Bun but threw `require is not
60
+ defined` under plain Node (the `npx` path). Replaced with top-level imports.
61
+ - **`trace_data_flow` next_steps broken** — `taintedSinks` collected SinkClass
62
+ *objects* instead of string sink ids, so sink-specific guidance never matched.
63
+ Now collects `sink.id`.
64
+ - **`strike_verify` ignored its `timeout` parameter** — now threaded into the
65
+ request.
66
+ - **Dead code eliminated** — 12 unused locals/params/imports + 4 dead exports +
67
+ 1 dead re-export, all removed or wired into tools.
68
+
69
+ ### Hardening
70
+
71
+ - **Type safety** — 59 scattered `any` usages reduced to 0 literals. Internal
72
+ JSON/data types got explicit interfaces (`WafDetection`, `TechCorrelationResult`,
73
+ `EnrichResult`, `ScopeResult`, `NvdResponse`, `FofaResponse`, …). The only
74
+ remaining `any` is a single documented `AstNode` alias marking the external
75
+ untyped-parser boundary (php-parser / babel / lezer / java-parser).
76
+
8
77
  ## [1.0.0] — 2026-09-12
9
78
 
10
79
  ### Added
package/README.md CHANGED
@@ -161,12 +161,14 @@ MCP servers. With no client detected, it prints the snippet for manual paste.
161
161
 
162
162
  | Tool | Purpose |
163
163
  |---|---|
164
- | `strike_verify(url, method, data, headers, marker, timeout)` | Live HTTP verification with marker + negative control. |
164
+ | `strike_verify(url, method, data, headers, marker, timeout)` | Live HTTP verification with marker + negative control + baseline. |
165
+ | `strike_resolve(finding, verdict)` | Attach a live STRIKE verdict to a finding and advance its lifecycle. |
165
166
  | `scope_check(target, scope, mode)` | Enforce scope before active testing (no-DoS, exclusion-aware, mode-gated). |
166
167
  | `run_engagement(target, scope, mode, max_files)` | Full 3-tier audit in ONE call — scope gate → triage → chain enrichment → findings. |
167
168
  | `list_chains()` | List all escalation chains in the data layer. |
168
169
  | `fofa_search(query, size, fields)` | FOFA asset index search (needs `FOFA_EMAIL` + `FOFA_KEY`). |
169
170
  | `nvd_lookup(cve_id)` | CVE lookup from NVD 2.0 (no key required). |
171
+ | `live_recon(url)` | Modular passive-first recon: fingerprint, WAF/tech/version, crawler, params, subdomains, Wayback, API discovery, port scan. |
170
172
 
171
173
  ### CATALOG — breadth layer (tools + skills knowledge base)
172
174
 
@@ -183,11 +185,32 @@ MCP servers. With no client detected, it prints the snippet for manual paste.
183
185
 
184
186
  | Tool | Purpose |
185
187
  |---|---|
186
- | `read_tool_manual(name)` | Read a full deep manual for a tool (270+ manuals). |
188
+ | `read_tool_manual(name)` | Read a full deep manual for a tool (317+ manuals). |
187
189
  | `list_manuals()` | List all manuals + playbooks. |
188
190
  | `read_playbook(name)` | Read an engagement playbook (web-app, api-security, AD, etc.). |
189
191
  | `list_playbooks()` | List all 17 engagement playbooks. |
190
192
 
193
+ ### PHASE 4 — verification, measurement, reporting
194
+
195
+ | Tool | Purpose |
196
+ |---|---|
197
+ | `cvss_score(AV, AC, PR, UI, S, C, I, A)` | Compute a deterministic CVSS v3.1 base score + vector + severity (self-computed, not read from NVD). |
198
+ | `dedup_findings(findings)` | Collapse findings that share a root cause (sink × source × CWE) into one group per root cause. |
199
+ | `generate_report(findings, format)` | Emit a reproducible markdown/JSON report with summary + SHA-256 integrity hash. |
200
+ | `run_benchmark()` | Run the labelled corpus and report detection rate, false-positive rate, and precision. |
201
+ | `coverage_matrix()` | Enumerate language × sink-class coverage (4 languages × 12 sink classes) + coverage ratio. |
202
+
203
+ ### EAGLE-EYE — taint + data-flow
204
+
205
+ | Tool | Purpose |
206
+ |---|---|
207
+ | `taint_file(path)` | Inter-procedural taint analysis (PHP) — reachable, sanitized, authorized sinks. |
208
+ | `taint_scan(code, language)` | Universal taint analysis (PHP/JS/TS/Python/Java) with source→sink tracing. |
209
+ | `taint_tree(path)` | Taint propagation tree — how a source flows to a sink. |
210
+ | `trace_data_flow(path)` | Window-based data-flow trace with sanitizer + auth-gate awareness. |
211
+ | `variant_analysis(path)` | Group reachable sinks into variant families. |
212
+ | `list_languages()` | List supported analysis languages + extensions. |
213
+
191
214
  ### INTELLIGENCE — data layer (WAF + correlations + fuzzer)
192
215
 
193
216
  | Tool | Purpose |
@@ -207,7 +230,8 @@ data, vuln ontology, exploit payloads, nuclei detection templates) is sourced
207
230
  from airecon (MIT), PayloadsAllTheThings (MIT), and nuclei-templates (MIT) —
208
231
  loaded at runtime and wired into the tool surface above.
209
232
 
210
- 270 tool manuals + 17 playbooks from kali-pentest (Apache-2.0). These are NOT
233
+ 317 indexed tool manuals + 17 playbooks from kali-pentest (Apache-2.0) — 334
234
+ manual files, 100% of the 130-tool catalog documented. These are NOT
211
235
  decoration — they are wired into the flow:
212
236
 
213
237
  - `tool_lookup(name)` auto-attaches the tool's full manual.
@@ -220,6 +244,9 @@ decoration — they are wired into the flow:
220
244
  | `remember(topic, content, type, tags, verified)` | Save a reusable insight (deduped). verified=true only if marker reflected + negative control inert. |
221
245
  | `memory_lookup(query)` | Search memory by topic/tag/content, scored. |
222
246
  | `memory_list()` | List all memory entries, grouped by type. |
247
+ | `memory_forget(id)` | Remove a memory entry (append-only tombstone). |
248
+ | `confidence_weights(...)` | Get or set the confidence-scoring weight factors. |
249
+ | `finding_attach_evidence(finding, type, description, content)` | Attach a redacted + hashed evidence record to a finding. |
223
250
 
224
251
  Memory is append-only JSONL at `~/.blitzstrike/memory.jsonl` (override with
225
252
  `BLITZSTRIKE_HOME`). `run_engagement` auto-captures matched escalation chains
@@ -305,11 +332,29 @@ All other tools need no credentials.
305
332
  bun install # deps
306
333
  bun run typecheck # tsc --noEmit
307
334
  bun run build # ESM bundle → dist/index.js
335
+ bun run test # regression + benchmark suite (106 checks)
308
336
  bun run compile # single static binary → dist/blitzstrike
309
337
  ```
310
338
 
311
339
  ---
312
340
 
341
+ ## Quality (measured, not claimed)
342
+
343
+ Blitz Strike carries a benchmark suite and a coverage matrix so quality is a
344
+ number you can re-run, not a claim.
345
+
346
+ - **Benchmark** (`run_benchmark`) — a labelled corpus of vulnerable + safe
347
+ fixtures across PHP, JavaScript, Python, and Java. Current result:
348
+ detection rate **1.0**, false-positive rate **0**, precision **1.0**.
349
+ - **Coverage matrix** (`coverage_matrix`) — 4 languages × 12 sink classes =
350
+ 35/48 pairs covered (**72.9%**). The two uncovered classes (`xml_processing`,
351
+ `archive_extraction`) are tracked in the roadmap.
352
+ - **Regression suite** — `bun run test` runs 106 checks covering finding
353
+ lifecycle, evidence integrity, CVSS math, taint tracing, dedup, report
354
+ integrity, and benchmark invariants. CI runs it on every push.
355
+
356
+ ---
357
+
313
358
  ## Methodology Notes
314
359
 
315
360
  - **Sink ≠ vuln.** A dangerous function in the same *file* as an unauth handler does not mean the handler calls it. Use `eagle_eye` to confirm scope.
package/ROADMAP.md CHANGED
@@ -2,15 +2,28 @@
2
2
 
3
3
  Blitz Strike is version 1.0. This is where it's headed.
4
4
 
5
+ ## Done
6
+
7
+ - [x] **npm publish** — `npx blitzstrike` zero-install for every MCP client.
8
+ - [x] **Phase 1 — Finding engine** — canonical Finding schema, evidence +
9
+ SHA-256 integrity, secret redaction, confidence scoring, strict lifecycle.
10
+ - [x] **Phase 2 — Source-to-sink tracing** — universal multi-language taint
11
+ (PHP/JS/TS/Python/Java), sanitizer + auth-gate awareness, variant grouping.
12
+ - [x] **Phase 3 — STRIKE validation** — baseline + marker + negative control →
13
+ deterministic verdict, wired into the finding lifecycle.
14
+ - [x] **Phase 4 — Benchmark & regression** — labelled corpus (detection rate /
15
+ false-positive rate / precision), coverage matrix, CI, formal test suite.
16
+ - [x] **Type hardening** — 59 scattered `any` → 0 literals; explicit interfaces
17
+ for all internal JSON/data shapes.
18
+
5
19
  ## Near term
6
20
 
7
- - [ ] **npm publish** — `npx blitzstrike` zero-install for every MCP client.
8
- - [ ] **Live catalog** — `tools-catalog.json` + intelligence data fetched from
9
- GitHub at startup (always current, no re-clone).
10
21
  - [ ] **Client-side pentest** — Playwright browser automation for DOM XSS,
11
22
  auth-flow replay, and CSRF PoC generation (verifiable, not decorative).
12
- - [ ] **`bun test` formal suite** — convert `test/verify.ts` to `bun:test` with
13
- CI.
23
+ - [ ] **XML + archive sink coverage** — `xml_processing` and `archive_extraction`
24
+ are the two sink classes still uncovered (see `coverage_matrix`).
25
+ - [ ] **Java/Go/Ruby taint precision** — Java adapter is currently regex-oriented;
26
+ Go and Ruby are not yet covered by the universal engine.
14
27
 
15
28
  ## Medium term
16
29
 
package/docs/findings.md CHANGED
@@ -89,7 +89,34 @@ validation + evidence.
89
89
  | `finding_create` | create a canonical finding (default `detected`) |
90
90
  | `finding_transition` | advance lifecycle (rejects illegal moves) |
91
91
  | `confidence_score` | deterministic weighted confidence |
92
+ | `confidence_weights` | get/set the confidence weight factors |
92
93
  | `redact` | redact secrets from arbitrary text |
94
+ | `finding_attach_evidence` | attach a redacted + hashed evidence record to a finding |
95
+ | `strike_resolve` | attach a live STRIKE verdict to a finding and advance its lifecycle |
93
96
 
94
97
  `run_engagement` now emits canonical findings (status `hypothesis`, carrying
95
98
  static + sink evidence) instead of ad-hoc `{chain_id, name, severity}` tuples.
99
+
100
+ ## STRIKE verdict → lifecycle
101
+
102
+ `src/strike.ts` runs a baseline, a marker, and a negative-control request and
103
+ maps the result to a deterministic verdict that resolves a finding:
104
+
105
+ | Verdict | Condition | Lifecycle effect |
106
+ | :--- | :--- | :--- |
107
+ | `confirmed` | marker reflected, control inert | `hypothesis → validating → confirmed` (+ evidence, confidence 1.0) |
108
+ | `false_positive` | marker + control both reflected | terminal `false_positive` |
109
+ | `unconfirmed` | marker not reflected | stays `validating` (validation `unconfirmed`) |
110
+ | `blocked` | request failed/blocked | terminal `blocked` |
111
+
112
+ ## Deduplication, CVSS & reports
113
+
114
+ - **Dedup** (`src/dedup.ts` + `dedup_findings`) — findings that share a root
115
+ cause (`sink type × source type × CWE`) collapse into one group, so the same
116
+ bug reached the same way in two files counts once.
117
+ - **CVSS** (`src/cvss.ts` + `cvss_score`) — a self-computed CVSS v3.1 base score
118
+ + vector + severity (verified against known NVD values), instead of only
119
+ reading a score from NVD.
120
+ - **Reports** (`src/report.ts` + `generate_report`) — deterministic markdown or
121
+ JSON with a summary table and a SHA-256 integrity hash; same findings →
122
+ byte-identical output.
package/docs/usage.md CHANGED
@@ -45,11 +45,15 @@ Only after `strike_verify` reflects your marker AND the chain's
45
45
 
46
46
  - `tool_lookup` / `ensure_tool` — find + auto-install a security tool.
47
47
  - `skill_lookup` / `read_skill` — search 32 universal playbooks.
48
- - `read_tool_manual` / `read_playbook` — 270 manuals + 17 playbooks.
48
+ - `read_tool_manual` / `read_playbook` — 317 manuals + 17 playbooks.
49
49
  - `detect_waf` / `tech_correlation` / `cve_correlation` / `port_correlation` —
50
50
  intelligence data layer lookups.
51
51
  - `payload_lookup` / `template_lookup` — exploit payloads + nuclei templates.
52
- - `remember` / `memory_lookup` — persist + recall verified knowledge.
52
+ - `remember` / `memory_lookup` / `memory_forget` — persist + recall + remove
53
+ verified knowledge.
54
+ - `cvss_score` / `dedup_findings` / `generate_report` — self-computed CVSS,
55
+ root-cause dedup, and reproducible reports.
56
+ - `run_benchmark` / `coverage_matrix` — measure detection quality and coverage.
53
57
 
54
58
  ## Memory
55
59
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blitzstrike",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
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": {