@clear-capabilities/agentic-security-scanner 0.195.11 → 0.195.12
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 +16 -0
- package/dist/{13e6d1463f0aec440afa.json → 2bbc3428df6b8d66516c.json} +2 -2
- package/dist/agentic-security.mjs +2 -2
- package/dist/agentic-security.mjs.sha256 +1 -1
- package/package.json +2 -2
- package/src/dataflow/CLAUDE.md +1 -1
- package/src/dataflow/catalog-expanded.js +5 -1
- package/src/dataflow/engine.js +7 -0
- package/src/language/CLAUDE.md +1 -0
- package/src/language/haskell-guards.js +10 -0
- package/src/language/haskell-ir.js +118 -2
- package/src/language/haskell-models.js +5 -0
- package/src/language/haskell-parser.js +4 -1
- package/src/language/haskell-syntax.js +34 -6
- package/src/posture/corpus-match.js +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,22 @@
|
|
|
9
9
|
> make the history less accurate, not more.
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
## 0.195.12 - Haskell on real advisories: the first published-advisory replay entry, four parser gaps and two taint shapes found on its code, and a corpus predicate that no longer counts the engine's own refutations
|
|
13
|
+
|
|
14
|
+
**Measured, 0.195.11:** `TIMINGS preflight=3s push=6s pr=1s checks=461s merge=6s verify=6s tag=2s release=254s npm=481s total=1220s release-clock=268s`, shipped in 22 min 26 s. The release clock (merge to published release) was 268 s; the run was long because the push stopped three times before the merge (dependency currency, a stale run's jobs endpoint answering 502, which was a ship bug now fixed, and the self-scan reading a guide bullet as code), never the engine.
|
|
15
|
+
|
|
16
|
+
Why: every Haskell entry of the CVE-replay corpus was synthetic and self-authored, so nothing measured the engine against a vulnerability somebody had actually published. This release read the Haskell Security Advisory Database (44 published advisories) and tried to replay every one whose fix is a code change in a module the parser reads. One became a corpus entry; the others are written down with the reason each could not be (`bench/cve-replay/real-haskell-advisories.md`). The one that could, keter's reflected XSS (HSEC-2024-0001: the `Host` header echoed into an HTML page), was invisible to the engine for four reasons that had nothing to do with the advisory and everything to do with ordinary Haskell, each fixed generally and pinned on synthetic code.
|
|
17
|
+
|
|
18
|
+
- **`deep/hs-keter-unknown-host-xss-HSEC-2024-0001`**: `Keter/Proxy.hs` and `keter.cabal` before and after the upstream fix, unmodified (MIT; the commits are in the manifest). `pre:TP post:TN`; invisible with deep mode off. The post tree still reports the sink with `proof.verdict` `proven-clean` (the escaper is reached through a point-free alias of blaze-builder's `fromHtmlEscapedByteString`, now a modelled sanitizer, names read from the Hackage index), which is the next bullet.
|
|
19
|
+
- **The corpus predicate counts neither a finding the engine proved clean nor one it lowered to `info` on evidence** (`posture/corpus-match.js` `_refuted`, `_loweredOnEvidence`; `bench/cve-replay/CONTRIBUTING.md`). Both are the product's own refutations, dropped by the fix lifecycle and marked in the report. Counting them had hidden two things: `CVE-2018-1271-java-path-traversal` was "detected" by a finding the engine proved clean through `Paths.get`, which merely builds a `Path` and was wrongly listed as a path sanitizer (`dataflow/catalog-expanded.js`; removed, the entry detects again, java stays 13 of 25 by taint); and two synthetic Haskell entries (`hs-argv-injection-shape`, `hs-code-injection-hint-shape`) passed on a finding the trust model had lowered to `info` because their input was a command-line argument. Those two now read standard input, the shape they pin unchanged. Full corpus and layer-recall baselines re-run: no other entry moved; 229 entries, 135 by taint (59%), Haskell 9 of 9 (`docs/METRICS.md`).
|
|
20
|
+
- **Parser (`haskell-syntax.js`, `haskell-parser.js`):** a record pattern accepts whitespace before its brace (`withClient isSecure MkProxySettings {..}` dropped the whole clause and every call in it; hackage-server's multi-line `readmeSection` pattern too); a `|` after a top-level `of`, `\case` or multiway `if` inside a list literal is that construct's guard, not a comprehension bar (keter's `mkUrl`); a Template Haskell splice in expression position (`pure (x, $(widgetFile "add-form"))`, every Yesod handler) is one opaque atom when the LANGUAGE pragma enables the extension, so the expression around it parses; `var@Pat = ..` in a `where` is a pattern binding; and the Hamlet quasi-quote replacement closes its parenthesis at the `|]` instead of after the last `}`, which is a newline when the interpolation ends its line (hledger-web's `addModal` and every handler shaped like it had lost their calls).
|
|
21
|
+
- **Taint (`haskell-ir.js`, `dataflow/engine.js`):** a sink built inside a tuple or a constructor in a `return` (`return (settings, WPRResponse (responseBuilder .. body))`, the shape a reverse-proxy callback returns) is a sink site; a function held in a record field whose record is built at run time (`psUnkownHost`, chosen from the configuration in `makeSettings`) resolves to the functions the project stores in that field over every construction of the constructor (`fieldFunctionCandidates`: explicit fields, `Con{..}` with a bind or a local definition, `case`/`if` branches, `pure`/`return` peeled, `const <$> e` as a function that ignores its argument), and one construction that cannot be classified keeps the call unresolved as before. A WAI response with a `Location` header and no content type is a redirect whose body is not rendered, lowered to `info` with the reason (`haskell-guards.js`).
|
|
22
|
+
- **Not detected, recorded as gaps:** hledger-web's stored XSS (journal data rendered later), hackage-server's `javascript:` hyperlinks from package metadata, pandoc's media path (a `..` check at insertion into a `Map`, decoded again at extraction; both trees flag the write), git-annex's SSH host (a large utility tree, a git-config source), xmonad-contrib's window title into a status-bar pipe. None of these is modelled and none was special-cased.
|
|
23
|
+
|
|
24
|
+
**Measured on real code** (`bench/dag/dev-haskell`, re-recorded with `bench:haskell-precision:update`; every new site read and labelled after the scan found it, `LABEL-CHANGES.md`, none fed back into a rule): the fresh set now flags 53 labelled sites, 21 true positives (39.6%, Wilson 27.6% to 53.1%), against 31 and 21 (67.7%) in 0.195.11. The 22 new flagged sites are all false positives, and all are code the parser could not read before (record patterns with a space before the brace, in IHP's compile-time database tool, the middleware's hspec suite and two static error pages); the labelled true positives, the lost-true-positive count (1) and the development halves are unchanged, and ghcup gained one labelled false positive (a library function on the operator's project path) as more of its `main` parsed. That is the honest reading of a parser fix: the engine sees more code, and what it newly sees in these projects is operator configuration and test code, the two classes the next release's trust and component work is for.
|
|
25
|
+
|
|
26
|
+
Gates, from the runs recorded for this entry: `test:haskell` 460/460 (`haskell-real-advisory-shapes`, 10 tests, wired into the script), `test:nix` 305/305, `test:lineage` 1554/1554, `test:dataflow` 1599/1599, `test:smoke` 30/30, `bench:mutation:check` 460/460, `bench:cve-replay:check` 229/229, `bench:layer-recall:check` re-baselined deliberately (Haskell 8 to 9 entries), `bench:self-scan:check` 690/113/0 unchanged, `bench:language-support:check` current after promotion under GHC 9.4.8 (Haskell 9/9, Nix 8/10 with the two blocked rows), `docs:check-language` current. The sealed independent set and unseen-v6 were not re-scored (their USE-LOGs record the planning survey that read unseen-v6's miss IDs, no case source). Not in this release: the discovery set of never-scanned projects and the quasi-quoter, record-dot, cross-function cell and library-model work of the same plan, which follow.
|
|
27
|
+
|
|
12
28
|
## 0.195.11 - Haskell taint: the project that is the framework, mutable cells, instance dispatch, record-held functions, request text into helpers; a scotty body-limit fixer; Haskell comments blanked for the generic detectors
|
|
13
29
|
|
|
14
30
|
**Measured, 0.195.10:** `TIMINGS preflight=3s push=6s pr=2s checks=338s merge=5s verify=6s tag=2s release=223s npm=237s total=822s release-clock=236s`, shipped in 24 min 47 s. The release clock (merge to published release) was 236 s; the run was long because the push stopped three times before the merge, each a host or capture artefact, never the engine (a transient `npm pack` retry, a warm gate run under GHC 9.4.8's package environment, a captured example whose compiler message lacked the error code the hosted GHC prints). The 0.195.9 line was not kept.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clear-capabilities/agentic-security-scanner",
|
|
3
|
-
"version": "0.195.
|
|
3
|
+
"version": "0.195.12",
|
|
4
4
|
"description": "Scanner engine for the agentic-security Claude Code plugin: SAST, SCA with reachability and CISA KEV, secrets, IaC, Haskell and Nix/NixOS, prompt-injection, MCP/agent-tool audit, authZ analysis, SBOM, compliance attestation, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"test:lineage": "node --test test/lineage/analysis-completion.test.js test/lineage/schema.test.js test/lineage/ids.test.js test/lineage/protection.test.js test/lineage/classification.test.js test/lineage/validate.test.js test/lineage/json-schema-parity.test.js test/lineage/flagship-fixture.test.js test/lineage/flagship-fixture-semantics.test.js test/lineage/field-identity.test.js test/lineage/engine-expr-resolver.test.js test/lineage/engine-walker.test.js test/lineage/engine-integration.test.js test/lineage/engine-receiver-identity.test.js test/lineage/summaries.test.js test/lineage/driver.test.js test/lineage/engine-provenance.test.js test/lineage/engine-provenance-interprocedural.test.js test/lineage/path-store.test.js test/lineage/path-query.test.js test/lineage/flow-grade.test.js test/lineage/source-registry.test.js test/lineage/sink-registry.test.js test/lineage/transform-catalog.test.js test/lineage/handling-analyzer.test.js test/lineage/registry-real-code.test.js test/lineage/source-seeding.test.js test/lineage/graph-builder.test.js test/lineage/coverage.test.js test/lineage/resolve-destination.test.js test/lineage/queue-detail.test.js test/lineage/index.test.js test/lineage/obligation-mapping.test.js test/lineage/obligation-predicates.test.js test/lineage/obligation-predicates-walkthrough.test.js test/lineage/transit-protection.test.js test/lineage/at-rest-protection.test.js test/lineage/protection-summary.test.js test/lineage/ac01-multi-sink.test.js test/lineage/policy-verdict.test.js test/lineage/governance-refs.test.js test/lineage/export-privacy.test.js test/lineage/export-json.test.js test/lineage/export-csv.test.js test/lineage/decision-story.test.js test/lineage/export-briefing.test.js test/lineage/graph-snapshot.test.js test/lineage/graph-diff.test.js test/lineage/drift-policy.test.js test/lineage/recipient-profile.test.js test/lineage/recipient-registry.test.js test/lineage/recipient-wiring.test.js test/lineage/redact-graph.test.js test/lineage-scan-wiring.test.js test/lineage-artifact-write.test.js test/bench-data-lineage-runner.test.js test/bundle-frontend.test.js test/bundle-frontend-golden.test.js test/generate-html-report.test.js test/export-image.test.js test/lineage/scenario.test.js test/lineage/scenario-engine.test.js test/lineage/scenario-diff.test.js test/lineage/scenario-no-obligation-wiring.test.js test/lineage/impact-assessment.test.js test/lineage/impact-engine.test.js test/lineage/impact-no-obligation-wiring.test.js test/lineage/governance-edit.test.js test/lineage/remediation.test.js test/lineage/runtime-observation.test.js test/lineage/observation-correlation.test.js test/lineage/observation-adapters.test.js test/lineage/observation-store.test.js test/lineage/runtime-corroboration-wiring.test.js test/lineage/cross-repo-link.test.js test/lineage/federation-loader.test.js test/lineage/cross-repo-link-wiring.test.js test/lineage/runtime-assurance.test.js test/lineage/runtime-edge-states.test.js test/lineage/runtime-explorer-view.test.js test/cli/runtime-explorer-cli.test.js test/cli/runtime-identity-cli.test.js test/cli/runtime-twin-cli.test.js test/lineage/cut-planner.test.js test/lineage/scc.test.js test/lineage/scc-solver.test.js test/graph/graph-views.test.js test/lineage/dag07-completion.test.js test/lineage/owned-build.test.js test/dataflow/boundary-propagation.test.js test/lineage/boundary-contract.test.js test/lineage/correlation-v2.test.js test/lineage/path-control-evidence.test.js test/lineage/smt-z3-backend.test.js test/cli/dag-commands.test.js",
|
|
94
94
|
"test:bench-modules": "node --test test/phase4-harness.test.js test/pipeline.test.js test/proof-corpus-lib.test.js test/proof-corpus-runner.test.js",
|
|
95
95
|
"test:server": "node --test test/server/graph-loader.test.js test/server/security.test.js test/server/routes.test.js test/server/http-server.test.js test/server/cmd-explore.test.js test/server/cmd-dataflow-export.test.js test/server/static-assets.test.js test/server/dataflow-scenario-cli.test.js test/server/dataflow-impact-cli.test.js",
|
|
96
|
-
"test:haskell": "node --test test/haskell/haskell-reachability.test.js test/haskell/haskell-real-code-shapes.test.js test/haskell/haskell-unseen-v5-shapes.test.js test/haskell/haskell-unseen-v4-shapes.test.js test/haskell/haskell-alias-taint.test.js test/haskell/haskell-weak-hash-names.test.js test/haskell/haskell-models-extended.test.js test/haskell/haskell-rules-extended.test.js test/haskell/haskell-injection.test.js test/haskell/haskell-ir.test.js test/haskell/haskell-manifests.test.js test/haskell/haskell-parser.test.js test/haskell/haskell-remediation.test.js test/haskell/haskell-remediation-0190.test.js test/haskell/haskell-remediation-kdf.test.js test/haskell/haskell-remediation-html-text.test.js test/haskell/haskell-remediation-scotty-body.test.js test/haskell/haskell-taint-shapes.test.js test/haskell/haskell-resolved-graph.test.js test/haskell/haskell-sca.test.js test/haskell/haskell-sca-severity.test.js test/haskell/haskell-web-guards.test.js test/haskell/haskell-advisory-feed.test.js test/haskell/haskell-security-rules.test.js test/haskell/haskell-taint.test.js test/haskell/haskell-boundaries.test.js test/haskell/haskell-live-feed-scan.test.js test/haskell/haskell-supply-bounds.test.js test/haskell/haskell-ir-scaling.test.js test/haskell/haskell-boundary-propagation.test.js test/haskell/haskell-generalization.test.js test/haskell/haskell-trust-boundary.test.js test/haskell/haskell-comment-invariance.test.js test/haskell/haskell-remediation-classes.test.js test/haskell/haskell-trust-boundary-frameworks.test.js test/haskell/haskell-generic-detectors.test.js",
|
|
96
|
+
"test:haskell": "node --test test/haskell/haskell-reachability.test.js test/haskell/haskell-real-code-shapes.test.js test/haskell/haskell-unseen-v5-shapes.test.js test/haskell/haskell-unseen-v4-shapes.test.js test/haskell/haskell-alias-taint.test.js test/haskell/haskell-weak-hash-names.test.js test/haskell/haskell-models-extended.test.js test/haskell/haskell-rules-extended.test.js test/haskell/haskell-injection.test.js test/haskell/haskell-ir.test.js test/haskell/haskell-manifests.test.js test/haskell/haskell-parser.test.js test/haskell/haskell-remediation.test.js test/haskell/haskell-remediation-0190.test.js test/haskell/haskell-remediation-kdf.test.js test/haskell/haskell-remediation-html-text.test.js test/haskell/haskell-remediation-scotty-body.test.js test/haskell/haskell-taint-shapes.test.js test/haskell/haskell-real-advisory-shapes.test.js test/haskell/haskell-resolved-graph.test.js test/haskell/haskell-sca.test.js test/haskell/haskell-sca-severity.test.js test/haskell/haskell-web-guards.test.js test/haskell/haskell-advisory-feed.test.js test/haskell/haskell-security-rules.test.js test/haskell/haskell-taint.test.js test/haskell/haskell-boundaries.test.js test/haskell/haskell-live-feed-scan.test.js test/haskell/haskell-supply-bounds.test.js test/haskell/haskell-ir-scaling.test.js test/haskell/haskell-boundary-propagation.test.js test/haskell/haskell-generalization.test.js test/haskell/haskell-trust-boundary.test.js test/haskell/haskell-comment-invariance.test.js test/haskell/haskell-remediation-classes.test.js test/haskell/haskell-trust-boundary-frameworks.test.js test/haskell/haskell-generic-detectors.test.js",
|
|
97
97
|
"test:nix": "node --test test/nix/nix-option-types.test.js test/nix/nix-development-shapes.test.js test/nix/nixos-hardening-daemon.test.js test/nix/nixos-hardening-extended.test.js test/nix/nix-build-trust.test.js test/nix/nix-eval-isolation.test.js test/nix/nix-input-inventory.test.js test/nix/nix-parser-ir.test.js test/nix/nix-remediation.test.js test/nix/nix-resolved-closure.test.js test/nix/nix-sca-patches.test.js test/nix/nix-sca-severity.test.js test/nix/nix-haskell-closure-names.test.js test/nix/nix-script-taint.test.js test/nix/nix-secrets-store.test.js test/nix/nixos-hardening.test.js test/nix/nixos-module-resolution.test.js test/nix/nix-fix-multifile.test.js test/nix/nixos-evaluator-forms.test.js test/nix/nix-advisory-feed.test.js test/nix/nix-fix-prewrite.test.js test/nix/nix-boundary-scope.test.js",
|
|
98
98
|
"test:language": "node --test test/bench-haskell-precision.test.js test/bench-independent-haskell-panel.test.js test/language/capability-ledger.test.js test/language/language-accuracy-regression.test.js test/language/language-aibom.test.js test/language/language-assurance.test.js test/language/language-bom.test.js test/language/language-compliance.test.js test/language/language-contracts.test.js test/language/language-corpora-integrity.test.js test/language/language-discovery.test.js test/language/language-doc-coverage.test.js test/language/language-evidence-posture.test.js test/language/language-explorer.test.js test/language/frozen-splits.test.js test/language/language-gap-fixes.test.js test/language/language-gap-fixes-2.test.js test/language/language-governance.test.js test/language/language-integrations.test.js test/language/language-llm-agent.test.js test/language/language-local-ai.test.js test/language/language-parity-haskell.test.js test/language/language-polyglot-bridges.test.js test/language/language-privacy-lineage.test.js test/language/language-proof-remediation.test.js test/language/language-report-formats.test.js test/language/language-secrets.test.js test/language/language-trust-boundary.test.js",
|
|
99
99
|
"test:language-stress": "node --test --test-concurrency=1 test/language/language-stress-offline.test.js",
|