@kevinrabun/judges-cli 3.124.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 +24 -0
- package/agents/accessibility.judge.md +44 -0
- package/agents/agent-instructions.judge.md +44 -0
- package/agents/ai-code-safety.judge.md +55 -0
- package/agents/api-contract.judge.md +37 -0
- package/agents/api-design.judge.md +55 -0
- package/agents/authentication.judge.md +61 -0
- package/agents/backwards-compatibility.judge.md +44 -0
- package/agents/caching.judge.md +44 -0
- package/agents/ci-cd.judge.md +44 -0
- package/agents/cloud-readiness.judge.md +51 -0
- package/agents/code-structure.judge.md +48 -0
- package/agents/compliance.judge.md +47 -0
- package/agents/concurrency.judge.md +46 -0
- package/agents/configuration-management.judge.md +44 -0
- package/agents/cost-effectiveness.judge.md +40 -0
- package/agents/cybersecurity.judge.md +61 -0
- package/agents/data-security.judge.md +48 -0
- package/agents/data-sovereignty.judge.md +58 -0
- package/agents/database.judge.md +49 -0
- package/agents/dependency-health.judge.md +46 -0
- package/agents/documentation.judge.md +53 -0
- package/agents/error-handling.judge.md +53 -0
- package/agents/ethics-bias.judge.md +46 -0
- package/agents/false-positive-review.judge.md +85 -0
- package/agents/framework-safety.judge.md +47 -0
- package/agents/hallucination-detection.judge.md +46 -0
- package/agents/iac-security.judge.md +45 -0
- package/agents/intent-alignment.judge.md +44 -0
- package/agents/internationalization.judge.md +42 -0
- package/agents/logging-privacy.judge.md +44 -0
- package/agents/logic-review.judge.md +34 -0
- package/agents/maintainability.judge.md +44 -0
- package/agents/model-fingerprint.judge.md +31 -0
- package/agents/multi-turn-coherence.judge.md +36 -0
- package/agents/observability.judge.md +52 -0
- package/agents/over-engineering.judge.md +48 -0
- package/agents/performance.judge.md +44 -0
- package/agents/portability.judge.md +44 -0
- package/agents/rate-limiting.judge.md +53 -0
- package/agents/reliability.judge.md +55 -0
- package/agents/scalability.judge.md +50 -0
- package/agents/security.judge.md +62 -0
- package/agents/software-practices.judge.md +54 -0
- package/agents/testing.judge.md +52 -0
- package/agents/ux.judge.md +44 -0
- package/bin/judges.js +8 -0
- package/dist/a2a-protocol.d.ts +136 -0
- package/dist/a2a-protocol.js +218 -0
- package/dist/agent-loader.d.ts +107 -0
- package/dist/agent-loader.js +260 -0
- package/dist/api.d.ts +169 -0
- package/dist/api.js +195 -0
- package/dist/ast/cross-file-taint.d.ts +42 -0
- package/dist/ast/cross-file-taint.js +679 -0
- package/dist/ast/index.d.ts +25 -0
- package/dist/ast/index.js +148 -0
- package/dist/ast/structural-parser.d.ts +2 -0
- package/dist/ast/structural-parser.js +756 -0
- package/dist/ast/taint-tracker.d.ts +48 -0
- package/dist/ast/taint-tracker.js +1033 -0
- package/dist/ast/tree-sitter-ast.d.ts +33 -0
- package/dist/ast/tree-sitter-ast.js +1164 -0
- package/dist/ast/types.d.ts +50 -0
- package/dist/ast/types.js +7 -0
- package/dist/audit-trail.d.ts +245 -0
- package/dist/audit-trail.js +257 -0
- package/dist/auto-tune.d.ts +146 -0
- package/dist/auto-tune.js +373 -0
- package/dist/cache.d.ts +53 -0
- package/dist/cache.js +86 -0
- package/dist/calibration.d.ts +108 -0
- package/dist/calibration.js +219 -0
- package/dist/cli-dispatch.d.ts +7 -0
- package/dist/cli-dispatch.js +654 -0
- package/dist/cli-formatters.d.ts +6 -0
- package/dist/cli-formatters.js +186 -0
- package/dist/cli-helpers.d.ts +29 -0
- package/dist/cli-helpers.js +129 -0
- package/dist/cli.d.ts +30 -0
- package/dist/cli.js +1487 -0
- package/dist/commands/adoption-report.d.ts +7 -0
- package/dist/commands/adoption-report.js +218 -0
- package/dist/commands/adoption-track.d.ts +4 -0
- package/dist/commands/adoption-track.js +246 -0
- package/dist/commands/ai-gate.d.ts +7 -0
- package/dist/commands/ai-gate.js +212 -0
- package/dist/commands/ai-model-trust.d.ts +16 -0
- package/dist/commands/ai-model-trust.js +234 -0
- package/dist/commands/ai-output-compare.d.ts +8 -0
- package/dist/commands/ai-output-compare.js +202 -0
- package/dist/commands/ai-pattern-trend.d.ts +8 -0
- package/dist/commands/ai-pattern-trend.js +223 -0
- package/dist/commands/ai-prompt-audit.d.ts +22 -0
- package/dist/commands/ai-prompt-audit.js +254 -0
- package/dist/commands/ai-provenance.d.ts +4 -0
- package/dist/commands/ai-provenance.js +247 -0
- package/dist/commands/api-audit.d.ts +8 -0
- package/dist/commands/api-audit.js +359 -0
- package/dist/commands/api-misuse.d.ts +4 -0
- package/dist/commands/api-misuse.js +260 -0
- package/dist/commands/api-versioning-audit.d.ts +5 -0
- package/dist/commands/api-versioning-audit.js +233 -0
- package/dist/commands/approve-chain.d.ts +7 -0
- package/dist/commands/approve-chain.js +234 -0
- package/dist/commands/arch-audit.d.ts +8 -0
- package/dist/commands/arch-audit.js +283 -0
- package/dist/commands/assertion-density.d.ts +4 -0
- package/dist/commands/assertion-density.js +263 -0
- package/dist/commands/assign-findings.d.ts +36 -0
- package/dist/commands/assign-findings.js +177 -0
- package/dist/commands/async-safety.d.ts +4 -0
- package/dist/commands/async-safety.js +266 -0
- package/dist/commands/audit-bundle.d.ts +28 -0
- package/dist/commands/audit-bundle.js +234 -0
- package/dist/commands/audit-trail.d.ts +17 -0
- package/dist/commands/audit-trail.js +154 -0
- package/dist/commands/auto-approve.d.ts +4 -0
- package/dist/commands/auto-approve.js +188 -0
- package/dist/commands/auto-calibrate.d.ts +14 -0
- package/dist/commands/auto-calibrate.js +106 -0
- package/dist/commands/auto-detect.d.ts +61 -0
- package/dist/commands/auto-detect.js +328 -0
- package/dist/commands/auto-fix.d.ts +17 -0
- package/dist/commands/auto-fix.js +240 -0
- package/dist/commands/auto-triage.d.ts +31 -0
- package/dist/commands/auto-triage.js +125 -0
- package/dist/commands/baseline.d.ts +47 -0
- package/dist/commands/baseline.js +353 -0
- package/dist/commands/batch-review.d.ts +4 -0
- package/dist/commands/batch-review.js +180 -0
- package/dist/commands/benchmark-advanced.d.ts +14 -0
- package/dist/commands/benchmark-advanced.js +5057 -0
- package/dist/commands/benchmark-ai-agents.d.ts +8 -0
- package/dist/commands/benchmark-ai-agents.js +4123 -0
- package/dist/commands/benchmark-ai-output.d.ts +9 -0
- package/dist/commands/benchmark-ai-output.js +365 -0
- package/dist/commands/benchmark-compliance-ethics.d.ts +8 -0
- package/dist/commands/benchmark-compliance-ethics.js +3060 -0
- package/dist/commands/benchmark-expanded-2.d.ts +12 -0
- package/dist/commands/benchmark-expanded-2.js +5530 -0
- package/dist/commands/benchmark-expanded.d.ts +12 -0
- package/dist/commands/benchmark-expanded.js +2599 -0
- package/dist/commands/benchmark-infrastructure.d.ts +8 -0
- package/dist/commands/benchmark-infrastructure.js +2882 -0
- package/dist/commands/benchmark-languages.d.ts +8 -0
- package/dist/commands/benchmark-languages.js +1963 -0
- package/dist/commands/benchmark-quality-ops.d.ts +8 -0
- package/dist/commands/benchmark-quality-ops.js +3415 -0
- package/dist/commands/benchmark-security-deep.d.ts +9 -0
- package/dist/commands/benchmark-security-deep.js +2335 -0
- package/dist/commands/benchmark.d.ts +233 -0
- package/dist/commands/benchmark.js +3214 -0
- package/dist/commands/blame-review.d.ts +4 -0
- package/dist/commands/blame-review.js +266 -0
- package/dist/commands/boundary-enforce.d.ts +5 -0
- package/dist/commands/boundary-enforce.js +255 -0
- package/dist/commands/build-optimize.d.ts +6 -0
- package/dist/commands/build-optimize.js +256 -0
- package/dist/commands/burndown.d.ts +26 -0
- package/dist/commands/burndown.js +179 -0
- package/dist/commands/cache-audit.d.ts +4 -0
- package/dist/commands/cache-audit.js +219 -0
- package/dist/commands/calibration-dashboard.d.ts +1 -0
- package/dist/commands/calibration-dashboard.js +294 -0
- package/dist/commands/calibration-share.d.ts +30 -0
- package/dist/commands/calibration-share.js +182 -0
- package/dist/commands/chat-notify.d.ts +8 -0
- package/dist/commands/chat-notify.js +258 -0
- package/dist/commands/ci-template.d.ts +14 -0
- package/dist/commands/ci-template.js +211 -0
- package/dist/commands/ci-templates.d.ts +9 -0
- package/dist/commands/ci-templates.js +89 -0
- package/dist/commands/clarity-score.d.ts +8 -0
- package/dist/commands/clarity-score.js +260 -0
- package/dist/commands/clone-detect.d.ts +4 -0
- package/dist/commands/clone-detect.js +232 -0
- package/dist/commands/coach-mode.d.ts +7 -0
- package/dist/commands/coach-mode.js +229 -0
- package/dist/commands/code-health.d.ts +4 -0
- package/dist/commands/code-health.js +195 -0
- package/dist/commands/code-owner-suggest.d.ts +16 -0
- package/dist/commands/code-owner-suggest.js +214 -0
- package/dist/commands/code-similarity.d.ts +8 -0
- package/dist/commands/code-similarity.js +231 -0
- package/dist/commands/comment-drift.d.ts +4 -0
- package/dist/commands/comment-drift.js +228 -0
- package/dist/commands/commit-hygiene.d.ts +5 -0
- package/dist/commands/commit-hygiene.js +175 -0
- package/dist/commands/community-patterns.d.ts +1 -0
- package/dist/commands/community-patterns.js +131 -0
- package/dist/commands/compare-runs.d.ts +37 -0
- package/dist/commands/compare-runs.js +228 -0
- package/dist/commands/completion-audit.d.ts +4 -0
- package/dist/commands/completion-audit.js +296 -0
- package/dist/commands/completions.d.ts +1 -0
- package/dist/commands/completions.js +257 -0
- package/dist/commands/compliance-map.d.ts +8 -0
- package/dist/commands/compliance-map.js +374 -0
- package/dist/commands/compliance-report.d.ts +34 -0
- package/dist/commands/compliance-report.js +161 -0
- package/dist/commands/compliance-weight.d.ts +8 -0
- package/dist/commands/compliance-weight.js +272 -0
- package/dist/commands/config-drift.d.ts +24 -0
- package/dist/commands/config-drift.js +213 -0
- package/dist/commands/config-lint.d.ts +4 -0
- package/dist/commands/config-lint.js +187 -0
- package/dist/commands/config-migrate.d.ts +43 -0
- package/dist/commands/config-migrate.js +240 -0
- package/dist/commands/config-share.d.ts +95 -0
- package/dist/commands/config-share.js +406 -0
- package/dist/commands/context-blind.d.ts +4 -0
- package/dist/commands/context-blind.js +272 -0
- package/dist/commands/context-inject.d.ts +8 -0
- package/dist/commands/context-inject.js +211 -0
- package/dist/commands/contract-verify.d.ts +4 -0
- package/dist/commands/contract-verify.js +316 -0
- package/dist/commands/correlate.d.ts +27 -0
- package/dist/commands/correlate.js +241 -0
- package/dist/commands/cost-forecast.d.ts +18 -0
- package/dist/commands/cost-forecast.js +193 -0
- package/dist/commands/coverage-map.d.ts +22 -0
- package/dist/commands/coverage-map.js +222 -0
- package/dist/commands/coverage.d.ts +40 -0
- package/dist/commands/coverage.js +147 -0
- package/dist/commands/cross-file-consistency.d.ts +4 -0
- package/dist/commands/cross-file-consistency.js +254 -0
- package/dist/commands/cross-pr-regression.d.ts +8 -0
- package/dist/commands/cross-pr-regression.js +297 -0
- package/dist/commands/custom-rule.d.ts +4 -0
- package/dist/commands/custom-rule.js +210 -0
- package/dist/commands/dead-code-detect.d.ts +4 -0
- package/dist/commands/dead-code-detect.js +255 -0
- package/dist/commands/dedup-report.d.ts +12 -0
- package/dist/commands/dedup-report.js +137 -0
- package/dist/commands/dep-audit.d.ts +52 -0
- package/dist/commands/dep-audit.js +277 -0
- package/dist/commands/dep-correlate.d.ts +8 -0
- package/dist/commands/dep-correlate.js +207 -0
- package/dist/commands/deploy-readiness.d.ts +5 -0
- package/dist/commands/deploy-readiness.js +211 -0
- package/dist/commands/deprecated.d.ts +47 -0
- package/dist/commands/deprecated.js +201 -0
- package/dist/commands/deps.d.ts +5 -0
- package/dist/commands/deps.js +122 -0
- package/dist/commands/design-audit.d.ts +8 -0
- package/dist/commands/design-audit.js +301 -0
- package/dist/commands/dev-score.d.ts +36 -0
- package/dist/commands/dev-score.js +203 -0
- package/dist/commands/diff-explain.d.ts +4 -0
- package/dist/commands/diff-explain.js +142 -0
- package/dist/commands/diff-only.d.ts +33 -0
- package/dist/commands/diff-only.js +151 -0
- package/dist/commands/diff-review.d.ts +4 -0
- package/dist/commands/diff-review.js +190 -0
- package/dist/commands/diff.d.ts +6 -0
- package/dist/commands/diff.js +449 -0
- package/dist/commands/digest.d.ts +19 -0
- package/dist/commands/digest.js +221 -0
- package/dist/commands/doc-drift.d.ts +8 -0
- package/dist/commands/doc-drift.js +258 -0
- package/dist/commands/doc-gen.d.ts +7 -0
- package/dist/commands/doc-gen.js +208 -0
- package/dist/commands/docs.d.ts +1 -0
- package/dist/commands/docs.js +156 -0
- package/dist/commands/doctor.d.ts +55 -0
- package/dist/commands/doctor.js +362 -0
- package/dist/commands/encoding-safety.d.ts +4 -0
- package/dist/commands/encoding-safety.js +275 -0
- package/dist/commands/error-taxonomy.d.ts +5 -0
- package/dist/commands/error-taxonomy.js +226 -0
- package/dist/commands/error-ux.d.ts +4 -0
- package/dist/commands/error-ux.js +252 -0
- package/dist/commands/event-leak.d.ts +4 -0
- package/dist/commands/event-leak.js +262 -0
- package/dist/commands/evidence-chain.d.ts +4 -0
- package/dist/commands/evidence-chain.js +309 -0
- package/dist/commands/example-leak.d.ts +4 -0
- package/dist/commands/example-leak.js +232 -0
- package/dist/commands/exception-consistency.d.ts +6 -0
- package/dist/commands/exception-consistency.js +192 -0
- package/dist/commands/exec-report.d.ts +8 -0
- package/dist/commands/exec-report.js +271 -0
- package/dist/commands/explain-finding.d.ts +7 -0
- package/dist/commands/explain-finding.js +278 -0
- package/dist/commands/false-negatives.d.ts +34 -0
- package/dist/commands/false-negatives.js +165 -0
- package/dist/commands/feedback-rules.d.ts +28 -0
- package/dist/commands/feedback-rules.js +173 -0
- package/dist/commands/feedback.d.ts +182 -0
- package/dist/commands/feedback.js +550 -0
- package/dist/commands/finding-age-analysis.d.ts +4 -0
- package/dist/commands/finding-age-analysis.js +144 -0
- package/dist/commands/finding-age-report.d.ts +4 -0
- package/dist/commands/finding-age-report.js +154 -0
- package/dist/commands/finding-age-tracker.d.ts +7 -0
- package/dist/commands/finding-age-tracker.js +152 -0
- package/dist/commands/finding-age.d.ts +4 -0
- package/dist/commands/finding-age.js +145 -0
- package/dist/commands/finding-ancestry-trace.d.ts +1 -0
- package/dist/commands/finding-ancestry-trace.js +69 -0
- package/dist/commands/finding-annotation-export.d.ts +1 -0
- package/dist/commands/finding-annotation-export.js +97 -0
- package/dist/commands/finding-annotation-layer.d.ts +4 -0
- package/dist/commands/finding-annotation-layer.js +128 -0
- package/dist/commands/finding-auto-categorize.d.ts +1 -0
- package/dist/commands/finding-auto-categorize.js +109 -0
- package/dist/commands/finding-auto-fix-suggest.d.ts +1 -0
- package/dist/commands/finding-auto-fix-suggest.js +76 -0
- package/dist/commands/finding-auto-fix.d.ts +4 -0
- package/dist/commands/finding-auto-fix.js +188 -0
- package/dist/commands/finding-auto-group.d.ts +4 -0
- package/dist/commands/finding-auto-group.js +108 -0
- package/dist/commands/finding-auto-label.d.ts +4 -0
- package/dist/commands/finding-auto-label.js +220 -0
- package/dist/commands/finding-auto-priority.d.ts +1 -0
- package/dist/commands/finding-auto-priority.js +100 -0
- package/dist/commands/finding-auto-suppress.d.ts +4 -0
- package/dist/commands/finding-auto-suppress.js +126 -0
- package/dist/commands/finding-auto-tag.d.ts +4 -0
- package/dist/commands/finding-auto-tag.js +113 -0
- package/dist/commands/finding-auto-triage.d.ts +4 -0
- package/dist/commands/finding-auto-triage.js +108 -0
- package/dist/commands/finding-autofix-preview.d.ts +4 -0
- package/dist/commands/finding-autofix-preview.js +86 -0
- package/dist/commands/finding-batch-resolve.d.ts +4 -0
- package/dist/commands/finding-batch-resolve.js +165 -0
- package/dist/commands/finding-batch-suppress.d.ts +4 -0
- package/dist/commands/finding-batch-suppress.js +85 -0
- package/dist/commands/finding-batch-triage.d.ts +1 -0
- package/dist/commands/finding-batch-triage.js +90 -0
- package/dist/commands/finding-blast-radius.d.ts +4 -0
- package/dist/commands/finding-blast-radius.js +91 -0
- package/dist/commands/finding-budget.d.ts +4 -0
- package/dist/commands/finding-budget.js +232 -0
- package/dist/commands/finding-category-map.d.ts +4 -0
- package/dist/commands/finding-category-map.js +103 -0
- package/dist/commands/finding-category-stats.d.ts +4 -0
- package/dist/commands/finding-category-stats.js +104 -0
- package/dist/commands/finding-category.d.ts +4 -0
- package/dist/commands/finding-category.js +109 -0
- package/dist/commands/finding-change-impact.d.ts +4 -0
- package/dist/commands/finding-change-impact.js +107 -0
- package/dist/commands/finding-cluster-analysis.d.ts +4 -0
- package/dist/commands/finding-cluster-analysis.js +133 -0
- package/dist/commands/finding-cluster-group.d.ts +4 -0
- package/dist/commands/finding-cluster-group.js +105 -0
- package/dist/commands/finding-cluster-summary.d.ts +1 -0
- package/dist/commands/finding-cluster-summary.js +85 -0
- package/dist/commands/finding-cluster.d.ts +4 -0
- package/dist/commands/finding-cluster.js +157 -0
- package/dist/commands/finding-code-context.d.ts +4 -0
- package/dist/commands/finding-code-context.js +96 -0
- package/dist/commands/finding-code-smell.d.ts +4 -0
- package/dist/commands/finding-code-smell.js +113 -0
- package/dist/commands/finding-compare-runs.d.ts +4 -0
- package/dist/commands/finding-compare-runs.js +105 -0
- package/dist/commands/finding-compliance-tag.d.ts +1 -0
- package/dist/commands/finding-compliance-tag.js +106 -0
- package/dist/commands/finding-confidence-boost.d.ts +1 -0
- package/dist/commands/finding-confidence-boost.js +88 -0
- package/dist/commands/finding-confidence-calibrate.d.ts +4 -0
- package/dist/commands/finding-confidence-calibrate.js +111 -0
- package/dist/commands/finding-confidence-filter.d.ts +4 -0
- package/dist/commands/finding-confidence-filter.js +77 -0
- package/dist/commands/finding-contest.d.ts +7 -0
- package/dist/commands/finding-contest.js +192 -0
- package/dist/commands/finding-context-enrich.d.ts +4 -0
- package/dist/commands/finding-context-enrich.js +89 -0
- package/dist/commands/finding-context-expand.d.ts +4 -0
- package/dist/commands/finding-context-expand.js +102 -0
- package/dist/commands/finding-context-link.d.ts +1 -0
- package/dist/commands/finding-context-link.js +94 -0
- package/dist/commands/finding-context-summary.d.ts +1 -0
- package/dist/commands/finding-context-summary.js +85 -0
- package/dist/commands/finding-context-window.d.ts +4 -0
- package/dist/commands/finding-context-window.js +126 -0
- package/dist/commands/finding-context.d.ts +4 -0
- package/dist/commands/finding-context.js +140 -0
- package/dist/commands/finding-correlate.d.ts +4 -0
- package/dist/commands/finding-correlate.js +88 -0
- package/dist/commands/finding-correlation-map.d.ts +4 -0
- package/dist/commands/finding-correlation-map.js +101 -0
- package/dist/commands/finding-correlation.d.ts +4 -0
- package/dist/commands/finding-correlation.js +103 -0
- package/dist/commands/finding-cross-file-link.d.ts +1 -0
- package/dist/commands/finding-cross-file-link.js +101 -0
- package/dist/commands/finding-cross-ref.d.ts +4 -0
- package/dist/commands/finding-cross-ref.js +98 -0
- package/dist/commands/finding-cve-lookup.d.ts +4 -0
- package/dist/commands/finding-cve-lookup.js +97 -0
- package/dist/commands/finding-cwe-lookup.d.ts +4 -0
- package/dist/commands/finding-cwe-lookup.js +148 -0
- package/dist/commands/finding-cwe-map.d.ts +4 -0
- package/dist/commands/finding-cwe-map.js +133 -0
- package/dist/commands/finding-dedup-cross-file.d.ts +4 -0
- package/dist/commands/finding-dedup-cross-file.js +95 -0
- package/dist/commands/finding-dedup-cross.d.ts +4 -0
- package/dist/commands/finding-dedup-cross.js +90 -0
- package/dist/commands/finding-dedup-merge.d.ts +1 -0
- package/dist/commands/finding-dedup-merge.js +107 -0
- package/dist/commands/finding-dedup-report.d.ts +4 -0
- package/dist/commands/finding-dedup-report.js +101 -0
- package/dist/commands/finding-dedup-smart.d.ts +1 -0
- package/dist/commands/finding-dedup-smart.js +109 -0
- package/dist/commands/finding-deduplicate.d.ts +4 -0
- package/dist/commands/finding-deduplicate.js +141 -0
- package/dist/commands/finding-dependency-check.d.ts +4 -0
- package/dist/commands/finding-dependency-check.js +119 -0
- package/dist/commands/finding-dependency-impact.d.ts +1 -0
- package/dist/commands/finding-dependency-impact.js +97 -0
- package/dist/commands/finding-dependency-link.d.ts +4 -0
- package/dist/commands/finding-dependency-link.js +73 -0
- package/dist/commands/finding-dependency-risk.d.ts +4 -0
- package/dist/commands/finding-dependency-risk.js +117 -0
- package/dist/commands/finding-dependency-tree.d.ts +4 -0
- package/dist/commands/finding-dependency-tree.js +116 -0
- package/dist/commands/finding-diff-highlight.d.ts +4 -0
- package/dist/commands/finding-diff-highlight.js +107 -0
- package/dist/commands/finding-dismiss-workflow.d.ts +4 -0
- package/dist/commands/finding-dismiss-workflow.js +119 -0
- package/dist/commands/finding-duplicate-detect.d.ts +4 -0
- package/dist/commands/finding-duplicate-detect.js +113 -0
- package/dist/commands/finding-duplicate-rule.d.ts +4 -0
- package/dist/commands/finding-duplicate-rule.js +103 -0
- package/dist/commands/finding-effort-rank.d.ts +1 -0
- package/dist/commands/finding-effort-rank.js +93 -0
- package/dist/commands/finding-evidence-chain.d.ts +4 -0
- package/dist/commands/finding-evidence-chain.js +147 -0
- package/dist/commands/finding-evidence-collect.d.ts +4 -0
- package/dist/commands/finding-evidence-collect.js +114 -0
- package/dist/commands/finding-explain.d.ts +4 -0
- package/dist/commands/finding-explain.js +93 -0
- package/dist/commands/finding-export-csv.d.ts +4 -0
- package/dist/commands/finding-export-csv.js +78 -0
- package/dist/commands/finding-false-neg-check.d.ts +8 -0
- package/dist/commands/finding-false-neg-check.js +139 -0
- package/dist/commands/finding-false-positive-learn.d.ts +4 -0
- package/dist/commands/finding-false-positive-learn.js +85 -0
- package/dist/commands/finding-false-positive-log.d.ts +4 -0
- package/dist/commands/finding-false-positive-log.js +150 -0
- package/dist/commands/finding-false-positive.d.ts +4 -0
- package/dist/commands/finding-false-positive.js +134 -0
- package/dist/commands/finding-filter-view.d.ts +4 -0
- package/dist/commands/finding-filter-view.js +107 -0
- package/dist/commands/finding-fix-chain.d.ts +1 -0
- package/dist/commands/finding-fix-chain.js +78 -0
- package/dist/commands/finding-fix-estimate.d.ts +1 -0
- package/dist/commands/finding-fix-estimate.js +95 -0
- package/dist/commands/finding-fix-playbook.d.ts +1 -0
- package/dist/commands/finding-fix-playbook.js +110 -0
- package/dist/commands/finding-fix-priority.d.ts +4 -0
- package/dist/commands/finding-fix-priority.js +98 -0
- package/dist/commands/finding-fix-rate.d.ts +4 -0
- package/dist/commands/finding-fix-rate.js +141 -0
- package/dist/commands/finding-fix-suggest.d.ts +4 -0
- package/dist/commands/finding-fix-suggest.js +88 -0
- package/dist/commands/finding-fix-validation.d.ts +4 -0
- package/dist/commands/finding-fix-validation.js +115 -0
- package/dist/commands/finding-fix-verify.d.ts +4 -0
- package/dist/commands/finding-fix-verify.js +198 -0
- package/dist/commands/finding-group-by.d.ts +4 -0
- package/dist/commands/finding-group-by.js +86 -0
- package/dist/commands/finding-group.d.ts +15 -0
- package/dist/commands/finding-group.js +164 -0
- package/dist/commands/finding-groupby-file.d.ts +4 -0
- package/dist/commands/finding-groupby-file.js +94 -0
- package/dist/commands/finding-hotfix-suggest.d.ts +7 -0
- package/dist/commands/finding-hotfix-suggest.js +170 -0
- package/dist/commands/finding-hotspot-detect.d.ts +1 -0
- package/dist/commands/finding-hotspot-detect.js +120 -0
- package/dist/commands/finding-hotspot-map.d.ts +4 -0
- package/dist/commands/finding-hotspot-map.js +106 -0
- package/dist/commands/finding-hotspot.d.ts +4 -0
- package/dist/commands/finding-hotspot.js +115 -0
- package/dist/commands/finding-impact-radius.d.ts +1 -0
- package/dist/commands/finding-impact-radius.js +94 -0
- package/dist/commands/finding-impact-rank.d.ts +4 -0
- package/dist/commands/finding-impact-rank.js +85 -0
- package/dist/commands/finding-impact-score.d.ts +4 -0
- package/dist/commands/finding-impact-score.js +123 -0
- package/dist/commands/finding-impact.d.ts +4 -0
- package/dist/commands/finding-impact.js +135 -0
- package/dist/commands/finding-line-blame.d.ts +7 -0
- package/dist/commands/finding-line-blame.js +129 -0
- package/dist/commands/finding-link-graph.d.ts +4 -0
- package/dist/commands/finding-link-graph.js +144 -0
- package/dist/commands/finding-link.d.ts +4 -0
- package/dist/commands/finding-link.js +128 -0
- package/dist/commands/finding-merge-results.d.ts +4 -0
- package/dist/commands/finding-merge-results.js +110 -0
- package/dist/commands/finding-merge-strategy.d.ts +1 -0
- package/dist/commands/finding-merge-strategy.js +84 -0
- package/dist/commands/finding-metadata-enrich.d.ts +4 -0
- package/dist/commands/finding-metadata-enrich.js +92 -0
- package/dist/commands/finding-noise-filter.d.ts +7 -0
- package/dist/commands/finding-noise-filter.js +140 -0
- package/dist/commands/finding-noise-reduce.d.ts +1 -0
- package/dist/commands/finding-noise-reduce.js +81 -0
- package/dist/commands/finding-noise-score.d.ts +1 -0
- package/dist/commands/finding-noise-score.js +93 -0
- package/dist/commands/finding-owner-assign.d.ts +4 -0
- package/dist/commands/finding-owner-assign.js +133 -0
- package/dist/commands/finding-owner-notify.d.ts +1 -0
- package/dist/commands/finding-owner-notify.js +121 -0
- package/dist/commands/finding-ownership-assign.d.ts +4 -0
- package/dist/commands/finding-ownership-assign.js +101 -0
- package/dist/commands/finding-ownership-map.d.ts +4 -0
- package/dist/commands/finding-ownership-map.js +118 -0
- package/dist/commands/finding-patch-chain.d.ts +1 -0
- package/dist/commands/finding-patch-chain.js +90 -0
- package/dist/commands/finding-patch-preview.d.ts +4 -0
- package/dist/commands/finding-patch-preview.js +103 -0
- package/dist/commands/finding-pattern-detect.d.ts +4 -0
- package/dist/commands/finding-pattern-detect.js +127 -0
- package/dist/commands/finding-pattern-library.d.ts +4 -0
- package/dist/commands/finding-pattern-library.js +145 -0
- package/dist/commands/finding-pattern-match.d.ts +4 -0
- package/dist/commands/finding-pattern-match.js +165 -0
- package/dist/commands/finding-prioritize.d.ts +4 -0
- package/dist/commands/finding-prioritize.js +119 -0
- package/dist/commands/finding-priority-matrix.d.ts +4 -0
- package/dist/commands/finding-priority-matrix.js +102 -0
- package/dist/commands/finding-priority-queue.d.ts +4 -0
- package/dist/commands/finding-priority-queue.js +131 -0
- package/dist/commands/finding-priority-rank.d.ts +1 -0
- package/dist/commands/finding-priority-rank.js +82 -0
- package/dist/commands/finding-quality-gate.d.ts +4 -0
- package/dist/commands/finding-quality-gate.js +107 -0
- package/dist/commands/finding-rank.d.ts +4 -0
- package/dist/commands/finding-rank.js +138 -0
- package/dist/commands/finding-reachability-check.d.ts +4 -0
- package/dist/commands/finding-reachability-check.js +102 -0
- package/dist/commands/finding-reachability.d.ts +4 -0
- package/dist/commands/finding-reachability.js +131 -0
- package/dist/commands/finding-recurrence-check.d.ts +1 -0
- package/dist/commands/finding-recurrence-check.js +103 -0
- package/dist/commands/finding-recurrence-detect.d.ts +4 -0
- package/dist/commands/finding-recurrence-detect.js +77 -0
- package/dist/commands/finding-recurrence.d.ts +4 -0
- package/dist/commands/finding-recurrence.js +135 -0
- package/dist/commands/finding-regression-check.d.ts +4 -0
- package/dist/commands/finding-regression-check.js +112 -0
- package/dist/commands/finding-regression-detect.d.ts +1 -0
- package/dist/commands/finding-regression-detect.js +86 -0
- package/dist/commands/finding-related-rules.d.ts +4 -0
- package/dist/commands/finding-related-rules.js +151 -0
- package/dist/commands/finding-remediation-cost.d.ts +1 -0
- package/dist/commands/finding-remediation-cost.js +79 -0
- package/dist/commands/finding-remediation-plan.d.ts +4 -0
- package/dist/commands/finding-remediation-plan.js +107 -0
- package/dist/commands/finding-reopen-detect.d.ts +1 -0
- package/dist/commands/finding-reopen-detect.js +77 -0
- package/dist/commands/finding-repeat-detect.d.ts +1 -0
- package/dist/commands/finding-repeat-detect.js +92 -0
- package/dist/commands/finding-resolution-track.d.ts +4 -0
- package/dist/commands/finding-resolution-track.js +150 -0
- package/dist/commands/finding-resolution-tracker.d.ts +4 -0
- package/dist/commands/finding-resolution-tracker.js +163 -0
- package/dist/commands/finding-resolution-workflow.d.ts +1 -0
- package/dist/commands/finding-resolution-workflow.js +91 -0
- package/dist/commands/finding-resolution.d.ts +4 -0
- package/dist/commands/finding-resolution.js +142 -0
- package/dist/commands/finding-risk-label.d.ts +1 -0
- package/dist/commands/finding-risk-label.js +72 -0
- package/dist/commands/finding-risk-matrix.d.ts +4 -0
- package/dist/commands/finding-risk-matrix.js +126 -0
- package/dist/commands/finding-risk-score.d.ts +4 -0
- package/dist/commands/finding-risk-score.js +95 -0
- package/dist/commands/finding-root-cause.d.ts +4 -0
- package/dist/commands/finding-root-cause.js +184 -0
- package/dist/commands/finding-rule-explain.d.ts +4 -0
- package/dist/commands/finding-rule-explain.js +140 -0
- package/dist/commands/finding-scope-filter.d.ts +1 -0
- package/dist/commands/finding-scope-filter.js +77 -0
- package/dist/commands/finding-scope-impact.d.ts +1 -0
- package/dist/commands/finding-scope-impact.js +83 -0
- package/dist/commands/finding-search-index.d.ts +4 -0
- package/dist/commands/finding-search-index.js +99 -0
- package/dist/commands/finding-security-hotspot.d.ts +4 -0
- package/dist/commands/finding-security-hotspot.js +175 -0
- package/dist/commands/finding-severity-dist.d.ts +4 -0
- package/dist/commands/finding-severity-dist.js +105 -0
- package/dist/commands/finding-severity-drift.d.ts +4 -0
- package/dist/commands/finding-severity-drift.js +92 -0
- package/dist/commands/finding-severity-heatmap.d.ts +4 -0
- package/dist/commands/finding-severity-heatmap.js +108 -0
- package/dist/commands/finding-severity-histogram.d.ts +4 -0
- package/dist/commands/finding-severity-histogram.js +66 -0
- package/dist/commands/finding-severity-override.d.ts +4 -0
- package/dist/commands/finding-severity-override.js +131 -0
- package/dist/commands/finding-severity-rebalance.d.ts +1 -0
- package/dist/commands/finding-severity-rebalance.js +108 -0
- package/dist/commands/finding-severity-trend.d.ts +4 -0
- package/dist/commands/finding-severity-trend.js +127 -0
- package/dist/commands/finding-similar-match.d.ts +1 -0
- package/dist/commands/finding-similar-match.js +112 -0
- package/dist/commands/finding-snippet.d.ts +4 -0
- package/dist/commands/finding-snippet.js +102 -0
- package/dist/commands/finding-summary-digest.d.ts +7 -0
- package/dist/commands/finding-summary-digest.js +145 -0
- package/dist/commands/finding-suppress-pattern.d.ts +4 -0
- package/dist/commands/finding-suppress-pattern.js +148 -0
- package/dist/commands/finding-suppress.d.ts +4 -0
- package/dist/commands/finding-suppress.js +164 -0
- package/dist/commands/finding-suppression-audit.d.ts +4 -0
- package/dist/commands/finding-suppression-audit.js +137 -0
- package/dist/commands/finding-suppression-list.d.ts +4 -0
- package/dist/commands/finding-suppression-list.js +119 -0
- package/dist/commands/finding-suppression-log.d.ts +4 -0
- package/dist/commands/finding-suppression-log.js +174 -0
- package/dist/commands/finding-time-to-fix.d.ts +1 -0
- package/dist/commands/finding-time-to-fix.js +98 -0
- package/dist/commands/finding-timeline-view.d.ts +4 -0
- package/dist/commands/finding-timeline-view.js +98 -0
- package/dist/commands/finding-timeline.d.ts +4 -0
- package/dist/commands/finding-timeline.js +143 -0
- package/dist/commands/finding-top-offender.d.ts +1 -0
- package/dist/commands/finding-top-offender.js +75 -0
- package/dist/commands/finding-trace.d.ts +4 -0
- package/dist/commands/finding-trace.js +118 -0
- package/dist/commands/finding-trend-alert.d.ts +1 -0
- package/dist/commands/finding-trend-alert.js +126 -0
- package/dist/commands/finding-trend-analysis.d.ts +4 -0
- package/dist/commands/finding-trend-analysis.js +95 -0
- package/dist/commands/finding-trend-forecast.d.ts +4 -0
- package/dist/commands/finding-trend-forecast.js +106 -0
- package/dist/commands/finding-trend-report.d.ts +4 -0
- package/dist/commands/finding-trend-report.js +107 -0
- package/dist/commands/finding-trend.d.ts +4 -0
- package/dist/commands/finding-trend.js +118 -0
- package/dist/commands/fix-pr.d.ts +22 -0
- package/dist/commands/fix-pr.js +286 -0
- package/dist/commands/fix-suggest.d.ts +4 -0
- package/dist/commands/fix-suggest.js +171 -0
- package/dist/commands/fix-verify.d.ts +4 -0
- package/dist/commands/fix-verify.js +123 -0
- package/dist/commands/fix.d.ts +117 -0
- package/dist/commands/fix.js +445 -0
- package/dist/commands/focus-area.d.ts +5 -0
- package/dist/commands/focus-area.js +192 -0
- package/dist/commands/generate.d.ts +7 -0
- package/dist/commands/generate.js +403 -0
- package/dist/commands/governance.d.ts +31 -0
- package/dist/commands/governance.js +202 -0
- package/dist/commands/group-findings.d.ts +22 -0
- package/dist/commands/group-findings.js +154 -0
- package/dist/commands/guided-tour.d.ts +8 -0
- package/dist/commands/guided-tour.js +287 -0
- package/dist/commands/habit-tracker.d.ts +7 -0
- package/dist/commands/habit-tracker.js +194 -0
- package/dist/commands/hallucination-detect.d.ts +4 -0
- package/dist/commands/hallucination-detect.js +350 -0
- package/dist/commands/hallucination-score.d.ts +8 -0
- package/dist/commands/hallucination-score.js +316 -0
- package/dist/commands/help.d.ts +7 -0
- package/dist/commands/help.js +302 -0
- package/dist/commands/hook-install.d.ts +21 -0
- package/dist/commands/hook-install.js +142 -0
- package/dist/commands/hook.d.ts +8 -0
- package/dist/commands/hook.js +145 -0
- package/dist/commands/iac-lint.d.ts +7 -0
- package/dist/commands/iac-lint.js +312 -0
- package/dist/commands/idempotency-audit.d.ts +4 -0
- package/dist/commands/idempotency-audit.js +222 -0
- package/dist/commands/ignore-list.d.ts +18 -0
- package/dist/commands/ignore-list.js +152 -0
- package/dist/commands/impact-scan.d.ts +8 -0
- package/dist/commands/impact-scan.js +281 -0
- package/dist/commands/incident-response.d.ts +7 -0
- package/dist/commands/incident-response.js +254 -0
- package/dist/commands/incremental-review.d.ts +4 -0
- package/dist/commands/incremental-review.js +236 -0
- package/dist/commands/init.d.ts +10 -0
- package/dist/commands/init.js +265 -0
- package/dist/commands/input-guard.d.ts +4 -0
- package/dist/commands/input-guard.js +255 -0
- package/dist/commands/interactive-fix.d.ts +22 -0
- package/dist/commands/interactive-fix.js +139 -0
- package/dist/commands/judge-author.d.ts +7 -0
- package/dist/commands/judge-author.js +260 -0
- package/dist/commands/judge-config.d.ts +4 -0
- package/dist/commands/judge-config.js +151 -0
- package/dist/commands/judge-learn.d.ts +8 -0
- package/dist/commands/judge-learn.js +217 -0
- package/dist/commands/judge-reputation.d.ts +28 -0
- package/dist/commands/judge-reputation.js +198 -0
- package/dist/commands/kb.d.ts +40 -0
- package/dist/commands/kb.js +228 -0
- package/dist/commands/language-packs.d.ts +42 -0
- package/dist/commands/language-packs.js +150 -0
- package/dist/commands/learn.d.ts +26 -0
- package/dist/commands/learn.js +288 -0
- package/dist/commands/learning-path.d.ts +8 -0
- package/dist/commands/learning-path.js +325 -0
- package/dist/commands/license-scan.d.ts +8 -0
- package/dist/commands/license-scan.js +183 -0
- package/dist/commands/llm-benchmark-optimizer.d.ts +78 -0
- package/dist/commands/llm-benchmark-optimizer.js +241 -0
- package/dist/commands/llm-benchmark.d.ts +156 -0
- package/dist/commands/llm-benchmark.js +670 -0
- package/dist/commands/log-quality.d.ts +5 -0
- package/dist/commands/log-quality.js +211 -0
- package/dist/commands/logic-lint.d.ts +4 -0
- package/dist/commands/logic-lint.js +255 -0
- package/dist/commands/lsp.d.ts +23 -0
- package/dist/commands/lsp.js +285 -0
- package/dist/commands/merge-verdict.d.ts +4 -0
- package/dist/commands/merge-verdict.js +287 -0
- package/dist/commands/metrics-dashboard.d.ts +21 -0
- package/dist/commands/metrics-dashboard.js +334 -0
- package/dist/commands/metrics.d.ts +57 -0
- package/dist/commands/metrics.js +241 -0
- package/dist/commands/migration-safety.d.ts +5 -0
- package/dist/commands/migration-safety.js +256 -0
- package/dist/commands/model-report.d.ts +8 -0
- package/dist/commands/model-report.js +194 -0
- package/dist/commands/model-risk.d.ts +27 -0
- package/dist/commands/model-risk.js +220 -0
- package/dist/commands/monorepo.d.ts +37 -0
- package/dist/commands/monorepo.js +232 -0
- package/dist/commands/multi-lang-review.d.ts +4 -0
- package/dist/commands/multi-lang-review.js +230 -0
- package/dist/commands/noise-advisor.d.ts +29 -0
- package/dist/commands/noise-advisor.js +170 -0
- package/dist/commands/notify.d.ts +78 -0
- package/dist/commands/notify.js +324 -0
- package/dist/commands/null-safety-audit.d.ts +5 -0
- package/dist/commands/null-safety-audit.js +221 -0
- package/dist/commands/observability-gap.d.ts +5 -0
- package/dist/commands/observability-gap.js +211 -0
- package/dist/commands/onboard.d.ts +12 -0
- package/dist/commands/onboard.js +178 -0
- package/dist/commands/org-metrics.d.ts +23 -0
- package/dist/commands/org-metrics.js +237 -0
- package/dist/commands/org-policy.d.ts +7 -0
- package/dist/commands/org-policy.js +207 -0
- package/dist/commands/over-abstraction.d.ts +4 -0
- package/dist/commands/over-abstraction.js +307 -0
- package/dist/commands/override.d.ts +61 -0
- package/dist/commands/override.js +268 -0
- package/dist/commands/ownership-map.d.ts +5 -0
- package/dist/commands/ownership-map.js +217 -0
- package/dist/commands/parity.d.ts +30 -0
- package/dist/commands/parity.js +212 -0
- package/dist/commands/pattern-registry.d.ts +22 -0
- package/dist/commands/pattern-registry.js +226 -0
- package/dist/commands/perf-compare.d.ts +8 -0
- package/dist/commands/perf-compare.js +245 -0
- package/dist/commands/perf-hotspot.d.ts +7 -0
- package/dist/commands/perf-hotspot.js +273 -0
- package/dist/commands/phantom-import.d.ts +4 -0
- package/dist/commands/phantom-import.js +260 -0
- package/dist/commands/pii-scan.d.ts +7 -0
- package/dist/commands/pii-scan.js +299 -0
- package/dist/commands/plugin-search.d.ts +39 -0
- package/dist/commands/plugin-search.js +327 -0
- package/dist/commands/plugins.d.ts +12 -0
- package/dist/commands/plugins.js +104 -0
- package/dist/commands/policy-audit.d.ts +52 -0
- package/dist/commands/policy-audit.js +160 -0
- package/dist/commands/pr-quality-gate.d.ts +28 -0
- package/dist/commands/pr-quality-gate.js +207 -0
- package/dist/commands/pr-summary.d.ts +25 -0
- package/dist/commands/pr-summary.js +187 -0
- package/dist/commands/predict.d.ts +7 -0
- package/dist/commands/predict.js +218 -0
- package/dist/commands/privilege-path.d.ts +4 -0
- package/dist/commands/privilege-path.js +233 -0
- package/dist/commands/profile.d.ts +37 -0
- package/dist/commands/profile.js +101 -0
- package/dist/commands/prompt-replay.d.ts +7 -0
- package/dist/commands/prompt-replay.js +176 -0
- package/dist/commands/quality-gate.d.ts +69 -0
- package/dist/commands/quality-gate.js +252 -0
- package/dist/commands/query.d.ts +19 -0
- package/dist/commands/query.js +229 -0
- package/dist/commands/quick-check.d.ts +4 -0
- package/dist/commands/quick-check.js +173 -0
- package/dist/commands/recommend.d.ts +20 -0
- package/dist/commands/recommend.js +282 -0
- package/dist/commands/refactor-safety.d.ts +8 -0
- package/dist/commands/refactor-safety.js +273 -0
- package/dist/commands/reg-watch.d.ts +20 -0
- package/dist/commands/reg-watch.js +219 -0
- package/dist/commands/regression-alert.d.ts +31 -0
- package/dist/commands/regression-alert.js +215 -0
- package/dist/commands/remediation-lib.d.ts +8 -0
- package/dist/commands/remediation-lib.js +265 -0
- package/dist/commands/remediation.d.ts +20 -0
- package/dist/commands/remediation.js +256 -0
- package/dist/commands/report-template.d.ts +16 -0
- package/dist/commands/report-template.js +290 -0
- package/dist/commands/report.d.ts +12 -0
- package/dist/commands/report.js +139 -0
- package/dist/commands/resource-cleanup.d.ts +6 -0
- package/dist/commands/resource-cleanup.js +235 -0
- package/dist/commands/retro.d.ts +22 -0
- package/dist/commands/retro.js +211 -0
- package/dist/commands/retry-pattern-audit.d.ts +5 -0
- package/dist/commands/retry-pattern-audit.js +215 -0
- package/dist/commands/review-ab-test.d.ts +4 -0
- package/dist/commands/review-ab-test.js +224 -0
- package/dist/commands/review-access-log.d.ts +4 -0
- package/dist/commands/review-access-log.js +65 -0
- package/dist/commands/review-action-item-gen.d.ts +1 -0
- package/dist/commands/review-action-item-gen.js +72 -0
- package/dist/commands/review-adoption-metrics.d.ts +4 -0
- package/dist/commands/review-adoption-metrics.js +95 -0
- package/dist/commands/review-adoption-score.d.ts +1 -0
- package/dist/commands/review-adoption-score.js +181 -0
- package/dist/commands/review-ai-feedback-loop.d.ts +1 -0
- package/dist/commands/review-ai-feedback-loop.js +116 -0
- package/dist/commands/review-annotate.d.ts +4 -0
- package/dist/commands/review-annotate.js +122 -0
- package/dist/commands/review-annotation-export.d.ts +4 -0
- package/dist/commands/review-annotation-export.js +105 -0
- package/dist/commands/review-annotation.d.ts +4 -0
- package/dist/commands/review-annotation.js +133 -0
- package/dist/commands/review-api-export.d.ts +4 -0
- package/dist/commands/review-api-export.js +98 -0
- package/dist/commands/review-approval-criteria.d.ts +1 -0
- package/dist/commands/review-approval-criteria.js +99 -0
- package/dist/commands/review-approval-gate.d.ts +7 -0
- package/dist/commands/review-approval-gate.js +190 -0
- package/dist/commands/review-approval.d.ts +4 -0
- package/dist/commands/review-approval.js +133 -0
- package/dist/commands/review-archive-search.d.ts +4 -0
- package/dist/commands/review-archive-search.js +70 -0
- package/dist/commands/review-archive.d.ts +4 -0
- package/dist/commands/review-archive.js +135 -0
- package/dist/commands/review-audit-export.d.ts +4 -0
- package/dist/commands/review-audit-export.js +93 -0
- package/dist/commands/review-audit-log.d.ts +4 -0
- package/dist/commands/review-audit-log.js +140 -0
- package/dist/commands/review-audit-trail.d.ts +4 -0
- package/dist/commands/review-audit-trail.js +96 -0
- package/dist/commands/review-auto-merge.d.ts +4 -0
- package/dist/commands/review-auto-merge.js +175 -0
- package/dist/commands/review-badge.d.ts +4 -0
- package/dist/commands/review-badge.js +152 -0
- package/dist/commands/review-batch-files.d.ts +4 -0
- package/dist/commands/review-batch-files.js +82 -0
- package/dist/commands/review-batch-mode.d.ts +4 -0
- package/dist/commands/review-batch-mode.js +97 -0
- package/dist/commands/review-batch-run.d.ts +4 -0
- package/dist/commands/review-batch-run.js +149 -0
- package/dist/commands/review-benchmark-self.d.ts +4 -0
- package/dist/commands/review-benchmark-self.js +140 -0
- package/dist/commands/review-blame-map.d.ts +4 -0
- package/dist/commands/review-blame-map.js +100 -0
- package/dist/commands/review-branch-compare.d.ts +4 -0
- package/dist/commands/review-branch-compare.js +108 -0
- package/dist/commands/review-branch-policy.d.ts +4 -0
- package/dist/commands/review-branch-policy.js +102 -0
- package/dist/commands/review-bulk-action.d.ts +4 -0
- package/dist/commands/review-bulk-action.js +109 -0
- package/dist/commands/review-bulk-apply.d.ts +4 -0
- package/dist/commands/review-bulk-apply.js +102 -0
- package/dist/commands/review-cache-clear.d.ts +4 -0
- package/dist/commands/review-cache-clear.js +160 -0
- package/dist/commands/review-cache-warm.d.ts +4 -0
- package/dist/commands/review-cache-warm.js +70 -0
- package/dist/commands/review-cache.d.ts +22 -0
- package/dist/commands/review-cache.js +134 -0
- package/dist/commands/review-changelog-entry.d.ts +7 -0
- package/dist/commands/review-changelog-entry.js +109 -0
- package/dist/commands/review-changelog-gen.d.ts +4 -0
- package/dist/commands/review-changelog-gen.js +117 -0
- package/dist/commands/review-changelog-impact.d.ts +1 -0
- package/dist/commands/review-changelog-impact.js +89 -0
- package/dist/commands/review-checklist.d.ts +4 -0
- package/dist/commands/review-checklist.js +144 -0
- package/dist/commands/review-checkpoint.d.ts +4 -0
- package/dist/commands/review-checkpoint.js +163 -0
- package/dist/commands/review-ci-gate.d.ts +4 -0
- package/dist/commands/review-ci-gate.js +114 -0
- package/dist/commands/review-ci-insight.d.ts +1 -0
- package/dist/commands/review-ci-insight.js +100 -0
- package/dist/commands/review-ci-integration.d.ts +4 -0
- package/dist/commands/review-ci-integration.js +125 -0
- package/dist/commands/review-ci-status.d.ts +4 -0
- package/dist/commands/review-ci-status.js +200 -0
- package/dist/commands/review-cicd-integrate.d.ts +4 -0
- package/dist/commands/review-cicd-integrate.js +122 -0
- package/dist/commands/review-code-health-score.d.ts +1 -0
- package/dist/commands/review-code-health-score.js +100 -0
- package/dist/commands/review-code-owner.d.ts +7 -0
- package/dist/commands/review-code-owner.js +164 -0
- package/dist/commands/review-code-ownership.d.ts +1 -0
- package/dist/commands/review-code-ownership.js +88 -0
- package/dist/commands/review-comment.d.ts +4 -0
- package/dist/commands/review-comment.js +165 -0
- package/dist/commands/review-commit-hook.d.ts +7 -0
- package/dist/commands/review-commit-hook.js +134 -0
- package/dist/commands/review-commit-quality.d.ts +1 -0
- package/dist/commands/review-commit-quality.js +94 -0
- package/dist/commands/review-comparative.d.ts +4 -0
- package/dist/commands/review-comparative.js +149 -0
- package/dist/commands/review-compare-version.d.ts +4 -0
- package/dist/commands/review-compare-version.js +108 -0
- package/dist/commands/review-compare.d.ts +4 -0
- package/dist/commands/review-compare.js +200 -0
- package/dist/commands/review-compliance-check.d.ts +4 -0
- package/dist/commands/review-compliance-check.js +202 -0
- package/dist/commands/review-compliance-gate.d.ts +4 -0
- package/dist/commands/review-compliance-gate.js +151 -0
- package/dist/commands/review-compliance-map.d.ts +4 -0
- package/dist/commands/review-compliance-map.js +110 -0
- package/dist/commands/review-compliance-report.d.ts +4 -0
- package/dist/commands/review-compliance-report.js +127 -0
- package/dist/commands/review-confidence-explain.d.ts +1 -0
- package/dist/commands/review-confidence-explain.js +99 -0
- package/dist/commands/review-config-diff.d.ts +4 -0
- package/dist/commands/review-config-diff.js +108 -0
- package/dist/commands/review-config-export.d.ts +4 -0
- package/dist/commands/review-config-export.js +124 -0
- package/dist/commands/review-config-health.d.ts +1 -0
- package/dist/commands/review-config-health.js +172 -0
- package/dist/commands/review-config-migrate.d.ts +4 -0
- package/dist/commands/review-config-migrate.js +123 -0
- package/dist/commands/review-config-template.d.ts +4 -0
- package/dist/commands/review-config-template.js +112 -0
- package/dist/commands/review-config-validate.d.ts +4 -0
- package/dist/commands/review-config-validate.js +110 -0
- package/dist/commands/review-contract.d.ts +4 -0
- package/dist/commands/review-contract.js +199 -0
- package/dist/commands/review-coverage-gap.d.ts +4 -0
- package/dist/commands/review-coverage-gap.js +120 -0
- package/dist/commands/review-coverage-map.d.ts +4 -0
- package/dist/commands/review-coverage-map.js +194 -0
- package/dist/commands/review-custom-judge-config.d.ts +4 -0
- package/dist/commands/review-custom-judge-config.js +103 -0
- package/dist/commands/review-custom-judge.d.ts +4 -0
- package/dist/commands/review-custom-judge.js +182 -0
- package/dist/commands/review-custom-prompt.d.ts +4 -0
- package/dist/commands/review-custom-prompt.js +170 -0
- package/dist/commands/review-custom-rule.d.ts +4 -0
- package/dist/commands/review-custom-rule.js +169 -0
- package/dist/commands/review-dashboard-data.d.ts +4 -0
- package/dist/commands/review-dashboard-data.js +142 -0
- package/dist/commands/review-dashboard.d.ts +4 -0
- package/dist/commands/review-dashboard.js +140 -0
- package/dist/commands/review-data-retention.d.ts +4 -0
- package/dist/commands/review-data-retention.js +119 -0
- package/dist/commands/review-dependency-graph.d.ts +4 -0
- package/dist/commands/review-dependency-graph.js +94 -0
- package/dist/commands/review-dependency-review.d.ts +1 -0
- package/dist/commands/review-dependency-review.js +104 -0
- package/dist/commands/review-deployment-gate.d.ts +4 -0
- package/dist/commands/review-deployment-gate.js +94 -0
- package/dist/commands/review-depth.d.ts +4 -0
- package/dist/commands/review-depth.js +142 -0
- package/dist/commands/review-diff-annotate.d.ts +4 -0
- package/dist/commands/review-diff-annotate.js +104 -0
- package/dist/commands/review-diff-context.d.ts +4 -0
- package/dist/commands/review-diff-context.js +158 -0
- package/dist/commands/review-diff-highlight.d.ts +4 -0
- package/dist/commands/review-diff-highlight.js +179 -0
- package/dist/commands/review-diff-stats.d.ts +4 -0
- package/dist/commands/review-diff-stats.js +90 -0
- package/dist/commands/review-diff-summary.d.ts +4 -0
- package/dist/commands/review-diff-summary.js +154 -0
- package/dist/commands/review-digest-gen.d.ts +1 -0
- package/dist/commands/review-digest-gen.js +100 -0
- package/dist/commands/review-digest.d.ts +4 -0
- package/dist/commands/review-digest.js +265 -0
- package/dist/commands/review-dry-run.d.ts +4 -0
- package/dist/commands/review-dry-run.js +120 -0
- package/dist/commands/review-engagement-score.d.ts +1 -0
- package/dist/commands/review-engagement-score.js +111 -0
- package/dist/commands/review-env-check.d.ts +4 -0
- package/dist/commands/review-env-check.js +115 -0
- package/dist/commands/review-environment-config.d.ts +4 -0
- package/dist/commands/review-environment-config.js +102 -0
- package/dist/commands/review-escalation-path.d.ts +1 -0
- package/dist/commands/review-escalation-path.js +86 -0
- package/dist/commands/review-exclude-vendor.d.ts +4 -0
- package/dist/commands/review-exclude-vendor.js +158 -0
- package/dist/commands/review-explain.d.ts +5 -0
- package/dist/commands/review-explain.js +194 -0
- package/dist/commands/review-export-pdf.d.ts +7 -0
- package/dist/commands/review-export-pdf.js +131 -0
- package/dist/commands/review-export.d.ts +4 -0
- package/dist/commands/review-export.js +179 -0
- package/dist/commands/review-feedback-loop.d.ts +4 -0
- package/dist/commands/review-feedback-loop.js +113 -0
- package/dist/commands/review-feedback-summary.d.ts +1 -0
- package/dist/commands/review-feedback-summary.js +130 -0
- package/dist/commands/review-feedback.d.ts +4 -0
- package/dist/commands/review-feedback.js +145 -0
- package/dist/commands/review-file-complexity.d.ts +4 -0
- package/dist/commands/review-file-complexity.js +137 -0
- package/dist/commands/review-file-filter.d.ts +4 -0
- package/dist/commands/review-file-filter.js +121 -0
- package/dist/commands/review-file-stats.d.ts +4 -0
- package/dist/commands/review-file-stats.js +130 -0
- package/dist/commands/review-filter.d.ts +4 -0
- package/dist/commands/review-filter.js +161 -0
- package/dist/commands/review-finding-link.d.ts +7 -0
- package/dist/commands/review-finding-link.js +115 -0
- package/dist/commands/review-focus-area.d.ts +1 -0
- package/dist/commands/review-focus-area.js +96 -0
- package/dist/commands/review-focus.d.ts +4 -0
- package/dist/commands/review-focus.js +196 -0
- package/dist/commands/review-gate-config.d.ts +4 -0
- package/dist/commands/review-gate-config.js +153 -0
- package/dist/commands/review-gate.d.ts +4 -0
- package/dist/commands/review-gate.js +212 -0
- package/dist/commands/review-goal-track.d.ts +1 -0
- package/dist/commands/review-goal-track.js +123 -0
- package/dist/commands/review-guardrail.d.ts +4 -0
- package/dist/commands/review-guardrail.js +155 -0
- package/dist/commands/review-handoff.d.ts +4 -0
- package/dist/commands/review-handoff.js +208 -0
- package/dist/commands/review-health-check.d.ts +4 -0
- package/dist/commands/review-health-check.js +148 -0
- package/dist/commands/review-health-trend.d.ts +1 -0
- package/dist/commands/review-health-trend.js +107 -0
- package/dist/commands/review-history-compare.d.ts +4 -0
- package/dist/commands/review-history-compare.js +93 -0
- package/dist/commands/review-history-search.d.ts +4 -0
- package/dist/commands/review-history-search.js +214 -0
- package/dist/commands/review-ide-sync.d.ts +4 -0
- package/dist/commands/review-ide-sync.js +91 -0
- package/dist/commands/review-ignore-path.d.ts +4 -0
- package/dist/commands/review-ignore-path.js +147 -0
- package/dist/commands/review-ignore-pattern.d.ts +5 -0
- package/dist/commands/review-ignore-pattern.js +138 -0
- package/dist/commands/review-incident-link.d.ts +4 -0
- package/dist/commands/review-incident-link.js +93 -0
- package/dist/commands/review-incremental.d.ts +4 -0
- package/dist/commands/review-incremental.js +128 -0
- package/dist/commands/review-integration-health.d.ts +4 -0
- package/dist/commands/review-integration-health.js +84 -0
- package/dist/commands/review-integration-test.d.ts +4 -0
- package/dist/commands/review-integration-test.js +145 -0
- package/dist/commands/review-integration.d.ts +4 -0
- package/dist/commands/review-integration.js +236 -0
- package/dist/commands/review-interactive.d.ts +4 -0
- package/dist/commands/review-interactive.js +85 -0
- package/dist/commands/review-knowledge-capture.d.ts +1 -0
- package/dist/commands/review-knowledge-capture.js +94 -0
- package/dist/commands/review-language-profile.d.ts +4 -0
- package/dist/commands/review-language-profile.js +72 -0
- package/dist/commands/review-language-stats.d.ts +4 -0
- package/dist/commands/review-language-stats.js +152 -0
- package/dist/commands/review-lock-file.d.ts +4 -0
- package/dist/commands/review-lock-file.js +153 -0
- package/dist/commands/review-lock.d.ts +4 -0
- package/dist/commands/review-lock.js +107 -0
- package/dist/commands/review-log.d.ts +22 -0
- package/dist/commands/review-log.js +164 -0
- package/dist/commands/review-mentor-suggest.d.ts +1 -0
- package/dist/commands/review-mentor-suggest.js +112 -0
- package/dist/commands/review-merge-check.d.ts +4 -0
- package/dist/commands/review-merge-check.js +101 -0
- package/dist/commands/review-merge-config.d.ts +4 -0
- package/dist/commands/review-merge-config.js +119 -0
- package/dist/commands/review-merge-readiness.d.ts +1 -0
- package/dist/commands/review-merge-readiness.js +90 -0
- package/dist/commands/review-merge-request.d.ts +4 -0
- package/dist/commands/review-merge-request.js +95 -0
- package/dist/commands/review-merge.d.ts +4 -0
- package/dist/commands/review-merge.js +145 -0
- package/dist/commands/review-metric-export.d.ts +4 -0
- package/dist/commands/review-metric-export.js +62 -0
- package/dist/commands/review-milestone.d.ts +4 -0
- package/dist/commands/review-milestone.js +136 -0
- package/dist/commands/review-multi-repo-sync.d.ts +4 -0
- package/dist/commands/review-multi-repo-sync.js +115 -0
- package/dist/commands/review-multi-repo.d.ts +4 -0
- package/dist/commands/review-multi-repo.js +145 -0
- package/dist/commands/review-note.d.ts +4 -0
- package/dist/commands/review-note.js +104 -0
- package/dist/commands/review-notification-config.d.ts +4 -0
- package/dist/commands/review-notification-config.js +122 -0
- package/dist/commands/review-notification-digest.d.ts +4 -0
- package/dist/commands/review-notification-digest.js +64 -0
- package/dist/commands/review-notification.d.ts +4 -0
- package/dist/commands/review-notification.js +126 -0
- package/dist/commands/review-notify.d.ts +4 -0
- package/dist/commands/review-notify.js +143 -0
- package/dist/commands/review-offline.d.ts +4 -0
- package/dist/commands/review-offline.js +125 -0
- package/dist/commands/review-onboard-checklist.d.ts +4 -0
- package/dist/commands/review-onboard-checklist.js +119 -0
- package/dist/commands/review-onboard-wizard.d.ts +4 -0
- package/dist/commands/review-onboard-wizard.js +92 -0
- package/dist/commands/review-onboard.d.ts +4 -0
- package/dist/commands/review-onboard.js +154 -0
- package/dist/commands/review-onboarding-check.d.ts +1 -0
- package/dist/commands/review-onboarding-check.js +93 -0
- package/dist/commands/review-org-dashboard.d.ts +4 -0
- package/dist/commands/review-org-dashboard.js +68 -0
- package/dist/commands/review-output-filter.d.ts +4 -0
- package/dist/commands/review-output-filter.js +112 -0
- package/dist/commands/review-output-format.d.ts +4 -0
- package/dist/commands/review-output-format.js +144 -0
- package/dist/commands/review-output-transform.d.ts +4 -0
- package/dist/commands/review-output-transform.js +119 -0
- package/dist/commands/review-owner.d.ts +4 -0
- package/dist/commands/review-owner.js +129 -0
- package/dist/commands/review-parallel-diff.d.ts +4 -0
- package/dist/commands/review-parallel-diff.js +146 -0
- package/dist/commands/review-parallel-files.d.ts +7 -0
- package/dist/commands/review-parallel-files.js +134 -0
- package/dist/commands/review-parallel-run.d.ts +4 -0
- package/dist/commands/review-parallel-run.js +116 -0
- package/dist/commands/review-parallel.d.ts +4 -0
- package/dist/commands/review-parallel.js +164 -0
- package/dist/commands/review-perf-profile.d.ts +4 -0
- package/dist/commands/review-perf-profile.js +98 -0
- package/dist/commands/review-permission-model.d.ts +4 -0
- package/dist/commands/review-permission-model.js +149 -0
- package/dist/commands/review-pipeline-status.d.ts +4 -0
- package/dist/commands/review-pipeline-status.js +54 -0
- package/dist/commands/review-plugin-config.d.ts +4 -0
- package/dist/commands/review-plugin-config.js +167 -0
- package/dist/commands/review-plugin-list.d.ts +4 -0
- package/dist/commands/review-plugin-list.js +99 -0
- package/dist/commands/review-plugin-manage.d.ts +4 -0
- package/dist/commands/review-plugin-manage.js +137 -0
- package/dist/commands/review-plugin-status.d.ts +4 -0
- package/dist/commands/review-plugin-status.js +53 -0
- package/dist/commands/review-policy-enforce.d.ts +1 -0
- package/dist/commands/review-policy-enforce.js +92 -0
- package/dist/commands/review-policy-engine.d.ts +4 -0
- package/dist/commands/review-policy-engine.js +135 -0
- package/dist/commands/review-pr-comment-gen.d.ts +4 -0
- package/dist/commands/review-pr-comment-gen.js +62 -0
- package/dist/commands/review-pr-comment.d.ts +4 -0
- package/dist/commands/review-pr-comment.js +106 -0
- package/dist/commands/review-pr-label-suggest.d.ts +1 -0
- package/dist/commands/review-pr-label-suggest.js +77 -0
- package/dist/commands/review-pr-size-check.d.ts +1 -0
- package/dist/commands/review-pr-size-check.js +98 -0
- package/dist/commands/review-pr-template.d.ts +4 -0
- package/dist/commands/review-pr-template.js +104 -0
- package/dist/commands/review-preset-save.d.ts +4 -0
- package/dist/commands/review-preset-save.js +159 -0
- package/dist/commands/review-priority.d.ts +4 -0
- package/dist/commands/review-priority.js +157 -0
- package/dist/commands/review-profile.d.ts +4 -0
- package/dist/commands/review-profile.js +168 -0
- package/dist/commands/review-progress-bar.d.ts +4 -0
- package/dist/commands/review-progress-bar.js +157 -0
- package/dist/commands/review-progress-report.d.ts +1 -0
- package/dist/commands/review-progress-report.js +95 -0
- package/dist/commands/review-progress-track.d.ts +4 -0
- package/dist/commands/review-progress-track.js +94 -0
- package/dist/commands/review-quality-baseline.d.ts +1 -0
- package/dist/commands/review-quality-baseline.js +134 -0
- package/dist/commands/review-quality-gate.d.ts +1 -0
- package/dist/commands/review-quality-gate.js +86 -0
- package/dist/commands/review-quality-score.d.ts +4 -0
- package/dist/commands/review-quality-score.js +127 -0
- package/dist/commands/review-quality-trend.d.ts +4 -0
- package/dist/commands/review-quality-trend.js +57 -0
- package/dist/commands/review-queue.d.ts +33 -0
- package/dist/commands/review-queue.js +225 -0
- package/dist/commands/review-quickstart.d.ts +4 -0
- package/dist/commands/review-quickstart.js +107 -0
- package/dist/commands/review-quota-check.d.ts +4 -0
- package/dist/commands/review-quota-check.js +97 -0
- package/dist/commands/review-quota.d.ts +4 -0
- package/dist/commands/review-quota.js +126 -0
- package/dist/commands/review-rate-limit.d.ts +4 -0
- package/dist/commands/review-rate-limit.js +130 -0
- package/dist/commands/review-readiness-check.d.ts +1 -0
- package/dist/commands/review-readiness-check.js +98 -0
- package/dist/commands/review-receipt.d.ts +4 -0
- package/dist/commands/review-receipt.js +220 -0
- package/dist/commands/review-release-gate.d.ts +1 -0
- package/dist/commands/review-release-gate.js +81 -0
- package/dist/commands/review-replay.d.ts +8 -0
- package/dist/commands/review-replay.js +264 -0
- package/dist/commands/review-repo-onboard.d.ts +4 -0
- package/dist/commands/review-repo-onboard.js +114 -0
- package/dist/commands/review-report-archive.d.ts +4 -0
- package/dist/commands/review-report-archive.js +100 -0
- package/dist/commands/review-report-merge.d.ts +4 -0
- package/dist/commands/review-report-merge.js +90 -0
- package/dist/commands/review-report-pdf.d.ts +4 -0
- package/dist/commands/review-report-pdf.js +163 -0
- package/dist/commands/review-report-schedule.d.ts +4 -0
- package/dist/commands/review-report-schedule.js +96 -0
- package/dist/commands/review-retrospective.d.ts +1 -0
- package/dist/commands/review-retrospective.js +118 -0
- package/dist/commands/review-retry.d.ts +4 -0
- package/dist/commands/review-retry.js +91 -0
- package/dist/commands/review-review-cadence.d.ts +1 -0
- package/dist/commands/review-review-cadence.js +85 -0
- package/dist/commands/review-review-comments.d.ts +4 -0
- package/dist/commands/review-review-comments.js +84 -0
- package/dist/commands/review-reviewer-match.d.ts +1 -0
- package/dist/commands/review-reviewer-match.js +108 -0
- package/dist/commands/review-risk-matrix.d.ts +1 -0
- package/dist/commands/review-risk-matrix.js +96 -0
- package/dist/commands/review-risk-score.d.ts +4 -0
- package/dist/commands/review-risk-score.js +156 -0
- package/dist/commands/review-role-assignment.d.ts +4 -0
- package/dist/commands/review-role-assignment.js +98 -0
- package/dist/commands/review-rollback.d.ts +4 -0
- package/dist/commands/review-rollback.js +171 -0
- package/dist/commands/review-rollout-plan.d.ts +4 -0
- package/dist/commands/review-rollout-plan.js +123 -0
- package/dist/commands/review-rule-filter.d.ts +4 -0
- package/dist/commands/review-rule-filter.js +116 -0
- package/dist/commands/review-rule-stats.d.ts +4 -0
- package/dist/commands/review-rule-stats.js +161 -0
- package/dist/commands/review-sandbox.d.ts +4 -0
- package/dist/commands/review-sandbox.js +191 -0
- package/dist/commands/review-schedule.d.ts +4 -0
- package/dist/commands/review-schedule.js +169 -0
- package/dist/commands/review-scope-limit.d.ts +4 -0
- package/dist/commands/review-scope-limit.js +100 -0
- package/dist/commands/review-scope-lock.d.ts +7 -0
- package/dist/commands/review-scope-lock.js +138 -0
- package/dist/commands/review-scope-select.d.ts +4 -0
- package/dist/commands/review-scope-select.js +98 -0
- package/dist/commands/review-scope-suggest.d.ts +1 -0
- package/dist/commands/review-scope-suggest.js +112 -0
- package/dist/commands/review-scope.d.ts +4 -0
- package/dist/commands/review-scope.js +197 -0
- package/dist/commands/review-score-history.d.ts +4 -0
- package/dist/commands/review-score-history.js +137 -0
- package/dist/commands/review-security-posture.d.ts +1 -0
- package/dist/commands/review-security-posture.js +105 -0
- package/dist/commands/review-session-replay.d.ts +4 -0
- package/dist/commands/review-session-replay.js +81 -0
- package/dist/commands/review-session-save.d.ts +4 -0
- package/dist/commands/review-session-save.js +173 -0
- package/dist/commands/review-session.d.ts +4 -0
- package/dist/commands/review-session.js +150 -0
- package/dist/commands/review-skip-list.d.ts +4 -0
- package/dist/commands/review-skip-list.js +135 -0
- package/dist/commands/review-skip-rule.d.ts +4 -0
- package/dist/commands/review-skip-rule.js +105 -0
- package/dist/commands/review-sla-config.d.ts +4 -0
- package/dist/commands/review-sla-config.js +88 -0
- package/dist/commands/review-slack-format.d.ts +4 -0
- package/dist/commands/review-slack-format.js +113 -0
- package/dist/commands/review-snapshot-diff.d.ts +4 -0
- package/dist/commands/review-snapshot-diff.js +100 -0
- package/dist/commands/review-sprint-plan.d.ts +1 -0
- package/dist/commands/review-sprint-plan.js +79 -0
- package/dist/commands/review-stakeholder-notify.d.ts +1 -0
- package/dist/commands/review-stakeholder-notify.js +134 -0
- package/dist/commands/review-stakeholder-report.d.ts +4 -0
- package/dist/commands/review-stakeholder-report.js +75 -0
- package/dist/commands/review-stale-finding-clean.d.ts +1 -0
- package/dist/commands/review-stale-finding-clean.js +81 -0
- package/dist/commands/review-standup.d.ts +4 -0
- package/dist/commands/review-standup.js +95 -0
- package/dist/commands/review-stats.d.ts +4 -0
- package/dist/commands/review-stats.js +175 -0
- package/dist/commands/review-status-badge.d.ts +4 -0
- package/dist/commands/review-status-badge.js +120 -0
- package/dist/commands/review-streak.d.ts +4 -0
- package/dist/commands/review-streak.js +150 -0
- package/dist/commands/review-summary-dashboard.d.ts +4 -0
- package/dist/commands/review-summary-dashboard.js +96 -0
- package/dist/commands/review-summary-email.d.ts +4 -0
- package/dist/commands/review-summary-email.js +102 -0
- package/dist/commands/review-summary.d.ts +4 -0
- package/dist/commands/review-summary.js +174 -0
- package/dist/commands/review-tag-manager.d.ts +4 -0
- package/dist/commands/review-tag-manager.js +128 -0
- package/dist/commands/review-tag.d.ts +4 -0
- package/dist/commands/review-tag.js +136 -0
- package/dist/commands/review-team-analytics.d.ts +1 -0
- package/dist/commands/review-team-analytics.js +94 -0
- package/dist/commands/review-team-assign.d.ts +7 -0
- package/dist/commands/review-team-assign.js +211 -0
- package/dist/commands/review-team-coverage.d.ts +1 -0
- package/dist/commands/review-team-coverage.js +95 -0
- package/dist/commands/review-team-dashboard.d.ts +4 -0
- package/dist/commands/review-team-dashboard.js +98 -0
- package/dist/commands/review-team-rotation.d.ts +1 -0
- package/dist/commands/review-team-rotation.js +99 -0
- package/dist/commands/review-team-skill-map.d.ts +1 -0
- package/dist/commands/review-team-skill-map.js +102 -0
- package/dist/commands/review-team-stats.d.ts +4 -0
- package/dist/commands/review-team-stats.js +97 -0
- package/dist/commands/review-team-summary.d.ts +4 -0
- package/dist/commands/review-team-summary.js +155 -0
- package/dist/commands/review-team-velocity.d.ts +1 -0
- package/dist/commands/review-team-velocity.js +103 -0
- package/dist/commands/review-template-export.d.ts +4 -0
- package/dist/commands/review-template-export.js +146 -0
- package/dist/commands/review-template-library.d.ts +4 -0
- package/dist/commands/review-template-library.js +155 -0
- package/dist/commands/review-template-suggest.d.ts +1 -0
- package/dist/commands/review-template-suggest.js +119 -0
- package/dist/commands/review-template.d.ts +4 -0
- package/dist/commands/review-template.js +212 -0
- package/dist/commands/review-tenant-config.d.ts +4 -0
- package/dist/commands/review-tenant-config.js +116 -0
- package/dist/commands/review-threshold-tune.d.ts +4 -0
- package/dist/commands/review-threshold-tune.js +135 -0
- package/dist/commands/review-timeline.d.ts +4 -0
- package/dist/commands/review-timeline.js +76 -0
- package/dist/commands/review-token-budget.d.ts +4 -0
- package/dist/commands/review-token-budget.js +117 -0
- package/dist/commands/review-velocity-track.d.ts +1 -0
- package/dist/commands/review-velocity-track.js +94 -0
- package/dist/commands/review-watch-mode.d.ts +7 -0
- package/dist/commands/review-watch-mode.js +132 -0
- package/dist/commands/review-webhook-dispatch.d.ts +4 -0
- package/dist/commands/review-webhook-dispatch.js +99 -0
- package/dist/commands/review-webhook-notify.d.ts +4 -0
- package/dist/commands/review-webhook-notify.js +145 -0
- package/dist/commands/review-webhook.d.ts +4 -0
- package/dist/commands/review-webhook.js +140 -0
- package/dist/commands/review-whitelist.d.ts +4 -0
- package/dist/commands/review-whitelist.js +150 -0
- package/dist/commands/review-workflow-suggest.d.ts +1 -0
- package/dist/commands/review-workflow-suggest.js +129 -0
- package/dist/commands/review-workload-balance.d.ts +1 -0
- package/dist/commands/review-workload-balance.js +86 -0
- package/dist/commands/review-workspace-init.d.ts +4 -0
- package/dist/commands/review-workspace-init.js +104 -0
- package/dist/commands/review-workspace-scan.d.ts +4 -0
- package/dist/commands/review-workspace-scan.js +144 -0
- package/dist/commands/review.d.ts +155 -0
- package/dist/commands/review.js +1114 -0
- package/dist/commands/risk-heatmap.d.ts +7 -0
- package/dist/commands/risk-heatmap.js +223 -0
- package/dist/commands/rollback-safety.d.ts +4 -0
- package/dist/commands/rollback-safety.js +191 -0
- package/dist/commands/rule-catalog.d.ts +4 -0
- package/dist/commands/rule-catalog.js +128 -0
- package/dist/commands/rule-metrics.d.ts +43 -0
- package/dist/commands/rule-metrics.js +113 -0
- package/dist/commands/rule-owner.d.ts +30 -0
- package/dist/commands/rule-owner.js +181 -0
- package/dist/commands/rule-share.d.ts +34 -0
- package/dist/commands/rule-share.js +202 -0
- package/dist/commands/rule-test.d.ts +4 -0
- package/dist/commands/rule-test.js +201 -0
- package/dist/commands/rule.d.ts +114 -0
- package/dist/commands/rule.js +295 -0
- package/dist/commands/sbom-export.d.ts +7 -0
- package/dist/commands/sbom-export.js +161 -0
- package/dist/commands/scaffold-plugin.d.ts +15 -0
- package/dist/commands/scaffold-plugin.js +270 -0
- package/dist/commands/secret-age.d.ts +5 -0
- package/dist/commands/secret-age.js +214 -0
- package/dist/commands/secret-scan.d.ts +7 -0
- package/dist/commands/secret-scan.js +244 -0
- package/dist/commands/security-maturity.d.ts +7 -0
- package/dist/commands/security-maturity.js +312 -0
- package/dist/commands/security-theater.d.ts +4 -0
- package/dist/commands/security-theater.js +278 -0
- package/dist/commands/setup-wizard.d.ts +4 -0
- package/dist/commands/setup-wizard.js +174 -0
- package/dist/commands/severity-tune.d.ts +4 -0
- package/dist/commands/severity-tune.js +208 -0
- package/dist/commands/sla-track.d.ts +56 -0
- package/dist/commands/sla-track.js +268 -0
- package/dist/commands/smart-output.d.ts +38 -0
- package/dist/commands/smart-output.js +175 -0
- package/dist/commands/smart-select.d.ts +26 -0
- package/dist/commands/smart-select.js +345 -0
- package/dist/commands/snapshot.d.ts +139 -0
- package/dist/commands/snapshot.js +478 -0
- package/dist/commands/snippet-eval.d.ts +7 -0
- package/dist/commands/snippet-eval.js +223 -0
- package/dist/commands/spec-conform.d.ts +4 -0
- package/dist/commands/spec-conform.js +304 -0
- package/dist/commands/stale-pattern.d.ts +4 -0
- package/dist/commands/stale-pattern.js +293 -0
- package/dist/commands/state-integrity.d.ts +4 -0
- package/dist/commands/state-integrity.js +283 -0
- package/dist/commands/suppress.d.ts +39 -0
- package/dist/commands/suppress.js +203 -0
- package/dist/commands/team-config.d.ts +4 -0
- package/dist/commands/team-config.js +234 -0
- package/dist/commands/team-leaderboard.d.ts +24 -0
- package/dist/commands/team-leaderboard.js +227 -0
- package/dist/commands/team-rules-sync.d.ts +7 -0
- package/dist/commands/team-rules-sync.js +250 -0
- package/dist/commands/team-trust.d.ts +7 -0
- package/dist/commands/team-trust.js +174 -0
- package/dist/commands/test-correlate.d.ts +7 -0
- package/dist/commands/test-correlate.js +221 -0
- package/dist/commands/test-isolation.d.ts +5 -0
- package/dist/commands/test-isolation.js +234 -0
- package/dist/commands/test-quality.d.ts +5 -0
- package/dist/commands/test-quality.js +160 -0
- package/dist/commands/test-suggest.d.ts +8 -0
- package/dist/commands/test-suggest.js +247 -0
- package/dist/commands/ticket-sync.d.ts +25 -0
- package/dist/commands/ticket-sync.js +235 -0
- package/dist/commands/timeout-audit.d.ts +4 -0
- package/dist/commands/timeout-audit.js +210 -0
- package/dist/commands/trace.d.ts +64 -0
- package/dist/commands/trace.js +245 -0
- package/dist/commands/trend-report.d.ts +4 -0
- package/dist/commands/trend-report.js +148 -0
- package/dist/commands/triage.d.ts +15 -0
- package/dist/commands/triage.js +171 -0
- package/dist/commands/trust-adaptive.d.ts +8 -0
- package/dist/commands/trust-adaptive.js +193 -0
- package/dist/commands/trust-ramp.d.ts +29 -0
- package/dist/commands/trust-ramp.js +189 -0
- package/dist/commands/tune.d.ts +24 -0
- package/dist/commands/tune.js +380 -0
- package/dist/commands/type-boundary.d.ts +4 -0
- package/dist/commands/type-boundary.js +235 -0
- package/dist/commands/upload.d.ts +13 -0
- package/dist/commands/upload.js +172 -0
- package/dist/commands/validate-config.d.ts +16 -0
- package/dist/commands/validate-config.js +267 -0
- package/dist/commands/vendor-lock-detect.d.ts +7 -0
- package/dist/commands/vendor-lock-detect.js +288 -0
- package/dist/commands/vote.d.ts +31 -0
- package/dist/commands/vote.js +200 -0
- package/dist/commands/warm-cache.d.ts +30 -0
- package/dist/commands/warm-cache.js +165 -0
- package/dist/commands/watch-judge.d.ts +7 -0
- package/dist/commands/watch-judge.js +179 -0
- package/dist/commands/watch.d.ts +22 -0
- package/dist/commands/watch.js +147 -0
- package/dist/comparison.d.ts +67 -0
- package/dist/comparison.js +253 -0
- package/dist/config.d.ts +108 -0
- package/dist/config.js +694 -0
- package/dist/context/context-snippets.d.ts +15 -0
- package/dist/context/context-snippets.js +36 -0
- package/dist/context/embedding-cache.d.ts +30 -0
- package/dist/context/embedding-cache.js +48 -0
- package/dist/data-adapter.d.ts +123 -0
- package/dist/data-adapter.js +212 -0
- package/dist/dedup.d.ts +105 -0
- package/dist/dedup.js +606 -0
- package/dist/disk-cache.d.ts +59 -0
- package/dist/disk-cache.js +236 -0
- package/dist/errors.d.ts +43 -0
- package/dist/errors.js +63 -0
- package/dist/escalation.d.ts +100 -0
- package/dist/escalation.js +292 -0
- package/dist/evaluation-session.d.ts +74 -0
- package/dist/evaluation-session.js +152 -0
- package/dist/evaluators/accessibility.d.ts +2 -0
- package/dist/evaluators/accessibility.js +559 -0
- package/dist/evaluators/agent-instructions.d.ts +2 -0
- package/dist/evaluators/agent-instructions.js +214 -0
- package/dist/evaluators/ai-code-safety.d.ts +8 -0
- package/dist/evaluators/ai-code-safety.js +410 -0
- package/dist/evaluators/api-contract.d.ts +9 -0
- package/dist/evaluators/api-contract.js +203 -0
- package/dist/evaluators/api-design.d.ts +2 -0
- package/dist/evaluators/api-design.js +260 -0
- package/dist/evaluators/app-builder.d.ts +33 -0
- package/dist/evaluators/app-builder.js +155 -0
- package/dist/evaluators/authentication.d.ts +2 -0
- package/dist/evaluators/authentication.js +455 -0
- package/dist/evaluators/backwards-compatibility.d.ts +2 -0
- package/dist/evaluators/backwards-compatibility.js +168 -0
- package/dist/evaluators/caching.d.ts +2 -0
- package/dist/evaluators/caching.js +171 -0
- package/dist/evaluators/ci-cd.d.ts +2 -0
- package/dist/evaluators/ci-cd.js +218 -0
- package/dist/evaluators/cloud-readiness.d.ts +2 -0
- package/dist/evaluators/cloud-readiness.js +231 -0
- package/dist/evaluators/code-structure.d.ts +21 -0
- package/dist/evaluators/code-structure.js +195 -0
- package/dist/evaluators/compliance.d.ts +2 -0
- package/dist/evaluators/compliance.js +329 -0
- package/dist/evaluators/concurrency.d.ts +2 -0
- package/dist/evaluators/concurrency.js +307 -0
- package/dist/evaluators/configuration-management.d.ts +2 -0
- package/dist/evaluators/configuration-management.js +232 -0
- package/dist/evaluators/cost-effectiveness.d.ts +2 -0
- package/dist/evaluators/cost-effectiveness.js +418 -0
- package/dist/evaluators/cybersecurity.d.ts +2 -0
- package/dist/evaluators/cybersecurity.js +1197 -0
- package/dist/evaluators/data-security.d.ts +2 -0
- package/dist/evaluators/data-security.js +467 -0
- package/dist/evaluators/data-sovereignty.d.ts +2 -0
- package/dist/evaluators/data-sovereignty.js +495 -0
- package/dist/evaluators/database.d.ts +2 -0
- package/dist/evaluators/database.js +240 -0
- package/dist/evaluators/dependencies.d.ts +5 -0
- package/dist/evaluators/dependencies.js +228 -0
- package/dist/evaluators/dependency-health.d.ts +2 -0
- package/dist/evaluators/dependency-health.js +477 -0
- package/dist/evaluators/documentation.d.ts +2 -0
- package/dist/evaluators/documentation.js +432 -0
- package/dist/evaluators/error-handling.d.ts +2 -0
- package/dist/evaluators/error-handling.js +426 -0
- package/dist/evaluators/ethics-bias.d.ts +2 -0
- package/dist/evaluators/ethics-bias.js +263 -0
- package/dist/evaluators/false-positive-review.d.ts +21 -0
- package/dist/evaluators/false-positive-review.js +1246 -0
- package/dist/evaluators/framework-rules.d.ts +58 -0
- package/dist/evaluators/framework-rules.js +291 -0
- package/dist/evaluators/framework-safety.d.ts +12 -0
- package/dist/evaluators/framework-safety.js +1205 -0
- package/dist/evaluators/hallucination-detection.d.ts +2 -0
- package/dist/evaluators/hallucination-detection.js +1250 -0
- package/dist/evaluators/iac-security.d.ts +8 -0
- package/dist/evaluators/iac-security.js +701 -0
- package/dist/evaluators/index.d.ts +167 -0
- package/dist/evaluators/index.js +994 -0
- package/dist/evaluators/intent-alignment.d.ts +18 -0
- package/dist/evaluators/intent-alignment.js +405 -0
- package/dist/evaluators/internationalization.d.ts +2 -0
- package/dist/evaluators/internationalization.js +287 -0
- package/dist/evaluators/judge-selector.d.ts +19 -0
- package/dist/evaluators/judge-selector.js +141 -0
- package/dist/evaluators/logging-privacy.d.ts +2 -0
- package/dist/evaluators/logging-privacy.js +190 -0
- package/dist/evaluators/logic-review.d.ts +2 -0
- package/dist/evaluators/logic-review.js +289 -0
- package/dist/evaluators/maintainability.d.ts +2 -0
- package/dist/evaluators/maintainability.js +430 -0
- package/dist/evaluators/model-fingerprint.d.ts +2 -0
- package/dist/evaluators/model-fingerprint.js +151 -0
- package/dist/evaluators/multi-turn-coherence.d.ts +13 -0
- package/dist/evaluators/multi-turn-coherence.js +149 -0
- package/dist/evaluators/observability.d.ts +2 -0
- package/dist/evaluators/observability.js +238 -0
- package/dist/evaluators/over-engineering.d.ts +2 -0
- package/dist/evaluators/over-engineering.js +160 -0
- package/dist/evaluators/performance.d.ts +2 -0
- package/dist/evaluators/performance.js +649 -0
- package/dist/evaluators/portability.d.ts +2 -0
- package/dist/evaluators/portability.js +254 -0
- package/dist/evaluators/project.d.ts +48 -0
- package/dist/evaluators/project.js +817 -0
- package/dist/evaluators/rate-limiting.d.ts +2 -0
- package/dist/evaluators/rate-limiting.js +193 -0
- package/dist/evaluators/recall-boost.d.ts +27 -0
- package/dist/evaluators/recall-boost.js +409 -0
- package/dist/evaluators/reliability.d.ts +2 -0
- package/dist/evaluators/reliability.js +245 -0
- package/dist/evaluators/scalability.d.ts +2 -0
- package/dist/evaluators/scalability.js +230 -0
- package/dist/evaluators/security.d.ts +12 -0
- package/dist/evaluators/security.js +1013 -0
- package/dist/evaluators/shared.d.ts +219 -0
- package/dist/evaluators/shared.js +1169 -0
- package/dist/evaluators/software-practices.d.ts +2 -0
- package/dist/evaluators/software-practices.js +395 -0
- package/dist/evaluators/suppressions.d.ts +49 -0
- package/dist/evaluators/suppressions.js +185 -0
- package/dist/evaluators/testing.d.ts +2 -0
- package/dist/evaluators/testing.js +348 -0
- package/dist/evaluators/ux.d.ts +2 -0
- package/dist/evaluators/ux.js +309 -0
- package/dist/evaluators/v2.d.ts +26 -0
- package/dist/evaluators/v2.js +354 -0
- package/dist/ext-to-lang.d.ts +16 -0
- package/dist/ext-to-lang.js +60 -0
- package/dist/feedback-loop.d.ts +62 -0
- package/dist/feedback-loop.js +179 -0
- package/dist/finding-lifecycle.d.ts +215 -0
- package/dist/finding-lifecycle.js +547 -0
- package/dist/fingerprint.d.ts +39 -0
- package/dist/fingerprint.js +179 -0
- package/dist/fix-history.d.ts +103 -0
- package/dist/fix-history.js +164 -0
- package/dist/formatters/badge.d.ts +16 -0
- package/dist/formatters/badge.js +78 -0
- package/dist/formatters/codeclimate.d.ts +24 -0
- package/dist/formatters/codeclimate.js +80 -0
- package/dist/formatters/csv.d.ts +16 -0
- package/dist/formatters/csv.js +53 -0
- package/dist/formatters/diagnostics.d.ts +81 -0
- package/dist/formatters/diagnostics.js +152 -0
- package/dist/formatters/github-actions.d.ts +6 -0
- package/dist/formatters/github-actions.js +68 -0
- package/dist/formatters/html.d.ts +12 -0
- package/dist/formatters/html.js +194 -0
- package/dist/formatters/junit.d.ts +6 -0
- package/dist/formatters/junit.js +68 -0
- package/dist/formatters/pdf.d.ts +12 -0
- package/dist/formatters/pdf.js +114 -0
- package/dist/formatters/sarif.d.ts +92 -0
- package/dist/formatters/sarif.js +256 -0
- package/dist/formatters/shared.d.ts +4 -0
- package/dist/formatters/shared.js +29 -0
- package/dist/git-diff.d.ts +62 -0
- package/dist/git-diff.js +282 -0
- package/dist/github-app.d.ts +152 -0
- package/dist/github-app.js +716 -0
- package/dist/import-resolver.d.ts +51 -0
- package/dist/import-resolver.js +213 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +38 -0
- package/dist/judge-registry.d.ts +156 -0
- package/dist/judge-registry.js +272 -0
- package/dist/judges/accessibility.d.ts +2 -0
- package/dist/judges/accessibility.js +46 -0
- package/dist/judges/agent-instructions.d.ts +2 -0
- package/dist/judges/agent-instructions.js +46 -0
- package/dist/judges/ai-code-safety.d.ts +2 -0
- package/dist/judges/ai-code-safety.js +57 -0
- package/dist/judges/api-contract.d.ts +2 -0
- package/dist/judges/api-contract.js +40 -0
- package/dist/judges/api-design.d.ts +2 -0
- package/dist/judges/api-design.js +57 -0
- package/dist/judges/authentication.d.ts +2 -0
- package/dist/judges/authentication.js +63 -0
- package/dist/judges/backwards-compatibility.d.ts +2 -0
- package/dist/judges/backwards-compatibility.js +46 -0
- package/dist/judges/caching.d.ts +2 -0
- package/dist/judges/caching.js +46 -0
- package/dist/judges/ci-cd.d.ts +2 -0
- package/dist/judges/ci-cd.js +46 -0
- package/dist/judges/cloud-readiness.d.ts +2 -0
- package/dist/judges/cloud-readiness.js +53 -0
- package/dist/judges/code-structure.d.ts +2 -0
- package/dist/judges/code-structure.js +50 -0
- package/dist/judges/compliance.d.ts +2 -0
- package/dist/judges/compliance.js +49 -0
- package/dist/judges/concurrency.d.ts +2 -0
- package/dist/judges/concurrency.js +48 -0
- package/dist/judges/configuration-management.d.ts +2 -0
- package/dist/judges/configuration-management.js +46 -0
- package/dist/judges/cost-effectiveness.d.ts +2 -0
- package/dist/judges/cost-effectiveness.js +42 -0
- package/dist/judges/cybersecurity.d.ts +2 -0
- package/dist/judges/cybersecurity.js +63 -0
- package/dist/judges/data-security.d.ts +2 -0
- package/dist/judges/data-security.js +50 -0
- package/dist/judges/data-sovereignty.d.ts +2 -0
- package/dist/judges/data-sovereignty.js +60 -0
- package/dist/judges/database.d.ts +2 -0
- package/dist/judges/database.js +51 -0
- package/dist/judges/dependency-health.d.ts +2 -0
- package/dist/judges/dependency-health.js +48 -0
- package/dist/judges/documentation.d.ts +2 -0
- package/dist/judges/documentation.js +55 -0
- package/dist/judges/error-handling.d.ts +2 -0
- package/dist/judges/error-handling.js +55 -0
- package/dist/judges/ethics-bias.d.ts +2 -0
- package/dist/judges/ethics-bias.js +48 -0
- package/dist/judges/false-positive-review.d.ts +2 -0
- package/dist/judges/false-positive-review.js +85 -0
- package/dist/judges/framework-safety.d.ts +2 -0
- package/dist/judges/framework-safety.js +49 -0
- package/dist/judges/hallucination-detection.d.ts +2 -0
- package/dist/judges/hallucination-detection.js +48 -0
- package/dist/judges/iac-security.d.ts +2 -0
- package/dist/judges/iac-security.js +47 -0
- package/dist/judges/index.d.ts +88 -0
- package/dist/judges/index.js +128 -0
- package/dist/judges/intent-alignment.d.ts +2 -0
- package/dist/judges/intent-alignment.js +46 -0
- package/dist/judges/internationalization.d.ts +2 -0
- package/dist/judges/internationalization.js +44 -0
- package/dist/judges/logging-privacy.d.ts +2 -0
- package/dist/judges/logging-privacy.js +46 -0
- package/dist/judges/logic-review.d.ts +2 -0
- package/dist/judges/logic-review.js +36 -0
- package/dist/judges/maintainability.d.ts +2 -0
- package/dist/judges/maintainability.js +46 -0
- package/dist/judges/model-fingerprint.d.ts +2 -0
- package/dist/judges/model-fingerprint.js +35 -0
- package/dist/judges/multi-turn-coherence.d.ts +2 -0
- package/dist/judges/multi-turn-coherence.js +39 -0
- package/dist/judges/observability.d.ts +2 -0
- package/dist/judges/observability.js +54 -0
- package/dist/judges/over-engineering.d.ts +2 -0
- package/dist/judges/over-engineering.js +50 -0
- package/dist/judges/performance.d.ts +2 -0
- package/dist/judges/performance.js +46 -0
- package/dist/judges/portability.d.ts +2 -0
- package/dist/judges/portability.js +46 -0
- package/dist/judges/rate-limiting.d.ts +2 -0
- package/dist/judges/rate-limiting.js +55 -0
- package/dist/judges/reliability.d.ts +2 -0
- package/dist/judges/reliability.js +57 -0
- package/dist/judges/scalability.d.ts +2 -0
- package/dist/judges/scalability.js +52 -0
- package/dist/judges/security.d.ts +2 -0
- package/dist/judges/security.js +64 -0
- package/dist/judges/software-practices.d.ts +2 -0
- package/dist/judges/software-practices.js +56 -0
- package/dist/judges/testing.d.ts +2 -0
- package/dist/judges/testing.js +54 -0
- package/dist/judges/ux.d.ts +2 -0
- package/dist/judges/ux.js +46 -0
- package/dist/language-patterns.d.ts +653 -0
- package/dist/language-patterns.js +851 -0
- package/dist/parallel.d.ts +52 -0
- package/dist/parallel.js +157 -0
- package/dist/patches/apply.d.ts +15 -0
- package/dist/patches/apply.js +37 -0
- package/dist/patches/index.d.ts +9 -0
- package/dist/patches/index.js +2544 -0
- package/dist/plugins.d.ts +59 -0
- package/dist/plugins.js +76 -0
- package/dist/presets.d.ts +35 -0
- package/dist/presets.js +406 -0
- package/dist/probabilistic/llm-response-validator.d.ts +26 -0
- package/dist/probabilistic/llm-response-validator.js +122 -0
- package/dist/reports/public-repo-report.d.ts +42 -0
- package/dist/reports/public-repo-report.js +579 -0
- package/dist/review-conversation.d.ts +87 -0
- package/dist/review-conversation.js +307 -0
- package/dist/sast-integration.d.ts +112 -0
- package/dist/sast-integration.js +215 -0
- package/dist/scoring.d.ts +36 -0
- package/dist/scoring.js +437 -0
- package/dist/security-ids.d.ts +23 -0
- package/dist/security-ids.js +239 -0
- package/dist/skill-loader.d.ts +33 -0
- package/dist/skill-loader.js +167 -0
- package/dist/tools/command-safety.d.ts +13 -0
- package/dist/tools/command-safety.js +95 -0
- package/dist/tools/deep-review.d.ts +38 -0
- package/dist/tools/deep-review.js +302 -0
- package/dist/tools/prompts.d.ts +27 -0
- package/dist/tools/prompts.js +122 -0
- package/dist/tools/register-evaluation.d.ts +6 -0
- package/dist/tools/register-evaluation.js +587 -0
- package/dist/tools/register-fix.d.ts +5 -0
- package/dist/tools/register-fix.js +175 -0
- package/dist/tools/register-resources.d.ts +6 -0
- package/dist/tools/register-resources.js +177 -0
- package/dist/tools/register-review.d.ts +6 -0
- package/dist/tools/register-review.js +564 -0
- package/dist/tools/register-scaffold.d.ts +2 -0
- package/dist/tools/register-scaffold.js +398 -0
- package/dist/tools/register-workflow.d.ts +6 -0
- package/dist/tools/register-workflow.js +1037 -0
- package/dist/tools/register-workspace.d.ts +2 -0
- package/dist/tools/register-workspace.js +214 -0
- package/dist/tools/register.d.ts +6 -0
- package/dist/tools/register.js +21 -0
- package/dist/tools/schemas.d.ts +25 -0
- package/dist/tools/schemas.js +41 -0
- package/dist/tools/validation.d.ts +13 -0
- package/dist/tools/validation.js +77 -0
- package/dist/types.d.ts +898 -0
- package/dist/types.js +1 -0
- package/package.json +54 -0
- package/skills/ai-code-review.skill.md +57 -0
- package/skills/release-gate.skill.md +27 -0
- package/skills/security-review.skill.md +32 -0
|
@@ -0,0 +1,1169 @@
|
|
|
1
|
+
import { normalizeLanguage, langPattern, isIaC } from "../language-patterns.js";
|
|
2
|
+
// ─── Re-export language utilities for convenience ────────────────────────────
|
|
3
|
+
export { normalizeLanguage, langPattern };
|
|
4
|
+
// ─── Infrastructure-as-Code Detection ────────────────────────────────────────
|
|
5
|
+
// Content-based detection of IaC templates (Bicep, Terraform, ARM).
|
|
6
|
+
// Complements the language-family-based `isIaC()` from language-patterns.ts
|
|
7
|
+
// by detecting IaC content regardless of the language label passed in.
|
|
8
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
9
|
+
const IAC_TEMPLATE_PATTERN = /(?:^|\n)\s*(?:param\s+\w+\s+(?:string|int|bool|object|array)|resource\s+\w+\s+'[^']*@\d{4}-\d{2}-\d{2}|@(?:allowed|description|secure)\s*\(|targetScope\s*=|resource\s+"[^"]+"\s+"[^"]+"|variable\s+"|provider\s+"|terraform\s*\{|\$schema.*deploymentTemplate)/im;
|
|
10
|
+
/**
|
|
11
|
+
* Detect whether `code` is an Infrastructure-as-Code template (Bicep,
|
|
12
|
+
* Terraform, or ARM) based on content patterns. This is intentionally
|
|
13
|
+
* separate from `isIaC(lang)` which only checks the language family name —
|
|
14
|
+
* content-based detection works even when the language is mis-classified.
|
|
15
|
+
*/
|
|
16
|
+
export function isIaCTemplate(code) {
|
|
17
|
+
return IAC_TEMPLATE_PATTERN.test(code);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Heuristically classify a source file based on its content (and optionally its
|
|
21
|
+
* file path). The classification drives file-type gating: absence-based
|
|
22
|
+
* rules (e.g. "no rate limiting", "no config schema") are suppressed on
|
|
23
|
+
* non-server files where they would only produce noise.
|
|
24
|
+
*/
|
|
25
|
+
export function classifyFile(code, language, filePath) {
|
|
26
|
+
const lines = code.split("\n");
|
|
27
|
+
const lineCount = lines.length;
|
|
28
|
+
// ── Path-based fast checks ───────────────────────────────────────────────
|
|
29
|
+
if (filePath) {
|
|
30
|
+
const lowerPath = filePath.toLowerCase().replace(/\\/g, "/");
|
|
31
|
+
if (/[/\\]?(?:__tests__|test|tests|spec|__mocks__|__fixtures__)[/\\]/i.test(lowerPath) ||
|
|
32
|
+
/\.(test|spec|e2e)\.\w+$/i.test(lowerPath)) {
|
|
33
|
+
return "test";
|
|
34
|
+
}
|
|
35
|
+
if (/(?:^|[/\\])(?:tsconfig|jest\.config|webpack\.config|vite\.config|eslint|\.eslintrc|babel\.config|rollup\.config|\.prettierrc|Makefile|Dockerfile|docker-compose|package\.json|Cargo\.toml|go\.mod|pom\.xml|build\.gradle|\.csproj|\.sln|\.editorconfig)[^/\\]*$/i.test(lowerPath)) {
|
|
36
|
+
return "config";
|
|
37
|
+
}
|
|
38
|
+
if (/\.d\.ts$/i.test(lowerPath)) {
|
|
39
|
+
return "types";
|
|
40
|
+
}
|
|
41
|
+
// Health check / readiness probe endpoints (should not trigger absence rules)
|
|
42
|
+
if (/(?:^|[/\\])(?:health|healthcheck|health-check|readiness|liveness|ready|live|ping|status)\.\w+$/i.test(lowerPath)) {
|
|
43
|
+
return "utility";
|
|
44
|
+
}
|
|
45
|
+
// Migration / seed files
|
|
46
|
+
if (/(?:^|[/\\])(?:migrations?|seeds?|fixtures)[/\\]/i.test(lowerPath)) {
|
|
47
|
+
return "config";
|
|
48
|
+
}
|
|
49
|
+
// Infrastructure as Code files
|
|
50
|
+
if (/\.(?:tf|tfvars|bicep)$/i.test(lowerPath)) {
|
|
51
|
+
return "config";
|
|
52
|
+
}
|
|
53
|
+
// Data / config files by extension (YAML, JSON, TOML, INI, ENV, properties)
|
|
54
|
+
if (/\.(?:ya?ml|json|jsonc|toml|ini|env|properties|cfg|conf)$/i.test(lowerPath)) {
|
|
55
|
+
return "config";
|
|
56
|
+
}
|
|
57
|
+
// VS Code extension files — desktop plugin, not a web service
|
|
58
|
+
if (/vscode[_-]?extension[/\\]/i.test(lowerPath)) {
|
|
59
|
+
return "vscode-extension";
|
|
60
|
+
}
|
|
61
|
+
// Code analysis / pattern-matching tool directories
|
|
62
|
+
if (/[/\\](?:judges|evaluators|analyzers|linters|rules|checks|ast|formatters|patches|reports|tools)[/\\]/i.test(lowerPath)) {
|
|
63
|
+
return "analysis-tool";
|
|
64
|
+
}
|
|
65
|
+
// CLI entry points and command files — must come before server detection
|
|
66
|
+
// to prevent server-signal patterns in sample code from mis-classifying
|
|
67
|
+
if (/[/\\](?:commands?|cmd|scripts)[/\\]/i.test(lowerPath)) {
|
|
68
|
+
return "cli";
|
|
69
|
+
}
|
|
70
|
+
if (/[/\\]cli\.\w+$/i.test(lowerPath)) {
|
|
71
|
+
return "cli";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// ── Content-based classification ─────────────────────────────────────────
|
|
75
|
+
// Regex-heavy pattern libraries are analysis tools, not test files.
|
|
76
|
+
// Check this BEFORE test detection to prevent string-embedded assert/test
|
|
77
|
+
// keywords from mis-classifying pattern libraries.
|
|
78
|
+
const regexTestCallCount = lines.filter((l) => /\.test\s*\(/.test(l)).length;
|
|
79
|
+
const regexLiteralCount = lines.filter((l) => /\/[^/\s][^/\n]*\/[gimsuy]*/.test(l)).length;
|
|
80
|
+
if (regexLiteralCount >= 20) {
|
|
81
|
+
return "analysis-tool";
|
|
82
|
+
}
|
|
83
|
+
if (regexTestCallCount >= 5 && regexLiteralCount >= 8) {
|
|
84
|
+
return "analysis-tool";
|
|
85
|
+
}
|
|
86
|
+
// Test files: heavy test framework usage.
|
|
87
|
+
// Exclude lines where "test" is preceded by a dot — those are regex
|
|
88
|
+
// .test() calls, not test-framework invocations.
|
|
89
|
+
const testFrameworkLines = lines.filter((l) => {
|
|
90
|
+
if (!/\b(?:describe|it|test|beforeEach|afterEach|beforeAll|afterAll|expect|assert)\s*\(/i.test(l))
|
|
91
|
+
return false;
|
|
92
|
+
// If the only match is .test( (regex invocation), skip the line
|
|
93
|
+
const stripped = l.replace(/\.test\s*\(/g, ".XXXX(");
|
|
94
|
+
return /\b(?:describe|it|test|beforeEach|afterEach|beforeAll|afterAll|expect|assert)\s*\(/i.test(stripped);
|
|
95
|
+
}).length;
|
|
96
|
+
if (testFrameworkLines >= 3) {
|
|
97
|
+
return "test";
|
|
98
|
+
}
|
|
99
|
+
// Pure type-definition files: mostly interfaces, types, enums, no runtime
|
|
100
|
+
const typeOnlyPattern = /^\s*(?:export\s+)?(?:interface|type|enum|declare|namespace)\b/;
|
|
101
|
+
const importPattern = /^\s*(?:import|export)\s/;
|
|
102
|
+
const commentOrBlank = /^\s*(?:\/\/|\/\*|\*|$)/;
|
|
103
|
+
const runtimeStatements = lines.filter((l) => {
|
|
104
|
+
const trimmed = l.trim();
|
|
105
|
+
return (trimmed.length > 0 &&
|
|
106
|
+
!commentOrBlank.test(trimmed) &&
|
|
107
|
+
!typeOnlyPattern.test(trimmed) &&
|
|
108
|
+
!importPattern.test(trimmed) &&
|
|
109
|
+
!/^\s*\}/.test(trimmed) && // closing braces
|
|
110
|
+
!/^\s*\*\//.test(trimmed)); // end of block comment
|
|
111
|
+
}).length;
|
|
112
|
+
if (lineCount > 5 && runtimeStatements / lineCount < 0.15) {
|
|
113
|
+
return "types";
|
|
114
|
+
}
|
|
115
|
+
// Config-like files: mostly key-value, constants, no functions
|
|
116
|
+
const constExportLines = lines.filter((l) => /^\s*(?:export\s+)?(?:const|let|var)\s+\w+\s*=\s*(?:\{|"|'|\d|true|false|null|\[)/i.test(l)).length;
|
|
117
|
+
const functionDeclLines = lines.filter((l) => /(?:function\s+\w+|=>\s*\{|class\s+\w+|def\s+\w+|fn\s+\w+|func\s+\w+)/i.test(l)).length;
|
|
118
|
+
if (lineCount > 5 && constExportLines / lineCount > 0.3 && functionDeclLines === 0) {
|
|
119
|
+
return "config";
|
|
120
|
+
}
|
|
121
|
+
// Content-based VS Code detection: imports from 'vscode' package
|
|
122
|
+
if ((code.includes("vscode") && /\bimport\b/.test(code) && /\bfrom\s+['"]vscode['"]/.test(code)) ||
|
|
123
|
+
/require\s*\(\s*['"]vscode['"]\s*\)/i.test(code)) {
|
|
124
|
+
return "vscode-extension";
|
|
125
|
+
}
|
|
126
|
+
// Files with many scoring/evaluation patterns are also analysis tools
|
|
127
|
+
const scoringPatterns = lines.filter((l) => /\b(?:scoreFindings|evaluateWith|filterFalsePositive|classifyFile|isIaCTemplate|normalizeLanguage|langPattern)\b/.test(l)).length;
|
|
128
|
+
if (scoringPatterns >= 2 && regexLiteralCount >= 3) {
|
|
129
|
+
return "analysis-tool";
|
|
130
|
+
}
|
|
131
|
+
// Health-check endpoints detected by content (lightweight route returning 200/ok).
|
|
132
|
+
// Only classify as utility when the file is a dedicated health-check module —
|
|
133
|
+
// if it defines multiple routes it is a real server that happens to include
|
|
134
|
+
// a health endpoint.
|
|
135
|
+
const routeHandlerCount = (code.match(/\bapp\.(?:get|post|put|delete|patch|use)\s*\(|router\.(?:get|post|put|delete|patch|use)\s*\(|@app\.route\s*\(|@(?:Get|Post|Put|Delete)Mapping\s*\(/gi) || []).length;
|
|
136
|
+
if (routeHandlerCount <= 1 &&
|
|
137
|
+
/(?:\/health|\/ready|\/live|\/ping|\/status)\b/i.test(code) &&
|
|
138
|
+
lineCount < 50 &&
|
|
139
|
+
// Bound [^\n] to {0,200} to prevent polynomial backtracking when a line
|
|
140
|
+
// contains many 'return' sub-strings (CodeQL js/polynomial-redos).
|
|
141
|
+
/(?:res\.(?:send|json|status)|return[^\n]{0,200}(?:ok|healthy|200))/i.test(code)) {
|
|
142
|
+
return "utility";
|
|
143
|
+
}
|
|
144
|
+
// Library modules that import judges domain types are part of the analysis
|
|
145
|
+
// tool even if they lack many regex patterns. Check this BEFORE server
|
|
146
|
+
// signals — files like presets.ts reference framework names (Django, Spring)
|
|
147
|
+
// inside preset data, which would otherwise false-trigger server detection.
|
|
148
|
+
if (/\b(?:scoreFindings|evaluateWith|filterFalsePositive|classifyFile|Finding|TribunalVerdict|JudgeDefinition|JudgeEvaluation|JudgesConfig|LangFamily|Severity|FileCategory|EvaluatorResult|normalizeLanguage|RuleSeverity|Preset|ToolCapability|ComparisonResult)\b/.test(code)) {
|
|
149
|
+
return "analysis-tool";
|
|
150
|
+
}
|
|
151
|
+
// Server / entry point: has HTTP handlers, route definitions, or listen
|
|
152
|
+
const serverSignals = /\b(?:app\.(?:get|post|put|delete|patch|use|listen)|router\.|express\(|createServer|fastify|Koa|hono|http\.(?:Server|createServer)|new\s+Hono|Flask|Django|Spring|@(?:Get|Post|Put|Delete|Controller|RequestMapping)|func\s+\w+Handler|gin\.\w+|http\.Handle)/i;
|
|
153
|
+
if (serverSignals.test(code)) {
|
|
154
|
+
return "server";
|
|
155
|
+
}
|
|
156
|
+
// CLI commands: short-lived processes with console output, process.exit,
|
|
157
|
+
// argument parsing, synchronous I/O — should not trigger scalability,
|
|
158
|
+
// structured logging, or graceful-shutdown rules.
|
|
159
|
+
const cliSignals = [
|
|
160
|
+
/\bprocess\.exit\s*\(/i.test(code), // explicit exit codes
|
|
161
|
+
/\bprocess\.argv\b/i.test(code), // CLI argument access
|
|
162
|
+
/\bconsole\.(?:log|error|warn)\s*\(/i.test(code) && /\bprocess\.exit\s*\(/i.test(code), // console output + exit
|
|
163
|
+
/\b(?:commander|yargs|minimist|meow|inquirer|vorpal|oclif|clipanion|cac)\b/i.test(code), // CLI frameworks
|
|
164
|
+
/\b(?:parseArgs|parse_args|add_argument|\.option\s*\(\s*["']-)/i.test(code), // argument parsing
|
|
165
|
+
];
|
|
166
|
+
const cliScore = cliSignals.filter(Boolean).length;
|
|
167
|
+
if (cliScore >= 2 && !serverSignals.test(code)) {
|
|
168
|
+
return "cli";
|
|
169
|
+
}
|
|
170
|
+
// Client-side web / frontend components (React, Vue, Angular, Svelte) are
|
|
171
|
+
// app code, not utility modules — they can have XSS, framework safety,
|
|
172
|
+
// accessibility, and i18n issues. Check BEFORE the utility fallback.
|
|
173
|
+
const hasFrontendPatterns = /<\w+[\s>]/.test(code) &&
|
|
174
|
+
/\b(?:className|onClick|onChange|onSubmit|useState|useEffect|useRef|useCallback|useMemo|useContext|dangerouslySetInnerHTML|React\.(?:createElement|Component|Fragment|memo|forwardRef))\b/i.test(code);
|
|
175
|
+
if (hasFrontendPatterns) {
|
|
176
|
+
return "unknown";
|
|
177
|
+
}
|
|
178
|
+
// Small utility with no I/O
|
|
179
|
+
const hasIO = /\b(?:fetch|axios|http|https|net|fs\.|readFile|writeFile|database|query|exec|spawn|child_process|socket|s3\.|putObject|getObject|dynamodb|cosmosdb|BigQuery|DatastoreClient|firestore|redis\.|mongodb|mongoose|pg\.|mysql|sequelize|prisma|knex|typeorm|drizzle|supabase|blob\.|BlobServiceClient|SQS|SNS|pubsub|EventHub|kafka)\b/i.test(code);
|
|
180
|
+
if (!hasIO && lineCount >= 8 && lineCount < 200) {
|
|
181
|
+
return "utility";
|
|
182
|
+
}
|
|
183
|
+
// Files that primarily export utility functions (no server, no test, no CLI,
|
|
184
|
+
// has I/O or is large) are general utility modules.
|
|
185
|
+
if (functionDeclLines >= 2 && !hasIO) {
|
|
186
|
+
return "utility";
|
|
187
|
+
}
|
|
188
|
+
return "unknown";
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Whether absence-based rules should fire for a file of this category.
|
|
192
|
+
* Absence-based rules (e.g. "no rate limiting", "no input validation") are
|
|
193
|
+
* only meaningful on server / entry-point code.
|
|
194
|
+
*/
|
|
195
|
+
export function shouldRunAbsenceRules(category) {
|
|
196
|
+
return category === "server" || category === "unknown";
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Patterns that extract version hints from code, config, or comments.
|
|
200
|
+
* Each entry: [framework, regex with capture group 1 = version string].
|
|
201
|
+
*/
|
|
202
|
+
const VERSION_DETECT_PATTERNS = [
|
|
203
|
+
// Python requirements / pyproject.toml
|
|
204
|
+
["django", /django\s*[=~><]{1,2}\s*([\d.]+)/i],
|
|
205
|
+
["flask", /flask\s*[=~><]{1,2}\s*([\d.]+)/i],
|
|
206
|
+
["fastapi", /fastapi\s*[=~><]{1,2}\s*([\d.]+)/i],
|
|
207
|
+
// JavaScript package.json style
|
|
208
|
+
["express", /["']express["']\s*:\s*["'][~^]?([\d.]+)/i],
|
|
209
|
+
["next", /["']next["']\s*:\s*["'][~^]?([\d.]+)/i],
|
|
210
|
+
// Java / Kotlin — Spring Boot
|
|
211
|
+
["spring", /spring-boot(?:-starter)?[:-](\d+\.\d+[\d.]*)/i],
|
|
212
|
+
["spring", /org\.springframework\.boot.*version\s*=?\s*['"]?(\d+\.\d+[\d.]*)/i],
|
|
213
|
+
// C# — ASP.NET
|
|
214
|
+
["aspnet", /Microsoft\.AspNetCore[.\w]*Version=["']?([\d.]+)/i],
|
|
215
|
+
["aspnet", /net(\d+\.\d+)/i],
|
|
216
|
+
// Ruby Gemfile
|
|
217
|
+
["rails", /['"]rails['"],?\s*['"]~>\s*([\d.]+)/i],
|
|
218
|
+
// Go go.mod
|
|
219
|
+
["gin", /github\.com\/gin-gonic\/gin\s+v([\d.]+)/i],
|
|
220
|
+
// PHP composer.json
|
|
221
|
+
["laravel", /["']laravel\/framework["']\s*:\s*["'][~^]?([\d.]+)/i],
|
|
222
|
+
// Generic version comment
|
|
223
|
+
["django", /@version\s+Django\s+([\d.]+)/i],
|
|
224
|
+
["spring", /@version\s+Spring\s+(?:Boot\s+)?([\d.]+)/i],
|
|
225
|
+
];
|
|
226
|
+
/**
|
|
227
|
+
* Extract framework version hints from code content.
|
|
228
|
+
* Scans for version specifiers in requirements, package.json, go.mod,
|
|
229
|
+
* Gemfile, composer.json, and version comments.
|
|
230
|
+
*/
|
|
231
|
+
export function detectFrameworkVersions(code) {
|
|
232
|
+
const hints = [];
|
|
233
|
+
const seen = new Set();
|
|
234
|
+
for (const [fw, regex] of VERSION_DETECT_PATTERNS) {
|
|
235
|
+
const match = code.match(regex);
|
|
236
|
+
if (match && match[1]) {
|
|
237
|
+
const key = `${fw}:${match[1]}`;
|
|
238
|
+
if (seen.has(key))
|
|
239
|
+
continue;
|
|
240
|
+
seen.add(key);
|
|
241
|
+
const parts = match[1].split(".");
|
|
242
|
+
hints.push({
|
|
243
|
+
framework: fw,
|
|
244
|
+
major: parts[0] ? parseInt(parts[0], 10) : null,
|
|
245
|
+
minor: parts[1] ? parseInt(parts[1], 10) : null,
|
|
246
|
+
raw: match[1],
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return hints;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Version-aware confidence adjustments. Some security concerns only apply to
|
|
254
|
+
* specific framework versions. Returns the confidence delta (negative = reduce,
|
|
255
|
+
* positive = increase).
|
|
256
|
+
*
|
|
257
|
+
* Examples:
|
|
258
|
+
* - Django ≥4.0 has CSRF enabled by default → reduce CSRF-finding confidence
|
|
259
|
+
* - Spring Boot ≥3.0 requires explicit security configuration → raise concern
|
|
260
|
+
* - Express 5.x deprecates certain middleware → raise concern for old patterns
|
|
261
|
+
*/
|
|
262
|
+
export function getVersionConfidenceAdjustment(finding, versions) {
|
|
263
|
+
for (const v of versions) {
|
|
264
|
+
if (v.major === null)
|
|
265
|
+
continue;
|
|
266
|
+
if (v.framework === "django") {
|
|
267
|
+
// Django 4.0+ has async view support and improved CSRF
|
|
268
|
+
if (v.major >= 4 && /csrf/i.test(finding.title))
|
|
269
|
+
return -0.15;
|
|
270
|
+
// Django 3.x deprecated certain auth patterns
|
|
271
|
+
if (v.major >= 3 && /password.*reset.*insecure/i.test(finding.title))
|
|
272
|
+
return -0.1;
|
|
273
|
+
}
|
|
274
|
+
if (v.framework === "spring") {
|
|
275
|
+
// Spring Boot 3.x requires Spring Security 6 — no more auto-CSRF
|
|
276
|
+
if (v.major >= 3 && /csrf.*auto|default.*csrf/i.test(finding.title))
|
|
277
|
+
return 0.1;
|
|
278
|
+
// Spring Boot 2.x had auto-configured security
|
|
279
|
+
if (v.major <= 2 && /security.*missing|no.*security/i.test(finding.title))
|
|
280
|
+
return -0.15;
|
|
281
|
+
}
|
|
282
|
+
if (v.framework === "next") {
|
|
283
|
+
// Next.js 13+ App Router has built-in security headers
|
|
284
|
+
if (v.major >= 13 && /security.?header/i.test(finding.title))
|
|
285
|
+
return -0.15;
|
|
286
|
+
// Next.js 14+ has improved Server Action security
|
|
287
|
+
if (v.major >= 14 && /server.?action.*insecure/i.test(finding.title))
|
|
288
|
+
return -0.1;
|
|
289
|
+
}
|
|
290
|
+
if (v.framework === "express") {
|
|
291
|
+
// Express 5.x deprecated several patterns
|
|
292
|
+
if (v.major >= 5 && /deprecated/i.test(finding.title))
|
|
293
|
+
return 0.1;
|
|
294
|
+
}
|
|
295
|
+
if (v.framework === "rails") {
|
|
296
|
+
// Rails 7+ has strong defaults for parameter filtering
|
|
297
|
+
if (v.major >= 7 && /mass.?assign|strong.?param/i.test(finding.title))
|
|
298
|
+
return -0.1;
|
|
299
|
+
// Rails 6+ has per-form CSRF tokens
|
|
300
|
+
if (v.major >= 6 && /csrf/i.test(finding.title))
|
|
301
|
+
return -0.1;
|
|
302
|
+
}
|
|
303
|
+
if (v.framework === "laravel") {
|
|
304
|
+
// Laravel 9+ has improved validation and typed request factories
|
|
305
|
+
if (v.major >= 9 && /input.?valid|request.?valid/i.test(finding.title))
|
|
306
|
+
return -0.1;
|
|
307
|
+
}
|
|
308
|
+
if (v.framework === "aspnet") {
|
|
309
|
+
// .NET 8+ has built-in rate limiting middleware
|
|
310
|
+
if (v.major >= 8 && /rate.?limit/i.test(finding.title))
|
|
311
|
+
return -0.15;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return 0;
|
|
315
|
+
}
|
|
316
|
+
const FRAMEWORK_DETECT_PATTERNS = [
|
|
317
|
+
// ── JavaScript / TypeScript ──
|
|
318
|
+
["express", /\brequire\s*\(\s*['"]express['"]\)|from\s+['"]express['"]/],
|
|
319
|
+
["next", /from\s+['"]next['"/]|getServerSideProps|getStaticProps|NextRequest|NextResponse/],
|
|
320
|
+
["hono", /from\s+['"]hono['"/]|new\s+Hono\s*\(/],
|
|
321
|
+
["koa", /from\s+['"]koa['"/]|new\s+Koa\s*\(|require\s*\(\s*['"]koa['"]\)/],
|
|
322
|
+
["fastify", /from\s+['"]fastify['"/]|require\s*\(\s*['"]fastify['"]\)/],
|
|
323
|
+
["helmet", /\bhelmet\s*\(|from\s+['"]helmet['"]/],
|
|
324
|
+
["express-rate-limit", /express-rate-limit|rateLimit\s*\(\s*\{/],
|
|
325
|
+
["cors-middleware", /\bcors\s*\(|from\s+['"]cors['"]/],
|
|
326
|
+
["csurf", /csurf|csrf-csrf/],
|
|
327
|
+
// ── React ──
|
|
328
|
+
["react", /from\s+['"]react['"]|import\s+React\b|require\s*\(\s*['"]react['"]\)/],
|
|
329
|
+
// ── Python ──
|
|
330
|
+
["fastapi", /from\s+fastapi\s+import|FastAPI\s*\(/],
|
|
331
|
+
["django", /from\s+django\b|django\.\w+|INSTALLED_APPS/],
|
|
332
|
+
["flask", /from\s+flask\s+import|Flask\s*\(__name__\)/],
|
|
333
|
+
// ── Java ──
|
|
334
|
+
["spring", /@SpringBootApplication|@RestController|@(?:Get|Post|Put|Delete)Mapping/],
|
|
335
|
+
// ── C# ──
|
|
336
|
+
["aspnet", /\[ApiController\]|ControllerBase|Microsoft\.AspNetCore/],
|
|
337
|
+
// ── Go ──
|
|
338
|
+
["gin", /gin\.Default\s*\(|"github\.com\/gin-gonic\/gin"/],
|
|
339
|
+
// ── Rust ──
|
|
340
|
+
["actix", /use\s+actix_web|HttpServer::new\s*\(/],
|
|
341
|
+
];
|
|
342
|
+
/**
|
|
343
|
+
* Finding-title patterns that each framework inherently mitigates.
|
|
344
|
+
* When a framework is detected, findings matching these patterns have their
|
|
345
|
+
* confidence reduced because the framework likely handles the concern.
|
|
346
|
+
*/
|
|
347
|
+
const FRAMEWORK_MITIGATIONS = {
|
|
348
|
+
// Middleware that explicitly handles specific concerns
|
|
349
|
+
helmet: /security.?header|x-frame|hsts|content.security.policy|clickjack/i,
|
|
350
|
+
"express-rate-limit": /rate.?limit|throttl|brute.?force/i,
|
|
351
|
+
"cors-middleware": /cors|cross.?origin/i,
|
|
352
|
+
csurf: /csrf|cross.?site\s*request/i,
|
|
353
|
+
// Frameworks with built-in security features
|
|
354
|
+
next: /csrf|security.?header|x-frame/i,
|
|
355
|
+
django: /csrf|security.?header|xss|cross.?site\s*script/i,
|
|
356
|
+
fastapi: /input.?valid|type.?check|request.?valid|unsanitized.?input/i,
|
|
357
|
+
spring: /csrf|cross.?site\s*request/i,
|
|
358
|
+
aspnet: /csrf|cross.?site\s*request|input.?valid/i,
|
|
359
|
+
gin: /panic|recovery|unhandled/i,
|
|
360
|
+
};
|
|
361
|
+
/** Confidence reduction when a framework already handles the concern. */
|
|
362
|
+
const FRAMEWORK_CONFIDENCE_REDUCTION = 0.2;
|
|
363
|
+
/**
|
|
364
|
+
* Detect frameworks and security middleware from code patterns.
|
|
365
|
+
* Works across all languages — no AST required.
|
|
366
|
+
*/
|
|
367
|
+
export function detectFrameworks(code) {
|
|
368
|
+
const detected = [];
|
|
369
|
+
for (const [name, regex] of FRAMEWORK_DETECT_PATTERNS) {
|
|
370
|
+
if (regex.test(code))
|
|
371
|
+
detected.push(name);
|
|
372
|
+
}
|
|
373
|
+
return detected;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Reduce confidence on findings that are mitigated by a detected framework
|
|
377
|
+
* or middleware. Also applies version-aware adjustments when version hints
|
|
378
|
+
* are found in the code. This is complementary to AST-based import
|
|
379
|
+
* awareness — it works for all languages and detects framework-level
|
|
380
|
+
* mitigations (e.g. Django CSRF, FastAPI validation) that import checks miss.
|
|
381
|
+
*/
|
|
382
|
+
export function applyFrameworkAwareness(findings, code) {
|
|
383
|
+
const frameworks = detectFrameworks(code);
|
|
384
|
+
const versions = detectFrameworkVersions(code);
|
|
385
|
+
if (frameworks.length === 0 && versions.length === 0)
|
|
386
|
+
return findings;
|
|
387
|
+
return findings.map((f) => {
|
|
388
|
+
let currentConf = f.confidence ?? 0.5;
|
|
389
|
+
let provenanceNote = "";
|
|
390
|
+
// Framework mitigation adjustments
|
|
391
|
+
for (const fw of frameworks) {
|
|
392
|
+
const pattern = FRAMEWORK_MITIGATIONS[fw];
|
|
393
|
+
if (pattern && pattern.test(f.title)) {
|
|
394
|
+
currentConf = Math.max(0, Math.min(1, currentConf - FRAMEWORK_CONFIDENCE_REDUCTION));
|
|
395
|
+
provenanceNote += provenanceNote ? `; ${fw}-mitigated` : `${fw}-mitigated`;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
// Version-aware fine-tuning
|
|
399
|
+
if (versions.length > 0) {
|
|
400
|
+
const versionDelta = getVersionConfidenceAdjustment(f, versions);
|
|
401
|
+
if (versionDelta !== 0) {
|
|
402
|
+
currentConf = Math.max(0, Math.min(1, currentConf + versionDelta));
|
|
403
|
+
const versionLabel = versions.map((v) => `${v.framework}@${v.raw}`).join(",");
|
|
404
|
+
provenanceNote += provenanceNote ? `; version-adjusted(${versionLabel})` : `version-adjusted(${versionLabel})`;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
if (provenanceNote) {
|
|
408
|
+
return {
|
|
409
|
+
...f,
|
|
410
|
+
confidence: currentConf,
|
|
411
|
+
provenance: f.provenance ? `${f.provenance}; ${provenanceNote}` : provenanceNote,
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
return f;
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
const RUNTIME_PATTERNS = [
|
|
418
|
+
["node", /\b(?:process\.env|module\.exports|__dirname|__filename|Buffer\.from)\b|\brequire\s*\(/],
|
|
419
|
+
["browser", /\b(?:document\.|window\.|localStorage|sessionStorage|navigator\.|DOM|HTMLElement)\b/],
|
|
420
|
+
["serverless", /\b(?:exports\.handler|lambda|@azure\/functions|AzureFunction|APIGatewayEvent)\b/],
|
|
421
|
+
["container", /(?:Dockerfile|HEALTHCHECK|EXPOSE\s+\d+|docker-compose)/i],
|
|
422
|
+
["deno", /\b(?:Deno\.|import\s.*from\s+["']https:\/\/deno)/],
|
|
423
|
+
["bun", /\b(?:Bun\.|bun:)/],
|
|
424
|
+
];
|
|
425
|
+
const ENTRY_POINT_PATTERNS = [
|
|
426
|
+
["serverless", /\b(?:exports\.handler|lambda\s*=|AzureFunction|APIGatewayEvent)\b|@azure\/functions/],
|
|
427
|
+
["api-controller", /\bapp\.(?:get|post|put|delete|patch)\s*\(|@(?:Get|Post|Put|Delete|Controller)\b/],
|
|
428
|
+
["middleware", /\b(?:next\s*\(\)|app\.use\s*\(|middleware)/i],
|
|
429
|
+
["worker", /\b(?:Worker|parentPort|workerData|SharedWorker|ServiceWorker)\b/],
|
|
430
|
+
["websocket", /\b(?:WebSocket|ws\.Server|socket\.io|onmessage)\b/i],
|
|
431
|
+
["graphql", /\b(?:GraphQL|gql`|typeDefs|resolvers|ApolloServer)\b/i],
|
|
432
|
+
["grpc", /\b(?:grpc|protobuf|proto\.load)\b/i],
|
|
433
|
+
["queue-consumer", /\b(?:SQS|amqp|RabbitMQ|kafka|bullmq|BullQueue)\b/i],
|
|
434
|
+
["cron-job", /\b(?:cron|node-schedule|agenda|setInterval)\b/i],
|
|
435
|
+
];
|
|
436
|
+
const PROJECT_TYPE_PATTERNS = [
|
|
437
|
+
["web-api", /\bapp\.listen\s*\(|createServer\s*\(|@RestController\b/],
|
|
438
|
+
["cli-tool", /\b(?:process\.argv|commander|yargs|argparse|@Command)\b/],
|
|
439
|
+
["library", /^\s*(?:export\s+(?:function|class|const|interface|type)\b)/m],
|
|
440
|
+
["full-stack", /\b(?:getServerSideProps|getStaticProps|NextRequest|pages\/api)\b/],
|
|
441
|
+
["static-site", /\b(?:gatsby|vuepress|astro|eleventy|jekyll)\b/i],
|
|
442
|
+
];
|
|
443
|
+
const DEPENDENCY_PATTERNS = [/(?:import|from|require)\s*[\s(]+['"]([@\w][^'"]*)['"]/g];
|
|
444
|
+
/**
|
|
445
|
+
* Detect project-level context from code content. This context is injected
|
|
446
|
+
* into L2 prompts so the LLM understands what kind of code it is reviewing.
|
|
447
|
+
*/
|
|
448
|
+
export function detectProjectContext(code, language, filePath) {
|
|
449
|
+
const frameworks = detectFrameworks(code);
|
|
450
|
+
const versions = detectFrameworkVersions(code);
|
|
451
|
+
// Detect runtime
|
|
452
|
+
let runtime = "unknown";
|
|
453
|
+
for (const [name, pattern] of RUNTIME_PATTERNS) {
|
|
454
|
+
if (pattern.test(code)) {
|
|
455
|
+
runtime = name;
|
|
456
|
+
break;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
// Detect entry point type
|
|
460
|
+
let entryPointType = "unknown";
|
|
461
|
+
if (filePath) {
|
|
462
|
+
const category = classifyFile(code, language, filePath);
|
|
463
|
+
if (category !== "unknown")
|
|
464
|
+
entryPointType = category;
|
|
465
|
+
}
|
|
466
|
+
// Refine with content-based patterns
|
|
467
|
+
for (const [name, pattern] of ENTRY_POINT_PATTERNS) {
|
|
468
|
+
if (pattern.test(code)) {
|
|
469
|
+
entryPointType = name;
|
|
470
|
+
break;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
// Detect project type
|
|
474
|
+
let projectType = "unknown";
|
|
475
|
+
for (const [name, pattern] of PROJECT_TYPE_PATTERNS) {
|
|
476
|
+
if (pattern.test(code)) {
|
|
477
|
+
projectType = name;
|
|
478
|
+
break;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
// Extract top dependencies (first 10 unique package imports)
|
|
482
|
+
const deps = new Set();
|
|
483
|
+
for (const pattern of DEPENDENCY_PATTERNS) {
|
|
484
|
+
const re = new RegExp(pattern.source, pattern.flags);
|
|
485
|
+
let m;
|
|
486
|
+
while ((m = re.exec(code)) !== null && deps.size < 10) {
|
|
487
|
+
const pkg = m[1];
|
|
488
|
+
// Only external packages (not relative)
|
|
489
|
+
if (!pkg.startsWith(".") && !pkg.startsWith("/")) {
|
|
490
|
+
deps.add(pkg
|
|
491
|
+
.split("/")
|
|
492
|
+
.slice(0, pkg.startsWith("@") ? 2 : 1)
|
|
493
|
+
.join("/"));
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
return {
|
|
498
|
+
frameworks,
|
|
499
|
+
frameworkVersions: versions.map((v) => `${v.framework}@${v.raw ?? "unknown"}`),
|
|
500
|
+
entryPointType,
|
|
501
|
+
runtime,
|
|
502
|
+
dependencies: [...deps],
|
|
503
|
+
projectType,
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
// ─── Shared Utilities ────────────────────────────────────────────────────────
|
|
507
|
+
// Helper functions used by all analyzer modules and the evaluation engine.
|
|
508
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
509
|
+
/**
|
|
510
|
+
* Regex that matches lines that are purely comments (single-line, block,
|
|
511
|
+
* JSDoc body, Python/Shell hash, Python docstrings, HTML comments).
|
|
512
|
+
* Used by getLineNumbers / getLangLineNumbers to auto-skip comments and by
|
|
513
|
+
* evaluators that iterate lines manually via forEach / for-loops.
|
|
514
|
+
*/
|
|
515
|
+
const COMMENT_LINE_RE = /^\s*(?:\/\/|\/\*|\*[\s/]|\*$|#(?![![])|"""|'''|<!--)/;
|
|
516
|
+
/**
|
|
517
|
+
* Returns true when `line` is a comment (or JSDoc / docstring delimiter).
|
|
518
|
+
* Evaluators that iterate lines manually should call this at the top of
|
|
519
|
+
* the loop body and `return` / `continue` when it returns true.
|
|
520
|
+
*/
|
|
521
|
+
export function isCommentLine(line) {
|
|
522
|
+
return COMMENT_LINE_RE.test(line);
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Regex that matches lines whose primary content is a string literal value.
|
|
526
|
+
* These appear in object properties (description, suggestedFix, recommendation)
|
|
527
|
+
* and should not be pattern-matched as executable code.
|
|
528
|
+
*
|
|
529
|
+
* Matches lines like:
|
|
530
|
+
* "Some example code: const x = 1;",
|
|
531
|
+
* 'Another example',
|
|
532
|
+
* `Template string content`,
|
|
533
|
+
* "use strict";
|
|
534
|
+
*/
|
|
535
|
+
const STRING_LITERAL_LINE_RE = /^\s*["'`].*["'`][,;]?\s*$/;
|
|
536
|
+
/**
|
|
537
|
+
* Returns true when `line` is primarily a string literal value (e.g. an object
|
|
538
|
+
* property value containing description or example text). Evaluators should
|
|
539
|
+
* skip these lines to avoid false positives from example code in strings.
|
|
540
|
+
*/
|
|
541
|
+
export function isStringLiteralLine(line) {
|
|
542
|
+
return STRING_LITERAL_LINE_RE.test(line);
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Returns true when the source code appears to be a **code-analysis** or
|
|
546
|
+
* **static-analysis tool** rather than application/production code.
|
|
547
|
+
*
|
|
548
|
+
* Heuristic: files that contain ≥ 8 occurrences of `.test(` are almost
|
|
549
|
+
* certainly regex-heavy analysis/evaluator code (e.g. linters, security
|
|
550
|
+
* scanners). Rules about PII handling, database transactions, structured
|
|
551
|
+
* logging, sovereignty controls, etc. are not meaningful for such files
|
|
552
|
+
* and would only produce false positives.
|
|
553
|
+
*
|
|
554
|
+
* The threshold of 8 was calibrated from the Judges evaluator corpus —
|
|
555
|
+
* typical application files have 0–3 `.test()` calls while evaluators
|
|
556
|
+
* routinely have 15–60+.
|
|
557
|
+
*/
|
|
558
|
+
export function isLikelyAnalysisCode(code) {
|
|
559
|
+
return (code.match(/\.test\s*\(/g) || []).length >= 8;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Returns true when the source code appears to be a **CLI entry-point** or
|
|
563
|
+
* command-line tool.
|
|
564
|
+
*
|
|
565
|
+
* CLI programs legitimately use `process.exit()`, console logging, and
|
|
566
|
+
* synchronous I/O; flagging those patterns as anti-patterns would be a
|
|
567
|
+
* false positive.
|
|
568
|
+
*/
|
|
569
|
+
export function isLikelyCLI(code) {
|
|
570
|
+
// Shebang or process.argv / commander / yargs / meow patterns
|
|
571
|
+
return (/^#!\/usr\/bin\/env\s/m.test(code) ||
|
|
572
|
+
/\bprocess\.argv\b/.test(code) ||
|
|
573
|
+
/\b(?:commander|yargs|meow|cac|citty|clipanion)\b/i.test(code) ||
|
|
574
|
+
// Go CLI: flag package, cobra, urfave/cli
|
|
575
|
+
/\bflag\.(?:String|Int|Bool|Float|Parse|Args)\b/.test(code) ||
|
|
576
|
+
/\b(?:cobra|urfave\/cli)\b/i.test(code) ||
|
|
577
|
+
// Python CLI: argparse, click, typer
|
|
578
|
+
/\b(?:argparse|@click\.|typer\.)\b/.test(code) ||
|
|
579
|
+
// Rust CLI: clap
|
|
580
|
+
/\bclap::/.test(code));
|
|
581
|
+
}
|
|
582
|
+
// ─── Comment & String Stripping ──────────────────────────────────────────────
|
|
583
|
+
// Provides `stripCommentsAndStrings()` which replaces all comments and string
|
|
584
|
+
// literals with whitespace (preserving line structure) so that whole-file
|
|
585
|
+
// boolean checks like `pattern.test(code)` don't match patterns that exist
|
|
586
|
+
// only in comments, strings, or documentation.
|
|
587
|
+
//
|
|
588
|
+
// `testCode()` is a convenience wrapper: it lazily strips the code on first
|
|
589
|
+
// call and caches the result for subsequent tests against the same source.
|
|
590
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
591
|
+
/**
|
|
592
|
+
* Strip all comments from source code, replacing their content with spaces.
|
|
593
|
+
* String literals are preserved so that import paths and require() arguments
|
|
594
|
+
* remain matchable. Line structure (newlines) is preserved so that line
|
|
595
|
+
* numbers remain stable.
|
|
596
|
+
*
|
|
597
|
+
* Handles:
|
|
598
|
+
* - Single-line comments: `//`, `#` (Python/Ruby/YAML)
|
|
599
|
+
* - Block comments: slash-star ... star-slash
|
|
600
|
+
* - Python docstrings: `"""..."""` / `'''...'''` (treated as comments)
|
|
601
|
+
*
|
|
602
|
+
* Strings (`"..."`, `'...'`, `` `...` ``) are skipped (preserved) to avoid
|
|
603
|
+
* breaking patterns that intentionally match import paths, require() calls,
|
|
604
|
+
* route strings, etc.
|
|
605
|
+
*
|
|
606
|
+
* This is intentionally a lightweight heuristic — the goal is to eliminate
|
|
607
|
+
* the most common FP source (patterns in comments) without the overhead of
|
|
608
|
+
* a full parser.
|
|
609
|
+
*/
|
|
610
|
+
export function stripCommentsAndStrings(code) {
|
|
611
|
+
const len = code.length;
|
|
612
|
+
const result = new Array(len);
|
|
613
|
+
let i = 0;
|
|
614
|
+
while (i < len) {
|
|
615
|
+
const ch = code[i];
|
|
616
|
+
const next = i + 1 < len ? code[i + 1] : "";
|
|
617
|
+
// ── Single-line comment: // ──
|
|
618
|
+
if (ch === "/" && next === "/") {
|
|
619
|
+
while (i < len && code[i] !== "\n") {
|
|
620
|
+
result[i] = " ";
|
|
621
|
+
i++;
|
|
622
|
+
}
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
625
|
+
// ── Block comment: /* ... */ ──
|
|
626
|
+
if (ch === "/" && next === "*") {
|
|
627
|
+
result[i] = " ";
|
|
628
|
+
result[i + 1] = " ";
|
|
629
|
+
i += 2;
|
|
630
|
+
while (i < len) {
|
|
631
|
+
if (code[i] === "\n") {
|
|
632
|
+
result[i] = "\n";
|
|
633
|
+
i++;
|
|
634
|
+
}
|
|
635
|
+
else if (code[i] === "*" && i + 1 < len && code[i + 1] === "/") {
|
|
636
|
+
result[i] = " ";
|
|
637
|
+
result[i + 1] = " ";
|
|
638
|
+
i += 2;
|
|
639
|
+
break;
|
|
640
|
+
}
|
|
641
|
+
else {
|
|
642
|
+
result[i] = " ";
|
|
643
|
+
i++;
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
continue;
|
|
647
|
+
}
|
|
648
|
+
// ── Python-style `#` comment (but not `#!`, `#[` for Rust attributes) ──
|
|
649
|
+
if (ch === "#" && next !== "!" && next !== "[") {
|
|
650
|
+
while (i < len && code[i] !== "\n") {
|
|
651
|
+
result[i] = " ";
|
|
652
|
+
i++;
|
|
653
|
+
}
|
|
654
|
+
continue;
|
|
655
|
+
}
|
|
656
|
+
// ── Python triple-quoted strings / docstrings — treat as comments ──
|
|
657
|
+
if ((ch === '"' && next === '"' && i + 2 < len && code[i + 2] === '"') ||
|
|
658
|
+
(ch === "'" && next === "'" && i + 2 < len && code[i + 2] === "'")) {
|
|
659
|
+
const quote3 = code.substring(i, i + 3);
|
|
660
|
+
result[i] = " ";
|
|
661
|
+
result[i + 1] = " ";
|
|
662
|
+
result[i + 2] = " ";
|
|
663
|
+
i += 3;
|
|
664
|
+
while (i < len) {
|
|
665
|
+
if (code[i] === "\n") {
|
|
666
|
+
result[i] = "\n";
|
|
667
|
+
i++;
|
|
668
|
+
}
|
|
669
|
+
else if (code.substring(i, i + 3) === quote3) {
|
|
670
|
+
result[i] = " ";
|
|
671
|
+
result[i + 1] = " ";
|
|
672
|
+
result[i + 2] = " ";
|
|
673
|
+
i += 3;
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
else {
|
|
677
|
+
result[i] = " ";
|
|
678
|
+
i++;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
continue;
|
|
682
|
+
}
|
|
683
|
+
// ── String literals: "...", '...', `...` — SKIP (preserve) ──
|
|
684
|
+
if (ch === '"' || ch === "'" || ch === "`") {
|
|
685
|
+
const quote = ch;
|
|
686
|
+
result[i] = ch; // keep opening quote
|
|
687
|
+
i++;
|
|
688
|
+
while (i < len) {
|
|
689
|
+
if (code[i] === "\\") {
|
|
690
|
+
result[i] = code[i];
|
|
691
|
+
i++;
|
|
692
|
+
if (i < len) {
|
|
693
|
+
result[i] = code[i];
|
|
694
|
+
i++;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
else if (code[i] === "\n" && quote !== "`") {
|
|
698
|
+
break;
|
|
699
|
+
}
|
|
700
|
+
else if (code[i] === quote) {
|
|
701
|
+
result[i] = ch; // keep closing quote
|
|
702
|
+
i++;
|
|
703
|
+
break;
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
result[i] = code[i]; // preserve string content
|
|
707
|
+
i++;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
continue;
|
|
711
|
+
}
|
|
712
|
+
// ── Plain content — keep as-is ──
|
|
713
|
+
result[i] = ch;
|
|
714
|
+
i++;
|
|
715
|
+
}
|
|
716
|
+
return result.join("");
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* LRU-style cache for stripped code. Uses a WeakRef-based approach keyed
|
|
720
|
+
* by the code string itself (via a simple Map with bounded size).
|
|
721
|
+
*/
|
|
722
|
+
const strippedCodeCache = new Map();
|
|
723
|
+
const MAX_STRIPPED_CACHE = 64;
|
|
724
|
+
/**
|
|
725
|
+
* Get or create a stripped version of the source code. Results are cached
|
|
726
|
+
* per unique `code` string so that multiple `testCode()` calls in the same
|
|
727
|
+
* evaluator invocation share one strip pass.
|
|
728
|
+
*/
|
|
729
|
+
function getStrippedCode(code) {
|
|
730
|
+
let stripped = strippedCodeCache.get(code);
|
|
731
|
+
if (stripped !== undefined)
|
|
732
|
+
return stripped;
|
|
733
|
+
stripped = stripCommentsAndStrings(code);
|
|
734
|
+
// Evict oldest entry if cache is full
|
|
735
|
+
if (strippedCodeCache.size >= MAX_STRIPPED_CACHE) {
|
|
736
|
+
const first = strippedCodeCache.keys().next().value;
|
|
737
|
+
if (first !== undefined)
|
|
738
|
+
strippedCodeCache.delete(first);
|
|
739
|
+
}
|
|
740
|
+
strippedCodeCache.set(code, stripped);
|
|
741
|
+
return stripped;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* Test whether a regex pattern matches in executable code (ignoring
|
|
745
|
+
* comments). String literals are preserved so that import paths, require()
|
|
746
|
+
* arguments, and route strings remain matchable. Drop-in replacement for
|
|
747
|
+
* `pattern.test(code)` that strips comments first.
|
|
748
|
+
*
|
|
749
|
+
* @example
|
|
750
|
+
* ```ts
|
|
751
|
+
* // Instead of:
|
|
752
|
+
* const hasRateLimit = /rateLimit/i.test(code);
|
|
753
|
+
* // Use:
|
|
754
|
+
* const hasRateLimit = testCode(code, /rateLimit/i);
|
|
755
|
+
* ```
|
|
756
|
+
*/
|
|
757
|
+
export function testCode(code, pattern) {
|
|
758
|
+
const stripped = getStrippedCode(code);
|
|
759
|
+
pattern.lastIndex = 0;
|
|
760
|
+
return pattern.test(stripped);
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Get a multi-line context window around a specific line number.
|
|
764
|
+
* Returns the concatenated text of lines within ±radius of the target line.
|
|
765
|
+
* Useful for post-match filtering where the relevant pattern (e.g., a
|
|
766
|
+
* fallback operator `??`/`||`, an `await`, a config block brace) may appear
|
|
767
|
+
* on an adjacent line rather than the matched line itself.
|
|
768
|
+
*
|
|
769
|
+
* @param lines Array of source code lines (0-indexed)
|
|
770
|
+
* @param lineNum 1-based line number (as returned by getLineNumbers)
|
|
771
|
+
* @param radius Number of lines to include before and after (default 3)
|
|
772
|
+
* @returns Concatenated text of lines in the window
|
|
773
|
+
*/
|
|
774
|
+
export function getContextWindow(lines, lineNum, radius = 3) {
|
|
775
|
+
const start = Math.max(0, lineNum - 1 - radius);
|
|
776
|
+
const end = Math.min(lines.length, lineNum + radius);
|
|
777
|
+
return lines.slice(start, end).join("\n");
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Find line numbers in source code that match a given regex pattern.
|
|
781
|
+
* By default, comment lines and string-literal-only lines are skipped
|
|
782
|
+
* to avoid false positives from documentation/example text.
|
|
783
|
+
* Pass `{ skipComments: false }` to include comments.
|
|
784
|
+
* Pass `{ skipStringLiterals: false }` to include string-literal lines.
|
|
785
|
+
*/
|
|
786
|
+
export function getLineNumbers(code, pattern, opts) {
|
|
787
|
+
const skipComments = opts?.skipComments !== false; // default true
|
|
788
|
+
const skipStrings = opts?.skipStringLiterals !== false; // default true
|
|
789
|
+
const lines = code.split("\n");
|
|
790
|
+
const matches = [];
|
|
791
|
+
for (let i = 0; i < lines.length; i++) {
|
|
792
|
+
if (skipComments && COMMENT_LINE_RE.test(lines[i]))
|
|
793
|
+
continue;
|
|
794
|
+
if (skipStrings && STRING_LITERAL_LINE_RE.test(lines[i]))
|
|
795
|
+
continue;
|
|
796
|
+
pattern.lastIndex = 0;
|
|
797
|
+
if (pattern.test(lines[i])) {
|
|
798
|
+
matches.push(i + 1);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
return matches;
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* Find line numbers using a language-aware pattern map.
|
|
805
|
+
* Takes the raw language string, normalises it, and builds the right regex.
|
|
806
|
+
* Returns empty array if no pattern exists for the language.
|
|
807
|
+
* Comment lines are skipped by default (see getLineNumbers).
|
|
808
|
+
* String-literal skipping is automatically disabled for IaC languages
|
|
809
|
+
* (ARM/Terraform/Bicep) since their content is structured data where
|
|
810
|
+
* quoted values ARE the meaningful code.
|
|
811
|
+
*/
|
|
812
|
+
export function getLangLineNumbers(code, language, patterns, opts) {
|
|
813
|
+
const lang = normalizeLanguage(language);
|
|
814
|
+
const re = langPattern(lang, patterns);
|
|
815
|
+
if (!re)
|
|
816
|
+
return [];
|
|
817
|
+
// IaC content (JSON/HCL/Bicep) is structured data — don't skip "string" lines
|
|
818
|
+
const effectiveOpts = isIaC(lang) && opts?.skipStringLiterals === undefined ? { ...opts, skipStringLiterals: false } : opts;
|
|
819
|
+
return getLineNumbers(code, re, effectiveOpts);
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Returns the normalised LangFamily for the given language string.
|
|
823
|
+
*/
|
|
824
|
+
export function getLangFamily(language) {
|
|
825
|
+
return normalizeLanguage(language);
|
|
826
|
+
}
|
|
827
|
+
// ─── Configuration ───────────────────────────────────────────────────────────
|
|
828
|
+
/**
|
|
829
|
+
* Apply configuration to a set of findings — suppress disabled rules,
|
|
830
|
+
* override severities, and filter by minimum severity.
|
|
831
|
+
*/
|
|
832
|
+
export function applyConfig(findings, config) {
|
|
833
|
+
if (!config)
|
|
834
|
+
return findings;
|
|
835
|
+
const severityOrder = {
|
|
836
|
+
info: 0,
|
|
837
|
+
low: 1,
|
|
838
|
+
medium: 2,
|
|
839
|
+
high: 3,
|
|
840
|
+
critical: 4,
|
|
841
|
+
};
|
|
842
|
+
let result = findings;
|
|
843
|
+
// Remove disabled rules
|
|
844
|
+
if (config.disabledRules && config.disabledRules.length > 0) {
|
|
845
|
+
const disabled = new Set(config.disabledRules);
|
|
846
|
+
result = result.filter((f) => {
|
|
847
|
+
if (disabled.has(f.ruleId))
|
|
848
|
+
return false;
|
|
849
|
+
// Check prefix wildcards like "SEC-*"
|
|
850
|
+
for (const rule of disabled) {
|
|
851
|
+
if (rule.endsWith("*") && f.ruleId.startsWith(rule.slice(0, -1))) {
|
|
852
|
+
return false;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
return true;
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
// Apply per-rule overrides
|
|
859
|
+
if (config.ruleOverrides) {
|
|
860
|
+
result = result
|
|
861
|
+
.map((f) => {
|
|
862
|
+
const override = config.ruleOverrides[f.ruleId] ??
|
|
863
|
+
// Check prefix overrides like "SEC-*"
|
|
864
|
+
Object.entries(config.ruleOverrides).find(([key]) => key.endsWith("*") && f.ruleId.startsWith(key.slice(0, -1)))?.[1];
|
|
865
|
+
if (!override)
|
|
866
|
+
return f;
|
|
867
|
+
if (override.disabled)
|
|
868
|
+
return null;
|
|
869
|
+
if (override.severity)
|
|
870
|
+
return { ...f, severity: override.severity };
|
|
871
|
+
return f;
|
|
872
|
+
})
|
|
873
|
+
.filter((f) => f !== null);
|
|
874
|
+
}
|
|
875
|
+
// Filter by minimum severity
|
|
876
|
+
if (config.minSeverity) {
|
|
877
|
+
const minOrder = severityOrder[config.minSeverity];
|
|
878
|
+
result = result.filter((f) => severityOrder[f.severity] >= minOrder);
|
|
879
|
+
}
|
|
880
|
+
return result;
|
|
881
|
+
}
|
|
882
|
+
// ─── Scoring ─────────────────────────────────────────────────────────────────
|
|
883
|
+
/**
|
|
884
|
+
* Detect positive engineering signals in source code. Returns a bonus score.
|
|
885
|
+
* Called during scoring to reward good practices, not just penalize problems.
|
|
886
|
+
*/
|
|
887
|
+
export function detectPositiveSignals(code) {
|
|
888
|
+
let bonus = 0;
|
|
889
|
+
// Parameterized queries (prepared statements, $1 placeholders)
|
|
890
|
+
if (/\$\d+|PreparedStatement|\?\s*(?:,|\))|\.prepare\s*\(/i.test(code))
|
|
891
|
+
bonus += 3;
|
|
892
|
+
// Security headers imported (helmet, csp, hsts)
|
|
893
|
+
if (/\bhelmet\b|content-security-policy|strict-transport-security/i.test(code))
|
|
894
|
+
bonus += 3;
|
|
895
|
+
// Proper error handling (try/catch with actual handling, not empty catch).
|
|
896
|
+
// Use a line-by-line scan instead of a single whole-file regex to avoid
|
|
897
|
+
// polynomial backtracking when 'catch(' appears inside the [^}] window
|
|
898
|
+
// (CodeQL js/polynomial-redos).
|
|
899
|
+
const catchHasHandler = (() => {
|
|
900
|
+
const cl = code.split("\n");
|
|
901
|
+
for (let ci = 0; ci < cl.length; ci++) {
|
|
902
|
+
if (!/catch\s*\(/.test(cl[ci]))
|
|
903
|
+
continue;
|
|
904
|
+
const window = cl.slice(ci, ci + 15).join("\n");
|
|
905
|
+
if (/\b(?:log|throw|return|next|reject|emit)\b/i.test(window))
|
|
906
|
+
return true;
|
|
907
|
+
}
|
|
908
|
+
return false;
|
|
909
|
+
})();
|
|
910
|
+
if (catchHasHandler)
|
|
911
|
+
bonus += 2;
|
|
912
|
+
// Input validation present (joi, zod, yup, express-validator, class-validator)
|
|
913
|
+
if (/\b(?:joi|zod|yup|ajv|class-validator|express-validator)\b/i.test(code))
|
|
914
|
+
bonus += 2;
|
|
915
|
+
// Authentication middleware
|
|
916
|
+
if (/\b(?:passport|requireAuth|isAuthenticated|authMiddleware|verifyToken|authorize)\b/i.test(code))
|
|
917
|
+
bonus += 3;
|
|
918
|
+
// Rate limiting
|
|
919
|
+
if (/\b(?:rateLimit|rateLimiter|express-rate-limit|throttle|bottleneck)\b/i.test(code))
|
|
920
|
+
bonus += 2;
|
|
921
|
+
// CORS properly configured
|
|
922
|
+
if (/\bcors\b.*\b(?:origin|methods|credentials)\b/i.test(code))
|
|
923
|
+
bonus += 1;
|
|
924
|
+
// TypeScript strict mode or runtime type checking
|
|
925
|
+
if (/\bstrict(?:NullChecks|Mode)?\s*:\s*true\b/i.test(code))
|
|
926
|
+
bonus += 1;
|
|
927
|
+
// Structured logging (winston, pino, bunyan)
|
|
928
|
+
if (/\b(?:winston|pino|bunyan|createLogger|getLogger)\b/i.test(code))
|
|
929
|
+
bonus += 2;
|
|
930
|
+
// Tests present (basic signal for quality)
|
|
931
|
+
if (/\b(?:describe|it|test|expect|assert)\s*\(/i.test(code))
|
|
932
|
+
bonus += 1;
|
|
933
|
+
// Cap total bonus at +15
|
|
934
|
+
return Math.min(bonus, 15);
|
|
935
|
+
}
|
|
936
|
+
export function calculateScore(findings, code) {
|
|
937
|
+
const basePenalty = {
|
|
938
|
+
critical: 30,
|
|
939
|
+
high: 18,
|
|
940
|
+
medium: 10,
|
|
941
|
+
low: 5,
|
|
942
|
+
info: 2,
|
|
943
|
+
};
|
|
944
|
+
let score = 100;
|
|
945
|
+
for (const f of findings) {
|
|
946
|
+
const penalty = basePenalty[f.severity] ?? 0;
|
|
947
|
+
// Weight deductions by confidence — low-confidence findings have less impact
|
|
948
|
+
const confidence = f.confidence ?? 0.5;
|
|
949
|
+
score -= penalty * confidence;
|
|
950
|
+
}
|
|
951
|
+
// Add positive signals bonus if code is provided
|
|
952
|
+
if (code) {
|
|
953
|
+
score += detectPositiveSignals(code);
|
|
954
|
+
}
|
|
955
|
+
return Math.max(0, Math.min(100, Math.round(score)));
|
|
956
|
+
}
|
|
957
|
+
export function deriveVerdict(findings, score) {
|
|
958
|
+
// Only fail on critical findings with sufficient confidence
|
|
959
|
+
if (findings.some((f) => f.severity === "critical" && (f.confidence ?? 0.5) >= 0.6))
|
|
960
|
+
return "fail";
|
|
961
|
+
if (score < 60)
|
|
962
|
+
return "fail";
|
|
963
|
+
// High/medium findings need reasonable confidence to trigger warning
|
|
964
|
+
const significantFindings = findings.filter((f) => (f.severity === "high" || f.severity === "medium") && (f.confidence ?? 0.5) >= 0.4);
|
|
965
|
+
if (significantFindings.length > 0 || score < 80)
|
|
966
|
+
return "warning";
|
|
967
|
+
return "pass";
|
|
968
|
+
}
|
|
969
|
+
// ─── Summary Builders ────────────────────────────────────────────────────────
|
|
970
|
+
export function buildSummary(judge, findings, score, verdict) {
|
|
971
|
+
const critical = findings.filter((f) => f.severity === "critical").length;
|
|
972
|
+
const high = findings.filter((f) => f.severity === "high").length;
|
|
973
|
+
const medium = findings.filter((f) => f.severity === "medium").length;
|
|
974
|
+
const low = findings.filter((f) => f.severity === "low").length;
|
|
975
|
+
let summary = `**${judge.name}** — ${judge.domain}\n`;
|
|
976
|
+
summary += `Verdict: **${verdict.toUpperCase()}** | Score: **${score}/100**\n`;
|
|
977
|
+
summary += `Findings: ${critical} critical, ${high} high, ${medium} medium, ${low} low\n\n`;
|
|
978
|
+
if (findings.length === 0) {
|
|
979
|
+
summary +=
|
|
980
|
+
"No pattern-based issues detected. Heuristic analysis has inherent limits — absence of findings does not guarantee the code is free of defects. Manual expert review is strongly recommended.";
|
|
981
|
+
}
|
|
982
|
+
else {
|
|
983
|
+
summary += "Key issues:\n";
|
|
984
|
+
for (const f of findings.filter((f) => ["critical", "high"].includes(f.severity))) {
|
|
985
|
+
summary += `- [${f.ruleId}] (${f.severity}) ${f.title}: ${f.description}\n`;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
return summary;
|
|
989
|
+
}
|
|
990
|
+
export function buildTribunalSummary(evaluations, verdict, score, criticalCount, highCount) {
|
|
991
|
+
let summary = `# Judges Panel — Verdict\n\n`;
|
|
992
|
+
summary += `**Overall Verdict: ${verdict.toUpperCase()}** | **Score: ${score}/100**\n`;
|
|
993
|
+
summary += `Total critical findings: ${criticalCount} | Total high findings: ${highCount}\n\n`;
|
|
994
|
+
summary += `## Individual Judge Results\n\n`;
|
|
995
|
+
for (const e of evaluations) {
|
|
996
|
+
const icon = e.verdict === "pass" ? "✅" : e.verdict === "warning" ? "⚠️" : "❌";
|
|
997
|
+
summary += `${icon} **${e.judgeName}** (${e.verdict.toUpperCase()}, ${e.score}/100) — ${e.findings.length} finding(s)\n`;
|
|
998
|
+
}
|
|
999
|
+
summary += `\n---\n\n`;
|
|
1000
|
+
// Add details for each judge
|
|
1001
|
+
for (const e of evaluations) {
|
|
1002
|
+
summary += e.summary + "\n\n";
|
|
1003
|
+
}
|
|
1004
|
+
return summary;
|
|
1005
|
+
}
|
|
1006
|
+
// ─── Markdown Formatters ─────────────────────────────────────────────────────
|
|
1007
|
+
/**
|
|
1008
|
+
* Format a full tribunal verdict as a readable Markdown string.
|
|
1009
|
+
*/
|
|
1010
|
+
export function formatVerdictAsMarkdown(verdict) {
|
|
1011
|
+
let md = verdict.summary;
|
|
1012
|
+
md += `\n## Detailed Findings\n\n`;
|
|
1013
|
+
for (const evaluation of verdict.evaluations) {
|
|
1014
|
+
for (const finding of evaluation.findings) {
|
|
1015
|
+
const severityBadge = finding.severity === "critical"
|
|
1016
|
+
? "🔴 CRITICAL"
|
|
1017
|
+
: finding.severity === "high"
|
|
1018
|
+
? "🟠 HIGH"
|
|
1019
|
+
: finding.severity === "medium"
|
|
1020
|
+
? "🟡 MEDIUM"
|
|
1021
|
+
: finding.severity === "low"
|
|
1022
|
+
? "🔵 LOW"
|
|
1023
|
+
: "ℹ️ INFO";
|
|
1024
|
+
md += `### ${severityBadge} — [${finding.ruleId}] ${finding.title}\n\n`;
|
|
1025
|
+
md += `${finding.description}\n\n`;
|
|
1026
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
1027
|
+
md += `**Lines affected:** ${finding.lineNumbers.join(", ")}\n\n`;
|
|
1028
|
+
}
|
|
1029
|
+
if (typeof finding.confidence === "number") {
|
|
1030
|
+
md += `**Confidence:** ${Math.round(finding.confidence * 100)}%\n\n`;
|
|
1031
|
+
}
|
|
1032
|
+
md += `**Recommendation:** ${finding.recommendation}\n\n`;
|
|
1033
|
+
if (finding.reference) {
|
|
1034
|
+
md += `**Reference:** ${finding.reference}\n\n`;
|
|
1035
|
+
}
|
|
1036
|
+
md += `---\n\n`;
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
return md;
|
|
1040
|
+
}
|
|
1041
|
+
// ─── Shared Credential / Placeholder Detection ──────────────────────────────
|
|
1042
|
+
// Centralised so authentication.ts, data-security.ts, and cybersecurity.ts
|
|
1043
|
+
// all use the same logic instead of maintaining identical copies.
|
|
1044
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
1045
|
+
const EXACT_PLACEHOLDERS = new Set([
|
|
1046
|
+
"test",
|
|
1047
|
+
"testing",
|
|
1048
|
+
"mock",
|
|
1049
|
+
"dummy",
|
|
1050
|
+
"example",
|
|
1051
|
+
"sample",
|
|
1052
|
+
"fake",
|
|
1053
|
+
"na",
|
|
1054
|
+
"n/a",
|
|
1055
|
+
"none",
|
|
1056
|
+
"null",
|
|
1057
|
+
"undefined",
|
|
1058
|
+
"changeme",
|
|
1059
|
+
"change_me",
|
|
1060
|
+
"replace_me",
|
|
1061
|
+
"replace-me",
|
|
1062
|
+
"your_token_here",
|
|
1063
|
+
"your_api_key",
|
|
1064
|
+
"unused",
|
|
1065
|
+
"not_used",
|
|
1066
|
+
"placeholder",
|
|
1067
|
+
]);
|
|
1068
|
+
export function isLikelyPlaceholderCredentialValue(value) {
|
|
1069
|
+
const normalized = value.trim().toLowerCase();
|
|
1070
|
+
if (EXACT_PLACEHOLDERS.has(normalized))
|
|
1071
|
+
return true;
|
|
1072
|
+
if (/^(?:test|mock|dummy|sample|example|fake|placeholder|na|n\/a|unused|changeme|replace)[-_a-z0-9]*$/i.test(normalized))
|
|
1073
|
+
return true;
|
|
1074
|
+
return false;
|
|
1075
|
+
}
|
|
1076
|
+
export function isStrictCredentialDetectionEnabled() {
|
|
1077
|
+
return process.env.JUDGES_CREDENTIAL_MODE?.toLowerCase() === "strict";
|
|
1078
|
+
}
|
|
1079
|
+
export function looksLikeRealCredentialValue(value) {
|
|
1080
|
+
if (isLikelyPlaceholderCredentialValue(value))
|
|
1081
|
+
return false;
|
|
1082
|
+
if (!isStrictCredentialDetectionEnabled())
|
|
1083
|
+
return true;
|
|
1084
|
+
const normalized = value.trim();
|
|
1085
|
+
if (normalized.length < 12)
|
|
1086
|
+
return false;
|
|
1087
|
+
if (/(?:test|mock|dummy|sample|example|fake|placeholder|changeme|replace[_-]?me|unused|not[_-]?used|password|secret)/i.test(normalized))
|
|
1088
|
+
return false;
|
|
1089
|
+
// Natural language strings (error messages, descriptions, etc.) are not secrets.
|
|
1090
|
+
// Heuristic: if it contains 3+ space-separated words, it's likely prose.
|
|
1091
|
+
const wordCount = normalized.split(/\s+/).filter((w) => w.length > 1).length;
|
|
1092
|
+
if (wordCount >= 3)
|
|
1093
|
+
return false;
|
|
1094
|
+
const hasLower = /[a-z]/.test(normalized);
|
|
1095
|
+
const hasUpper = /[A-Z]/.test(normalized);
|
|
1096
|
+
const hasDigit = /\d/.test(normalized);
|
|
1097
|
+
const hasSymbol = /[^A-Za-z0-9]/.test(normalized);
|
|
1098
|
+
const classCount = [hasLower, hasUpper, hasDigit, hasSymbol].filter(Boolean).length;
|
|
1099
|
+
if (normalized.length >= 20 && classCount >= 2)
|
|
1100
|
+
return true;
|
|
1101
|
+
if (normalized.length >= 16 && classCount >= 3)
|
|
1102
|
+
return true;
|
|
1103
|
+
return false;
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Determine whether a value extracted from an IaC property (Bicep/Terraform/ARM)
|
|
1107
|
+
* looks like a real secret rather than a benign config value.
|
|
1108
|
+
*
|
|
1109
|
+
* IaC patterns match property names like `token`, `key`, `secret` — but the
|
|
1110
|
+
* values are often boolean-strings (`'true'`/`'false'`), enum identifiers
|
|
1111
|
+
* (`'GuestAttestation'`), or well-known config placeholders. This filter
|
|
1112
|
+
* rejects those non-secret values.
|
|
1113
|
+
*/
|
|
1114
|
+
export function looksLikeIaCSecretValue(value) {
|
|
1115
|
+
const v = value.trim();
|
|
1116
|
+
// Boolean-string config values
|
|
1117
|
+
if (/^(?:true|false|yes|no|enabled|disabled|on|off|none)$/i.test(v))
|
|
1118
|
+
return false;
|
|
1119
|
+
// Too short to be a real secret (less than 8 chars)
|
|
1120
|
+
if (v.length < 8)
|
|
1121
|
+
return false;
|
|
1122
|
+
// PascalCase / camelCase single-word identifiers — enum-style config values
|
|
1123
|
+
// e.g., 'GuestAttestation', 'SystemAssigned', 'ConfidentialVM'
|
|
1124
|
+
if (/^[A-Z][a-zA-Z0-9]+$/.test(v) && !/[0-9]{4,}/.test(v))
|
|
1125
|
+
return false;
|
|
1126
|
+
// Known non-secret IaC config values
|
|
1127
|
+
if (/^(?:SystemAssigned|UserAssigned|Standard|Premium|Basic|Hot|Cool|Archive|Enabled|Disabled|Allow|Deny|ReadOnly|ReadWrite|CanNotDelete|NotSpecified|Succeeded|Failed|Running|Stopped|Deallocated|TLS1_2|GuestAttestation|ManagedDisks|ConfidentialVM|DiskWithVMGuestState)$/i.test(v))
|
|
1128
|
+
return false;
|
|
1129
|
+
// Placeholder / example markers
|
|
1130
|
+
if (isLikelyPlaceholderCredentialValue(v))
|
|
1131
|
+
return false;
|
|
1132
|
+
// File paths (e.g. "prod/terraform.tfstate", "path/to/config.json")
|
|
1133
|
+
// are not secrets — common in backend/storage configuration.
|
|
1134
|
+
if (/\//.test(v) && /\.\w{2,10}$/.test(v))
|
|
1135
|
+
return false;
|
|
1136
|
+
return true;
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* Format a single judge evaluation as a readable Markdown string.
|
|
1140
|
+
*/
|
|
1141
|
+
export function formatEvaluationAsMarkdown(evaluation) {
|
|
1142
|
+
let md = evaluation.summary + "\n\n";
|
|
1143
|
+
md += `## Detailed Findings\n\n`;
|
|
1144
|
+
for (const finding of evaluation.findings) {
|
|
1145
|
+
const severityBadge = finding.severity === "critical"
|
|
1146
|
+
? "🔴 CRITICAL"
|
|
1147
|
+
: finding.severity === "high"
|
|
1148
|
+
? "🟠 HIGH"
|
|
1149
|
+
: finding.severity === "medium"
|
|
1150
|
+
? "🟡 MEDIUM"
|
|
1151
|
+
: finding.severity === "low"
|
|
1152
|
+
? "🔵 LOW"
|
|
1153
|
+
: "ℹ️ INFO";
|
|
1154
|
+
md += `### ${severityBadge} — [${finding.ruleId}] ${finding.title}\n\n`;
|
|
1155
|
+
md += `${finding.description}\n\n`;
|
|
1156
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
1157
|
+
md += `**Lines affected:** ${finding.lineNumbers.join(", ")}\n\n`;
|
|
1158
|
+
}
|
|
1159
|
+
if (typeof finding.confidence === "number") {
|
|
1160
|
+
md += `**Confidence:** ${Math.round(finding.confidence * 100)}%\n\n`;
|
|
1161
|
+
}
|
|
1162
|
+
md += `**Recommendation:** ${finding.recommendation}\n\n`;
|
|
1163
|
+
if (finding.reference) {
|
|
1164
|
+
md += `**Reference:** ${finding.reference}\n\n`;
|
|
1165
|
+
}
|
|
1166
|
+
md += `---\n\n`;
|
|
1167
|
+
}
|
|
1168
|
+
return md;
|
|
1169
|
+
}
|