@clear-capabilities/agentic-security-scanner 0.150.2 → 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.
@@ -1 +1 @@
1
- 54183e4ed75d70aeec00ba53f44450879c52d23fc1bd3ccc834719531f18a017 agentic-security.mjs
1
+ 77e3cc685ff082470adc65201efec42f49230abca8831f1cbc72caa5ce25125c agentic-security.mjs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clear-capabilities/agentic-security-scanner",
3
- "version": "0.150.2",
3
+ "version": "0.151.1",
4
4
  "description": "Scanner engine for the agentic-security Claude Code plugin — SAST, SCA (function-level reachability + CISA KEV), secrets, IaC, prompt-injection, MCP/agent-tool audit, auth/authZ deep analysis, attack chains, PoC generation, business logic, toxic-combinations scoring, SBOM, pipeline integrity, compliance attestation, and more.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -43,7 +43,7 @@
43
43
  "@babel/core": "^8.0.5",
44
44
  "@babel/preset-react": "^8.0.1",
45
45
  "@babel/preset-typescript": "^8.0.1",
46
- "js-yaml": "^5.4.1",
46
+ "js-yaml": "^5.4.2",
47
47
  "safe-regex": "^2.1.1"
48
48
  },
49
49
  "optionalDependencies": {
@@ -70,7 +70,7 @@
70
70
  "test:glob": "node --test test/glob-compat.test.js",
71
71
  "test:sast": "node --test test/cpp-hardcoded-secret.test.js test/sibling-guard.test.js test/comment-blindness.test.js test/crypto-specialist.test.js test/llm.test.js test/llm-cost-advisor.test.js test/llm-owasp.test.js test/logic.test.js test/authz.test.js test/model-load.test.js test/prompt-template.test.js test/business-logic.test.js test/python-sinks.test.js test/phase1-detectors.test.js test/phase2-detectors.test.js test/phase3-v3.test.js test/phase7-extensions.test.js test/phase8-extensions.test.js test/new-cwe-detectors.test.js test/file-upload.test.js test/llmsecops-detectors.test.js test/db-taint.test.js test/dart-swift.test.js test/zip-slip-containment-guard.test.js test/redos-anchoring.test.js test/path-guard-validator-call.test.js test/redos-nfa.test.js test/weak-randomness.test.js test/csharp-pipeline.test.js test/post-quantum-crypto.test.js test/web3-advanced.test.js test/cloud-iam-k8s.test.js test/crypto-protocol.test.js test/ml-supply-chain.test.js test/mcp-audit-scan.test.js test/wrong-context-sanitizer.test.js test/sanitizer-context.test.js test/frontend-hygiene.test.js test/csv-injection.test.js test/stored-taint.test.js test/tree-sitter-sinks.test.js test/kotlin-structural.test.js test/ruby-php-structural.test.js test/java-csharp-structural.test.js test/guard-recognition.test.js test/guard-window-identifier-correlation.test.js test/js-python-framework-structural.test.js test/go-structural.test.js test/secret-concat.test.js test/secret-redaction.test.js test/xss-reflected-multilang.test.js test/code-injection-multilang.test.js test/xxe-multilang.test.js test/xpath-injection-multilang.test.js test/gapfill-batch13.test.js test/agent-untrusted-flow.test.js test/api-authz.test.js test/event-entrypoint.test.js test/iac-terraform.test.js test/cross-service.test.js test/rbac-consistency.test.js test/adversarial-robustness.test.js test/secret-entropy.test.js test/comment-strip.test.js test/juliet-path-filter-gate.test.js test/java-bench-shape-opt-in.test.js test/reachability-missing-callgraph-data.test.js test/rate-limit.test.js test/auth-signals.test.js test/convention-deviation.test.js test/resource-exhaustion.test.js test/resource-exhaustion-realworld.test.js test/redirect-toctou.test.js test/redirect-toctou-realworld.test.js test/codegen-sink.test.js test/ownership-authz.test.js test/ownership-authz-realworld.test.js test/t21-precision-audit.test.js test/secrets-coverage.test.js test/prompt-injection-payloads.test.js test/iac-cloud-templates.test.js test/ruby-path-join.test.js test/sast/manifest-line-tracking.test.js",
72
72
  "test:posture": "node --test test/threat-model.test.js test/git-hardening.test.js test/privacy-framework.test.js test/material-change.test.js test/drift.test.js test/scorecard.test.js test/accuracy-scorecard.test.js test/scorecard-gate.test.js test/predeploy-gate.test.js test/release-check.test.js test/pre-push-gate.test.js test/dependency-currency.test.js test/package-contents-check.test.js test/gate-verdict-cache.test.js test/run-unit-tests.test.js test/release-workflow.test.js test/independent-population.test.js test/why-missed.test.js test/independent-scoring.test.js test/evidence-bundle.test.js test/obligation-evidence-pack.test.js test/policy-bundle.test.js test/discovery-memory.test.js test/mttr.test.js test/license-policy.test.js test/aibom.test.js test/sbom.test.js test/api-inventory.test.js test/iam-policy.test.js test/container.test.js test/container-runtime.test.js test/image-packages.test.js test/kev.test.js test/dep-confusion.test.js test/sca-deprecated.test.js test/sca-batch.test.js test/composite-risk.test.js test/epss-enrich.test.js test/sca-coverage.test.js test/gradle-deps.test.js test/sca-route-reachable.test.js test/sca-policy.test.js test/sca-verdict.test.js test/install-script.test.js test/sca-linked-findings.test.js test/packs.test.js test/flow-narration.test.js test/regression-test-gen.test.js test/deterministic-fix.test.js test/falsification.test.js test/verification-separation.test.js test/logic-claims.test.js test/attestation.test.js test/verify-attestation-cli.test.js test/comparison.test.js test/determinism-cross-machine.test.js test/fix-honesty-gate.test.js test/model-routing.test.js test/root-cause-sweep.test.js test/entrypoint-inventory.test.js test/relevance.test.js test/untrusted.test.js test/agent-hardening.test.js test/rule-synthesis.test.js test/policy-gate.test.js test/agents-memory.test.js test/cve-lookup.test.js test/cve-alert-daemon.test.js test/fix-verify-loop.test.js test/fix-verify-tests.test.js test/fix-acceptance.test.js test/exploitability-probability.test.js test/history-scan.test.js test/viral-features.test.js test/viral-v074.test.js test/state-dir.test.js test/ignore-pragma.test.js test/license-graph.test.js test/secret-live-check.test.js test/attack-taxonomy.test.js test/triage-memory.test.js test/pr-augment.test.js test/chat-batch2.test.js test/chat-batch3.test.js test/chat-batch4.test.js test/chat-batch5.test.js test/chat-batch6.test.js test/risk-scenario-disclosure.test.js test/egress-policy.test.js test/egress-policy-completeness.test.js test/egress-policy-integration.test.js test/router.test.js test/legacy-alias-redirect.test.js test/cache-economics.test.js test/coverage-report.test.js test/corpus-status.test.js test/provenance.test.js test/secret-history.test.js test/execution-proof.test.js test/fix-metrics.test.js test/corpus-enroll.test.js test/prove-findings.test.js test/corpus-match.test.js test/corpus-provenance.test.js test/learning-quorum.test.js test/llm-cache-integrity.test.js test/proof-artifact.test.js test/providers.test.js test/fleet.test.js test/autopilot.test.js test/autopilot-cli.test.js test/verifier-independence.test.js test/integrity-legacy-key.test.js test/suppression-visibility.test.js test/cost-ceiling.test.js test/local-endpoint.test.js test/ollama-provider.test.js test/ollama-capabilities.test.js test/ollama-offline-egress.test.js test/ollama-fix-proposal.test.js test/ollama-explain-proposal.test.js test/ollama-poc-proposal.test.js test/ollama-model-probe.test.js test/ollama-agent-tools.test.js test/ollama-agent-loop.test.js test/ollama-e2e.test.js test/ollama-oom-feedback.test.js test/ollama-doc-drift.test.js test/model-trust.test.js test/vuln-archaeology.test.js test/scan-checkpoint.test.js test/llm-redact.test.js test/world-class-batch2.test.js test/world-class-modules.test.js test/privacy-ir-adapter.test.js test/privacy-taxonomy.test.js test/privacy-sink-policy.test.js test/privacy-governance.test.js test/privacy-inventory.test.js test/integration-end-to-end.test.js test/streak-cli-wiring.test.js test/stack-playbook.test.js test/machine-output-flag.test.js test/stdout-flush.test.js test/format-determinism.test.js test/only-flag-channels.test.js test/confidence.test.js test/security-trend.test.js test/calibration-drift.test.js test/validator-metrics.test.js test/clustering-ir-taint-line.test.js test/concurrency-cwe.test.js test/compliance-mapping-liveness.test.js test/module-artifact-liveness.test.js test/supply-chain-provenance-completeness.test.js test/compliance-severity-threshold.test.js test/compliance-severity-policy.test.js test/compliance-evidence-binding.test.js test/compliance-evidence-signing.test.js test/compliance-file-contains.test.js test/label-isolation.test.js test/evidence-grade-wording.test.js test/llm-model-status.test.js test/egress-policy-constraints.test.js test/egress-redact.test.js test/egress-audit.test.js test/egress-approved-providers.test.js test/family-registry.test.js test/coverage-strength.test.js test/framework-provenance.test.js test/framework-provenance-controlrefs.test.js test/third-party-verification.test.js test/proof-coverage.test.js test/calibration-holdout.test.js test/independent-population-gate.test.js test/catalog-freshness.test.js test/incremental-parity.test.js test/surface-smoke.test.js test/fix-coverage.test.js test/raw-source-carveout.test.js test/mlbom-conformance.test.js test/deploy-gate-replay.test.js test/sbom-conformance.test.js test/unscored-claims.test.js test/mcp-rug-pull.test.js test/agent-boundary-taint.test.js test/confinement-adversarial.test.js test/comment-strip-cost.test.js test/reachability-claim.test.js test/entrypoint-breadth.test.js test/dep-file-admission.test.js test/custom-rules-freshness.test.js test/posture/provenance-schema.test.js test/posture/provenance-cache.test.js test/helpers/build-git-fixture.test.js test/posture/provenance-git-evidence.test.js test/posture/provenance-dag-walk.test.js test/posture/provenance-confidence.test.js test/posture/provenance-predicate-replay.test.js test/posture/provenance-origin-resolver.test.js test/posture/provenance-ai-authorship.test.js test/posture/provenance-branch-entry.test.js test/posture/provenance-evidence-attribution.test.js test/posture/provenance-lifecycle.test.js test/posture/provenance-missing-control-resolver.test.js test/posture/provenance-missing-control-wiring.test.js test/posture/provenance-coordinator.test.js test/posture/provenance-sca-origin.test.js test/posture/provenance-transitive-sca.test.js test/posture/provenance-coordinator-sca.test.js test/posture/provenance-providers.test.js test/posture/provenance-evidence-bundle.test.js test/posture/provenance-repo-lineage.test.js test/posture/provenance-secrets-logic.test.js test/cli/provenance-flags.test.js test/cli/attest-provenance.test.js test/cli/attest-obligations.test.js test/cli/models.test.js test/cli/setup-llm.test.js test/cli/fix-retry.test.js test/cli/compliance-walkthrough-lineage.test.js test/cli/dataflow-export-privacy.test.js test/cli/dataflow-export-briefing.test.js test/cli/lineage-snapshot-persist.test.js test/cli/dataflow-diff.test.js test/cli/dataflow-watch.test.js test/cli/dataflow-recipients.test.js test/cli/dataflow-coverage.test.js test/security/provenance-safety.test.js test/security/provenance-injection.test.js test/posture/remediation-ledger.test.js",
73
- "test:dataflow": "node --test test/privacy-catalog.test.js test/privacy-deep-walker.test.js test/privacy-deep-e2e.test.js test/container-taint.test.js test/stored-taint-families.test.js test/py-annotation-sources.test.js test/fn-reach.test.js test/deep-taint.test.js test/calibration.test.js test/holdout-eval.test.js test/cross-lang-meta.test.js test/cross-lang-queues.test.js test/phase5-xlang.test.js test/phase5-coverage.test.js test/phase6-taint.test.js test/llm-validator-consistency.test.js test/llm-validator-default-on.test.js test/llm-validator-preset.test.js test/parser-py-cst.test.js test/chrome-probe.test.js test/parser-cs-kt.test.js test/parser-cs-annotations.test.js test/parser-cs-control-flow.test.js test/parser-kt-control-flow.test.js test/parser-js-annotations.test.js test/parser-java-annotations.test.js test/parser-java-control-flow.test.js test/parser-java-calls.test.js test/parser-go.test.js test/parser-php-rb.test.js test/parser-php-control-flow.test.js test/interproc-k2.test.js test/proven-clean.test.js test/backward-default.test.js test/incremental-cache.test.js test/string-regex-lattice.test.js test/closure-capture.test.js test/points-to.test.js test/type-stubs.test.js test/soft-taint.test.js test/ifds.test.js test/symbolic-exec-proof.test.js test/ifds-summary-edges.test.js test/stub-aware-filter.test.js test/cross-repo.test.js test/proof-gate.test.js test/layer-recall.test.js test/java-taint-flow.test.js test/kt-taint-flow.test.js test/sanitizer-typed-flow.test.js test/sanitizer-gate-unit.test.js test/proof-safe.test.js test/collection-taint.test.js test/kcfa-context.test.js test/kcfa-callstring.test.js test/flow-parity.test.js test/callgraph-resolve.test.js test/import-reachability.test.js test/ir-stats.test.js test/parser-cpp.test.js test/parser-js-decorators.test.js test/parser-js-if-else-cfg.test.js test/cpp-integration.test.js test/engine-reconnect.test.js test/phase2-scoping.test.js test/engine-recall.test.js test/catalog-annotation-source.test.js test/catalog-cs-p1.test.js test/catalog-expanded.test.js test/builtin-summaries.test.js test/interproc-mutation-crash.test.js test/mutated-param-taint.test.js test/return-sink-check.test.js test/higher-order-inline-callback.test.js test/interproc-findings-discard.test.js test/runscan-deep-option.test.js test/summary-cache-convergence.test.js test/parser-rb-calls.test.js test/parser-rb-module-level.test.js test/balanced-call.test.js test/destructuring-taint.test.js test/computed-member-taint.test.js test/string-interpolation-taint.test.js test/dataflow-deadcode-severity.test.js test/catalog-dotted-callee-lookup.test.js test/builtin-summary-family-blind-kill.test.js test/deep-mode-annotator-pipeline.test.js test/receiver-type-and-nested-calls.test.js test/member-write-and-loop-taint.test.js test/parser-py-module-level.test.js test/parser-php-module-level.test.js test/r14b-module-level-e2e.test.js test/annotation-taint-engine.test.js test/interproc-nested-call-taint.test.js test/catalog-xpath-injection.test.js test/catalog-ldap-injection.test.js test/catalog-xxe.test.js test/catalog-response-splitting.test.js test/catalog-code-injection.test.js test/parser-rb-control-flow.test.js test/catalog-ruby-p1.test.js test/callee-receiver-taint.test.js test/catalog-command-injection-p4.test.js test/catalog-xss-p4.test.js test/catalog-path-ssrf-p3.test.js test/catalog-ai-model-provider-precision.test.js test/catalog-orm-write.test.js test/dataflow/provenance-pipeline-integration.test.js test/dataflow-progress.test.js test/scan-progress.test.js",
73
+ "test:dataflow": "node --test test/privacy-catalog.test.js test/privacy-deep-walker.test.js test/privacy-deep-e2e.test.js test/container-taint.test.js test/stored-taint-families.test.js test/py-annotation-sources.test.js test/fn-reach.test.js test/deep-taint.test.js test/calibration.test.js test/holdout-eval.test.js test/cross-lang-meta.test.js test/cross-lang-queues.test.js test/phase5-xlang.test.js test/phase5-coverage.test.js test/phase6-taint.test.js test/llm-validator-consistency.test.js test/llm-validator-default-on.test.js test/llm-validator-preset.test.js test/parser-py-cst.test.js test/chrome-probe.test.js test/parser-cs-kt.test.js test/parser-cs-annotations.test.js test/parser-cs-control-flow.test.js test/parser-kt-control-flow.test.js test/parser-js-annotations.test.js test/parser-java-annotations.test.js test/parser-java-control-flow.test.js test/parser-java-calls.test.js test/parser-go.test.js test/parser-php-rb.test.js test/parser-php-control-flow.test.js test/interproc-k2.test.js test/proven-clean.test.js test/backward-default.test.js test/incremental-cache.test.js test/string-regex-lattice.test.js test/closure-capture.test.js test/points-to.test.js test/type-stubs.test.js test/soft-taint.test.js test/ifds.test.js test/symbolic-exec-proof.test.js test/ifds-summary-edges.test.js test/stub-aware-filter.test.js test/cross-repo.test.js test/proof-gate.test.js test/layer-recall.test.js test/java-taint-flow.test.js test/kt-taint-flow.test.js test/sanitizer-typed-flow.test.js test/sanitizer-gate-unit.test.js test/proof-safe.test.js test/collection-taint.test.js test/kcfa-context.test.js test/kcfa-callstring.test.js test/flow-parity.test.js test/callgraph-resolve.test.js test/import-reachability.test.js test/ir-stats.test.js test/parser-cpp.test.js test/parser-js-decorators.test.js test/parser-js-if-else-cfg.test.js test/cpp-integration.test.js test/engine-reconnect.test.js test/phase2-scoping.test.js test/engine-recall.test.js test/catalog-annotation-source.test.js test/catalog-cs-p1.test.js test/catalog-expanded.test.js test/builtin-summaries.test.js test/interproc-mutation-crash.test.js test/mutated-param-taint.test.js test/return-sink-check.test.js test/higher-order-inline-callback.test.js test/interproc-findings-discard.test.js test/runscan-deep-option.test.js test/summary-cache-convergence.test.js test/parser-rb-calls.test.js test/parser-rb-module-level.test.js test/balanced-call.test.js test/destructuring-taint.test.js test/computed-member-taint.test.js test/string-interpolation-taint.test.js test/dataflow-deadcode-severity.test.js test/catalog-dotted-callee-lookup.test.js test/builtin-summary-family-blind-kill.test.js test/deep-mode-annotator-pipeline.test.js test/receiver-type-and-nested-calls.test.js test/member-write-and-loop-taint.test.js test/parser-py-module-level.test.js test/parser-php-module-level.test.js test/r14b-module-level-e2e.test.js test/annotation-taint-engine.test.js test/interproc-nested-call-taint.test.js test/catalog-xpath-injection.test.js test/catalog-ldap-injection.test.js test/catalog-xxe.test.js test/catalog-response-splitting.test.js test/catalog-code-injection.test.js test/parser-rb-control-flow.test.js test/catalog-ruby-p1.test.js test/callee-receiver-taint.test.js test/catalog-command-injection-p4.test.js test/catalog-xss-p4.test.js test/catalog-path-ssrf-p3.test.js test/catalog-ai-model-provider-precision.test.js test/catalog-orm-write.test.js test/dataflow/provenance-pipeline-integration.test.js test/dataflow-progress.test.js test/scan-progress.test.js test/sard-leakage-pipeline.test.js test/sard-split-scoring.test.js test/sard-llm-isolation.test.js test/sard-mutation-adversarial.test.js test/sard-baseline-adaptive-tolerance.test.js test/sard-independent-holdout.test.js",
74
74
  "test:mcp": "node --test test/mcp.test.js test/mcp-protocol-smoke.test.js test/mcp-audit.test.js test/audit-cli.test.js test/mcp-scratchpad.test.js test/mcp-offload.test.js test/sca-upgrade.test.js test/lsp-server.test.js test/mcp-dataflow-tools.test.js test/cli/governance-propose-edit.test.js test/cli/remediation-open-update.test.js test/cli/remediation-verify-reopen.test.js test/cli/dataflow-observations.test.js test/cli/federate-declare-list.test.js",
75
75
  "test:report": "node --test test/report-scan-invariants.test.js test/junit.test.js test/ci.test.js test/poc-generator.test.js test/verifier.test.js test/verifier-target.test.js test/annotator-errors.test.js test/scan-health.test.js test/finding-schema.test.js test/pipeline/finding-schema-provenance.test.js test/evidence-provenance.test.js test/report/provenance-output.test.js test/report/provenance-format-parity.test.js test/legacy-compat.test.js test/annotator-runner.test.js test/detector-runner.test.js test/detector-errors.test.js test/analyzer-supervisor.test.js test/cascade-worker-pool.test.js test/cascade-pool-wiring.test.js test/coverage-ledger.test.js test/coverage-ledger-completeness.test.js test/assurance-mode.test.js test/artifact-registry.test.js test/artifact-registry-completeness.test.js test/retention-policy.test.js test/state-lifecycle-report.test.js test/legal-hold.test.js test/production-feedback.test.js test/calibration-feedback.test.js test/encryption-provider.test.js test/grader-calibration.test.js test/pr-delta-gate.test.js test/vex.test.js test/report-render.test.js test/oscal-conformance.test.js test/cli-fix-apply.test.js test/apply-fix-service.test.js test/high-impact-approval-gate.test.js test/approver-registry.test.js test/suppression-exceptions.test.js test/fix-history.test.js test/producer-registry.test.js test/producer-collector.test.js test/enrichment-completion.test.js",
76
76
  "test:lineage": "node --test 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",
@@ -129,6 +129,23 @@
129
129
  "bench:sca-replay:reachability": "node ../bench/sca-replay/reachability.mjs",
130
130
  "bench:sca-replay:fetch": "node ../bench/sca-replay/fetch.mjs",
131
131
  "bench:sca-replay:label": "node ../bench/sca-replay/label.mjs",
132
+ "bench:sard:score": "node ../bench/sard/scripts/macro-score.mjs",
133
+ "bench:sard:leakage-audit": "node ../bench/sard/scripts/leakage-audit.mjs",
134
+ "bench:sard:java": "node test/benchmark/realworld/bench-realworld.js --app sard-juliet-java-strict --blind --scramble-identifiers --json | node ../bench/sard/scripts/macro-score.mjs",
135
+ "bench:sard:csharp": "node test/benchmark/realworld/bench-realworld.js --app sard-juliet-csharp-strict --blind --scramble-identifiers --json | node ../bench/sard/scripts/macro-score.mjs",
136
+ "bench:sard:java:fast-unsafe": "node test/benchmark/realworld/bench-realworld.js --app sard-juliet-java-strict --blind --json | node ../bench/sard/scripts/macro-score.mjs",
137
+ "bench:sard:split": "node ../bench/sard/scripts/split.mjs",
138
+ "bench:sard:split:check": "node ../bench/sard/scripts/split.mjs --verify",
139
+ "bench:sard:update-baseline": "node ../bench/sard/scripts/compare-baseline.mjs --update-baseline",
140
+ "bench:sard:check-baseline": "node ../bench/sard/scripts/compare-baseline.mjs --check-baseline",
141
+ "bench:sard:holdout-update-baseline": "node ../bench/sard/scripts/holdout-check.mjs --update-baseline",
142
+ "bench:sard:holdout-check": "node ../bench/sard/scripts/holdout-check.mjs --check-baseline",
143
+ "bench:sard:smoke": "node test/benchmark/realworld/bench-realworld.js --app sard-juliet-java-strict --blind --scramble-identifiers --cwe CWE-89,CWE-78,CWE-23,CWE-80,CWE-327 --json | node ../bench/sard/scripts/macro-score.mjs",
144
+ "bench:sard:mutate": "node ../bench/sard/scripts/mutate.mjs --app sard-juliet-java-strict --cwe 89,78,23,80,327 --limit 60",
145
+ "bench:sard:verify-fixes": "node ../bench/sard/scripts/verify-fixes.mjs --app sard-juliet-java-strict --cwe 89,78,23,80,327,328 --limit 200",
146
+ "bench:sard:analyze-errors": "node ../bench/sard/scripts/analyze-errors.mjs",
147
+ "bench:sard:php-ingest": "node ../bench/sard/scripts/ingest-php.mjs",
148
+ "bench:sard:php-score": "node ../bench/sard/scripts/score-php.mjs",
132
149
  "bench:layer-recall": "node ../bench/layer-recall/runner.mjs",
133
150
  "bench:layer-recall:check": "node ../bench/layer-recall/runner.mjs --check",
134
151
  "bench:layer-recall:update-baseline": "node ../bench/layer-recall/runner.mjs --update-baseline",
@@ -217,6 +217,32 @@ export const CATALOG = [
217
217
  { kind: 'source', id: 'java-request-getReader', language: 'java', framework: 'servlet', match: { type: 'call', callee: 'getReader' }, label: 'request.getReader' },
218
218
  { kind: 'source', id: 'java-system-getenv', language: 'java', framework: 'stdlib', match: { type: 'call', callee: 'getenv' }, label: 'System.getenv' },
219
219
  { kind: 'source', id: 'java-system-getProperty', language: 'java', framework: 'stdlib', match: { type: 'call', callee: 'getProperty' }, label: 'System.getProperty' },
220
+ // Found via SARD_AGENTIC_SECURITY_PRD.md bench work: bench/sard/scripts/
221
+ // analyze-errors.mjs clustered Java false negatives by Juliet's own
222
+ // source-descriptor filename segment (evidence-based — see that script's
223
+ // header for why this is legitimate without reading raw corpus content)
224
+ // and found "console_readLine" and "database" among the largest clusters,
225
+ // spanning multiple unrelated CWEs uniformly — the signature of a missing
226
+ // SOURCE model, not a per-CWE bug. Confirmed by grep: this catalog had no
227
+ // entry for either before now. Both are standard real-world taint sources
228
+ // (interactive stdin input; a value read back out of a database result
229
+ // set — classic second-order injection), not SARD-specific.
230
+ { kind: 'source', id: 'java-io-readline', language: 'java', framework: 'stdlib', match: { type: 'call', callee: 'readLine' }, label: 'BufferedReader.readLine() / Console.readLine()' },
231
+ // `getString`/`getObject` are common enough method names on unrelated
232
+ // classes that this SHOULD be scoped to a resolved ResultSet-shaped
233
+ // receiver, and receiverTypeIn is written here expressing that intent —
234
+ // but verified (via a dedicated precision test, see java-taint-flow.
235
+ // test.js) that it is currently INERT for Java: `class-hierarchy.js`'s
236
+ // own module header states its CHA/classOfVar is JS/TS-only (built by
237
+ // walking Babel ASTs), so `_receiverTypeFor` always returns null for a
238
+ // Java call site and `_receiverTypeAllowed`'s "unknown != clean" rule
239
+ // (documented in this file, `_receiverTypeAllowed`'s own header) then
240
+ // permits the match unconditionally — identical to a bare unscoped entry
241
+ // today. Left in place (correct once Java CHA support exists, and
242
+ // documents the intended precision boundary) rather than removed, but
243
+ // do not assume it is actually gating anything yet.
244
+ { kind: 'source', id: 'java-resultset-getstring', language: 'java', framework: 'jdbc', match: { type: 'call', callee: 'getString', receiverTypeIn: ['resultset'] }, label: 'ResultSet.getString' },
245
+ { kind: 'source', id: 'java-resultset-getobject', language: 'java', framework: 'jdbc', match: { type: 'call', callee: 'getObject', receiverTypeIn: ['resultset'] }, label: 'ResultSet.getObject' },
220
246
 
221
247
  // ─── SOURCES (Annotation/Decorator-shaped) ────────────────────────────────
222
248
  // R14(a): annotation/decorator-shaped framework sources (Spring @RequestParam,
@@ -356,6 +382,20 @@ export const CATALOG = [
356
382
  { kind: 'source', id: 'php-post', language: 'php', framework: 'core', match: { type: 'global', name: '_POST' }, label: '$_POST' },
357
383
  { kind: 'source', id: 'php-cookie', language: 'php', framework: 'core', match: { type: 'global', name: '_COOKIE' }, label: '$_COOKIE' },
358
384
  { kind: 'source', id: 'php-server', language: 'php', framework: 'core', match: { type: 'global', name: '_SERVER' }, label: '$_SERVER' },
385
+ // $_SESSION and $_ENV were absent from this catalog entirely (only
386
+ // _REQUEST/_GET/_POST/_COOKIE/_SERVER were modeled) — found via
387
+ // SARD_AGENTIC_SECURITY_PRD.md bench work on the NIST SARD PHP corpus,
388
+ // whose templates use $_SESSION as one of several source stand-ins.
389
+ // $_SESSION isn't purely attacker-controlled the way $_GET is (session
390
+ // data usually originates from server-side writes), but a common,
391
+ // real-world-relevant subclass IS attacker-controlled: any value the app
392
+ // itself copies into $_SESSION from $_GET/$_POST/$_COOKIE without
393
+ // validation. Modeling it as a source (same as the existing four) is the
394
+ // conservative, general choice — flagging that class rather than missing
395
+ // it entirely, consistent with how $_COOKIE (also partly server-set) is
396
+ // already modeled.
397
+ { kind: 'source', id: 'php-session', language: 'php', framework: 'core', match: { type: 'global', name: '_SESSION' }, label: '$_SESSION' },
398
+ { kind: 'source', id: 'php-env', language: 'php', framework: 'core', match: { type: 'global', name: '_ENV' }, label: '$_ENV' },
359
399
  { kind: 'source', id: 'php-symfony-query', language: 'php', framework: 'symfony', match: { type: 'member', object: '$request', prop: 'query' }, label: '$request->query (Symfony)' },
360
400
  { kind: 'source', id: 'php-symfony-request', language: 'php', framework: 'symfony', match: { type: 'member', object: '$request', prop: 'request' }, label: '$request->request (Symfony)' },
361
401
  { kind: 'source', id: 'php-symfony-cookies', language: 'php', framework: 'symfony', match: { type: 'member', object: '$request', prop: 'cookies' }, label: '$request->cookies (Symfony)' },
@@ -444,6 +484,18 @@ export const CATALOG = [
444
484
  { kind: 'sink', id: 'php-mysqli-query', language: 'php', framework: 'mysqli', match: { type: 'call', callee: 'mysqli_query' }, argIndex: 1,
445
485
  vuln: { name: 'SQL Injection (mysqli_query)', severity: 'critical', cwe: 'CWE-89',
446
486
  remediation: 'Use prepared statements: $stmt = $conn->prepare("SELECT * WHERE id = ?"); $stmt->bind_param("i", $id);' } },
487
+ // Legacy mysql_* extension (deprecated PHP 5.5, removed 7.0) — still widely
488
+ // present in real-world PHP and, per SARD_AGENTIC_SECURITY_PRD.md bench
489
+ // work, in the NIST SARD PHP Vulnerability Test Suite corpus. Only
490
+ // php.js's same-line structural regex (`sqlInjectionStructural`) covered
491
+ // this call before; a variable assigned on one line and passed to
492
+ // mysql_query() on a later line (the dominant real-world and SARD shape)
493
+ // was invisible to the taint dataflow engine entirely. Query is argIndex 0
494
+ // (the optional link-identifier connection is argIndex 1), unlike
495
+ // mysqli_query's argIndex 1.
496
+ { kind: 'sink', id: 'php-mysql-query', language: 'php', framework: 'mysql', match: { type: 'call', callee: 'mysql_query' }, argIndex: 0,
497
+ vuln: { name: 'SQL Injection (mysql_query)', severity: 'critical', cwe: 'CWE-89',
498
+ remediation: 'The mysql_* extension is removed in PHP 7+; migrate to mysqli or PDO with prepared statements: $stmt = $mysqli->prepare("SELECT * WHERE id = ?"); $stmt->bind_param("i", $id).' } },
447
499
  { kind: 'sink', id: 'php-pdo-query', language: 'php', framework: 'pdo', match: { type: 'call', callee: 'query' }, argIndex: 0,
448
500
  vuln: { name: 'SQL Injection (PDO::query)', severity: 'critical', cwe: 'CWE-89',
449
501
  remediation: 'Use PDO::prepare with bound parameters.' } },
@@ -153,6 +153,12 @@ export const NO_PROVENANCE_OVERRIDES = Object.freeze({
153
153
  // Java / stdlib
154
154
  'java-system-getenv': 'env-value',
155
155
  'java-system-getProperty': 'env-value', // JVM system properties, env-adjacent
156
+ 'java-io-readline': 'user-input', // BufferedReader.readLine() / Console.readLine() — interactive stdin
157
+ // Java / JDBC — a value read back out of a database result set (classic
158
+ // second-order injection); `database-read` is SOURCE_CATEGORIES' own
159
+ // vocabulary for exactly this shape.
160
+ 'java-resultset-getstring': 'database-read',
161
+ 'java-resultset-getobject': 'database-read',
156
162
  // Java / Spring annotations
157
163
  'java-spring-requestparam': 'http-query',
158
164
  'java-spring-pathvariable': 'http-route',
@@ -209,6 +215,8 @@ export const NO_PROVENANCE_OVERRIDES = Object.freeze({
209
215
  'php-post': 'http-body',
210
216
  'php-cookie': 'http-cookie',
211
217
  'php-server': 'http-header',
218
+ 'php-session': 'http-cookie', // $_SESSION is cookie-backed by default, same convention as rb-rails-session
219
+ 'php-env': 'env-value',
212
220
  'php-symfony-query': 'http-query',
213
221
  'php-symfony-request': 'http-body',
214
222
  'php-symfony-cookies': 'http-cookie',
@@ -14,6 +14,7 @@
14
14
 
15
15
  const JS_EXT = /\.(?:js|jsx|ts|tsx|mjs|cjs)$/i;
16
16
  const PY_EXT = /\.py$/i;
17
+ const JAVA_EXT = /\.java$/i;
17
18
 
18
19
  // Each rule gates on the finding's cwe/family, then rewrites the whole-file
19
20
  // content. transform() returns the new content, or null when nothing changed
@@ -25,12 +26,22 @@ const RULES = [
25
26
  // swapping them all is safe; the verifier confirms the weak-hash finding is
26
27
  // gone and nothing worse appeared.
27
28
  applies: (f) => /CWE-(?:327|328|916)/.test(f.cwe || '') || /weak.?hash/i.test(f.family || ''),
29
+ // SARD_AGENTIC_SECURITY_PRD.md Phase 8 bench work found this rule's
30
+ // `applies()` gate matched Java findings (CWE-327/328) by cwe/family, but
31
+ // `transform()` had no Java branch at all — every Java weak-hash finding
32
+ // silently produced `null` (no fix), a coverage gap invisible from the
33
+ // gate alone. `MessageDigest.getInstance("MD5"|"SHA1"|"SHA-1")` ->
34
+ // `"SHA-256"` is the same class of context-independent literal swap as
35
+ // the existing JS/Python branches (the algorithm name is a string
36
+ // literal, not something requiring surrounding-code understanding).
28
37
  transform: (content, file) => {
29
38
  let out = content;
30
39
  if (JS_EXT.test(file)) {
31
40
  out = out.replace(/(\bcreateHash\s*\(\s*['"`])(?:md5|sha1)(['"`])/gi, '$1sha256$2');
32
41
  } else if (PY_EXT.test(file)) {
33
42
  out = out.replace(/\bhashlib\.(?:md5|sha1)\s*\(/g, 'hashlib.sha256(');
43
+ } else if (JAVA_EXT.test(file)) {
44
+ out = out.replace(/(\bMessageDigest\.getInstance\s*\(\s*")(?:MD5|SHA-?1)(")/gi, '$1SHA-256$2');
34
45
  }
35
46
  return out !== content ? out : null;
36
47
  },