@clear-capabilities/agentic-security-scanner 0.148.3 → 0.148.5
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 +61 -0
- package/dist/4970.index.js +104 -28
- package/dist/agentic-security.mjs +1 -1
- package/dist/agentic-security.mjs.sha256 +1 -1
- package/package.json +2 -2
- package/src/engine.js +46 -14
- package/src/pipeline/assurance-mode.js +104 -28
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
87b411bffafaae98fef870a4379829e07500f8e62d528ff2370c540eab2dcee4 agentic-security.mjs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clear-capabilities/agentic-security-scanner",
|
|
3
|
-
"version": "0.148.
|
|
3
|
+
"version": "0.148.5",
|
|
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",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"test:smoke": "node --test test/smoke.test.js test/demo-app.test.js",
|
|
65
65
|
"test:glob": "node --test test/glob-compat.test.js",
|
|
66
66
|
"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",
|
|
67
|
-
"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/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/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/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",
|
|
67
|
+
"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/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/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",
|
|
68
68
|
"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",
|
|
69
69
|
"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",
|
|
70
70
|
"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",
|
package/src/engine.js
CHANGED
|
@@ -721,6 +721,19 @@ const AUTH_PATTERNS=[/(?:authenticate|isAuthenticated|requireAuth|passport\.auth
|
|
|
721
721
|
// output becomes input.
|
|
722
722
|
const IGNORE_DIRS=new Set(["node_modules",".git","__pycache__","vendor","dist","build",".next","venv","env",".venv","target","bin","obj",".cache","coverage","bower_components","tests","test","__tests__","spec","mocks",".agentic-security"]);
|
|
723
723
|
const CODE_EXTS=new Set(["js","jsx","ts","tsx","mjs","cjs","py","rb","php","java","go","cs","rs","vue","svelte","html","htm","ejs","hbs","pug","erb","twig","graphql","gql","kt","scala","swift","dart","ex","exs","tf","tfvars","dockerfile","c","cc","cpp","cxx","h","hh","hpp","hxx","sol"]);
|
|
724
|
+
// Supply-chain finding types that genuinely describe an ABSENT declaration
|
|
725
|
+
// (no origin commit exists to resolve — see the provenance-stamping loop
|
|
726
|
+
// later in this file for the full reasoning). Hoisted to module scope and
|
|
727
|
+
// exported via `_internals` (S4, adversarial premortem third pass,
|
|
728
|
+
// 2026-09-07) so `test/supply-chain-provenance-completeness.test.js` can
|
|
729
|
+
// assert every OTHER supply-chain finding type this file produces is either
|
|
730
|
+
// a member here or is a real source-location type (cdn_no_integrity,
|
|
731
|
+
// dynamic_require) — without that guard, a future type added to one
|
|
732
|
+
// detection loop and forgotten in this Set silently tells a user a
|
|
733
|
+
// genuinely-unresolvable absence is an ordinary, fixable coverage gap, the
|
|
734
|
+
// exact wrong-direction error the third premortem pass flagged as a
|
|
735
|
+
// maintainability risk even though today's two-member Set is correct.
|
|
736
|
+
const SUPPLY_CHAIN_ABSENCE_TYPES = new Set(['unpinned_dep', 'no_lockfile']);
|
|
724
737
|
// Feat-2: IaC manifest filenames that aren't extension-based.
|
|
725
738
|
const IAC_FILENAMES = new Set(['Dockerfile', 'Containerfile', 'docker-compose.yml', 'docker-compose.yaml', 'Chart.yaml']);
|
|
726
739
|
function _isIaCFile(p){
|
|
@@ -10625,27 +10638,45 @@ function _deterministicFileTimings(timings) {
|
|
|
10625
10638
|
// The supply-chain half. report/index.js normalizes EVERY supplyChain entry
|
|
10626
10639
|
// into an SCA finding — not just the direct vulnerable_dep ones the resolver
|
|
10627
10640
|
// can speak to — and pipeline/finding-schema.js requires findingProvenance on
|
|
10628
|
-
// every channel.
|
|
10629
|
-
//
|
|
10641
|
+
// every channel. FOUR distinct populations reach this loop, not three, and
|
|
10642
|
+
// they do not share a limitation string (adversarial premortem R2,
|
|
10643
|
+
// 2026-09-07, follow-up to the assurance-strict message fix — this split
|
|
10644
|
+
// used to be binary, and pipeline/assurance-mode.js's message building
|
|
10645
|
+
// depends on the exact wording below to tell them apart):
|
|
10630
10646
|
//
|
|
10631
10647
|
// - transitive vulnerable_deps: resolved by resolveTransitiveSCAOrigin
|
|
10632
10648
|
// above (M3 §3.2) — this branch is now reached only if that annotation
|
|
10633
10649
|
// pass itself failed to stamp the entry.
|
|
10634
|
-
// - unpinned_dep / no_lockfile
|
|
10635
|
-
// declaration, so "which commit introduced this version" is not a
|
|
10636
|
-
// that has an answer to defer
|
|
10637
|
-
//
|
|
10650
|
+
// - unpinned_dep / no_lockfile: these describe the ABSENCE of a
|
|
10651
|
+
// declaration, so "which commit introduced this version" is not a
|
|
10652
|
+
// question that has an answer to defer — permanently unresolvable, by
|
|
10653
|
+
// construction, not merely unresolved today.
|
|
10654
|
+
// - cdn_no_integrity / dynamic_require: NOT the same claim as the one
|
|
10655
|
+
// above, despite both reaching this loop as "not the vulnerable_dep
|
|
10656
|
+
// the resolver speaks to" — each of these carries a real `file`+`line`
|
|
10657
|
+
// (a specific `<script src>` tag or `require(...)` call someone
|
|
10658
|
+
// specifically wrote), so there IS a commit that introduced it; this
|
|
10659
|
+
// engine's resolver just isn't wired to walk it yet. Confusing this
|
|
10660
|
+
// with the absence case above told a user their finding was a
|
|
10661
|
+
// "permanent, by-design limitation" when it was really an ordinary,
|
|
10662
|
+
// fixable coverage gap.
|
|
10663
|
+
// - anything else: the annotator failed to reach it, as above.
|
|
10638
10664
|
//
|
|
10639
|
-
// The first
|
|
10640
|
-
// is for. Only a genuine annotator failure is an `error`, which is
|
|
10641
|
-
// loop distinguishes them rather than stamping one status for all
|
|
10665
|
+
// The first three are honest `not_available` — that is exactly what the
|
|
10666
|
+
// status is for. Only a genuine annotator failure is an `error`, which is
|
|
10667
|
+
// why this loop distinguishes them rather than stamping one status for all.
|
|
10668
|
+
// (SUPPLY_CHAIN_ABSENCE_TYPES is module-scoped — see its own comment.)
|
|
10642
10669
|
for (const sc of (supplyChain || [])) {
|
|
10643
10670
|
if (!sc || typeof sc !== 'object' || sc.findingProvenance) continue;
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
10648
|
-
|
|
10671
|
+
let limitation;
|
|
10672
|
+
if (sc.type === 'vulnerable_dep') {
|
|
10673
|
+
limitation = 'transitive dependency origin resolution failed for this entry (annotator error)';
|
|
10674
|
+
} else if (SUPPLY_CHAIN_ABSENCE_TYPES.has(sc.type)) {
|
|
10675
|
+
limitation = `origin resolution does not apply to a ${sc.type} supply-chain entry`;
|
|
10676
|
+
} else {
|
|
10677
|
+
limitation = `origin resolution is not yet wired for a ${sc.type || 'non-vulnerability'} supply-chain entry (this describes a real source location, not an absent declaration — resolvable in principle, just not implemented today)`;
|
|
10678
|
+
}
|
|
10679
|
+
sc.findingProvenance = emptyProvenance(PROVENANCE_STATUS.NOT_AVAILABLE, { limitations: [limitation] });
|
|
10649
10680
|
}
|
|
10650
10681
|
// The OTHER two channels report/index.js normalizes into findings —
|
|
10651
10682
|
// `scan.secrets` and `scan.logicVulns`. The same argument that produced the
|
|
@@ -11221,4 +11252,5 @@ export {
|
|
|
11221
11252
|
/** Internals exposed for targeted unit tests (not part of the public API). */
|
|
11222
11253
|
export const _internals = {
|
|
11223
11254
|
_isLikelyUnsafeRegex, _isAnchoredRegex, _hasNestedQuantifier, _extractRegexLiterals, _hasLeadingUnboundedQuantifier,
|
|
11255
|
+
SUPPLY_CHAIN_ABSENCE_TYPES,
|
|
11224
11256
|
};
|
|
@@ -72,39 +72,115 @@ function _provenanceFailureReason(badProvenance, totalFindings) {
|
|
|
72
72
|
counts.set(reason, (counts.get(reason) || 0) + 1);
|
|
73
73
|
}
|
|
74
74
|
const ranked = [...counts.entries()].sort((a, b) => b[1] - a[1]);
|
|
75
|
-
const [topReason, topCount] = ranked[0];
|
|
76
|
-
const allSameReason = ranked.length === 1;
|
|
77
75
|
const base = `strict mode requires complete finding provenance; ${badProvenance.length}/${totalFindings} finding(s) have status outside [complete, uncommitted]`;
|
|
78
76
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
const gitReasons = ranked.filter(([r]) => r === 'not a Git repository' || r === 'repository state unavailable');
|
|
78
|
+
const gitCount = gitReasons.reduce((s, [, n]) => s + n, 0);
|
|
79
|
+
// engine.js's own comment on this branch: "unpinned_dep / no_lockfile...
|
|
80
|
+
// describe the ABSENCE of a declaration, so 'which commit introduced this
|
|
81
|
+
// version' is not a question that has an answer to defer ... this is a
|
|
82
|
+
// known, disclosed limitation, not a bug... strict mode WILL fail on
|
|
83
|
+
// nearly any real project that has a package.json." That disclosure lived
|
|
84
|
+
// only in a source comment nobody hits this error reads — the README's
|
|
85
|
+
// own quickstart explicitly invites pointing --assurance strict at "your
|
|
86
|
+
// own project," where this is the single most likely outcome. Named here
|
|
87
|
+
// so the person who hits it learns it is expected and permanent, not
|
|
88
|
+
// something to keep investigating. This prefix is deliberately narrower
|
|
89
|
+
// than "every non-vulnerable_dep supply-chain entry" — engine.js's
|
|
90
|
+
// provenance-stamping loop only uses it for unpinned_dep/no_lockfile,
|
|
91
|
+
// which genuinely have no origin commit; cdn_no_integrity/dynamic_require
|
|
92
|
+
// carry a real file:line and get a DIFFERENT string precisely so they
|
|
93
|
+
// never land in this "permanent, give up" bucket (adversarial premortem
|
|
94
|
+
// R2, 2026-09-07 — conflating the two told a user a resolvable coverage
|
|
95
|
+
// gap was an unfixable, by-design limitation).
|
|
96
|
+
const supplyChainReasons = ranked.filter(([r]) => r.startsWith('origin resolution does not apply to a'));
|
|
97
|
+
const supplyChainCount = supplyChainReasons.reduce((s, [, n]) => s + n, 0);
|
|
98
|
+
// Third known bucket (S1, adversarial premortem third pass, 2026-09-07):
|
|
99
|
+
// cdn_no_integrity/dynamic_require's "not yet wired" string (see the
|
|
100
|
+
// engine.js comment this file's `supplyChainReasons` block already
|
|
101
|
+
// references) was previously falling through to the generic `otherReasons`
|
|
102
|
+
// path below — honest, but verbose, and with no recommended next step,
|
|
103
|
+
// unlike every other named bucket here. Giving it its own bucket closes
|
|
104
|
+
// that inconsistency without touching the two already-fixed buckets.
|
|
105
|
+
const notYetWiredReasons = ranked.filter(([r]) => r.startsWith('origin resolution is not yet wired for a'));
|
|
106
|
+
const notYetWiredCount = notYetWiredReasons.reduce((s, [, n]) => s + n, 0);
|
|
107
|
+
const knownReasonSet = new Set([...gitReasons, ...supplyChainReasons, ...notYetWiredReasons].map(([r]) => r));
|
|
108
|
+
const otherReasons = ranked.filter(([r]) => !knownReasonSet.has(r));
|
|
109
|
+
const otherCount = badProvenance.length - gitCount - supplyChainCount - notYetWiredCount;
|
|
110
|
+
const knownCategoryCount = (gitCount > 0 ? 1 : 0) + (supplyChainCount > 0 ? 1 : 0) + (notYetWiredCount > 0 ? 1 : 0);
|
|
111
|
+
|
|
112
|
+
// Exactly one KNOWN category, and nothing outside it — the shape every
|
|
113
|
+
// caller before this fix assumed was the only shape, and the one every
|
|
114
|
+
// existing test was written against. Kept as tight, single-topic prose
|
|
115
|
+
// rather than the multi-segment form below.
|
|
116
|
+
if (knownCategoryCount === 0) {
|
|
117
|
+
if (otherReasons.length === 1) {
|
|
118
|
+
return `${base} — all ${badProvenance.length} share the same reason: "${otherReasons[0][0]}".`;
|
|
119
|
+
}
|
|
120
|
+
const breakdown = otherReasons.slice(0, 5).map(([reason, n]) => `${n}× "${reason}"`).join(', ');
|
|
121
|
+
return `${base} — breakdown: ${breakdown}${otherReasons.length > 5 ? ', …' : ''}.`;
|
|
122
|
+
}
|
|
123
|
+
if (knownCategoryCount === 1 && otherCount === 0) {
|
|
124
|
+
if (gitCount > 0) {
|
|
125
|
+
const gitReasonNames = gitReasons.map(([r]) => `"${r}"`).join(' and ');
|
|
126
|
+
return `${base} — reason: ${gitCount === badProvenance.length ? 'all of them are' : `${gitCount} of them are`} ${gitReasonNames}. ` +
|
|
127
|
+
`strict mode resolves finding provenance from git history, so it requires a real git repository ` +
|
|
128
|
+
`(a GitHub "Download ZIP" extracts without one). Run \`git init && git add -A && git commit -m init\` in ` +
|
|
129
|
+
`the scanned directory, point the scan at a real \`git clone\`, or drop --assurance strict for standard/advisory.`;
|
|
130
|
+
}
|
|
131
|
+
if (supplyChainCount > 0) {
|
|
132
|
+
return `${base} — ${supplyChainCount} of them describe an ABSENT dependency declaration ` +
|
|
133
|
+
`(an unpinned version, a missing lockfile) that has no origin commit to resolve, by design. This is a ` +
|
|
134
|
+
`known, permanent limitation: strict mode cannot pass while any are present, on any real project with ` +
|
|
135
|
+
`such a dependency. Fix the underlying SCA finding(s) (pin the version / add a lockfile) if you want ` +
|
|
136
|
+
`strict to pass, or use --assurance standard/advisory for a project you don't control the dependencies of.`;
|
|
137
|
+
}
|
|
138
|
+
return `${base} — ${notYetWiredCount} of them point at a real source location (a CDN script tag, a dynamic ` +
|
|
139
|
+
`require) this engine can't yet trace back to the commit that introduced it — unlike the ABSENT-declaration ` +
|
|
140
|
+
`case above, this is an ordinary coverage gap, not a permanent limitation, but it isn't fixable from your ` +
|
|
141
|
+
`side either. Use --assurance standard/advisory if you need this scan to pass today.`;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Two or more independently-blocking categories on the SAME scan — the
|
|
145
|
+
// defect this closes (adversarial premortem R1, 2026-09-07): the old
|
|
146
|
+
// code picked whichever category had the most findings and silently
|
|
147
|
+
// dropped every other one, so a user could "fix" the reported problem,
|
|
148
|
+
// rerun, and hit a second wall the first run already had full information
|
|
149
|
+
// about but never mentioned — the same "the tool knew and didn't tell me"
|
|
150
|
+
// complaint this whole function exists to fix, recurring in a milder form.
|
|
151
|
+
//
|
|
152
|
+
// Rendered as a bulleted, newline-separated list rather than one
|
|
153
|
+
// semicolon-joined paragraph (S2, adversarial premortem third pass,
|
|
154
|
+
// 2026-09-07) — each bullet is independently actionable, and a wall of
|
|
155
|
+
// clauses buried the fact that they are SEPARATE problems, each with its
|
|
156
|
+
// own fix, rather than one problem described three ways.
|
|
157
|
+
const segments = [];
|
|
158
|
+
if (gitCount > 0) {
|
|
159
|
+
const gitReasonNames = gitReasons.map(([r]) => `"${r}"`).join(' and ');
|
|
160
|
+
segments.push(`${gitCount} of them are ${gitReasonNames} — strict mode requires a real git repository; ` +
|
|
161
|
+
`run \`git init && git add -A && git commit\`, or scan a real \`git clone\`.`);
|
|
162
|
+
}
|
|
163
|
+
if (supplyChainCount > 0) {
|
|
164
|
+
segments.push(`${supplyChainCount} of them describe an ABSENT dependency declaration (unpinned version / ` +
|
|
165
|
+
`missing lockfile) with no origin commit to resolve — a known, permanent limitation, not something a ` +
|
|
166
|
+
`rerun will fix.`);
|
|
84
167
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
// ... this is a known, disclosed limitation, not a bug... strict mode
|
|
89
|
-
// WILL fail on nearly any real project that has a package.json." That
|
|
90
|
-
// disclosure lived only in a source comment nobody hits this error reads —
|
|
91
|
-
// the README's own quickstart explicitly invites pointing --assurance
|
|
92
|
-
// strict at "your own project," where this is the single most likely
|
|
93
|
-
// outcome. Named here so the person who hits it learns it is expected and
|
|
94
|
-
// permanent, not something to keep investigating.
|
|
95
|
-
const supplyChainCount = ranked.filter(([r]) => r.startsWith('origin resolution does not apply to a')).reduce((s, [, n]) => s + n, 0);
|
|
96
|
-
if (supplyChainCount > 0 && supplyChainCount >= badProvenance.length / 2) {
|
|
97
|
-
return `${base} — ${supplyChainCount} of them describe an ABSENT dependency declaration ` +
|
|
98
|
-
`(an unpinned version, a missing lockfile) that has no origin commit to resolve, by design. This is a ` +
|
|
99
|
-
`known, permanent limitation: strict mode cannot pass while any are present, on any real project with ` +
|
|
100
|
-
`such a dependency. Fix the underlying SCA finding(s) (pin the version / add a lockfile) if you want ` +
|
|
101
|
-
`strict to pass, or use --assurance standard/advisory for a project you don't control the dependencies of.`;
|
|
168
|
+
if (notYetWiredCount > 0) {
|
|
169
|
+
segments.push(`${notYetWiredCount} of them point at a real source location this engine can't yet trace ` +
|
|
170
|
+
`back to a commit — an ordinary coverage gap, not a permanent limitation, but not fixable from your side.`);
|
|
102
171
|
}
|
|
103
|
-
if (
|
|
104
|
-
|
|
172
|
+
if (otherCount > 0) {
|
|
173
|
+
if (otherReasons.length === 1) {
|
|
174
|
+
segments.push(`${otherCount} share the reason "${otherReasons[0][0]}".`);
|
|
175
|
+
} else {
|
|
176
|
+
const breakdown = otherReasons.slice(0, 5).map(([reason, n]) => `${n}× "${reason}"`).join(', ');
|
|
177
|
+
segments.push(`${otherCount} break down as: ${breakdown}${otherReasons.length > 5 ? ', …' : ''}.`);
|
|
178
|
+
}
|
|
105
179
|
}
|
|
106
|
-
const
|
|
107
|
-
return `${base} —
|
|
180
|
+
const bullets = segments.map((s) => ` - ${s}`).join('\n');
|
|
181
|
+
return `${base} — MULTIPLE distinct reasons, not just one:\n${bullets}\nEvery category above must be ` +
|
|
182
|
+
`resolved for strict to pass (or drop to --assurance standard/advisory) — fixing only one will surface the ` +
|
|
183
|
+
`next on your following run.`;
|
|
108
184
|
}
|
|
109
185
|
|
|
110
186
|
/**
|