@clear-capabilities/agentic-security-scanner 0.195.9 → 0.195.10

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,16 @@
9
9
  > make the history less accurate, not more.
10
10
 
11
11
 
12
+ ## 0.195.10 - Haskell remediation measured on real code: a password-hash migration fixer, an HTML-from-text fixer, and the registry's GHC check
13
+
14
+ Why: the fix preview was run over every labelled real-code true positive of `bench/dag/dev-haskell` (26 sites in gitit, scotty, dhall, hackage-server and IHP; `fix-real.mjs <project> --all`) and 3 of them got a verified patch (one cookie, two wai request bodies). The rest were refusals: five scotty `html $ mconcat ["<h1>", v, "</h1>"]` sites, which the blaze rewrite cannot touch; three scotty `body` reads; two dhall path operations spread over several functions; three generators in files that import no entropy package; an OpenSSL `VerifyNone`; an open redirect; two partial functions; and gitit's `hashPassword salt pass = showDigest $ sha512 $ ...`, refused by the CWE-916 class reason. Two of those classes had a sound rewrite that was never written. After this release 8 of the 26 sites get a verified patch, on the same 47 flagged sites (nothing moved in detection).
15
+
16
+ - **`hs-password-kdf-migrate` (CWE-916), a MITIGATION that is the migration story the old refusal asked for.** The class reason was right that a swap locks every user out, so the fixer does not swap: a pure one-line `name salt password = ...` of one text type (`String`, `Text` or strict `ByteString`) is kept verbatim as `nameLegacy` for verification only; `name` becomes PBKDF2-HMAC-SHA256 (600000 iterations, 32 bytes, over the same salt and password; a declared default, named in the plan) with a tag in front of the hex so a stored hash says how it was made; `nameNeedsRehash` reads the tag; `nameVerify stored salt password` checks either form; every `stored == name salt password` in the file calls it; an export list gains the helpers. Only in a file that already imports a cryptonite or crypton module (`Crypto.KDF.PBKDF2` is then in a declared package) and `Data.Text` or `Data.ByteString`; refused, naming the decision, when the function takes no salt (a pure function cannot add one), when the types differ, when a name is taken, and when ANOTHER file compares with the function, because that comparison would be left checking the old form against the new one. The rule it relies on is semantic: `haskell-security-rules.js` `legacyVerifierOnly` reports a fast password hash at `info` when every use of its function, in every file, is an operand of an equality and one of those functions also computes a password KDF within one project hop; a function that also stores a hash, or compares beside no KDF, keeps the full finding (pinned both ways, from the IR, never from the name). `defaultRescan` now drops a finding the engine lowered to `info` for a stated reason (`originalSeverity`, or this legacy-verifier evidence) as it drops proven-clean ones; a finding that is `info` in its own right is still counted, so fixing it can still be shown to remove it. The API is cryptonite's from its documentation; the tests type-check the patch against a declared stub of that shape and RUN the patched program under GHC: a legacy hash verifies, a new hash verifies, a wrong password does not, the tag decides re-hashing. gitit's real site stays refused on purpose: it imports the `SHA` package, which has no KDF, and the decision (which library) is the operator's.
17
+ - **`hs-html-escape-text` (CWE-79), a MITIGATION for scotty's `html` of concatenated text.** `html $ mconcat ["<h1>", v, "</h1>"]` becomes `html $ mconcat ["<h1>", agenticEscapeHtml v, "</h1>"]`, and `html (f v)` with no literal in the argument becomes `html (agenticEscapeHtml (f v))`, with the escaper (the five characters that open markup or end a quoted attribute) defined in the file; the rescan recognises it by the entities it spells out (`htmlEscapers`), not by its name, so the finding goes quiet for the right reason and the effective check reads the application count back. Stated limits: HTML text and quoted attribute values only (a value inside a script, a style, a URL or an unquoted attribute is not made safe), markup the value carried is now text. Only with `Web.Scotty` and `Data.Text.Lazy` imported; a nested construction, a renderer in the argument, a literal alone and another framework's sink are refused. The escaper is run under GHC on hostile input in the test. On scotty's own examples this verifies all five labelled XSS sites.
18
+ - **The registry's GHC check.** `bench/language-support/suites.mjs` `probeTools` records the GHC version on PATH and whether it is the recorded toolchain (`docs/language-toolchain.json`, 9.4.8); `promote.mjs` refuses to measure the suites under another GHC (`--allow-ghc-mismatch` records the mismatch in the registry's limits instead); the `auth` compile criterion's failure message says "unavailable compiler" when a module is missing under a mismatched GHC, so the row is recorded as blocked, not as an engine failure; `judgeGhc` is pinned both ways in `test/language/language-package-ci.test.js`. Found while doing it: GHC 9.4.8's package environment file (written by `cabal install --lib`) hides `bytestring`, so under the recorded GHC every stub-compiling remediation test reported its compile gate as not-run or failed; those four files now run their compiles with `GHC_ENVIRONMENT=-` (boot packages only; the auth suite keeps the environment it needs). The remediation suites pass under both GHCs on the maintainer's machine for the first time.
19
+
20
+ Gates, from the runs recorded for this entry: `test:haskell` 438/438 (two new suites, `haskell-remediation-kdf` and `haskell-remediation-html-text`, both wired into the script and checked for a glued name), `test:nix` 305/305, `test:language` 257/257, `bench:haskell-precision:check` PASS (the labelled real-code rows unchanged), `bench:language-support:check`, mutation and layer-recall unchanged. The registry's capability suites were measured again under GHC 9.4.8 (the holdout result reused, not re-run) so the stored tools record carries the version; every Haskell row stays supported (9 of 9), Nix 8 of 10 with `nix-eval` and `nixos-host` still blocked on a host with no `nix`, and the registry's limits now name the GHC that was present (9.4.8, the recorded toolchain).
21
+
12
22
  ## 0.195.9 - Haskell real-code precision, a blind unseen-v6 and the first blind Nix split, the unseen-v5 and Nix development shapes
13
23
 
14
24
  Four pieces of work, in the order they were done, each measured where it could be measured. Every number below comes from a run recorded in this repository on 2026-11-01.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clear-capabilities/agentic-security-scanner",
3
- "version": "0.195.9",
3
+ "version": "0.195.10",
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-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-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",