kuzushi 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +429 -189
- package/dist/agent-runtime/batch-files.d.ts +9 -0
- package/dist/agent-runtime/batch-files.js +28 -0
- package/dist/agent-runtime/batch-files.js.map +1 -0
- package/dist/agent-runtime/claude.d.ts +28 -5
- package/dist/agent-runtime/claude.js +854 -105
- package/dist/agent-runtime/claude.js.map +1 -1
- package/dist/agent-runtime/context-guards.d.ts +61 -0
- package/dist/agent-runtime/context-guards.js +94 -0
- package/dist/agent-runtime/context-guards.js.map +1 -0
- package/dist/agent-runtime/error-classification.d.ts +18 -0
- package/dist/agent-runtime/error-classification.js +95 -0
- package/dist/agent-runtime/error-classification.js.map +1 -0
- package/dist/agent-runtime/execution.d.ts +81 -0
- package/dist/agent-runtime/execution.js +375 -0
- package/dist/agent-runtime/execution.js.map +1 -0
- package/dist/agent-runtime/index.d.ts +3 -4
- package/dist/agent-runtime/index.js +16 -22
- package/dist/agent-runtime/index.js.map +1 -1
- package/dist/agent-runtime/logging-runtime.d.ts +19 -0
- package/dist/agent-runtime/logging-runtime.js +91 -0
- package/dist/agent-runtime/logging-runtime.js.map +1 -0
- package/dist/agent-runtime/loop-detector.d.ts +30 -0
- package/dist/agent-runtime/loop-detector.js +157 -0
- package/dist/agent-runtime/loop-detector.js.map +1 -0
- package/dist/agent-runtime/model-fallback.d.ts +29 -0
- package/dist/agent-runtime/model-fallback.js +76 -0
- package/dist/agent-runtime/model-fallback.js.map +1 -0
- package/dist/agent-runtime/pi-ai.d.ts +7 -0
- package/dist/agent-runtime/pi-ai.js +446 -41
- package/dist/agent-runtime/pi-ai.js.map +1 -1
- package/dist/agent-runtime/tools.js +814 -2
- package/dist/agent-runtime/tools.js.map +1 -1
- package/dist/agent-runtime/turn-watchdog.d.ts +19 -0
- package/dist/agent-runtime/turn-watchdog.js +41 -0
- package/dist/agent-runtime/turn-watchdog.js.map +1 -0
- package/dist/agent-runtime/types.d.ts +44 -2
- package/dist/agents/handoff.d.ts +50 -0
- package/dist/agents/handoff.js +74 -0
- package/dist/agents/handoff.js.map +1 -0
- package/dist/agents/index.d.ts +3 -4
- package/dist/agents/index.js +153 -14
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/registry.d.ts +17 -1
- package/dist/agents/registry.js +32 -8
- package/dist/agents/registry.js.map +1 -1
- package/dist/agents/scanner-adapter.js +2 -2
- package/dist/agents/scanner-adapter.js.map +1 -1
- package/dist/agents/task-loader.d.ts +42 -0
- package/dist/agents/task-loader.js +148 -0
- package/dist/agents/task-loader.js.map +1 -0
- package/dist/agents/task-manifest.d.ts +81 -0
- package/dist/agents/task-manifest.js +158 -0
- package/dist/agents/task-manifest.js.map +1 -0
- package/dist/agents/task-wrappers.d.ts +28 -0
- package/dist/agents/task-wrappers.js +129 -0
- package/dist/agents/task-wrappers.js.map +1 -0
- package/dist/agents/tasks/app-model-build.d.ts +29 -0
- package/dist/agents/tasks/app-model-build.js +531 -0
- package/dist/agents/tasks/app-model-build.js.map +1 -0
- package/dist/agents/tasks/approval-gate.d.ts +39 -0
- package/dist/agents/tasks/approval-gate.js +116 -0
- package/dist/agents/tasks/approval-gate.js.map +1 -0
- package/dist/agents/tasks/auth-logic-detect.d.ts +16 -0
- package/dist/agents/tasks/auth-logic-detect.js +185 -0
- package/dist/agents/tasks/auth-logic-detect.js.map +1 -0
- package/dist/agents/tasks/call-graph-assist.d.ts +10 -0
- package/dist/agents/tasks/call-graph-assist.js +98 -0
- package/dist/agents/tasks/call-graph-assist.js.map +1 -0
- package/dist/agents/tasks/category-filter.d.ts +21 -0
- package/dist/agents/tasks/category-filter.js +78 -0
- package/dist/agents/tasks/category-filter.js.map +1 -0
- package/dist/agents/tasks/chain-analysis.d.ts +36 -0
- package/dist/agents/tasks/chain-analysis.js +194 -0
- package/dist/agents/tasks/chain-analysis.js.map +1 -0
- package/dist/agents/tasks/code-config-detect.d.ts +23 -0
- package/dist/agents/tasks/code-config-detect.js +589 -0
- package/dist/agents/tasks/code-config-detect.js.map +1 -0
- package/dist/agents/tasks/code-graph/build.d.ts +21 -0
- package/dist/agents/tasks/code-graph/build.js +595 -0
- package/dist/agents/tasks/code-graph/build.js.map +1 -0
- package/dist/agents/tasks/code-graph/enrich.d.ts +3 -0
- package/dist/agents/tasks/code-graph/enrich.js +142 -0
- package/dist/agents/tasks/code-graph/enrich.js.map +1 -0
- package/dist/agents/tasks/code-graph/prompts.d.ts +65 -0
- package/dist/agents/tasks/code-graph/prompts.js +206 -0
- package/dist/agents/tasks/code-graph/prompts.js.map +1 -0
- package/dist/agents/tasks/code-graph/store.d.ts +20 -0
- package/dist/agents/tasks/code-graph/store.js +146 -0
- package/dist/agents/tasks/code-graph/store.js.map +1 -0
- package/dist/agents/tasks/code-graph/types.d.ts +85 -0
- package/dist/agents/tasks/code-graph/types.js +2 -0
- package/dist/agents/tasks/code-graph/types.js.map +1 -0
- package/dist/agents/tasks/command-injection.d.ts +4 -0
- package/dist/agents/tasks/command-injection.js +226 -0
- package/dist/agents/tasks/command-injection.js.map +1 -0
- package/dist/agents/tasks/context-enricher.d.ts +15 -0
- package/dist/agents/tasks/context-enricher.js +272 -0
- package/dist/agents/tasks/context-enricher.js.map +1 -0
- package/dist/agents/tasks/context-gatherer.d.ts +7 -2
- package/dist/agents/tasks/context-gatherer.js +229 -70
- package/dist/agents/tasks/context-gatherer.js.map +1 -1
- package/dist/agents/tasks/crypto-behavioral-test.d.ts +18 -0
- package/dist/agents/tasks/crypto-behavioral-test.js +269 -0
- package/dist/agents/tasks/crypto-behavioral-test.js.map +1 -0
- package/dist/agents/tasks/deep-semantic/cwe-select.d.ts +22 -0
- package/dist/agents/tasks/deep-semantic/cwe-select.js +138 -0
- package/dist/agents/tasks/deep-semantic/cwe-select.js.map +1 -0
- package/dist/agents/tasks/deep-semantic/hunt.d.ts +23 -0
- package/dist/agents/tasks/deep-semantic/hunt.js +531 -0
- package/dist/agents/tasks/deep-semantic/hunt.js.map +1 -0
- package/dist/agents/tasks/deep-semantic/types.d.ts +52 -0
- package/dist/agents/tasks/deep-semantic/types.js +25 -0
- package/dist/agents/tasks/deep-semantic/types.js.map +1 -0
- package/dist/agents/tasks/deserialization-detection.d.ts +4 -0
- package/dist/agents/tasks/deserialization-detection.js +229 -0
- package/dist/agents/tasks/deserialization-detection.js.map +1 -0
- package/dist/agents/tasks/diff-review.d.ts +52 -0
- package/dist/agents/tasks/diff-review.js +452 -0
- package/dist/agents/tasks/diff-review.js.map +1 -0
- package/dist/agents/tasks/graphql-security.d.ts +32 -0
- package/dist/agents/tasks/graphql-security.js +310 -0
- package/dist/agents/tasks/graphql-security.js.map +1 -0
- package/dist/agents/tasks/invariant-analysis/check.d.ts +18 -0
- package/dist/agents/tasks/invariant-analysis/check.js +287 -0
- package/dist/agents/tasks/invariant-analysis/check.js.map +1 -0
- package/dist/agents/tasks/invariant-analysis/extract.d.ts +13 -0
- package/dist/agents/tasks/invariant-analysis/extract.js +178 -0
- package/dist/agents/tasks/invariant-analysis/extract.js.map +1 -0
- package/dist/agents/tasks/invariant-analysis/types.d.ts +159 -0
- package/dist/agents/tasks/invariant-analysis/types.js +108 -0
- package/dist/agents/tasks/invariant-analysis/types.js.map +1 -0
- package/dist/agents/tasks/nosql-injection.d.ts +32 -0
- package/dist/agents/tasks/nosql-injection.js +366 -0
- package/dist/agents/tasks/nosql-injection.js.map +1 -0
- package/dist/agents/tasks/pre-read-prompt.d.ts +5 -0
- package/dist/agents/tasks/pre-read-prompt.js +77 -0
- package/dist/agents/tasks/pre-read-prompt.js.map +1 -0
- package/dist/agents/tasks/pre-read.d.ts +17 -0
- package/dist/agents/tasks/pre-read.js +118 -0
- package/dist/agents/tasks/pre-read.js.map +1 -0
- package/dist/agents/tasks/prototype-pollution.d.ts +32 -0
- package/dist/agents/tasks/prototype-pollution.js +287 -0
- package/dist/agents/tasks/prototype-pollution.js.map +1 -0
- package/dist/agents/tasks/race-condition.d.ts +32 -0
- package/dist/agents/tasks/race-condition.js +269 -0
- package/dist/agents/tasks/race-condition.js.map +1 -0
- package/dist/agents/tasks/reachability-check.d.ts +9 -0
- package/dist/agents/tasks/reachability-check.js +156 -0
- package/dist/agents/tasks/reachability-check.js.map +1 -0
- package/dist/agents/tasks/runtime-overrides.d.ts +13 -0
- package/dist/agents/tasks/runtime-overrides.js +93 -0
- package/dist/agents/tasks/runtime-overrides.js.map +1 -0
- package/dist/agents/tasks/scenario-guidance.d.ts +18 -0
- package/dist/agents/tasks/scenario-guidance.js +136 -0
- package/dist/agents/tasks/scenario-guidance.js.map +1 -0
- package/dist/agents/tasks/secrets-crypto-detect.d.ts +22 -0
- package/dist/agents/tasks/secrets-crypto-detect.js +380 -0
- package/dist/agents/tasks/secrets-crypto-detect.js.map +1 -0
- package/dist/agents/tasks/sharp-edges-detect.d.ts +43 -0
- package/dist/agents/tasks/sharp-edges-detect.js +434 -0
- package/dist/agents/tasks/sharp-edges-detect.js.map +1 -0
- package/dist/agents/tasks/ssrf-detection.d.ts +42 -0
- package/dist/agents/tasks/ssrf-detection.js +393 -0
- package/dist/agents/tasks/ssrf-detection.js.map +1 -0
- package/dist/agents/tasks/supply-chain.d.ts +32 -0
- package/dist/agents/tasks/supply-chain.js +286 -0
- package/dist/agents/tasks/supply-chain.js.map +1 -0
- package/dist/agents/tasks/systems-hunt/artifacts.d.ts +8 -0
- package/dist/agents/tasks/systems-hunt/artifacts.js +40 -0
- package/dist/agents/tasks/systems-hunt/artifacts.js.map +1 -0
- package/dist/agents/tasks/systems-hunt/context.d.ts +13 -0
- package/dist/agents/tasks/systems-hunt/context.js +301 -0
- package/dist/agents/tasks/systems-hunt/context.js.map +1 -0
- package/dist/agents/tasks/systems-hunt/helpers.d.ts +37 -0
- package/dist/agents/tasks/systems-hunt/helpers.js +387 -0
- package/dist/agents/tasks/systems-hunt/helpers.js.map +1 -0
- package/dist/agents/tasks/systems-hunt/hunt.d.ts +87 -0
- package/dist/agents/tasks/systems-hunt/hunt.js +864 -0
- package/dist/agents/tasks/systems-hunt/hunt.js.map +1 -0
- package/dist/agents/tasks/systems-hunt/invariant-extract.d.ts +10 -0
- package/dist/agents/tasks/systems-hunt/invariant-extract.js +201 -0
- package/dist/agents/tasks/systems-hunt/invariant-extract.js.map +1 -0
- package/dist/agents/tasks/systems-hunt/trigger-synth.d.ts +10 -0
- package/dist/agents/tasks/systems-hunt/trigger-synth.js +193 -0
- package/dist/agents/tasks/systems-hunt/trigger-synth.js.map +1 -0
- package/dist/agents/tasks/systems-hunt/types.d.ts +152 -0
- package/dist/agents/tasks/systems-hunt/types.js +97 -0
- package/dist/agents/tasks/systems-hunt/types.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/analyze.d.ts +86 -0
- package/dist/agents/tasks/taint-analysis/analyze.js +1459 -0
- package/dist/agents/tasks/taint-analysis/analyze.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/codeql-compat.d.ts +99 -0
- package/dist/agents/tasks/taint-analysis/codeql-compat.js +291 -0
- package/dist/agents/tasks/taint-analysis/codeql-compat.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/cross-service/analyze.d.ts +40 -0
- package/dist/agents/tasks/taint-analysis/cross-service/analyze.js +296 -0
- package/dist/agents/tasks/taint-analysis/cross-service/analyze.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/cross-service/boundary-agent.d.ts +30 -0
- package/dist/agents/tasks/taint-analysis/cross-service/boundary-agent.js +288 -0
- package/dist/agents/tasks/taint-analysis/cross-service/boundary-agent.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/cross-service/discover.d.ts +15 -0
- package/dist/agents/tasks/taint-analysis/cross-service/discover.js +327 -0
- package/dist/agents/tasks/taint-analysis/cross-service/discover.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/cross-service/stitch.d.ts +36 -0
- package/dist/agents/tasks/taint-analysis/cross-service/stitch.js +857 -0
- package/dist/agents/tasks/taint-analysis/cross-service/stitch.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/cross-service/types.d.ts +363 -0
- package/dist/agents/tasks/taint-analysis/cross-service/types.js +183 -0
- package/dist/agents/tasks/taint-analysis/cross-service/types.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/csv.d.ts +5 -0
- package/dist/agents/tasks/taint-analysis/csv.js +96 -0
- package/dist/agents/tasks/taint-analysis/csv.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/diff-scope.d.ts +11 -0
- package/dist/agents/tasks/taint-analysis/diff-scope.js +95 -0
- package/dist/agents/tasks/taint-analysis/diff-scope.js.map +1 -0
- package/dist/agents/tasks/{augur-extraction-agent.d.ts → taint-analysis/extraction-agent.d.ts} +15 -7
- package/dist/agents/tasks/{augur-extraction-agent.js → taint-analysis/extraction-agent.js} +101 -41
- package/dist/agents/tasks/taint-analysis/extraction-agent.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/grounding.d.ts +27 -0
- package/dist/agents/tasks/taint-analysis/grounding.js +78 -0
- package/dist/agents/tasks/taint-analysis/grounding.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/label.d.ts +91 -0
- package/dist/agents/tasks/taint-analysis/label.js +2073 -0
- package/dist/agents/tasks/taint-analysis/label.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/preflight.d.ts +92 -0
- package/dist/agents/tasks/taint-analysis/preflight.js +1105 -0
- package/dist/agents/tasks/taint-analysis/preflight.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/ti-prior.d.ts +36 -0
- package/dist/agents/tasks/taint-analysis/ti-prior.js +398 -0
- package/dist/agents/tasks/taint-analysis/ti-prior.js.map +1 -0
- package/dist/agents/tasks/taint-analysis/types.d.ts +181 -0
- package/dist/agents/tasks/taint-analysis/types.js +333 -0
- package/dist/agents/tasks/taint-analysis/types.js.map +1 -0
- package/dist/agents/tasks/taint-iris/cwe-select.d.ts +11 -0
- package/dist/agents/tasks/taint-iris/cwe-select.js +132 -0
- package/dist/agents/tasks/taint-iris/cwe-select.js.map +1 -0
- package/dist/agents/tasks/taint-iris/iris.d.ts +4 -0
- package/dist/agents/tasks/taint-iris/iris.js +299 -0
- package/dist/agents/tasks/taint-iris/iris.js.map +1 -0
- package/dist/agents/tasks/task-selector.d.ts +32 -0
- package/dist/agents/tasks/task-selector.js +209 -0
- package/dist/agents/tasks/task-selector.js.map +1 -0
- package/dist/agents/tasks/template-injection.d.ts +32 -0
- package/dist/agents/tasks/template-injection.js +379 -0
- package/dist/agents/tasks/template-injection.js.map +1 -0
- package/dist/agents/tasks/threat-hunt.d.ts +29 -0
- package/dist/agents/tasks/threat-hunt.js +244 -0
- package/dist/agents/tasks/threat-hunt.js.map +1 -0
- package/dist/agents/tasks/threat-model-guidance.d.ts +33 -0
- package/dist/agents/tasks/threat-model-guidance.js +326 -0
- package/dist/agents/tasks/threat-model-guidance.js.map +1 -0
- package/dist/agents/tasks/threat-modeling/randori-adapter.d.ts +2 -0
- package/dist/agents/tasks/threat-modeling/randori-adapter.js +205 -0
- package/dist/agents/tasks/threat-modeling/randori-adapter.js.map +1 -0
- package/dist/agents/tasks/threat-modeling/randori-artifacts.d.ts +17 -0
- package/dist/agents/tasks/threat-modeling/randori-artifacts.js +140 -0
- package/dist/agents/tasks/threat-modeling/randori-artifacts.js.map +1 -0
- package/dist/agents/tasks/threat-modeling/randori.d.ts +8 -0
- package/dist/agents/tasks/threat-modeling/randori.js +210 -0
- package/dist/agents/tasks/threat-modeling/randori.js.map +1 -0
- package/dist/agents/tasks/threat-modeling/resolve-randori.d.ts +5 -0
- package/dist/agents/tasks/threat-modeling/resolve-randori.js +23 -0
- package/dist/agents/tasks/threat-modeling/resolve-randori.js.map +1 -0
- package/dist/agents/tasks/threat-modeling/types.d.ts +69 -0
- package/dist/agents/tasks/threat-modeling/types.js +53 -0
- package/dist/agents/tasks/threat-modeling/types.js.map +1 -0
- package/dist/agents/tasks/threat-scenario-build.d.ts +26 -0
- package/dist/agents/tasks/threat-scenario-build.js +250 -0
- package/dist/agents/tasks/threat-scenario-build.js.map +1 -0
- package/dist/agents/tasks/tob-audit/resolve-tob-plugin.d.ts +13 -0
- package/dist/agents/tasks/tob-audit/resolve-tob-plugin.js +55 -0
- package/dist/agents/tasks/tob-audit/resolve-tob-plugin.js.map +1 -0
- package/dist/agents/tasks/tob-audit/tob-audit.d.ts +15 -0
- package/dist/agents/tasks/tob-audit/tob-audit.js +132 -0
- package/dist/agents/tasks/tob-audit/tob-audit.js.map +1 -0
- package/dist/agents/tasks/variant-analysis.d.ts +54 -0
- package/dist/agents/tasks/variant-analysis.js +442 -0
- package/dist/agents/tasks/variant-analysis.js.map +1 -0
- package/dist/agents/tasks/vuln-scout/resolve-vuln-scout.d.ts +11 -0
- package/dist/agents/tasks/vuln-scout/resolve-vuln-scout.js +29 -0
- package/dist/agents/tasks/vuln-scout/resolve-vuln-scout.js.map +1 -0
- package/dist/agents/tasks/vuln-scout/vuln-scout.d.ts +15 -0
- package/dist/agents/tasks/vuln-scout/vuln-scout.js +131 -0
- package/dist/agents/tasks/vuln-scout/vuln-scout.js.map +1 -0
- package/dist/agents/tasks/xxe-detection.d.ts +4 -0
- package/dist/agents/tasks/xxe-detection.js +223 -0
- package/dist/agents/tasks/xxe-detection.js.map +1 -0
- package/dist/agents/types.d.ts +36 -1
- package/dist/analysis-support/code-intelligence.d.ts +13 -0
- package/dist/analysis-support/code-intelligence.js +304 -0
- package/dist/analysis-support/code-intelligence.js.map +1 -0
- package/dist/analysis-support/index.d.ts +3 -0
- package/dist/analysis-support/index.js +4 -0
- package/dist/analysis-support/index.js.map +1 -0
- package/dist/analysis-support/simple-index.d.ts +15 -0
- package/dist/analysis-support/simple-index.js +262 -0
- package/dist/analysis-support/simple-index.js.map +1 -0
- package/dist/analysis-support/types.d.ts +92 -0
- package/dist/analysis-support/types.js +2 -0
- package/dist/analysis-support/types.js.map +1 -0
- package/dist/banner.d.ts +5 -0
- package/dist/banner.js +40 -0
- package/dist/banner.js.map +1 -0
- package/dist/bus/adapters/in-process.js +5 -1
- package/dist/bus/adapters/in-process.js.map +1 -1
- package/dist/bus/adapters/index.js +1 -10
- package/dist/bus/adapters/index.js.map +1 -1
- package/dist/bus/event-log.d.ts +16 -0
- package/dist/bus/event-log.js +121 -0
- package/dist/bus/event-log.js.map +1 -0
- package/dist/bus/events.d.ts +383 -25
- package/dist/bus/index.d.ts +8 -7
- package/dist/bus/index.js +69 -13
- package/dist/bus/index.js.map +1 -1
- package/dist/bus/orchestrator/cheap-verify.d.ts +33 -0
- package/dist/bus/orchestrator/cheap-verify.js +204 -0
- package/dist/bus/orchestrator/cheap-verify.js.map +1 -0
- package/dist/bus/orchestrator/patch-dispatcher.d.ts +9 -0
- package/dist/bus/orchestrator/patch-dispatcher.js +122 -0
- package/dist/bus/orchestrator/patch-dispatcher.js.map +1 -0
- package/dist/bus/orchestrator/poc-dispatcher.d.ts +11 -0
- package/dist/bus/orchestrator/poc-dispatcher.js +93 -0
- package/dist/bus/orchestrator/poc-dispatcher.js.map +1 -0
- package/dist/bus/orchestrator/task-policy.d.ts +14 -0
- package/dist/bus/orchestrator/task-policy.js +169 -0
- package/dist/bus/orchestrator/task-policy.js.map +1 -0
- package/dist/bus/orchestrator/triage-dispatcher.d.ts +20 -0
- package/dist/bus/orchestrator/triage-dispatcher.js +172 -0
- package/dist/bus/orchestrator/triage-dispatcher.js.map +1 -0
- package/dist/bus/orchestrator/types.d.ts +168 -0
- package/dist/bus/orchestrator/types.js +2 -0
- package/dist/bus/orchestrator/types.js.map +1 -0
- package/dist/bus/orchestrator/verification-dispatcher.d.ts +14 -0
- package/dist/bus/orchestrator/verification-dispatcher.js +150 -0
- package/dist/bus/orchestrator/verification-dispatcher.js.map +1 -0
- package/dist/bus/orchestrator/verify-gate.d.ts +50 -0
- package/dist/bus/orchestrator/verify-gate.js +363 -0
- package/dist/bus/orchestrator/verify-gate.js.map +1 -0
- package/dist/bus/orchestrator.d.ts +72 -9
- package/dist/bus/orchestrator.js +2001 -421
- package/dist/bus/orchestrator.js.map +1 -1
- package/dist/bus/task-execution.d.ts +17 -0
- package/dist/bus/task-execution.js +228 -0
- package/dist/bus/task-execution.js.map +1 -0
- package/dist/bus/workers/audit-worker.js +6 -5
- package/dist/bus/workers/audit-worker.js.map +1 -1
- package/dist/bus/workers/dynamic-analysis-worker.d.ts +14 -0
- package/dist/bus/workers/dynamic-analysis-worker.js +268 -0
- package/dist/bus/workers/dynamic-analysis-worker.js.map +1 -0
- package/dist/bus/workers/github-worker.d.ts +13 -0
- package/dist/bus/workers/github-worker.js +131 -0
- package/dist/bus/workers/github-worker.js.map +1 -0
- package/dist/bus/workers/patch-verify-worker.d.ts +16 -0
- package/dist/bus/workers/patch-verify-worker.js +103 -0
- package/dist/bus/workers/patch-verify-worker.js.map +1 -0
- package/dist/bus/workers/patch-worker.d.ts +15 -0
- package/dist/bus/workers/patch-worker.js +48 -0
- package/dist/bus/workers/patch-worker.js.map +1 -0
- package/dist/bus/workers/poc-executor-worker.d.ts +7 -0
- package/dist/bus/workers/poc-executor-worker.js +33 -0
- package/dist/bus/workers/poc-executor-worker.js.map +1 -0
- package/dist/bus/workers/poc-harness-worker.d.ts +2 -0
- package/dist/bus/workers/poc-harness-worker.js +150 -49
- package/dist/bus/workers/poc-harness-worker.js.map +1 -1
- package/dist/bus/workers/report-worker.js +92 -44
- package/dist/bus/workers/report-worker.js.map +1 -1
- package/dist/bus/workers/scan-worker.d.ts +8 -6
- package/dist/bus/workers/scan-worker.js +144 -164
- package/dist/bus/workers/scan-worker.js.map +1 -1
- package/dist/bus/workers/store-worker.d.ts +9 -1
- package/dist/bus/workers/store-worker.js +79 -3
- package/dist/bus/workers/store-worker.js.map +1 -1
- package/dist/bus/workers/taint-analysis-artifact-worker.d.ts +9 -0
- package/dist/bus/workers/taint-analysis-artifact-worker.js +99 -0
- package/dist/bus/workers/taint-analysis-artifact-worker.js.map +1 -0
- package/dist/bus/workers/taint-analysis-refinement-worker.d.ts +29 -0
- package/dist/bus/workers/taint-analysis-refinement-worker.js +304 -0
- package/dist/bus/workers/taint-analysis-refinement-worker.js.map +1 -0
- package/dist/bus/workers/triage-worker.d.ts +19 -3
- package/dist/bus/workers/triage-worker.js +362 -55
- package/dist/bus/workers/triage-worker.js.map +1 -1
- package/dist/bus/workers/variant-analysis-worker.d.ts +26 -0
- package/dist/bus/workers/variant-analysis-worker.js +97 -0
- package/dist/bus/workers/variant-analysis-worker.js.map +1 -0
- package/dist/bus/workers/verification-worker.d.ts +8 -0
- package/dist/bus/workers/verification-worker.js +277 -48
- package/dist/bus/workers/verification-worker.js.map +1 -1
- package/dist/bypass-knowledge.d.ts +14 -0
- package/dist/bypass-knowledge.js +152 -0
- package/dist/bypass-knowledge.js.map +1 -0
- package/dist/cache.d.ts +48 -0
- package/dist/cache.js +157 -0
- package/dist/cache.js.map +1 -0
- package/dist/capabilities.d.ts +22 -0
- package/dist/capabilities.js +351 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/cli/commands/monorepo-scan.d.ts +8 -0
- package/dist/cli/commands/monorepo-scan.js +636 -0
- package/dist/cli/commands/monorepo-scan.js.map +1 -0
- package/dist/cli/commands/scan.d.ts +53 -0
- package/dist/cli/commands/scan.js +398 -0
- package/dist/cli/commands/scan.js.map +1 -0
- package/dist/cli/errors.d.ts +14 -0
- package/dist/cli/errors.js +37 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/pi-ai.d.ts +16 -0
- package/dist/cli/pi-ai.js +165 -0
- package/dist/cli/pi-ai.js.map +1 -0
- package/dist/cli/scan-config.d.ts +74 -0
- package/dist/cli/scan-config.js +243 -0
- package/dist/cli/scan-config.js.map +1 -0
- package/dist/cli/shared.d.ts +8 -0
- package/dist/cli/shared.js +27 -0
- package/dist/cli/shared.js.map +1 -0
- package/dist/cli.js +417 -413
- package/dist/cli.js.map +1 -1
- package/dist/confidence-calibration.d.ts +53 -0
- package/dist/confidence-calibration.js +192 -0
- package/dist/confidence-calibration.js.map +1 -0
- package/dist/config/defaults.d.ts +5 -0
- package/dist/config/defaults.js +166 -0
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/paths.d.ts +7 -0
- package/dist/config/paths.js +32 -0
- package/dist/config/paths.js.map +1 -0
- package/dist/config/presets.d.ts +4 -0
- package/dist/config/presets.js +83 -0
- package/dist/config/presets.js.map +1 -0
- package/dist/config/validation.d.ts +11 -0
- package/dist/config/validation.js +86 -0
- package/dist/config/validation.js.map +1 -0
- package/dist/config-io.d.ts +16 -0
- package/dist/config-io.js +70 -0
- package/dist/config-io.js.map +1 -0
- package/dist/config.d.ts +9 -9
- package/dist/config.js +795 -367
- package/dist/config.js.map +1 -1
- package/dist/context.js +3 -0
- package/dist/context.js.map +1 -1
- package/dist/crypto-behavioral/harness-generator.d.ts +37 -0
- package/dist/crypto-behavioral/harness-generator.js +141 -0
- package/dist/crypto-behavioral/harness-generator.js.map +1 -0
- package/dist/crypto-behavioral/harness-prompts.d.ts +16 -0
- package/dist/crypto-behavioral/harness-prompts.js +188 -0
- package/dist/crypto-behavioral/harness-prompts.js.map +1 -0
- package/dist/crypto-behavioral/index.d.ts +4 -0
- package/dist/crypto-behavioral/index.js +5 -0
- package/dist/crypto-behavioral/index.js.map +1 -0
- package/dist/crypto-behavioral/result-parser.d.ts +14 -0
- package/dist/crypto-behavioral/result-parser.js +159 -0
- package/dist/crypto-behavioral/result-parser.js.map +1 -0
- package/dist/crypto-behavioral/types.d.ts +72 -0
- package/dist/crypto-behavioral/types.js +2 -0
- package/dist/crypto-behavioral/types.js.map +1 -0
- package/dist/discovery/adapters/bazel-adapter.d.ts +5 -0
- package/dist/discovery/adapters/bazel-adapter.js +215 -0
- package/dist/discovery/adapters/bazel-adapter.js.map +1 -0
- package/dist/discovery/adapters/go-adapter.d.ts +5 -0
- package/dist/discovery/adapters/go-adapter.js +152 -0
- package/dist/discovery/adapters/go-adapter.js.map +1 -0
- package/dist/discovery/adapters/msvs-adapter.d.ts +5 -0
- package/dist/discovery/adapters/msvs-adapter.js +96 -0
- package/dist/discovery/adapters/msvs-adapter.js.map +1 -0
- package/dist/discovery/adapters/native-adapter.d.ts +5 -0
- package/dist/discovery/adapters/native-adapter.js +59 -0
- package/dist/discovery/adapters/native-adapter.js.map +1 -0
- package/dist/discovery/adapters/node-adapter.d.ts +5 -0
- package/dist/discovery/adapters/node-adapter.js +218 -0
- package/dist/discovery/adapters/node-adapter.js.map +1 -0
- package/dist/discovery/adapters/rust-adapter.d.ts +5 -0
- package/dist/discovery/adapters/rust-adapter.js +142 -0
- package/dist/discovery/adapters/rust-adapter.js.map +1 -0
- package/dist/discovery/adapters/types.d.ts +25 -0
- package/dist/discovery/adapters/types.js +2 -0
- package/dist/discovery/adapters/types.js.map +1 -0
- package/dist/discovery/graph.d.ts +18 -0
- package/dist/discovery/graph.js +338 -0
- package/dist/discovery/graph.js.map +1 -0
- package/dist/discovery/helpers.d.ts +29 -0
- package/dist/discovery/helpers.js +278 -0
- package/dist/discovery/helpers.js.map +1 -0
- package/dist/discovery/llm-refinement.d.ts +17 -0
- package/dist/discovery/llm-refinement.js +311 -0
- package/dist/discovery/llm-refinement.js.map +1 -0
- package/dist/discovery/repo-discovery.d.ts +14 -0
- package/dist/discovery/repo-discovery.js +116 -0
- package/dist/discovery/repo-discovery.js.map +1 -0
- package/dist/discovery/types.d.ts +46 -0
- package/dist/discovery/types.js +2 -0
- package/dist/discovery/types.js.map +1 -0
- package/dist/discovery/workspace-clustering.d.ts +19 -0
- package/dist/discovery/workspace-clustering.js +281 -0
- package/dist/discovery/workspace-clustering.js.map +1 -0
- package/dist/errors.d.ts +67 -0
- package/dist/errors.js +164 -0
- package/dist/errors.js.map +1 -0
- package/dist/findings/taint-path.d.ts +4 -0
- package/dist/findings/taint-path.js +50 -0
- package/dist/findings/taint-path.js.map +1 -0
- package/dist/hooks/chain.d.ts +28 -0
- package/dist/hooks/chain.js +58 -0
- package/dist/hooks/chain.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/loader.d.ts +7 -0
- package/dist/hooks/loader.js +41 -0
- package/dist/hooks/loader.js.map +1 -0
- package/dist/hooks/types.d.ts +33 -0
- package/dist/hooks/types.js +2 -0
- package/dist/hooks/types.js.map +1 -0
- package/dist/http-agent.d.ts +39 -0
- package/dist/http-agent.js +170 -0
- package/dist/http-agent.js.map +1 -0
- package/dist/incremental.d.ts +32 -0
- package/dist/incremental.js +99 -0
- package/dist/incremental.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/invariant.d.ts +7 -0
- package/dist/invariant.js +13 -0
- package/dist/invariant.js.map +1 -0
- package/dist/knowledge/index.d.ts +7 -0
- package/dist/knowledge/index.js +36 -0
- package/dist/knowledge/index.js.map +1 -0
- package/dist/knowledge/modules/auth-bypass.d.ts +2 -0
- package/dist/knowledge/modules/auth-bypass.js +47 -0
- package/dist/knowledge/modules/auth-bypass.js.map +1 -0
- package/dist/knowledge/modules/command-injection.d.ts +2 -0
- package/dist/knowledge/modules/command-injection.js +47 -0
- package/dist/knowledge/modules/command-injection.js.map +1 -0
- package/dist/knowledge/modules/crypto.d.ts +2 -0
- package/dist/knowledge/modules/crypto.js +44 -0
- package/dist/knowledge/modules/crypto.js.map +1 -0
- package/dist/knowledge/modules/deserialization.d.ts +2 -0
- package/dist/knowledge/modules/deserialization.js +47 -0
- package/dist/knowledge/modules/deserialization.js.map +1 -0
- package/dist/knowledge/modules/file-upload.d.ts +2 -0
- package/dist/knowledge/modules/file-upload.js +45 -0
- package/dist/knowledge/modules/file-upload.js.map +1 -0
- package/dist/knowledge/modules/idor.d.ts +2 -0
- package/dist/knowledge/modules/idor.js +43 -0
- package/dist/knowledge/modules/idor.js.map +1 -0
- package/dist/knowledge/modules/nosql-injection.d.ts +2 -0
- package/dist/knowledge/modules/nosql-injection.js +40 -0
- package/dist/knowledge/modules/nosql-injection.js.map +1 -0
- package/dist/knowledge/modules/path-traversal.d.ts +2 -0
- package/dist/knowledge/modules/path-traversal.js +40 -0
- package/dist/knowledge/modules/path-traversal.js.map +1 -0
- package/dist/knowledge/modules/race-condition.d.ts +2 -0
- package/dist/knowledge/modules/race-condition.js +41 -0
- package/dist/knowledge/modules/race-condition.js.map +1 -0
- package/dist/knowledge/modules/sqli.d.ts +2 -0
- package/dist/knowledge/modules/sqli.js +42 -0
- package/dist/knowledge/modules/sqli.js.map +1 -0
- package/dist/knowledge/modules/ssrf.d.ts +2 -0
- package/dist/knowledge/modules/ssrf.js +42 -0
- package/dist/knowledge/modules/ssrf.js.map +1 -0
- package/dist/knowledge/modules/xss.d.ts +2 -0
- package/dist/knowledge/modules/xss.js +54 -0
- package/dist/knowledge/modules/xss.js.map +1 -0
- package/dist/knowledge/modules/xxe.d.ts +2 -0
- package/dist/knowledge/modules/xxe.js +45 -0
- package/dist/knowledge/modules/xxe.js.map +1 -0
- package/dist/knowledge/registry.d.ts +17 -0
- package/dist/knowledge/registry.js +144 -0
- package/dist/knowledge/registry.js.map +1 -0
- package/dist/knowledge/types.d.ts +64 -0
- package/dist/knowledge/types.js +6 -0
- package/dist/knowledge/types.js.map +1 -0
- package/dist/lifecycle.d.ts +23 -0
- package/dist/lifecycle.js +68 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/logger.d.ts +38 -0
- package/dist/logger.js +115 -0
- package/dist/logger.js.map +1 -0
- package/dist/migrations/001_initial_schema.d.ts +7 -0
- package/dist/migrations/001_initial_schema.js +50 -0
- package/dist/migrations/001_initial_schema.js.map +1 -0
- package/dist/migrations/002_add_scanner_column.d.ts +3 -0
- package/dist/migrations/002_add_scanner_column.js +14 -0
- package/dist/migrations/002_add_scanner_column.js.map +1 -0
- package/dist/migrations/003_add_triage_cost_column.d.ts +3 -0
- package/dist/migrations/003_add_triage_cost_column.js +12 -0
- package/dist/migrations/003_add_triage_cost_column.js.map +1 -0
- package/dist/migrations/004_add_triage_details_column.d.ts +3 -0
- package/dist/migrations/004_add_triage_details_column.js +12 -0
- package/dist/migrations/004_add_triage_details_column.js.map +1 -0
- package/dist/migrations/005_add_verification_columns.d.ts +3 -0
- package/dist/migrations/005_add_verification_columns.js +24 -0
- package/dist/migrations/005_add_verification_columns.js.map +1 -0
- package/dist/migrations/006_add_poc_harness_columns.d.ts +3 -0
- package/dist/migrations/006_add_poc_harness_columns.js +24 -0
- package/dist/migrations/006_add_poc_harness_columns.js.map +1 -0
- package/dist/migrations/007_add_poc_execution_columns.d.ts +3 -0
- package/dist/migrations/007_add_poc_execution_columns.js +22 -0
- package/dist/migrations/007_add_poc_execution_columns.js.map +1 -0
- package/dist/migrations/008_pipeline_runs_status_values.d.ts +8 -0
- package/dist/migrations/008_pipeline_runs_status_values.js +72 -0
- package/dist/migrations/008_pipeline_runs_status_values.js.map +1 -0
- package/dist/migrations/009_add_pipeline_runs_context.d.ts +3 -0
- package/dist/migrations/009_add_pipeline_runs_context.js +12 -0
- package/dist/migrations/009_add_pipeline_runs_context.js.map +1 -0
- package/dist/migrations/010_add_calibration_schema.d.ts +3 -0
- package/dist/migrations/010_add_calibration_schema.js +26 -0
- package/dist/migrations/010_add_calibration_schema.js.map +1 -0
- package/dist/migrations/011_add_trajectories_table.d.ts +3 -0
- package/dist/migrations/011_add_trajectories_table.js +27 -0
- package/dist/migrations/011_add_trajectories_table.js.map +1 -0
- package/dist/migrations/012_add_finding_provenance_columns.d.ts +3 -0
- package/dist/migrations/012_add_finding_provenance_columns.js +19 -0
- package/dist/migrations/012_add_finding_provenance_columns.js.map +1 -0
- package/dist/migrations/013_add_composite_confidence_columns.d.ts +3 -0
- package/dist/migrations/013_add_composite_confidence_columns.js +16 -0
- package/dist/migrations/013_add_composite_confidence_columns.js.map +1 -0
- package/dist/migrations/014_add_metrics_column.d.ts +3 -0
- package/dist/migrations/014_add_metrics_column.js +13 -0
- package/dist/migrations/014_add_metrics_column.js.map +1 -0
- package/dist/migrations/015_add_assertion_tracking.d.ts +2 -0
- package/dist/migrations/015_add_assertion_tracking.js +31 -0
- package/dist/migrations/015_add_assertion_tracking.js.map +1 -0
- package/dist/migrations/016_add_structured_finding_evidence.d.ts +5 -0
- package/dist/migrations/016_add_structured_finding_evidence.js +21 -0
- package/dist/migrations/016_add_structured_finding_evidence.js.map +1 -0
- package/dist/migrations/017_add_dynamic_and_patch_persistence.d.ts +5 -0
- package/dist/migrations/017_add_dynamic_and_patch_persistence.js +69 -0
- package/dist/migrations/017_add_dynamic_and_patch_persistence.js.map +1 -0
- package/dist/migrations/018_add_crypto_behavioral_runs.d.ts +2 -0
- package/dist/migrations/018_add_crypto_behavioral_runs.js +40 -0
- package/dist/migrations/018_add_crypto_behavioral_runs.js.map +1 -0
- package/dist/migrations/019_add_code_graph_tables.d.ts +2 -0
- package/dist/migrations/019_add_code_graph_tables.js +72 -0
- package/dist/migrations/019_add_code_graph_tables.js.map +1 -0
- package/dist/migrations/020_add_verified_patch_status.d.ts +6 -0
- package/dist/migrations/020_add_verified_patch_status.js +38 -0
- package/dist/migrations/020_add_verified_patch_status.js.map +1 -0
- package/dist/migrations/021_add_incremental_scanning_support.d.ts +2 -0
- package/dist/migrations/021_add_incremental_scanning_support.js +13 -0
- package/dist/migrations/021_add_incremental_scanning_support.js.map +1 -0
- package/dist/migrations/022_add_verdict_index.d.ts +2 -0
- package/dist/migrations/022_add_verdict_index.js +8 -0
- package/dist/migrations/022_add_verdict_index.js.map +1 -0
- package/dist/migrations/023_expand_pipeline_status_constraint.d.ts +6 -0
- package/dist/migrations/023_expand_pipeline_status_constraint.js +58 -0
- package/dist/migrations/023_expand_pipeline_status_constraint.js.map +1 -0
- package/dist/migrations/index.d.ts +5 -0
- package/dist/migrations/index.js +51 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/runner.d.ts +15 -0
- package/dist/migrations/runner.js +154 -0
- package/dist/migrations/runner.js.map +1 -0
- package/dist/migrations/types.d.ts +10 -0
- package/dist/migrations/types.js +2 -0
- package/dist/migrations/types.js.map +1 -0
- package/dist/monorepo/architectural-analysis.d.ts +30 -0
- package/dist/monorepo/architectural-analysis.js +429 -0
- package/dist/monorepo/architectural-analysis.js.map +1 -0
- package/dist/monorepo/attack-surface.d.ts +20 -0
- package/dist/monorepo/attack-surface.js +238 -0
- package/dist/monorepo/attack-surface.js.map +1 -0
- package/dist/monorepo/boundary-manifest.d.ts +4 -0
- package/dist/monorepo/boundary-manifest.js +96 -0
- package/dist/monorepo/boundary-manifest.js.map +1 -0
- package/dist/monorepo/budget-controller.d.ts +19 -0
- package/dist/monorepo/budget-controller.js +121 -0
- package/dist/monorepo/budget-controller.js.map +1 -0
- package/dist/monorepo/context-index.d.ts +3 -0
- package/dist/monorepo/context-index.js +96 -0
- package/dist/monorepo/context-index.js.map +1 -0
- package/dist/monorepo/cross-module-tracing.d.ts +35 -0
- package/dist/monorepo/cross-module-tracing.js +251 -0
- package/dist/monorepo/cross-module-tracing.js.map +1 -0
- package/dist/monorepo/dependency-graph.d.ts +28 -0
- package/dist/monorepo/dependency-graph.js +219 -0
- package/dist/monorepo/dependency-graph.js.map +1 -0
- package/dist/monorepo/types.d.ts +139 -0
- package/dist/monorepo/types.js +10 -0
- package/dist/monorepo/types.js.map +1 -0
- package/dist/multi-agent-triage.d.ts +31 -0
- package/dist/multi-agent-triage.js +430 -0
- package/dist/multi-agent-triage.js.map +1 -0
- package/dist/parameter-risk.d.ts +17 -0
- package/dist/parameter-risk.js +103 -0
- package/dist/parameter-risk.js.map +1 -0
- package/dist/patch.d.ts +31 -0
- package/dist/patch.js +505 -0
- package/dist/patch.js.map +1 -0
- package/dist/poc-executor/docker.d.ts +15 -0
- package/dist/poc-executor/docker.js +123 -0
- package/dist/poc-executor/docker.js.map +1 -0
- package/dist/poc-executor/index.d.ts +10 -0
- package/dist/poc-executor/index.js +23 -0
- package/dist/poc-executor/index.js.map +1 -0
- package/dist/poc-executor/process.d.ts +14 -0
- package/dist/poc-executor/process.js +76 -0
- package/dist/poc-executor/process.js.map +1 -0
- package/dist/poc-executor/types.d.ts +19 -0
- package/dist/poc-executor/types.js +6 -0
- package/dist/poc-executor/types.js.map +1 -0
- package/dist/poc-harness.d.ts +7 -10
- package/dist/poc-harness.js +136 -156
- package/dist/poc-harness.js.map +1 -1
- package/dist/precedents.d.ts +17 -0
- package/dist/precedents.js +93 -0
- package/dist/precedents.js.map +1 -0
- package/dist/prompts/bootstrap.d.ts +29 -0
- package/dist/prompts/bootstrap.js +80 -0
- package/dist/prompts/bootstrap.js.map +1 -0
- package/dist/prompts/context.d.ts +79 -0
- package/dist/prompts/context.js +127 -0
- package/dist/prompts/context.js.map +1 -0
- package/dist/prompts/index.d.ts +7 -0
- package/dist/prompts/index.js +7 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/loader.d.ts +10 -0
- package/dist/prompts/loader.js +30 -0
- package/dist/prompts/loader.js.map +1 -0
- package/dist/prompts/modules.d.ts +53 -0
- package/dist/prompts/modules.js +176 -0
- package/dist/prompts/modules.js.map +1 -0
- package/dist/prompts/prompt-report.d.ts +34 -0
- package/dist/prompts/prompt-report.js +97 -0
- package/dist/prompts/prompt-report.js.map +1 -0
- package/dist/prompts/sanitize.d.ts +20 -0
- package/dist/prompts/sanitize.js +92 -0
- package/dist/prompts/sanitize.js.map +1 -0
- package/dist/prompts/template.d.ts +45 -0
- package/dist/prompts/template.js +385 -0
- package/dist/prompts/template.js.map +1 -0
- package/dist/prompts/templates/triage.d.ts +48 -0
- package/dist/prompts/templates/triage.js +151 -0
- package/dist/prompts/templates/triage.js.map +1 -0
- package/dist/prompts/templates/verify.d.ts +68 -0
- package/dist/prompts/templates/verify.js +256 -0
- package/dist/prompts/templates/verify.js.map +1 -0
- package/dist/prompts/tool-policy.d.ts +55 -0
- package/dist/prompts/tool-policy.js +142 -0
- package/dist/prompts/tool-policy.js.map +1 -0
- package/dist/quality-gate.d.ts +28 -0
- package/dist/quality-gate.js +65 -0
- package/dist/quality-gate.js.map +1 -0
- package/dist/repo-context.d.ts +6 -0
- package/dist/repo-context.js +190 -0
- package/dist/repo-context.js.map +1 -0
- package/dist/repo-walk.d.ts +12 -0
- package/dist/repo-walk.js +57 -0
- package/dist/repo-walk.js.map +1 -0
- package/dist/report-csv.d.ts +9 -0
- package/dist/report-csv.js +69 -0
- package/dist/report-csv.js.map +1 -0
- package/dist/report-json.d.ts +8 -0
- package/dist/report-json.js +91 -0
- package/dist/report-json.js.map +1 -0
- package/dist/report-jsonl.d.ts +9 -0
- package/dist/report-jsonl.js +74 -0
- package/dist/report-jsonl.js.map +1 -0
- package/dist/report-markdown.d.ts +1 -1
- package/dist/report-markdown.js +191 -21
- package/dist/report-markdown.js.map +1 -1
- package/dist/report-monorepo.d.ts +21 -0
- package/dist/report-monorepo.js +96 -0
- package/dist/report-monorepo.js.map +1 -0
- package/dist/report-sarif.d.ts +1 -1
- package/dist/report-sarif.js +81 -25
- package/dist/report-sarif.js.map +1 -1
- package/dist/report.d.ts +8 -3
- package/dist/report.js +283 -13
- package/dist/report.js.map +1 -1
- package/dist/retry.d.ts +7 -0
- package/dist/retry.js +68 -1
- package/dist/retry.js.map +1 -1
- package/dist/scanner-cache.d.ts +44 -0
- package/dist/scanner-cache.js +124 -0
- package/dist/scanner-cache.js.map +1 -0
- package/dist/scanners/agentic.d.ts +5 -3
- package/dist/scanners/agentic.js +47 -6
- package/dist/scanners/agentic.js.map +1 -1
- package/dist/scanners/codeql.d.ts +5 -3
- package/dist/scanners/codeql.js +38 -5
- package/dist/scanners/codeql.js.map +1 -1
- package/dist/scanners/dedup.d.ts +15 -0
- package/dist/scanners/dedup.js +132 -0
- package/dist/scanners/dedup.js.map +1 -0
- package/dist/scanners/design-decision-classifier.d.ts +29 -0
- package/dist/scanners/design-decision-classifier.js +164 -0
- package/dist/scanners/design-decision-classifier.js.map +1 -0
- package/dist/scanners/finding-selection.d.ts +2 -3
- package/dist/scanners/finding-selection.js +5 -115
- package/dist/scanners/finding-selection.js.map +1 -1
- package/dist/scanners/fp-filter.d.ts +17 -0
- package/dist/scanners/fp-filter.js +167 -0
- package/dist/scanners/fp-filter.js.map +1 -0
- package/dist/scanners/llm-rescore.d.ts +21 -0
- package/dist/scanners/llm-rescore.js +332 -0
- package/dist/scanners/llm-rescore.js.map +1 -0
- package/dist/scanners/normalization.d.ts +19 -0
- package/dist/scanners/normalization.js +254 -0
- package/dist/scanners/normalization.js.map +1 -0
- package/dist/scanners/normalize-findings.d.ts +86 -0
- package/dist/scanners/{run-claude-adk.js → normalize-findings.js} +77 -119
- package/dist/scanners/normalize-findings.js.map +1 -0
- package/dist/scanners/registry.d.ts +5 -5
- package/dist/scanners/registry.js +20 -6
- package/dist/scanners/registry.js.map +1 -1
- package/dist/scanners/resolve-codeql.js +1 -1
- package/dist/scanners/resolve-codeql.js.map +1 -1
- package/dist/scanners/resolve-semgrep.js +45 -8
- package/dist/scanners/resolve-semgrep.js.map +1 -1
- package/dist/scanners/run-agentic.d.ts +6 -19
- package/dist/scanners/run-agentic.js +106 -205
- package/dist/scanners/run-agentic.js.map +1 -1
- package/dist/scanners/run-codeql.d.ts +14 -0
- package/dist/scanners/run-codeql.js +192 -17
- package/dist/scanners/run-codeql.js.map +1 -1
- package/dist/scanners/run-semgrep.d.ts +1 -1
- package/dist/scanners/run-semgrep.js +45 -15
- package/dist/scanners/run-semgrep.js.map +1 -1
- package/dist/scanners/scoring.d.ts +4 -1
- package/dist/scanners/scoring.js +78 -5
- package/dist/scanners/scoring.js.map +1 -1
- package/dist/scanners/semgrep.d.ts +3 -3
- package/dist/scanners/semgrep.js +25 -5
- package/dist/scanners/semgrep.js.map +1 -1
- package/dist/scanners/types.d.ts +40 -7
- package/dist/scheduler/index.d.ts +27 -0
- package/dist/scheduler/index.js +45 -0
- package/dist/scheduler/index.js.map +1 -0
- package/dist/scheduler/rate-limit-registry.d.ts +48 -0
- package/dist/scheduler/rate-limit-registry.js +282 -0
- package/dist/scheduler/rate-limit-registry.js.map +1 -0
- package/dist/scheduler/types.d.ts +55 -0
- package/dist/scheduler/types.js +2 -0
- package/dist/scheduler/types.js.map +1 -0
- package/dist/schemas.d.ts +1133 -0
- package/dist/schemas.js +779 -0
- package/dist/schemas.js.map +1 -0
- package/dist/scoring/composite-confidence.d.ts +51 -0
- package/dist/scoring/composite-confidence.js +102 -0
- package/dist/scoring/composite-confidence.js.map +1 -0
- package/dist/scoring/prompt-versioning.d.ts +4 -0
- package/dist/scoring/prompt-versioning.js +8 -0
- package/dist/scoring/prompt-versioning.js.map +1 -0
- package/dist/scoring/run-metrics.d.ts +80 -0
- package/dist/scoring/run-metrics.js +234 -0
- package/dist/scoring/run-metrics.js.map +1 -0
- package/dist/scoring/triage-assertions.d.ts +96 -0
- package/dist/scoring/triage-assertions.js +390 -0
- package/dist/scoring/triage-assertions.js.map +1 -0
- package/dist/security-profiles.d.ts +21 -0
- package/dist/security-profiles.js +82 -0
- package/dist/security-profiles.js.map +1 -0
- package/dist/store/crypto-behavioral.d.ts +4 -0
- package/dist/store/crypto-behavioral.js +54 -0
- package/dist/store/crypto-behavioral.js.map +1 -0
- package/dist/store/dynamic-analysis.d.ts +5 -0
- package/dist/store/dynamic-analysis.js +70 -0
- package/dist/store/dynamic-analysis.js.map +1 -0
- package/dist/store/patch-results.d.ts +6 -0
- package/dist/store/patch-results.js +63 -0
- package/dist/store/patch-results.js.map +1 -0
- package/dist/store.d.ts +140 -21
- package/dist/store.js +796 -245
- package/dist/store.js.map +1 -1
- package/dist/strategies/auto-rule.d.ts +19 -0
- package/dist/strategies/auto-rule.js +282 -0
- package/dist/strategies/auto-rule.js.map +1 -0
- package/dist/strategies/cwe-strategy-map.d.ts +13 -0
- package/dist/strategies/cwe-strategy-map.js +144 -0
- package/dist/strategies/cwe-strategy-map.js.map +1 -0
- package/dist/strategies/dataflow/index.d.ts +3 -0
- package/dist/strategies/dataflow/index.js +143 -0
- package/dist/strategies/dataflow/index.js.map +1 -0
- package/dist/strategies/execution/index.d.ts +3 -0
- package/dist/strategies/execution/index.js +132 -0
- package/dist/strategies/execution/index.js.map +1 -0
- package/dist/strategies/executor.d.ts +15 -0
- package/dist/strategies/executor.js +86 -0
- package/dist/strategies/executor.js.map +1 -0
- package/dist/strategies/index.d.ts +8 -0
- package/dist/strategies/index.js +8 -0
- package/dist/strategies/index.js.map +1 -0
- package/dist/strategies/init.d.ts +3 -0
- package/dist/strategies/init.js +35 -0
- package/dist/strategies/init.js.map +1 -0
- package/dist/strategies/merge.d.ts +12 -0
- package/dist/strategies/merge.js +118 -0
- package/dist/strategies/merge.js.map +1 -0
- package/dist/strategies/multi-strategy-task.d.ts +9 -0
- package/dist/strategies/multi-strategy-task.js +80 -0
- package/dist/strategies/multi-strategy-task.js.map +1 -0
- package/dist/strategies/reasoning/index.d.ts +3 -0
- package/dist/strategies/reasoning/index.js +155 -0
- package/dist/strategies/reasoning/index.js.map +1 -0
- package/dist/strategies/registry.d.ts +14 -0
- package/dist/strategies/registry.js +26 -0
- package/dist/strategies/registry.js.map +1 -0
- package/dist/strategies/rule-persistence.d.ts +16 -0
- package/dist/strategies/rule-persistence.js +54 -0
- package/dist/strategies/rule-persistence.js.map +1 -0
- package/dist/strategies/syntactic/index.d.ts +2 -0
- package/dist/strategies/syntactic/index.js +136 -0
- package/dist/strategies/syntactic/index.js.map +1 -0
- package/dist/strategies/task-profile-map.d.ts +5 -0
- package/dist/strategies/task-profile-map.js +26 -0
- package/dist/strategies/task-profile-map.js.map +1 -0
- package/dist/strategies/types.d.ts +60 -0
- package/dist/strategies/types.js +2 -0
- package/dist/strategies/types.js.map +1 -0
- package/dist/streaming.d.ts +11 -0
- package/dist/streaming.js +181 -0
- package/dist/streaming.js.map +1 -0
- package/dist/task-output-meta.d.ts +11 -0
- package/dist/task-output-meta.js +24 -0
- package/dist/task-output-meta.js.map +1 -0
- package/dist/trajectory-memory.d.ts +90 -0
- package/dist/trajectory-memory.js +275 -0
- package/dist/trajectory-memory.js.map +1 -0
- package/dist/triage.d.ts +257 -20
- package/dist/triage.js +505 -190
- package/dist/triage.js.map +1 -1
- package/dist/types.d.ts +528 -22
- package/dist/types.js +2 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/safe-json.d.ts +31 -0
- package/dist/utils/safe-json.js +70 -0
- package/dist/utils/safe-json.js.map +1 -0
- package/dist/utils.d.ts +3 -1
- package/dist/utils.js +8 -2
- package/dist/utils.js.map +1 -1
- package/dist/verify.d.ts +100 -11
- package/dist/verify.js +331 -181
- package/dist/verify.js.map +1 -1
- package/package.json +41 -8
- package/dist/agents/tasks/augur-analyze.d.ts +0 -22
- package/dist/agents/tasks/augur-analyze.js +0 -418
- package/dist/agents/tasks/augur-analyze.js.map +0 -1
- package/dist/agents/tasks/augur-extraction-agent.js.map +0 -1
- package/dist/agents/tasks/augur-label.d.ts +0 -21
- package/dist/agents/tasks/augur-label.js +0 -627
- package/dist/agents/tasks/augur-label.js.map +0 -1
- package/dist/agents/tasks/augur-preflight.d.ts +0 -36
- package/dist/agents/tasks/augur-preflight.js +0 -471
- package/dist/agents/tasks/augur-preflight.js.map +0 -1
- package/dist/agents/tasks/augur-types.d.ts +0 -111
- package/dist/agents/tasks/augur-types.js +0 -169
- package/dist/agents/tasks/augur-types.js.map +0 -1
- package/dist/bus/adapters/google-pubsub.d.ts +0 -13
- package/dist/bus/adapters/google-pubsub.js +0 -26
- package/dist/bus/adapters/google-pubsub.js.map +0 -1
- package/dist/bus/adapters/nats.d.ts +0 -13
- package/dist/bus/adapters/nats.js +0 -26
- package/dist/bus/adapters/nats.js.map +0 -1
- package/dist/bus/adapters/redis.d.ts +0 -13
- package/dist/bus/adapters/redis.js +0 -26
- package/dist/bus/adapters/redis.js.map +0 -1
- package/dist/deps.d.ts +0 -15
- package/dist/deps.js +0 -18
- package/dist/deps.js.map +0 -1
- package/dist/llm/anthropic.d.ts +0 -3
- package/dist/llm/anthropic.js +0 -21
- package/dist/llm/anthropic.js.map +0 -1
- package/dist/scanner/claude-adk.d.ts +0 -26
- package/dist/scanner/claude-adk.js +0 -265
- package/dist/scanner/claude-adk.js.map +0 -1
- package/dist/scanner/resolve.d.ts +0 -10
- package/dist/scanner/resolve.js +0 -99
- package/dist/scanner/resolve.js.map +0 -1
- package/dist/scanner.d.ts +0 -47
- package/dist/scanner.js +0 -123
- package/dist/scanner.js.map +0 -1
- package/dist/scanners/claude-adk.d.ts +0 -11
- package/dist/scanners/claude-adk.js +0 -74
- package/dist/scanners/claude-adk.js.map +0 -1
- package/dist/scanners/run-claude-adk.d.ts +0 -33
- package/dist/scanners/run-claude-adk.js.map +0 -1
- package/dist/scanners.d.ts +0 -25
- package/dist/scanners.js +0 -88
- package/dist/scanners.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,103 +1,246 @@
|
|
|
1
1
|
<img src="kuzushi.png" alt="Kuzushi" width="200" />
|
|
2
2
|
|
|
3
|
-
# Kuzushi —
|
|
3
|
+
# Kuzushi — AI Security Scanner That Only Shows You Real Vulnerabilities
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://github.com/allsmog/Kuzushi/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.npmjs.com/package/kuzushi)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
[kuzushi.dev](https://kuzushi.dev)
|
|
10
|
+
|
|
11
|
+
SAST tools cry wolf. Semgrep finds 500 issues in your codebase. 480 of them are false positives. You spend hours triaging a wall of noise and still miss the real vulnerability on line 247.
|
|
12
|
+
|
|
13
|
+
Kuzushi runs the same scanners, then sends an AI agent to investigate each finding — reading the actual code, tracing data flow, checking for sanitization. It tells you which findings are real, which are noise, and optionally proves exploitability by constructing a working PoC.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx kuzushi /path/to/your/repo
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
No config files. Just point it at a repo.
|
|
20
|
+
|
|
21
|
+
<!-- TODO: Add terminal recording / asciinema GIF here -->
|
|
6
22
|
|
|
7
23
|
## Quick Start
|
|
8
24
|
|
|
9
|
-
Prereqs: Node 22+, an API key
|
|
25
|
+
Prereqs: Node 22+, and either an API key or Claude Code OAuth login.
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
# Install globally (recommended — get upgrades with npm update -g kuzushi)
|
|
29
|
+
npm install -g kuzushi
|
|
30
|
+
|
|
31
|
+
# Or run without installing
|
|
32
|
+
npx kuzushi /path/to/your/repo
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
# With Claude Code OAuth (no API key needed — uses your Claude login)
|
|
37
|
+
kuzushi /path/to/your/repo
|
|
38
|
+
|
|
39
|
+
# With Anthropic API key
|
|
40
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
41
|
+
kuzushi /path/to/your/repo
|
|
42
|
+
|
|
43
|
+
# With OpenAI
|
|
44
|
+
export OPENAI_API_KEY=sk-...
|
|
45
|
+
kuzushi /path/to/repo --model openai:gpt-4o
|
|
46
|
+
|
|
47
|
+
# With Google, Groq, Mistral, or 15+ other providers
|
|
48
|
+
kuzushi /path/to/repo --model google:gemini-2.0-flash
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Kuzushi auto-downloads Opengrep if you don't have a scanner installed. Zero dependencies to manage.
|
|
10
52
|
|
|
11
|
-
|
|
53
|
+
## The Problem
|
|
12
54
|
|
|
13
|
-
|
|
14
|
-
2. Set it: `export ANTHROPIC_API_KEY=sk-ant-...`
|
|
15
|
-
3. Scan: `npx kuzushi /path/to/your/repo`
|
|
55
|
+
**SAST scanners alone** have high recall but terrible precision — they flag everything that *could* be a vulnerability, drowning you in false positives. Teams burn hours triaging, develop alert fatigue, and eventually stop looking.
|
|
16
56
|
|
|
17
|
-
**
|
|
57
|
+
**LLMs alone** can reason about code but hallucinate when scanning from scratch — 95%+ false positive rate when you ask "find vulnerabilities in this repo."
|
|
18
58
|
|
|
19
|
-
|
|
20
|
-
2. Scan: `npx kuzushi /path/to/repo --agent-runtime pi-ai --model openai:gpt-4o`
|
|
59
|
+
**Kuzushi combines both.** SAST signal narrows the search space. AI reasoning eliminates false positives. The result: near-human researcher agreement rates on vulnerability classification.
|
|
21
60
|
|
|
22
|
-
|
|
61
|
+
## What You Get
|
|
23
62
|
|
|
24
|
-
|
|
63
|
+
For each finding, Kuzushi produces:
|
|
25
64
|
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
- **
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- **Tracks cost** — per-finding triage, verification, and PoC harness costs are persisted and displayed in the summary
|
|
36
|
-
- **Event-driven pipeline** — pluggable message bus interface (in-process backend implemented; Redis/Google Pub/Sub/NATS adapters are scaffolded)
|
|
37
|
-
- **DAG-based task orchestration** — tasks declare dependencies, run in parallel groups, pass outputs downstream
|
|
38
|
-
- **Extensible agent framework** — `AgentTask` interface for adding new analysis types (threat modeling, binary analysis, etc.)
|
|
39
|
-
- **Persists results** in SQLite — resume interrupted scans, skip already-triaged findings
|
|
40
|
-
- **Resumable runs** — checkpoint pipeline state to SQLite; `--resume` picks up where a crashed or interrupted scan left off
|
|
41
|
-
- **Retry with backoff** — transient agent failures are retried automatically with exponential backoff
|
|
42
|
-
- **Audit logging** — optional JSONL audit trail of every agent decision for debugging and accountability
|
|
43
|
-
- **Markdown reports** — export a shareable `.md` report for CI pipelines and team review
|
|
44
|
-
- **Prints a styled report** showing only what matters: true positives, needs-review items, and verified exploits with PoC payloads
|
|
65
|
+
- **Verdict** — `true_positive`, `false_positive`, `by_design`, or `needs_review`
|
|
66
|
+
- **Confidence** — 0.0 to 1.0
|
|
67
|
+
- **Rationale** — why the agent reached that verdict, referencing specific code lines
|
|
68
|
+
- **Verification steps** — 2-6 actionable steps a human reviewer can follow
|
|
69
|
+
- **Fix suggestion** — suggested patch when applicable
|
|
70
|
+
- **PoC exploit** (with `--verify`) — a concrete proof-of-concept payload proving the vulnerability is exploitable
|
|
71
|
+
- **Cost** — per-finding triage and verification cost in USD
|
|
72
|
+
|
|
73
|
+
The terminal report shows true positives first, then needs-review items. False positives and by-design findings are counted but deprioritized. You only see what matters.
|
|
45
74
|
|
|
46
75
|
## How It Works
|
|
47
76
|
|
|
48
|
-
|
|
77
|
+
```
|
|
78
|
+
┌─────────────┐ ┌──────────────┐ ┌──────────────┐ ┌─────────┐ ┌──────────┐
|
|
79
|
+
│ Task DAG │────▶│ AI Triage │────▶│ Verification │────▶│ Patch │────▶│ Report │
|
|
80
|
+
│ Semgrep │ │ Investigate │ │ Construct │ │ Generate │ │ TP only │
|
|
81
|
+
│ CodeQL │ │ each finding │ │ PoC exploits │ │ & verify │ │ + export │
|
|
82
|
+
│ 15+ tasks │ │ with context │ │ (optional) │ │ (opt-in) │ │ + stream │
|
|
83
|
+
└─────────────┘ └──────────────┘ └──────────────┘ └─────────┘ └──────────┘
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
1. **Context gathering** — auto-detects your tech stack, frameworks, auth patterns, ORMs, and sanitization libraries
|
|
87
|
+
2. **Code graph** — builds a persistent entry-point-to-sink graph via static analysis + LLM discovery mode. For HTTP services, traces pre-identified routes. For CLI tools, daemons, and non-HTTP projects, the LLM identifies entry points itself (main functions, socket listeners, gRPC servers, CLI handlers) and traces security-relevant call/data-flow paths
|
|
88
|
+
3. **Threat modeling** — Randori PASTA plugin (shipped as `@kuzushi/randori-plugin`) performs 4-stage threat analysis: business objectives, technical scope, DFD decomposition, and STRIDE threat scenarios with ATT&CK/CAPEC/OWASP mapping and 5-factor probabilistic scoring. All threat leads are injected into every detector's prompts.
|
|
89
|
+
4. **Threat-informed hunting** — spawns one adversarial Claude agent per DFD external entity (users, services, attackers) to CTF-style hunt for vulnerabilities from each actor's perspective
|
|
90
|
+
5. **Task DAG execution** — runs enabled tasks as a dependency-aware DAG: Semgrep, CodeQL, agentic scanner, and 15+ specialized detectors (SSRF, SQLi, XSS, command injection, XXE, deserialization, NoSQL injection, template injection, prototype pollution, race conditions, supply chain, GraphQL, secrets/crypto, auth logic, sharp edges, systems-level deep semantic analysis); multi-strategy mode runs 2-4 analytical approaches per vuln class
|
|
91
|
+
4. **Classifier funnel** — cheap single-token pre-filter removes ~80% of noise before expensive triage
|
|
92
|
+
5. **Deduplication** — fingerprints and merges equivalent findings across scanners
|
|
93
|
+
6. **Incremental skip** — findings already triaged in previous runs are skipped automatically
|
|
94
|
+
7. **AI triage** — an agent investigates each finding with pre-loaded source context, code graph paths, evidence chains, threat model context, and CWE-specific knowledge modules. Threat model output from Randori PASTA is injected into triage prompts so the agent can distinguish design choices (`by_design`) from real vulnerabilities (`tp`). Batch-dropped findings auto-escalate to individual triage
|
|
95
|
+
8. **Variant analysis** — confirmed TPs trigger automatic search for similar patterns across the codebase
|
|
96
|
+
9. **Verification** (optional) — constructs concrete PoC exploit payloads for true positives
|
|
97
|
+
10. **PoC harness generation** (optional) — produces runnable exploit scripts with iterative execution feedback
|
|
98
|
+
11. **Dynamic analysis** (optional) — executes harnesses in Docker sandbox to confirm exploitability
|
|
99
|
+
12. **Auto-patch** (optional) — generates, validates, and re-verifies patches in disposable git worktrees
|
|
100
|
+
13. **Report** — terminal display + export to SARIF, Markdown, JSON, CSV, or JSONL; optional SSE live streaming
|
|
101
|
+
|
|
102
|
+
## CI Integration
|
|
103
|
+
|
|
104
|
+
### GitHub Actions
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
name: Security Scan
|
|
108
|
+
on: [push, pull_request]
|
|
109
|
+
jobs:
|
|
110
|
+
kuzushi:
|
|
111
|
+
runs-on: ubuntu-latest
|
|
112
|
+
steps:
|
|
113
|
+
- uses: actions/checkout@v4
|
|
114
|
+
- uses: actions/setup-node@v4
|
|
115
|
+
with:
|
|
116
|
+
node-version: 22
|
|
117
|
+
- run: npx kuzushi . --sarif results.sarif --quality-gate --fail-on-tp
|
|
118
|
+
env:
|
|
119
|
+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
120
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
121
|
+
if: always()
|
|
122
|
+
with:
|
|
123
|
+
sarif_file: results.sarif
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Quality Gates
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
kuzushi <repo> --quality-gate # fail CI on threshold violations
|
|
130
|
+
kuzushi <repo> --fail-on-tp # fail if any high/critical TP is found
|
|
131
|
+
kuzushi <repo> --sarif results.sarif # export SARIF for GitHub Code Scanning
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Key Features
|
|
135
|
+
|
|
136
|
+
**Vendor-agnostic LLM runtime** — works with Anthropic, OpenAI, Google, Groq, Mistral, and 15+ other providers. Swap models at runtime with `--model provider:modelId`. Use cheaper models for triage, premium models for verification.
|
|
137
|
+
|
|
138
|
+
**Exploit verification** — goes beyond classification. Constructs concrete PoC payloads (SQL injection strings, XSS vectors, etc.) that prove a finding is exploitable, not just theoretically possible.
|
|
139
|
+
|
|
140
|
+
**Crypto behavioral testing** — generates and executes behavioral test harnesses in a Docker sandbox for crypto misuse findings. Detects timing side-channels, ECB mode, weak hashes, weak PRNGs, and more.
|
|
141
|
+
|
|
142
|
+
**IRIS-style taint analysis** — LLM-driven CodeQL taint analysis inspired by the IRIS paper (ICLR 2025). An LLM selects relevant CWE classes for the project, writes CodeQL extraction queries dynamically (language-agnostic, framework-agnostic), labels candidates, generates TaintTracking configurations, and iteratively refines queries when compilation fails. Structured taint paths (source-to-sink step data) are persisted to the findings DB for downstream verification and reporting. No templates, no hardcoded framework detection.
|
|
143
|
+
|
|
144
|
+
**Randori PASTA threat modeling** — ships `@kuzushi/randori-plugin` as a dependency. Runs 4-stage PASTA analysis (objectives, scope, DFD decomposition, STRIDE threats) via Claude Code plugin. Threat leads are injected into all detector prompts for threat-informed scanning. ATT&CK, CAPEC, and OWASP mapping included.
|
|
145
|
+
|
|
146
|
+
**Threat-informed hunting** — spawns adversarial Claude agents for each DFD external entity identified by the threat model. Each agent explores the codebase as that actor (end user, admin, external service, LLM agent) looking for exploitable paths. Findings are deduplicated and fed into triage/verification.
|
|
147
|
+
|
|
148
|
+
**Systems-level deep semantic hunt** — LLM-driven analysis pipeline for finding the class of bugs that survive decades of code review and fuzzing: integer overflow/wraparound (CWE-190), sentinel value collisions (CWE-787), signed/unsigned comparison bugs (CWE-681), buffer overflows exploitable via missing stack canaries (CWE-693), use-after-free in protocol state machines (CWE-416), and unsafe block violations in Rust (CWE-704). The LLM writes and runs CodeQL queries using range analysis, loop induction analysis, and type predicates — NOT TaintTracking — to find bugs that source-to-sink taint flows cannot express. Activates automatically for C, C++, Rust, and Go codebases. The `glasswing` preset routes a frontier model to this task for maximum depth.
|
|
149
|
+
|
|
150
|
+
**Auto rule generation** — verified exploitable findings automatically generate custom Semgrep rules. Rules are persisted to `.kuzushi/custom-rules/` and auto-loaded on subsequent scans, creating a feedback loop where the scanner gets smarter over time. Rules are validated against the original finding and removed if they don't match.
|
|
49
151
|
|
|
50
|
-
|
|
152
|
+
**Diff-aware taint analysis** — narrows analysis to files changed since a base branch. Run `--taint-diff-base main` in CI to only analyze what's new in the PR.
|
|
51
153
|
|
|
52
|
-
|
|
53
|
-
2. **Pipeline starts** — the orchestrator resolves enabled tasks into a dependency graph and groups them into parallel stages.
|
|
54
|
-
3. **Scanners run** — scanner tasks (Semgrep, CodeQL, Agentic, etc.) execute concurrently within their stage, emitting findings as typed events on the message bus.
|
|
55
|
-
4. **Results gate downstream tasks** — the orchestrator waits for each stage to complete before starting dependent stages. Upstream outputs are forwarded to dependent tasks via `TaskContext`.
|
|
56
|
-
5. **Triage stage** — findings are deduplicated (fingerprint + cross-scanner location/CWE/rule normalization), ranked, and sent to an LLM for semantic verification with configurable concurrency. The repo context from step 1 enriches every triage prompt.
|
|
57
|
-
6. **Verification stage** (optional) — triaged findings that pass verification gates (`verifyVerdicts`, scanner-level `scannerConfig.<id>.verify`, and `verifyMinConfidence`) are sent to a verification agent that attempts to construct concrete PoC exploit payloads.
|
|
58
|
-
7. **PoC harness generation** (optional) — verified-exploitable findings are sent to a harness generator that produces runnable exploit scripts with syntax validation.
|
|
59
|
-
8. **Report** — final results are persisted, rendered to terminal, and optionally exported as markdown.
|
|
154
|
+
**Resumable runs** — checkpoints pipeline state to SQLite. Interrupted scan? `--resume` picks up exactly where it left off.
|
|
60
155
|
|
|
61
|
-
|
|
156
|
+
**Patch synthesis** — `kuzushi patch <repo> --fingerprint <fp>` generates and validates security patches in disposable git worktrees without touching your working copy.
|
|
62
157
|
|
|
63
|
-
|
|
158
|
+
**15+ specialized detectors** — dedicated detection tasks for command injection, XXE, insecure deserialization, SSRF, NoSQL injection, template injection, prototype pollution, race conditions, supply chain, GraphQL security, secrets/crypto, code config, auth logic, sharp edges, crypto behavioral testing, and systems-level deep semantic analysis (integer overflow, buffer overflow, sentinel collision, use-after-free, unsafe blocks). Each has vulnerability-class-specific prompts, anti-hallucination constraints, and multi-lens analysis. All detectors receive threat model leads for threat-informed scanning.
|
|
159
|
+
|
|
160
|
+
**Classifier funnel** — single-token LLM pre-filter using a cheap model removes ~80% of false positives before expensive triage, cutting per-scan cost dramatically.
|
|
161
|
+
|
|
162
|
+
**Source pre-read** — triage agents receive the flagged source file pre-loaded (50 lines surrounding the finding), eliminating cold-start tool calls and improving reasoning accuracy.
|
|
163
|
+
|
|
164
|
+
**LLM code graph** — builds a persistent code graph tracing entry points through middleware, controllers, services, and data-access layers. Static skeleton from import analysis + LLM-assisted gap-filling for dynamic dispatch, DI, and callback patterns. Discovery mode: when no HTTP routes are detected, the LLM identifies entry points itself (main functions, socket listeners, gRPC servers, CLI handlers) and traces security-relevant paths with threat model context. Feeds graph context into triage for better reasoning.
|
|
165
|
+
|
|
166
|
+
**Multi-strategy analysis** — runs 2-4 different analytical approaches per vulnerability class (syntactic pattern matching, dataflow tracing, first-principles reasoning, execution-based proof) and merges results with confidence boosting when strategies agree. Auto-generates reusable Semgrep rules from confirmed multi-strategy findings.
|
|
167
|
+
|
|
168
|
+
**13 CWE knowledge modules** — domain-specific knowledge for SQL injection, XSS, SSRF, command injection, path traversal, auth bypass, deserialization, race conditions, crypto, XXE, file upload, IDOR, and NoSQL injection — including dangerous patterns, safe patterns, bypass techniques, and fix examples.
|
|
169
|
+
|
|
170
|
+
**Incremental scanning** — skips re-triage for unchanged findings across runs. Tracks the last scanned commit, computes file diffs, and expands the rescan scope with dependency-aware invalidation via the import graph.
|
|
171
|
+
|
|
172
|
+
**Auto-patch with closed-loop verification** — after confirming a vulnerability, automatically generates a patch in a disposable git worktree, validates it (apply, build, test), then re-runs the scanner on the patched code to confirm the vulnerability is gone.
|
|
173
|
+
|
|
174
|
+
**Live streaming** — SSE server streams pipeline events in real-time (`--stream`). Connect with `curl`, `EventSource`, or any SSE client to watch findings appear as they're triaged.
|
|
175
|
+
|
|
176
|
+
**Audit logging** — optional JSONL audit trail of every agent decision for debugging, accountability, and compliance records.
|
|
177
|
+
|
|
178
|
+
## Scan Presets
|
|
179
|
+
|
|
180
|
+
Presets configure the pipeline for different cost/depth tradeoffs. CLI flags override preset values.
|
|
181
|
+
|
|
182
|
+
```sh
|
|
183
|
+
kuzushi <repo> --preset fast # semgrep only, no context/enrichment/variant analysis
|
|
184
|
+
kuzushi <repo> --preset standard # semgrep + IRIS taint + secrets/crypto detection
|
|
185
|
+
kuzushi <repo> --preset deep # standard + verification + threat modeling + systems-level hunt
|
|
186
|
+
kuzushi <repo> --preset glasswing # verification + PoC generation + threat-informed hunting
|
|
187
|
+
# + deep semantic hunt with a frontier model
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
The `glasswing` preset uses a cost-smart model tiering strategy: a standard model handles bulk scanning and triage, while a frontier model is used surgically for the systems-hunt and threat-hunt stages — where stronger adversarial reasoning has the highest ROI for zero-day discovery. Per-task model overrides keep costs controlled.
|
|
191
|
+
|
|
192
|
+
## Tasks
|
|
193
|
+
|
|
194
|
+
Every stage of the pipeline is an **AgentTask** — a composable unit with explicit dependencies that the orchestrator runs as a DAG. Tasks are selected via `--tasks` or `config.tasks`, and per-task config (including model overrides) lives in `config.taskConfig`.
|
|
195
|
+
|
|
196
|
+
| Task ID | Description | Auto-download |
|
|
197
|
+
|---------|-------------|---------------|
|
|
198
|
+
| `semgrep` (default) | Traditional SAST via Opengrep/Semgrep | Yes |
|
|
199
|
+
| `codeql` | Semantic dataflow/taint analysis via GitHub CodeQL CLI | No (opt-in) |
|
|
200
|
+
| `agentic` | AI-driven scanner — LLM with read-only repo tools | N/A |
|
|
201
|
+
| `taint-cwe-select` / `taint-iris` | IRIS-style LLM-driven CodeQL taint analysis — dynamic CWE selection, LLM-generated queries, iterative refinement | No (opt-in) |
|
|
202
|
+
| `systems-hunt` | Deep semantic analysis for C/C++/Rust/Go — LLM-driven CodeQL range analysis, loop induction, missing mitigations | No (opt-in) |
|
|
203
|
+
| `secrets-crypto-detect` | Secrets, API keys, and cryptographic misuse detection | N/A |
|
|
204
|
+
| `code-config-detect` | Security-relevant code and configuration issues | N/A |
|
|
205
|
+
| `threat-model-randori` | PASTA threat modeling with STRIDE analysis | N/A |
|
|
206
|
+
| `threat-hunt` | Adversarial CTF-style hunting per DFD entity | N/A |
|
|
207
|
+
| `context-gatherer` | Auto-detects tech stack, frameworks, auth patterns | N/A |
|
|
208
|
+
| `context-enricher` | Deep context enrichment (middleware, trust boundaries) | N/A |
|
|
209
|
+
|
|
210
|
+
```sh
|
|
211
|
+
kuzushi <repo> --tasks semgrep,codeql # run specific tasks
|
|
212
|
+
kuzushi <repo> --tasks agentic # AI-only scan
|
|
213
|
+
kuzushi <repo> --task-model threat-hunt=anthropic:claude-opus-4-6 # per-task model override
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
<details>
|
|
219
|
+
<summary><strong>All Commands</strong></summary>
|
|
64
220
|
|
|
65
221
|
### Scan (default)
|
|
66
222
|
|
|
67
223
|
```
|
|
68
224
|
kuzushi <repo> # scan with defaults
|
|
69
|
-
kuzushi <repo> --
|
|
70
|
-
kuzushi <repo> --
|
|
71
|
-
kuzushi <repo> --
|
|
225
|
+
kuzushi <repo> --tasks codeql
|
|
226
|
+
kuzushi <repo> --tasks semgrep,codeql
|
|
227
|
+
kuzushi <repo> --tasks semgrep,agentic
|
|
72
228
|
kuzushi <repo> --severity ERROR # only ERROR-level findings
|
|
73
229
|
kuzushi <repo> --max 20 # triage top 20 findings only
|
|
74
|
-
kuzushi <repo> --model claude-
|
|
75
|
-
kuzushi <repo> --
|
|
76
|
-
kuzushi <repo> --
|
|
77
|
-
kuzushi <repo> --api-key sk-ant-... --base-url https://basecamp.stark.rubrik.com/
|
|
230
|
+
kuzushi <repo> --model anthropic:claude-sonnet-4-6 # use a different model
|
|
231
|
+
kuzushi <repo> --task-model triage=openai:gpt-4o # separate model for triage stage
|
|
232
|
+
kuzushi <repo> --api-key sk-ant-... --base-url https://api.example.com/ # custom API endpoint
|
|
78
233
|
kuzushi <repo> --fresh # clear prior results, re-triage everything
|
|
79
234
|
kuzushi <repo> --db ./my.sqlite3 # custom database path
|
|
80
235
|
kuzushi <repo> --resume # resume the most recent interrupted run
|
|
81
236
|
kuzushi <repo> --resume <run-id> # resume a specific run by ID
|
|
82
237
|
```
|
|
83
238
|
|
|
84
|
-
### Vendor-Agnostic Runtime
|
|
85
|
-
|
|
86
|
-
```
|
|
87
|
-
kuzushi <repo> --agent-runtime pi-ai --model openai:gpt-4o
|
|
88
|
-
kuzushi <repo> --agent-runtime pi-ai --model google:gemini-2.0-flash
|
|
89
|
-
kuzushi <repo> --agent-runtime pi-ai --model anthropic:claude-sonnet-4-20250514
|
|
90
|
-
kuzushi config set agentRuntimeBackend pi-ai
|
|
91
|
-
kuzushi config set model openai:gpt-4o
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
When `agentRuntimeBackend` is `pi-ai`, model strings use `provider:modelId` format. The pi-ai backend implements its own agentic tool-calling loop with local Read/Glob/Grep tools, structured output enforcement, budget tracking, and abort support. All consumer code (triage, verify, PoC harness, scanners) works unchanged — the `AgentRuntime` abstraction handles it.
|
|
95
|
-
|
|
96
239
|
### Verification
|
|
97
240
|
|
|
98
241
|
```
|
|
99
242
|
kuzushi <repo> --verify # enable exploit verification for TPs
|
|
100
|
-
kuzushi <repo> --verify --
|
|
243
|
+
kuzushi <repo> --verify --task-model verify=openai:gpt-4o-mini # cheaper model for verification
|
|
101
244
|
kuzushi <repo> --verify --verify-max-turns 20
|
|
102
245
|
kuzushi <repo> --verify --verify-concurrency 3
|
|
103
246
|
kuzushi <repo> --verify --verify-min-confidence 0.7 # skip low-confidence TPs
|
|
@@ -107,17 +250,86 @@ kuzushi <repo> --verify --verify-min-confidence 0.7 # skip low-confidence TPs
|
|
|
107
250
|
|
|
108
251
|
```
|
|
109
252
|
kuzushi <repo> --verify --poc-harness # generate exploit scripts for verified findings
|
|
110
|
-
kuzushi <repo> --verify --poc-harness --
|
|
253
|
+
kuzushi <repo> --verify --poc-harness --task-model poc-harness=openai:gpt-4o-mini
|
|
111
254
|
kuzushi <repo> --verify --poc-harness --poc-harness-max-turns 25
|
|
112
255
|
kuzushi <repo> --verify --poc-harness --poc-harness-concurrency 2
|
|
113
256
|
```
|
|
114
257
|
|
|
258
|
+
### Dynamic Analysis
|
|
259
|
+
|
|
260
|
+
```
|
|
261
|
+
kuzushi <repo> --verify --poc-harness --dynamic-analysis # execute harnesses to confirm/reject findings
|
|
262
|
+
kuzushi <repo> --verify --dynamic-analysis --dynamic-max-candidates 10
|
|
263
|
+
kuzushi <repo> --verify --dynamic-analysis --dynamic-min-score 8
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Patch Synthesis
|
|
267
|
+
|
|
268
|
+
```
|
|
269
|
+
kuzushi patch <repo> --fingerprint <fp> # synthesize and validate a patch
|
|
270
|
+
kuzushi patch <repo> --fingerprint <fp> --build-cmd "npm run build"
|
|
271
|
+
kuzushi patch <repo> --fingerprint <fp> --test-cmd "npm test" --max-iterations 5
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Code Graph
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
kuzushi <repo> --code-graph # enable LLM-powered code graph (entry-point-to-sink tracing)
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Multi-Strategy Analysis
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
kuzushi <repo> --multi-strategy # adaptive mode: run cheapest strategy first, exit early if confident
|
|
284
|
+
kuzushi <repo> --multi-strategy-full # run all strategies in parallel for maximum coverage
|
|
285
|
+
kuzushi <repo> --multi-strategy-budget 3.0 # per-finding budget across all strategies (USD)
|
|
286
|
+
kuzushi <repo> --multi-strategy-auto-rules # generate Semgrep rules from confirmed multi-strategy findings
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Auto-Patch (Closed-Loop)
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
kuzushi <repo> --verify --auto-patch # patch exploitable findings, re-verify
|
|
293
|
+
kuzushi <repo> --verify --auto-patch --auto-patch-after triage # patch any TP (broadest trigger)
|
|
294
|
+
kuzushi <repo> --verify --auto-patch --auto-patch-after poc # patch only after PoC proves it
|
|
295
|
+
kuzushi <repo> --auto-patch --patch-verify-depth triage # re-run scanner + triage on patched code
|
|
296
|
+
kuzushi <repo> --auto-patch --patch-verify-depth full # full pipeline re-verify (most thorough)
|
|
297
|
+
kuzushi <repo> --auto-patch --patch-concurrency 3 # parallel patch synthesis tasks
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Streaming
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
kuzushi <repo> --stream # start SSE server on auto-assigned port
|
|
304
|
+
kuzushi <repo> --stream --stream-port 3001 # start SSE server on specific port
|
|
305
|
+
# Then in another terminal:
|
|
306
|
+
curl -N http://localhost:3001/events # watch live pipeline events
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Crypto Behavioral Testing
|
|
310
|
+
|
|
311
|
+
```
|
|
312
|
+
kuzushi <repo> --crypto-behavioral-test # generate & run behavioral tests for crypto misuse findings
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Diff-Aware Taint
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
kuzushi <repo> --taint-diff-base main # only taint-analyze files changed since main
|
|
319
|
+
kuzushi <repo> --taint-diff-base main --taint-diff-mode delta # emit only findings intersecting the diff
|
|
320
|
+
kuzushi <repo> --taint-diff-base main --taint-diff-mode baseline # merge cached + rerun for full baseline
|
|
321
|
+
```
|
|
322
|
+
|
|
115
323
|
### Output & Observability
|
|
116
324
|
|
|
117
325
|
```
|
|
118
326
|
kuzushi <repo> --output report.md # export markdown report
|
|
119
327
|
kuzushi <repo> --sarif results.sarif # export SARIF v2.1.0
|
|
328
|
+
kuzushi <repo> --json results.json # export JSON report
|
|
329
|
+
kuzushi <repo> --csv results.csv # export CSV report
|
|
330
|
+
kuzushi <repo> --jsonl results.jsonl # export JSONL report
|
|
120
331
|
kuzushi <repo> --audit-log # write agent activity to .kuzushi/runs/{runId}/
|
|
332
|
+
kuzushi <repo> --verbose # show debug-level runtime diagnostics
|
|
121
333
|
kuzushi <repo> --no-context # disable repo context gathering
|
|
122
334
|
```
|
|
123
335
|
|
|
@@ -134,77 +346,107 @@ kuzushi <repo> --retry-backoff-ms 10000 # initial backoff delay (default: 50
|
|
|
134
346
|
```
|
|
135
347
|
kuzushi config get # show all config
|
|
136
348
|
kuzushi config get model # show one key
|
|
137
|
-
kuzushi config set model claude-
|
|
138
|
-
kuzushi config set
|
|
139
|
-
kuzushi config set
|
|
140
|
-
kuzushi config set
|
|
141
|
-
kuzushi config set
|
|
142
|
-
kuzushi config set
|
|
143
|
-
kuzushi config set
|
|
144
|
-
kuzushi config set
|
|
349
|
+
kuzushi config set model anthropic:claude-sonnet-4-6
|
|
350
|
+
kuzushi config set tasks semgrep,agentic
|
|
351
|
+
kuzushi config set taskConfig.codeql.dbPath ./codeql-db
|
|
352
|
+
kuzushi config set taskConfig.codeql.suite javascript-security-extended
|
|
353
|
+
kuzushi config set taskConfig.semgrep.binary opengrep
|
|
354
|
+
kuzushi config set taskConfig.semgrep.configFlag auto
|
|
355
|
+
kuzushi config set taskConfig.agentic.model anthropic:claude-sonnet-4-6
|
|
356
|
+
kuzushi config set taskConfig.agentic.maxFindings 25
|
|
357
|
+
kuzushi config set taskConfig.triage.model anthropic:claude-opus-4-6
|
|
358
|
+
kuzushi config set taskConfig.verify.model openai:gpt-4o-mini
|
|
145
359
|
kuzushi config set severity ERROR,WARNING,INFO
|
|
146
360
|
kuzushi config set verify true
|
|
147
361
|
kuzushi config set verifyMinConfidence 0.7
|
|
148
362
|
kuzushi config set auditLog true
|
|
363
|
+
kuzushi config validate --repo . # validate the effective config for this repo
|
|
149
364
|
kuzushi config unset model # reset to default
|
|
150
365
|
kuzushi config path # print config file location
|
|
151
366
|
```
|
|
152
367
|
|
|
153
368
|
Global config lives at `~/.kuzushi/config.json`. Optional project overrides can live at `<repo>/.kuzushi/config.json`. CLI flags override config values.
|
|
154
369
|
|
|
370
|
+
**Repo-local config sandboxing:** By default, project-level config files (`<repo>/.kuzushi/config.json`) are sandboxed — keys that could execute code or reach external systems (e.g., `hooks`, `externalTasks`, `pocExecute`, scanner binary paths) are silently stripped. This prevents a cloned repo from altering your runtime behavior. Pass `--trust-repo-config` to opt in to the full project config when you trust the repository.
|
|
371
|
+
|
|
155
372
|
Security note: `agentRuntimeConfig.apiKey` is stored in plaintext in config files. Prefer `--api-key` for one-off runs or `ANTHROPIC_API_KEY` from your shell/secret manager.
|
|
156
373
|
|
|
157
|
-
|
|
374
|
+
</details>
|
|
375
|
+
|
|
376
|
+
<details>
|
|
377
|
+
<summary><strong>Configuration Reference</strong></summary>
|
|
158
378
|
|
|
159
379
|
| Key | Default | Description |
|
|
160
380
|
| --- | --- | --- |
|
|
161
|
-
| `model` | `claude-sonnet-4-
|
|
162
|
-
| `
|
|
163
|
-
| `
|
|
164
|
-
| `scanners` | `["semgrep"]` | Scanner plugins to run, in order |
|
|
381
|
+
| `model` | `anthropic:claude-sonnet-4-6` | Default LLM model for all tasks and stages |
|
|
382
|
+
| `tasks` | `["semgrep"]` | Enabled task IDs, in execution order |
|
|
383
|
+
| `taskConfig` | `{ semgrep: {...}, triage: {...}, ... }` | Per-task config blocks keyed by task ID or stage ID (see below) |
|
|
165
384
|
| `severity` | `["ERROR","WARNING"]` | Semgrep severity filter |
|
|
166
385
|
| `excludePatterns` | `["test","tests","node_modules",...]` | Directories/globs to skip |
|
|
167
|
-
| `
|
|
168
|
-
| `
|
|
169
|
-
| `
|
|
170
|
-
| `
|
|
171
|
-
| `enabledTasks` | `[]` | Additional agent tasks beyond scanners |
|
|
172
|
-
| `agentRuntimeBackend` | `"claude-sdk"` | Agent runtime backend (`claude-sdk`, `pi-ai`, future: `acp`) |
|
|
386
|
+
| `busBackend` | `"in-process"` | Message bus transport (`in-process`) |
|
|
387
|
+
| `triageConcurrency` | `5` | Parallel LLM triage calls |
|
|
388
|
+
| `scanMode` | `"concurrent"` | Task execution mode (`sequential` or `concurrent`) |
|
|
389
|
+
| `agentRuntimeBackend` | `"pi-ai"` | Agent runtime backend (`pi-ai`) |
|
|
173
390
|
| `verify` | `false` | Enable proof-of-exploitability verification |
|
|
174
|
-
| `verifyModel` | _(uses `triageModel` or `model`)_ | Override model for verification agent |
|
|
175
391
|
| `verifyMaxTurns` | `15` | Max turns for verification agent |
|
|
176
|
-
| `verifyConcurrency` | `
|
|
392
|
+
| `verifyConcurrency` | `3` | Parallel verification calls |
|
|
177
393
|
| `verifyVerdicts` | `["tp"]` | Which triage verdicts to verify |
|
|
178
394
|
| `verifyMinConfidence` | `0` | Minimum triage confidence to trigger verification (0-1) |
|
|
179
395
|
| `pocHarness` | `false` | Enable post-verification PoC harness generation (requires `--verify`) |
|
|
180
|
-
| `pocHarnessModel` | _(uses `triageModel` or `model`)_ | Override model for PoC harness agent |
|
|
181
396
|
| `pocHarnessMaxTurns` | `20` | Max turns for PoC harness agent |
|
|
182
|
-
| `pocHarnessConcurrency` | `
|
|
397
|
+
| `pocHarnessConcurrency` | `2` | Parallel PoC harness generation calls |
|
|
398
|
+
| `cryptoBehavioralTestEnabled` | `false` | Enable crypto behavioral testing for crypto misuse findings |
|
|
399
|
+
| `cryptoBehavioralMaxFindings` | `10` | Max findings to generate behavioral tests for per run |
|
|
400
|
+
| `cryptoBehavioralTimeoutMs` | `120000` | Execution timeout per harness in ms |
|
|
401
|
+
| `cryptoBehavioralPerFindingBudgetUsd` | `1` | Cost budget per finding for harness generation |
|
|
402
|
+
| `codeGraphEnabled` | `true` | Enable LLM-powered code graph construction and enrichment |
|
|
403
|
+
|
|
404
|
+
**Stage model overrides** — set per-stage models via `taskConfig` instead of top-level fields:
|
|
405
|
+
|
|
406
|
+
| `taskConfig` key | Fallback chain | Purpose |
|
|
407
|
+
| --- | --- | --- |
|
|
408
|
+
| `taskConfig.triage.model` | `model` | Model for triage agents |
|
|
409
|
+
| `taskConfig.verify.model` | `model` | Model for verification agents |
|
|
410
|
+
| `taskConfig.poc-harness.model` | `taskConfig.verify.model` → `model` | Model for PoC harness generation |
|
|
411
|
+
| `multiStrategyMode` | `"off"` | Multi-strategy analysis mode (`off`, `adaptive`, `full`) |
|
|
412
|
+
| `multiStrategyBudgetUsd` | `2.0` | Per-finding budget across all strategies (USD) |
|
|
413
|
+
| `autoPatchEnabled` | `false` | Enable automatic patch generation in pipeline |
|
|
414
|
+
| `autoPatchAfter` | `"verify"` | Trigger threshold for auto-patch (`verify`, `poc`, `triage`) |
|
|
415
|
+
| `patchVerifyDepth` | `"task"` | Re-verification depth after patching (`task`, `triage`, `full`) |
|
|
416
|
+
| `patchConcurrency` | `2` | Max concurrent patch synthesis tasks |
|
|
417
|
+
| `incrementalCache` | `true` | Enable incremental scanning (skip unchanged findings across runs) |
|
|
418
|
+
| `incrementalDepTracking` | `true` | Include importers of changed files in rescan scope |
|
|
419
|
+
| `streamingEnabled` | `false` | Enable SSE streaming server for live pipeline events |
|
|
420
|
+
| `streamingPort` | `0` (auto) | Port for the SSE streaming server |
|
|
183
421
|
| `enableContextGathering` | `true` | Run repo context analysis before triage |
|
|
184
422
|
| `auditLog` | `false` | Write agent activity to JSONL audit files |
|
|
185
423
|
| `reportOutput` | _(unset)_ | Write markdown report output to this path |
|
|
186
424
|
| `sarifOutput` | _(unset)_ | Write SARIF v2.1.0 output to this path |
|
|
425
|
+
| `jsonOutput` | _(unset)_ | Write JSON report to this path |
|
|
426
|
+
| `csvOutput` | _(unset)_ | Write CSV report to this path |
|
|
427
|
+
| `jsonlOutput` | _(unset)_ | Write JSONL report to this path |
|
|
187
428
|
| `maxTriageRetries` | `2` | Retry failed triage calls |
|
|
188
429
|
| `maxVerifyRetries` | `2` | Retry failed verification calls |
|
|
189
430
|
| `maxPocHarnessRetries` | `2` | Retry failed PoC harness generation calls |
|
|
190
431
|
| `retryBackoffMs` | `5000` | Initial retry backoff delay in ms |
|
|
191
432
|
| `retryBackoffMultiplier` | `2` | Exponential backoff multiplier |
|
|
192
433
|
|
|
193
|
-
Example:
|
|
434
|
+
Example config:
|
|
194
435
|
|
|
195
436
|
```json
|
|
196
437
|
{
|
|
197
|
-
"
|
|
438
|
+
"tasks": ["semgrep", "codeql", "context-gatherer", "context-enricher", "secrets-crypto-detect", "code-config-detect", "taint-cwe-select", "taint-iris"],
|
|
198
439
|
"scanMode": "concurrent",
|
|
199
440
|
"triageConcurrency": 3,
|
|
200
441
|
"verify": true,
|
|
201
442
|
"verifyMinConfidence": 0.7,
|
|
202
443
|
"auditLog": true,
|
|
203
|
-
"
|
|
204
|
-
"scannerConfig": {
|
|
444
|
+
"taskConfig": {
|
|
205
445
|
"codeql": { "dbPath": "./codeql-db", "suite": "javascript-security-extended" },
|
|
206
446
|
"semgrep": { "binary": "opengrep", "configFlag": "auto" },
|
|
207
|
-
"agentic": { "model": "claude-sonnet-4-
|
|
447
|
+
"agentic": { "model": "anthropic:claude-sonnet-4-6", "maxFindings": 20 },
|
|
448
|
+
"triage": { "model": "anthropic:claude-opus-4-6" },
|
|
449
|
+
"verify": { "model": "openai:gpt-4o-mini" }
|
|
208
450
|
}
|
|
209
451
|
}
|
|
210
452
|
```
|
|
@@ -213,29 +455,14 @@ Example:
|
|
|
213
455
|
|
|
214
456
|
| Variable | Required | Description |
|
|
215
457
|
| --- | --- | --- |
|
|
216
|
-
| `ANTHROPIC_API_KEY` |
|
|
458
|
+
| `ANTHROPIC_API_KEY` | When using `anthropic:*` models | Anthropic API key for pi-ai backend |
|
|
217
459
|
| `OPENAI_API_KEY` | When using `openai:*` models | OpenAI API key for pi-ai backend |
|
|
218
460
|
| `GEMINI_API_KEY` / `GOOGLE_API_KEY` | When using `google:*` models | Google API key for pi-ai backend |
|
|
219
461
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
- `semgrep`: traditional SAST via Opengrep/Semgrep binary
|
|
223
|
-
- `codeql`: semantic dataflow/taint analysis via GitHub CodeQL CLI (SARIF output)
|
|
224
|
-
- `agentic`: AI-driven agentic scanner — LLM with read-only repo tools via any supported runtime
|
|
225
|
-
- `augur`: multi-pass CodeQL source/sink labeling pipeline — runs preflight (database creation, candidate extraction), LLM-assisted labeling with human-in-the-loop checkpoint, and deterministic library/query generation + analysis
|
|
226
|
-
|
|
227
|
-
## Semgrep Resolution
|
|
462
|
+
</details>
|
|
228
463
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
1. `opengrep` on your PATH
|
|
232
|
-
2. `semgrep` on your PATH
|
|
233
|
-
3. Previously downloaded binary at `~/.kuzushi/bin/opengrep`
|
|
234
|
-
4. Auto-downloads Opengrep from GitHub releases (~40 MB, cached for future runs)
|
|
235
|
-
|
|
236
|
-
No pip, no brew, no manual install needed.
|
|
237
|
-
|
|
238
|
-
## CodeQL Setup
|
|
464
|
+
<details>
|
|
465
|
+
<summary><strong>CodeQL Setup</strong></summary>
|
|
239
466
|
|
|
240
467
|
The `codeql` scanner requires the [CodeQL CLI](https://github.com/github/codeql-cli-binaries/releases) to be installed separately. Unlike Semgrep, it is **not auto-downloaded** (the CLI is ~500 MB and requires accepting GitHub's license).
|
|
241
468
|
|
|
@@ -269,142 +496,155 @@ CodeQL builds a database from your source code before running queries. You can s
|
|
|
269
496
|
kuzushi config set scannerConfig.codeql.dbPath ./codeql-db
|
|
270
497
|
```
|
|
271
498
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
The `pi-ai` backend uses `@mariozechner/pi-ai` to provide vendor-agnostic LLM access. It supports 15+ providers (Anthropic, OpenAI, Google, Groq, Mistral, etc.) through a single interface.
|
|
499
|
+
</details>
|
|
275
500
|
|
|
276
|
-
|
|
501
|
+
<details>
|
|
502
|
+
<summary><strong>Taint Analysis Setup</strong></summary>
|
|
277
503
|
|
|
278
|
-
|
|
279
|
-
2. **Local tool implementations** — Read (file reader with line numbers), Glob (Node 22+ `globSync`), Grep (regex search across files)
|
|
280
|
-
3. **Structured output** — system prompt injection + post-hoc JSON extraction from fenced code blocks or raw text
|
|
281
|
-
4. **Safety controls** — max turns, budget enforcement, abort signal, permission gating via `canUseTool`
|
|
282
|
-
|
|
283
|
-
```sh
|
|
284
|
-
# Use with any supported provider:
|
|
285
|
-
OPENAI_API_KEY=... kuzushi <repo> --agent-runtime pi-ai --model openai:gpt-4o
|
|
286
|
-
GEMINI_API_KEY=... kuzushi <repo> --agent-runtime pi-ai --model google:gemini-2.0-flash
|
|
287
|
-
ANTHROPIC_API_KEY=... kuzushi <repo> --agent-runtime pi-ai --model anthropic:claude-sonnet-4-20250514
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
## Augur Setup
|
|
291
|
-
|
|
292
|
-
The `augur` scanner is a multi-pass CodeQL-based pipeline that uses LLM-assisted classification to label sources, sinks, sanitizers, and summaries. It requires:
|
|
504
|
+
The `taint-analysis` scanner is a multi-pass CodeQL-based pipeline that uses LLM-assisted classification to label sources, sinks, sanitizers, and summaries. It requires:
|
|
293
505
|
|
|
294
506
|
1. **CodeQL CLI** — same requirement as the `codeql` scanner
|
|
295
|
-
2. **Python 3** — used by
|
|
507
|
+
2. **Python 3** — used by taint analysis scripts for query generation
|
|
296
508
|
|
|
297
|
-
|
|
509
|
+
Taint analysis templates, references, and scripts are bundled as the [`@kuzushi/augur`](https://www.npmjs.com/package/@kuzushi/augur) npm package and installed automatically with `pnpm install`. No manual clone or `TAINT_ANALYSIS_PATH` setup needed.
|
|
298
510
|
|
|
299
511
|
```sh
|
|
300
|
-
kuzushi <repo> --scanners
|
|
301
|
-
kuzushi
|
|
302
|
-
kuzushi config set scannerConfig.
|
|
303
|
-
kuzushi config set scannerConfig.augur.passes "[1,2,3,4,5,6]"
|
|
512
|
+
kuzushi <repo> --scanners taint-analysis
|
|
513
|
+
kuzushi config set scannerConfig["taint-analysis"].labelingModel anthropic:claude-sonnet-4-6
|
|
514
|
+
kuzushi config set scannerConfig["taint-analysis"].passes "[1,2,3,4,5,6]"
|
|
304
515
|
```
|
|
305
516
|
|
|
306
|
-
To override the bundled
|
|
517
|
+
To override the bundled taint-analysis assets (e.g., for local development), set `TAINT_ANALYSIS_PATH` or `scannerConfig["taint-analysis"].taintAnalysisPath`:
|
|
307
518
|
|
|
308
519
|
```sh
|
|
309
|
-
export
|
|
310
|
-
kuzushi config set scannerConfig.
|
|
520
|
+
export TAINT_ANALYSIS_PATH=/path/to/local/taint-analysis
|
|
521
|
+
kuzushi config set scannerConfig["taint-analysis"].taintAnalysisPath /path/to/local/taint-analysis
|
|
311
522
|
```
|
|
312
523
|
|
|
313
|
-
|
|
524
|
+
Taint analysis runs in three DAG-ordered stages: **preflight** (database creation, candidate extraction), **label** (LLM classification), and **analyze** (library generation, query execution, finding extraction).
|
|
314
525
|
|
|
315
|
-
|
|
526
|
+
### Taint Analysis TI + Artifact Outputs
|
|
316
527
|
|
|
317
|
-
|
|
528
|
+
Each taint analysis run emits interoperability artifacts under the workspace (`scannerConfig["taint-analysis"].workspaceDir`, default `./iris`) and run directory:
|
|
318
529
|
|
|
319
|
-
-
|
|
320
|
-
-
|
|
321
|
-
-
|
|
322
|
-
-
|
|
323
|
-
- **fix_patch**: suggested fix (when applicable)
|
|
324
|
-
- **exploitability** (with `--verify`): whether a concrete exploit was constructed, PoC payload, attack vector, and preconditions
|
|
325
|
-
- **cost**: per-finding triage and verification cost in USD
|
|
530
|
+
- `iris/exploration/TI_PRIOR.md` and `iris/exploration/ti_prior.json` — live TI prior (CISA KEV + NVD) with degraded-mode metadata when fetches fail
|
|
531
|
+
- `iris/labels/TAINT_MODEL.json` — per-CWE taint model (`sources/sinks/sanitizers/propagators`) with TI-weighted basis
|
|
532
|
+
- `iris/results/findings.raw.json` — normalized raw findings aggregate from taint analysis pass SARIF outputs
|
|
533
|
+
- `.kuzushi/runs/<runId>/findings.triaged.json` — triaged findings export including optional taint analysis source/sink triage details
|
|
326
534
|
|
|
327
|
-
|
|
535
|
+
Relevant `scannerConfig["taint-analysis"]` options:
|
|
328
536
|
|
|
329
|
-
|
|
330
|
-
|
|
537
|
+
- `tiMode`: `"live-required"` (default)
|
|
538
|
+
- `tiFailurePolicy`: `"continue_without_ti"` (default)
|
|
539
|
+
- `tiTimeoutMs`: live TI fetch timeout in milliseconds
|
|
540
|
+
- `refinementEnabled`: enable one post-triage refinement loop (default `false`)
|
|
541
|
+
- `refinementIterations`: max refinement passes when enabled (default `1`)
|
|
542
|
+
- `refinementDeltaOnly`: triage only changed findings after refinement (default `true`)
|
|
543
|
+
- `refinementModel`: optional model override for refinement stage wiring
|
|
331
544
|
|
|
332
|
-
|
|
545
|
+
</details>
|
|
333
546
|
|
|
334
|
-
|
|
547
|
+
<details>
|
|
548
|
+
<summary><strong>Agent Runtime Backends</strong></summary>
|
|
335
549
|
|
|
336
|
-
|
|
337
|
-
kuzushi <repo> --sarif results.sarif
|
|
550
|
+
Kuzushi supports two agent runtime backends:
|
|
338
551
|
|
|
339
|
-
|
|
340
|
-
-X POST \
|
|
341
|
-
repos/OWNER/REPO/code-scanning/sarifs \
|
|
342
|
-
-f commit_sha="$(git rev-parse HEAD)" \
|
|
343
|
-
-f ref="refs/heads/$(git rev-parse --abbrev-ref HEAD)" \
|
|
344
|
-
-f sarif="$(gzip -c results.sarif | base64 | tr -d '\n')"
|
|
345
|
-
```
|
|
552
|
+
**Claude (default)** — Uses `@anthropic-ai/claude-agent-sdk` to spawn Claude Code subprocesses with built-in tool implementations (Read, Glob, Grep, Bash, etc.). Supports session reuse: batch operations keep a single subprocess alive across multiple turns via the SDK's streaming input API, reducing subprocess spawns by ~99%. Requires `ANTHROPIC_API_KEY`.
|
|
346
553
|
|
|
347
|
-
|
|
554
|
+
**Pi-AI** — Uses `@mariozechner/pi-ai` to provide vendor-agnostic LLM access. It supports 15+ providers (Anthropic, OpenAI, Google, Groq, Mistral, etc.) through a single interface. All LLM calls run in-process (no subprocesses).
|
|
348
555
|
|
|
349
|
-
Kuzushi
|
|
556
|
+
Kuzushi implements an internal agentic loop on top of pi-ai:
|
|
350
557
|
|
|
351
|
-
|
|
558
|
+
1. **Tool-calling loop** — call model, parse tool calls, execute tools, feed results back, repeat until stop or max turns
|
|
559
|
+
2. **Local tool implementations** — Read (file reader with line numbers), Glob (Node 22+ `globSync`), Grep (regex search across files)
|
|
560
|
+
3. **Structured output** — system prompt injection + post-hoc JSON extraction from fenced code blocks or raw text
|
|
561
|
+
4. **Safety controls** — max turns, budget enforcement, abort signal, permission gating via `canUseTool`
|
|
352
562
|
|
|
353
|
-
```
|
|
354
|
-
|
|
355
|
-
kuzushi <repo> --
|
|
563
|
+
```sh
|
|
564
|
+
# Use with any supported provider:
|
|
565
|
+
OPENAI_API_KEY=... kuzushi <repo> --model openai:gpt-4o
|
|
566
|
+
GEMINI_API_KEY=... kuzushi <repo> --model google:gemini-2.0-flash
|
|
567
|
+
ANTHROPIC_API_KEY=... kuzushi <repo> --model anthropic:claude-sonnet-4-6
|
|
356
568
|
```
|
|
357
569
|
|
|
358
|
-
|
|
570
|
+
</details>
|
|
359
571
|
|
|
360
|
-
|
|
572
|
+
<details>
|
|
573
|
+
<summary><strong>Architecture</strong></summary>
|
|
361
574
|
|
|
362
|
-
|
|
363
|
-
- `verify.jsonl` — same for verification agents
|
|
364
|
-
- `run.json` — run config and scan options
|
|
365
|
-
- `stats.json` — final pipeline statistics
|
|
575
|
+
Kuzushi is built on three core abstractions:
|
|
366
576
|
|
|
367
|
-
|
|
577
|
+
**Message Bus** — A transport-agnostic `MessageBus` interface (`publish`, `subscribe`, `waitFor`) that decouples pipeline stages. The stable build supports the in-process `EventEmitter` transport today.
|
|
368
578
|
|
|
369
|
-
|
|
579
|
+
**AgentTask + DAG** — Every unit of work (context gatherer, scanner, future threat modeler, etc.) implements the `AgentTask` interface: an `id`, `dependsOn` list, `outputKind`, and a `run()` method. The `TaskRegistry` resolves enabled tasks into a DAG, groups them into parallel stages, detects cycles, and hands execution to the `PipelineOrchestrator`. Upstream task outputs are forwarded to dependents automatically.
|
|
370
580
|
|
|
371
|
-
|
|
581
|
+
**Pipeline Phases** — After the DAG completes, the orchestrator drives sequential phases: triage (classify findings), verification (construct PoC exploits), patch synthesis (auto-generate and re-verify fixes), and report (display results + optional SSE streaming). Each phase has its own concurrency control, cost tracking, and checkpoint support.
|
|
372
582
|
|
|
373
|
-
**
|
|
583
|
+
**Strategy Framework** — The multi-strategy system wraps detection tasks with multiple analytical approaches (syntactic, dataflow, reasoning, execution) that run in parallel or adaptively, merging results with corroboration-based confidence boosting.
|
|
374
584
|
|
|
375
|
-
**
|
|
585
|
+
**Code Graph** — A persistent SQLite-backed graph of code paths from entry points to sinks, built from static import analysis and LLM-assisted tracing. Injected into triage prompts for deeper reasoning about reachability and sanitization.
|
|
376
586
|
|
|
377
|
-
**
|
|
587
|
+
**Session Reuse** — The Claude runtime uses the Agent SDK's `AsyncIterable<SDKUserMessage>` prompt to keep a single subprocess alive across multiple turns. Batch operations (taint labeling, triage, verification, rescoring, PoC generation, patch synthesis) write per-batch data to `.kuzushi/batches/` files and send the subprocess a prompt to `Read` each file. This reduces worst-case subprocess spawns from ~3,100 to ~24 per pipeline run. Runtimes without `createSession` support (pi-ai) fall back to one subprocess per call automatically.
|
|
378
588
|
|
|
379
589
|
Existing `ScannerPlugin` implementations (Semgrep, Agentic) are adapted into `AgentTask` via `adaptScannerPlugin()`, so the scanner plugin API remains stable.
|
|
380
590
|
|
|
381
591
|
See [AGENTS.md](AGENTS.md) for the full developer guide on adding new agent tasks.
|
|
382
592
|
|
|
593
|
+
### Package Surface
|
|
594
|
+
|
|
595
|
+
Kuzushi is published as a CLI-first package. The supported npm surface is the executable plus the root package export; internal modules under `dist/*` and `src/*` are not a stable API contract and may change between releases.
|
|
596
|
+
|
|
597
|
+
Release builds are expected to come from a clean compile into `dist/`. `pnpm build` now cleans `dist/` first, `prepack` rebuilds automatically, and `pnpm verify:pack` runs `npm pack --dry-run` so stale artifacts do not get published.
|
|
598
|
+
|
|
599
|
+
</details>
|
|
600
|
+
|
|
601
|
+
## Output
|
|
602
|
+
|
|
603
|
+
Results are stored in SQLite at `<repo>/.kuzushi/findings.sqlite3`. Export to any format:
|
|
604
|
+
|
|
605
|
+
```sh
|
|
606
|
+
kuzushi <repo> --output report.md # Markdown
|
|
607
|
+
kuzushi <repo> --sarif results.sarif # SARIF v2.1.0 (GitHub Code Scanning compatible)
|
|
608
|
+
kuzushi <repo> --json results.json # JSON
|
|
609
|
+
kuzushi <repo> --csv results.csv # CSV
|
|
610
|
+
kuzushi <repo> --jsonl results.jsonl # JSONL
|
|
611
|
+
```
|
|
612
|
+
|
|
383
613
|
## Development
|
|
384
614
|
|
|
385
615
|
```
|
|
386
616
|
pnpm install # install deps
|
|
387
617
|
pnpm dev -- /path/to/repo # run in dev mode
|
|
618
|
+
pnpm check:types # typecheck app + benchmark tooling
|
|
388
619
|
pnpm typecheck # type check
|
|
389
|
-
pnpm test # run tests
|
|
620
|
+
pnpm test # run tests
|
|
621
|
+
pnpm test:e2e # deterministic mock-backed smoke scan against fixture app
|
|
390
622
|
pnpm test:coverage # tests + coverage (70% threshold)
|
|
391
623
|
pnpm build # compile to dist/
|
|
624
|
+
pnpm verify:pack # verify published tarball contents
|
|
625
|
+
pnpm benchmark # run benchmark suite against govwa dataset
|
|
626
|
+
pnpm benchmark:freeze # freeze current benchmark results as baseline
|
|
627
|
+
pnpm benchmark:diff # diff current results against frozen baseline
|
|
628
|
+
pnpm benchmark:regression # CI regression check against baseline
|
|
392
629
|
```
|
|
393
630
|
|
|
394
|
-
|
|
631
|
+
`pnpm test:e2e` and the benchmark regression workflow use `tests/fixtures/mock-anthropic-server.mjs` for deterministic mock-backed coverage. They are useful smoke/regression checks, but they are not real LLM integration tests.
|
|
395
632
|
|
|
396
633
|
## Troubleshooting
|
|
397
634
|
|
|
398
|
-
- **"Error:
|
|
635
|
+
- **"Error: missing API credentials for selected model provider(s)."**: Set the provider env var(s) for your selected models (for example `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or `GEMINI_API_KEY`)
|
|
399
636
|
- **"No findings from scanner. Code looks clean."**: Your code is clean, or try `--severity ERROR,WARNING,INFO` to include lower-severity rules
|
|
400
637
|
- **Scan interrupted**: Re-run the same command (already-triaged findings are skipped), or use `--resume` to continue from the exact checkpoint
|
|
401
|
-
- **Wrong model**: `kuzushi config set model claude-
|
|
638
|
+
- **Wrong model**: `kuzushi config set model anthropic:claude-sonnet-4-6` or pass `--model` per-scan
|
|
402
639
|
- **Scanner download fails**: Install Opengrep or Semgrep manually, ensure it's on your PATH
|
|
403
|
-
- **High triage cost**: Use `--triage-model
|
|
404
|
-
- **Verification too expensive**: Use `--verify-min-confidence 0.8` to only verify high-confidence TPs, or `--verify-model
|
|
640
|
+
- **High triage cost**: Use `--triage-model openai:gpt-4o-mini` for cheaper triage, or `--max 10` to limit findings
|
|
641
|
+
- **Verification too expensive**: Use `--verify-min-confidence 0.8` to only verify high-confidence TPs, or `--verify-model openai:gpt-4o-mini`
|
|
405
642
|
- **pi-ai model not found**: Ensure the model string uses `provider:modelId` format (e.g., `openai:gpt-4o`, not just `gpt-4o`)
|
|
406
|
-
|
|
643
|
+
|
|
644
|
+
## Contributing
|
|
645
|
+
|
|
646
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
|
|
407
647
|
|
|
408
648
|
## License
|
|
409
649
|
|
|
410
|
-
MIT
|
|
650
|
+
[MIT](LICENSE)
|