@clear-capabilities/agentic-security-scanner 0.151.3 → 0.152.0
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 +71 -0
- package/dist/agentic-security.mjs +80 -80
- package/dist/agentic-security.mjs.sha256 +1 -1
- package/package.json +5 -5
- package/src/dataflow/CLAUDE.md +1 -1
- package/src/dataflow/catalog.js +802 -13
- package/src/dataflow/engine.js +852 -89
- package/src/dataflow/incremental.js +13 -0
- package/src/dataflow/index.js +18 -5
- package/src/dataflow/path-feasibility.js +86 -9
- package/src/dataflow/string-domain.js +132 -0
- package/src/dataflow/summaries.js +69 -8
- package/src/engine.js +108 -3
- package/src/ir/CLAUDE.md +2 -1
- package/src/ir/balanced-call.js +33 -1
- package/src/ir/callgraph.js +26 -2
- package/src/ir/class-hierarchy.js +101 -6
- package/src/ir/csharp-ir.js +97 -8
- package/src/ir/index.js +21 -1
- package/src/ir/parser-cs.js +706 -24
- package/src/ir/parser-java.js +498 -17
- package/src/ir/parser-js.js +22 -0
- package/src/ir/parser-php.js +446 -43
- package/src/ir/parser-rust.js +1338 -0
- package/src/ir/php-include-merge.js +190 -0
- package/src/lineage/sink-registry.js +18 -0
- package/src/lineage/source-registry.js +23 -0
- package/src/posture/csharp-analysis.js +341 -43
- package/src/posture/finding-defaults.js +5 -1
- package/src/posture/fix-coverage.js +1 -0
- package/src/posture/proof-coverage.js +1 -0
- package/src/sast/CLAUDE.md +1 -1
- package/src/sast/authz.js +144 -1
- package/src/sast/crypto-protocol.js +65 -7
- package/src/sast/csharp-cross-file.js +125 -0
- package/src/sast/csharp-structural.js +78 -2
- package/src/sast/csharp.js +574 -42
- package/src/sast/java-ast-folding.js +268 -11
- package/src/sast/java-bench-extras.js +530 -2
- package/src/sast/java-deserialization.js +31 -2
- package/src/sast/java-structural-cross-file.js +146 -0
- package/src/sast/java-structural.js +499 -6
- package/src/sast/ldap-injection.js +133 -3
- package/src/sast/rust.js +57 -0
- package/src/sast/xss-reflected-multilang.js +252 -3
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,77 @@
|
|
|
9
9
|
> make the history less accurate, not more.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
## 0.152.0 - Rust: first-class language, and the SARD 80% F1 push's taint-engine architecture work
|
|
13
|
+
|
|
14
|
+
Rust joins the first-class language set (JS/TS, Python, Java, Kotlin, Go, Ruby, PHP, C#) with both
|
|
15
|
+
a hand-rolled IR frontend (`scanner/src/ir/parser-rust.js`, the `parser-go.js`/`parser-cs.js`
|
|
16
|
+
pattern) feeding the Layer-2 taint engine, and dedicated SAST rules — Rust previously had only the
|
|
17
|
+
opt-in, WASM-based tree-sitter long-tail path, which nothing in the taint engine ever consumed.
|
|
18
|
+
|
|
19
|
+
- **Taint coverage** (`dataflow/catalog.js`, ~90 new source/sink/sanitizer entries): SQL injection
|
|
20
|
+
(sqlx/diesel/rusqlite/postgres, distinguishing the compile-checked `query!` macro and `.bind()`
|
|
21
|
+
parameterization from `format!`-built SQL text), command injection (`Command::new("sh").arg("-c")`
|
|
22
|
+
vs. safe argv-array execution), path traversal (`std::fs`/`tokio::fs`, recognizing a
|
|
23
|
+
canonicalize+`starts_with` containment guard), SSRF (reqwest/ureq), reflected XSS
|
|
24
|
+
(actix/axum/rocket/warp response bodies), open redirect, log injection, insecure deserialization,
|
|
25
|
+
and uncontrolled resource consumption. Sources include axum/actix/rocket extractor-typed
|
|
26
|
+
parameters (`Query`/`Path`/`Json`/`Form`/`HeaderMap`) via a new `paramAnnotations` side-channel
|
|
27
|
+
and route-attributed handlers (`#[get("/<x>")]`).
|
|
28
|
+
- **SAST rules** (`sast/rust.js`): TLS verification disabled, weak hash/cipher (MD5/SHA-1/DES/RC4),
|
|
29
|
+
weak randomness feeding a token/secret identifier, and unsafe raw-memory operations
|
|
30
|
+
(`transmute`/`from_raw_parts`/`get_unchecked`) — alongside the pre-existing sqlx-format/shell-form
|
|
31
|
+
command-injection/zero-seed-RNG/unsafe-block regex rules.
|
|
32
|
+
- **A real parser design lesson, not specific to Rust's own correctness**: `.unwrap()`/`.expect(msg)`
|
|
33
|
+
chained onto a sink call shift the chain's terminal segment away from the sink's own name (the same
|
|
34
|
+
"terminal segment shift" defect class already documented for Go/Java/Kotlin) — nearly every
|
|
35
|
+
real-world async Rust call site ends this way, so they are popped from the parsed call chain
|
|
36
|
+
rather than merely treated as taint-transparent.
|
|
37
|
+
- **Measured**: `bench/layer-recall` — 5/5 (100%) whole-corpus, 3/3 (100%) deep-tier on first
|
|
38
|
+
measurement (see `docs/METRICS.md`; the corpus is small today, so this reflects the corpus's own
|
|
39
|
+
composition, not general ecosystem coverage). `bench/cve-replay` — 5 new entries (2 capability,
|
|
40
|
+
3 deep), all `pre:TP post:TN`. `bench/mutation` — 1 new detection-dimension baseline/adversarial
|
|
41
|
+
pair (`format!`-built SQL fires; the parameterized `.bind()` form does not).
|
|
42
|
+
|
|
43
|
+
### SARD/Juliet 80% macro-F1 push (`bench/sard/EXECUTION_STATUS.md`) — substantial progress, DoD not yet met
|
|
44
|
+
|
|
45
|
+
A long-running execution PRD targeting macro-F1 >= 80% on the held-out TEST split for Java, C#, and
|
|
46
|
+
PHP against the SARD/Juliet benchmark corpus. **Honest status: real, verified, substantial gains for
|
|
47
|
+
all three languages, but the 80% target is not yet reached** — Java macroF1=59.1%, C#
|
|
48
|
+
macroF1=68.6% (clears the 50% M2 gate), PHP macroF1=48.2% (all measured on TEST split, never on
|
|
49
|
+
gold/answer-key signals — see the PRD's own integrity rules). This release ships the engine and
|
|
50
|
+
scoring work; the PRD stays open.
|
|
51
|
+
|
|
52
|
+
- **Measurement integrity first**: fixed truncation-masking in the benchmark harness (a truncated
|
|
53
|
+
scan was silently scoring as if complete), added per-CWE batched scanning to eliminate it in
|
|
54
|
+
practice, and made the scan surface match the gold surface exactly.
|
|
55
|
+
- **Structural class resolution**: real `ir.classes` emission and class-hierarchy-based method
|
|
56
|
+
resolution replacing regex heuristics, across the languages that lacked it.
|
|
57
|
+
- **Interprocedural completeness**: cross-file field/chain taint for C# (`csharp-cross-file.js`) and
|
|
58
|
+
Java, collection-element taint (typed reads, for-each binding), abstract/interface dispatch via
|
|
59
|
+
declared base type, and real branch+join CFGs for Java `if`/`switch` (previously linear
|
|
60
|
+
fall-through — a real correctness bug, not just a recall gap).
|
|
61
|
+
- **Precision**: guard-predicate narrowing (`is_numeric`/`ctype_digit`/`int.TryParse`/etc. on an
|
|
62
|
+
if-statement's TRUE branch only), a proven-clean ledger, and dozens of per-CWE false-positive
|
|
63
|
+
fixes across Java/C# (many rooted in Juliet's own "dead code by construction" idioms —
|
|
64
|
+
`if(true)`/`if(5==5)`/constant-folded fields/methods — defeating naive literal-tracking heuristics).
|
|
65
|
+
- **Call-string context-sensitivity, built from scratch this push**: `dataflow/engine.js` now
|
|
66
|
+
narrows a shared static/class field's taint to only the callers that can actually reach it
|
|
67
|
+
(previously any writer anywhere in the class tainted every reader), closing a real
|
|
68
|
+
context-sensitivity gap independently identified across all three languages. A second,
|
|
69
|
+
previously-built-but-never-validated k=1 call-string mechanism (`AGENTIC_SECURITY_KCFA_CALLSTRING`,
|
|
70
|
+
opt-in) was found broken, root-caused, and repaired.
|
|
71
|
+
- **Two new "next-generation taint analysis" capabilities**, requested and scoped independently of
|
|
72
|
+
the SARD benchmark itself: (1) sound regex-validation-guard narrowing for JS/TS — a
|
|
73
|
+
fully-anchored pattern like `/^[a-zA-Z0-9]+$/` used as `if (pattern.test(x))` now provably proves
|
|
74
|
+
`x` metacharacter-free on the true branch, via a new conservative character-class parser
|
|
75
|
+
(`dataflow/string-domain.js`'s `isSafeValidationPattern`); (2) object-instance field taint via
|
|
76
|
+
method calls, a general (not JS-specific) engine capability — `bad.setData(tainted)` now taints
|
|
77
|
+
`bad`'s own field, read back correctly through `bad.getData()`, while a **different** instance of
|
|
78
|
+
the same class stays untainted (real object-instance sensitivity, without a full
|
|
79
|
+
allocation-site-keyed heap model).
|
|
80
|
+
- PHP: closed total blackouts for LFI/RFI (`include`/`require` result assignment), several IDOR
|
|
81
|
+
sub-shapes, and a cross-file variable-scope-merging capability for split include chains.
|
|
82
|
+
|
|
12
83
|
## 0.151.3 - Adversarial premortem on the SARD benchmarking PROGRAM itself: full remediation, first genuine held-out numbers
|
|
13
84
|
|
|
14
85
|
A structured adversarial premortem ("assume this has completely failed six months from now — work
|