@clear-capabilities/agentic-security-scanner 0.151.0 → 0.151.1

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
@@ -9,6 +9,80 @@
9
9
  > make the history less accurate, not more.
10
10
 
11
11
 
12
+ ## 0.151.1 - Adversarial premortem on the SARD benchmarking subsystem: 12 real findings, 12 real fixes
13
+
14
+ A structured adversarial premortem ("assume this subsystem has completely failed six months
15
+ from now — work backwards to why") was run against 0.151.0's SARD benchmarking work, producing
16
+ 19 findings across data/leakage, methodology, security, MLOps, and governance. All 12 findings
17
+ judged actionable were fixed and verified with real runs — none deferred, none papered over. Full
18
+ account, including one deliberate self-correction, in `bench/sard/IMPLEMENTATION_STATUS.md`'s
19
+ "Adversarial premortem + full remediation pass" section.
20
+
21
+ **Data & leakage:**
22
+ - Train/dev/test splits (`bench/sard/splits/*.json`) were computed and self-verified but never
23
+ consumed by scoring — every prior macro-F1 number was measured over the full corpus, not a
24
+ held-out split. `bench-realworld.js` now has a real `--split train|dev|test` flag filtering
25
+ both ground truth and actual findings symmetrically (8 new tests).
26
+ - `leakage-audit.mjs`'s own `CWE` term couldn't match Juliet's real fused naming convention
27
+ (`CWE89`, no separator) — `'CWE89'.match(/\bCWE\b/i)` returns null. Added a dedicated
28
+ `cwe-number` check independent of the plain term (2 new tests).
29
+ - PHP's identifier neutralization renamed exactly one hardcoded variable (`$tainted`) — an ad hoc
30
+ point-fix, not a designed protection. Generalized to the same hash-based rule pattern Java/C#
31
+ already use.
32
+
33
+ **Methodology:**
34
+ - The C# "26/32 CWE families, root-caused, not fixed" claim was re-investigated and found wrong
35
+ as stated: catalog entries already exist for several of the "uncovered" families. A first
36
+ re-investigation pass concluded the interprocedural taint engine was broken — before writing
37
+ that down, a controlled test matrix caught that the "evidence" for it was a coincidental
38
+ structural-detector hit, not real taint (a lowercase `request` parameter never matched the
39
+ catalog's case-sensitive source entry, in either the passing or failing fixture). With the
40
+ casing fixed, interprocedural taint propagation works correctly for this shape. The real
41
+ root cause of the C# corpus gap remains genuinely open. 3 new regression tests.
42
+ - Added the previously-missing adversarial (must-flip) mutation side to `mutate.mjs` —
43
+ `ADVERSARIAL_SOURCE_LITERALIZATION` replaces a tainted source's initializer with a hardcoded
44
+ literal and scores the opposite polarity from the existing metamorphic mutators. Found a real
45
+ detector precision gap on its first use: a structural Java SQL-injection detector fires on
46
+ "string built via concatenation" regardless of whether the value is genuinely tainted, while
47
+ the real taint engine correctly stays silent (5 new tests; the detector gap itself is
48
+ disclosed, not fixed here).
49
+ - `compare-baseline.mjs`'s flat 2-percentage-point regression tolerance either hid a real
50
+ regression on a high-support metric or failed on ordinary noise for a low-support one — exactly
51
+ the double-bind measured live this session (an unrelated holdout app's F1 moved between two
52
+ identical runs). Added `adaptiveTolerance()`, widening the band for low-support metrics only,
53
+ one-directionally (10 new tests, including the first automated end-to-end CLI proof for this
54
+ script in either direction).
55
+ - Headline metrics (100% Fully Verified Fix Rate, 100% Semantic Robustness Rate) now carry
56
+ explicit scope qualifiers in the implementation ledger, so neither can be quoted out of
57
+ context as a whole-corpus claim.
58
+
59
+ **Security:**
60
+ - PRD §56 "LLM Isolation" had zero implementation and zero test anywhere in this repo. Added
61
+ `test/sard-llm-isolation.test.js` against the real LLM-validator prompt builder: an
62
+ already-neutralized input produces a leakage-clean prompt; the scanner's own CWE classification
63
+ is legitimate content, not a leak; and, disclosed rather than hidden, the prompt builder has no
64
+ independent redaction of its own — isolation is entirely inherited from upstream neutralization.
65
+
66
+ **MLOps/CI:**
67
+ - `realworld-bench`'s `needs: synthetic-bench` meant a real, unrelated regression in
68
+ `synthetic-bench` (91.3%→85.9% F1, first observed 2026-09-08) silently skipped
69
+ `realworld-bench` for 5+ consecutive scheduled runs with zero alert. Removed the dependency —
70
+ both are already independently-tiered informational jobs.
71
+ - `compare-baseline.mjs` was local-only by design (no committed scores), leaving no CI-enforced
72
+ regression gate at all. Wired a GitHub Actions cache (never a git commit) into `sard-blind-smoke`
73
+ so a genuine regression fails the job for real, without touching the "no scores committed"
74
+ policy.
75
+ - The external-holdout generalization gate could never fail: every existing curated app's ground
76
+ truth was bootstrapped from a past scanner run, not built independently. Added
77
+ `bench/holdout-independent/tinymart/` — a small, hand-written app whose ground truth was
78
+ authored from its own source before the scanner ever ran against it. Proved the gate has real
79
+ teeth end to end: clean baseline, deliberately removed a vulnerability (gate correctly failed,
80
+ naming the app and the exact regression), reverted (gate returned to clean, numbers matched
81
+ byte-for-byte). 5 new tests.
82
+
83
+ No detection-engine changes in this release — every fix above is to the benchmarking/CI
84
+ infrastructure itself, not to `scanner/src/`.
85
+
12
86
  ## 0.151.0 - SARD/Juliet benchmarking: leakage-clean scoring, macro-F1, mutation testing, and fix verification (SARD_AGENTIC_SECURITY_PRD.md)
13
87
 
14
88
  Builds a full benchmarking subsystem against NIST SARD's Juliet (Java/C#) and PHP Vulnerability