@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,1246 @@
|
|
|
1
|
+
// ─── Deterministic False-Positive Heuristic Filter ──────────────────────────
|
|
2
|
+
// Post-processing step that reviews aggregated findings from all judges and
|
|
3
|
+
// removes those matching known false-positive patterns. This runs in the
|
|
4
|
+
// evaluateWithTribunal pipeline after per-judge evaluation and before final
|
|
5
|
+
// scoring, complementing the agentic FP review in the deep-review section.
|
|
6
|
+
// ──────────────────────────────────────────────────────────────────────────────
|
|
7
|
+
import { isCommentLine, isStringLiteralLine, isIaCTemplate, classifyFile } from "./shared.js";
|
|
8
|
+
// ─── Heuristic Rules ─────────────────────────────────────────────────────────
|
|
9
|
+
/**
|
|
10
|
+
* Rule IDs that target application-runtime concerns and should NOT fire
|
|
11
|
+
* on Infrastructure-as-Code templates (Terraform, CloudFormation, Bicep,
|
|
12
|
+
* Ansible, Kubernetes YAML, Dockerfiles, Helm charts, etc.).
|
|
13
|
+
*/
|
|
14
|
+
const APP_ONLY_RULE_PREFIXES = [
|
|
15
|
+
"CYBER-", // injection, XSS, CSRF — not relevant to declarative IaC
|
|
16
|
+
"AUTH-", // authentication flow — not relevant to IaC
|
|
17
|
+
"PERF-", // runtime performance — not relevant to IaC
|
|
18
|
+
"RATE-", // rate limiting — not relevant to IaC
|
|
19
|
+
"CACHE-", // caching strategy — not relevant to IaC
|
|
20
|
+
"ERR-", // error handling — not relevant to IaC
|
|
21
|
+
"UX-", // user experience — not relevant to IaC
|
|
22
|
+
"A11Y-", // accessibility — not relevant to IaC
|
|
23
|
+
"I18N-", // internationalization — not relevant to IaC
|
|
24
|
+
"DB-", // database queries — not relevant to IaC
|
|
25
|
+
"CONC-", // concurrency — not relevant to IaC
|
|
26
|
+
];
|
|
27
|
+
/**
|
|
28
|
+
* Rule prefixes that target production-runtime concerns and should NOT fire
|
|
29
|
+
* on test files (test_*, *.test.ts, spec/**, etc.).
|
|
30
|
+
*/
|
|
31
|
+
const PROD_ONLY_RULE_PREFIXES = [
|
|
32
|
+
"RATE-", // rate limiting not expected in tests
|
|
33
|
+
"SCALE-", // scalability not expected in tests
|
|
34
|
+
"OBS-", // observability not expected in tests
|
|
35
|
+
"CLOUD-", // cloud readiness not expected in tests
|
|
36
|
+
"SOV-", // data sovereignty not relevant to tests
|
|
37
|
+
"DOC-", // documentation quality not relevant in tests
|
|
38
|
+
"MAINT-", // maintainability patterns not relevant in tests
|
|
39
|
+
"COMP-", // compliance checks not relevant in tests
|
|
40
|
+
"CICD-", // CI/CD infrastructure not relevant in tests
|
|
41
|
+
"COST-", // cost optimization not relevant in tests
|
|
42
|
+
"SWDEV-", // software dev practices not relevant in tests
|
|
43
|
+
"AGENT-", // agent instructions not relevant to test code
|
|
44
|
+
"AICS-", // AI code safety not relevant to test code
|
|
45
|
+
"PERF-", // performance optimization noise in test code
|
|
46
|
+
"PORTA-", // portability not relevant to test code
|
|
47
|
+
"UX-", // user experience not relevant to test code
|
|
48
|
+
"I18N-", // internationalization not relevant to test code
|
|
49
|
+
"A11Y-", // accessibility not relevant to test code
|
|
50
|
+
"LOGPRIV-", // logging privacy not relevant to test code
|
|
51
|
+
"CACHE-", // caching strategy not relevant to test code
|
|
52
|
+
"DATA-", // data security patterns noise in test assertions
|
|
53
|
+
"API-", // API design not relevant in test code
|
|
54
|
+
"REL-", // reliability patterns not needed in tests
|
|
55
|
+
"CONC-", // concurrency patterns not needed in tests
|
|
56
|
+
"FW-", // framework rules triggered by test fixtures
|
|
57
|
+
"ERR-", // error handling patterns differ in test code
|
|
58
|
+
"STRUCT-", // structural rules less meaningful in test files
|
|
59
|
+
"DB-", // database rules triggered by test fixtures
|
|
60
|
+
"COMPAT-", // backwards compatibility not relevant in tests
|
|
61
|
+
"CFG-", // configuration management not relevant in tests
|
|
62
|
+
"ETHICS-", // ethics not relevant to test code
|
|
63
|
+
"DEPS-", // dependency health triggered by test fixtures
|
|
64
|
+
];
|
|
65
|
+
/**
|
|
66
|
+
* Rule IDs that target executable code and should NOT fire on configuration
|
|
67
|
+
* or data files (YAML, JSON, TOML, INI, .env, etc.). These files contain
|
|
68
|
+
* no executable logic, so code-quality rules produce false positives.
|
|
69
|
+
*/
|
|
70
|
+
const CODE_ONLY_RULE_PREFIXES = [
|
|
71
|
+
"CYBER-", // injection, XSS — no executable code in config
|
|
72
|
+
"AUTH-", // authentication flow — no executable code in config
|
|
73
|
+
"PERF-", // runtime performance — no runtime in config
|
|
74
|
+
"RATE-", // rate limiting — no middleware in config
|
|
75
|
+
"CACHE-", // caching strategy — no runtime in config
|
|
76
|
+
"ERR-", // error handling — no try/catch in config
|
|
77
|
+
"UX-", // user experience — not applicable to config
|
|
78
|
+
"A11Y-", // accessibility — not applicable to config
|
|
79
|
+
"I18N-", // internationalization — not applicable to config
|
|
80
|
+
"DB-", // database queries — no SQL in config
|
|
81
|
+
"CONC-", // concurrency — no threads in config
|
|
82
|
+
"SOV-", // sovereignty — declarative config, no data flow
|
|
83
|
+
"MAINT-", // maintainability — not applicable to data files
|
|
84
|
+
"SWDEV-", // software practices — not applicable to data files
|
|
85
|
+
"DOC-", // documentation — not applicable to data files
|
|
86
|
+
"TEST-", // testing — not applicable to data files
|
|
87
|
+
"SCALE-", // scalability — no runtime in config
|
|
88
|
+
"CICD-", // CI/CD infra — not a code concern on data files
|
|
89
|
+
"COST-", // cost — not applicable to data files
|
|
90
|
+
"COMP-", // compliance — not code-level concern on data files
|
|
91
|
+
"CLOUD-", // cloud readiness — not applicable to data files
|
|
92
|
+
"PORTA-", // portability — not applicable to data files
|
|
93
|
+
"DATA-", // data security — no data flow in config
|
|
94
|
+
"OBS-", // observability — no runtime in config
|
|
95
|
+
"AICS-", // AI code safety — no executable code in config
|
|
96
|
+
"REL-", // reliability — no runtime in config
|
|
97
|
+
"LOGPRIV-", // logging privacy — no logging in config
|
|
98
|
+
"API-", // API design — no endpoints in config
|
|
99
|
+
"DEPS-", // dependency health — package files handled separately
|
|
100
|
+
"AGENT-", // agent instructions — not applicable to data files
|
|
101
|
+
];
|
|
102
|
+
/**
|
|
103
|
+
* Rule IDs targeting application-runtime / cloud-service concerns that
|
|
104
|
+
* do NOT apply to code analysis tools (linters, security scanners,
|
|
105
|
+
* judge definitions, evaluators, formatters, AST analyzers).
|
|
106
|
+
*
|
|
107
|
+
* Analysis tools necessarily contain the very patterns they detect
|
|
108
|
+
* (regex patterns for auth, data export, PII, etc.) and are single-
|
|
109
|
+
* process developer utilities, not production services.
|
|
110
|
+
*/
|
|
111
|
+
const ANALYSIS_TOOL_INAPPLICABLE_RULE_PREFIXES = [
|
|
112
|
+
"SOV-", // data sovereignty — tool doesn't process user data
|
|
113
|
+
"COMP-", // compliance — tool doesn't handle regulated data
|
|
114
|
+
"CYBER-", // web security — tool has no endpoints
|
|
115
|
+
"AUTH-", // authentication — tool has no auth system
|
|
116
|
+
"DATA-", // data security — tool analyzes code, doesn't store data
|
|
117
|
+
"SEC-", // security — detection patterns contain the keywords they detect, not real vulnerabilities
|
|
118
|
+
"HALLU-", // hallucination — detection lists contain hallucinated API names by design
|
|
119
|
+
"SCALE-", // scalability — single-process tool
|
|
120
|
+
"CLOUD-", // cloud readiness — not a cloud service
|
|
121
|
+
"RATE-", // rate limiting — not a service
|
|
122
|
+
"DB-", // database — no database
|
|
123
|
+
"API-", // API design — not an API service
|
|
124
|
+
"A11Y-", // accessibility — not a UI
|
|
125
|
+
"I18N-", // internationalization — not user-facing
|
|
126
|
+
"UX-", // user experience — not a UI
|
|
127
|
+
"OBS-", // observability — not a production service
|
|
128
|
+
"LOGPRIV-", // logging privacy — no user data
|
|
129
|
+
"AGENT-", // agent instructions — not an AI agent
|
|
130
|
+
"AICS-", // AI code safety — analyzing code, not generating it
|
|
131
|
+
"FW-", // framework rules — analysis tool, not framework consumer
|
|
132
|
+
"CACHE-", // caching strategy — not a service
|
|
133
|
+
"ETHICS-", // ethics/bias — tool doesn't make decisions about people
|
|
134
|
+
"CONC-", // concurrency — single-threaded analysis
|
|
135
|
+
"TEST-", // testing rules — analysis code isn't test code
|
|
136
|
+
"CICD-", // CI/CD infrastructure — not applicable
|
|
137
|
+
"DEPS-", // dependency health — not applicable to analysis patterns
|
|
138
|
+
"COMPAT-", // backwards compat — internal tool
|
|
139
|
+
"CFG-", // config management — analysis tool
|
|
140
|
+
"REL-", // reliability patterns — not a service
|
|
141
|
+
];
|
|
142
|
+
/**
|
|
143
|
+
* Rule IDs targeting cloud-service / web-server concerns that do NOT apply
|
|
144
|
+
* to VS Code extensions (desktop plugins running in the editor process).
|
|
145
|
+
*/
|
|
146
|
+
const VSCODE_EXT_INAPPLICABLE_RULE_PREFIXES = [
|
|
147
|
+
"SOV-", // data sovereignty — desktop app, no cross-border data
|
|
148
|
+
"COMP-", // compliance — extension doesn't handle regulated data
|
|
149
|
+
"SCALE-", // scalability — desktop extension
|
|
150
|
+
"CLOUD-", // cloud readiness — desktop extension
|
|
151
|
+
"RATE-", // rate limiting — desktop extension
|
|
152
|
+
"DB-", // database — extensions use VS Code storage API
|
|
153
|
+
"A11Y-", // accessibility — VS Code handles accessibility
|
|
154
|
+
"I18N-", // internationalization — VS Code handles i18n
|
|
155
|
+
"AGENT-", // agent instructions — not an AI agent
|
|
156
|
+
"CACHE-", // caching — desktop extension
|
|
157
|
+
"API-", // API design — extension API, not REST API
|
|
158
|
+
"OBS-", // observability — desktop extension
|
|
159
|
+
"CONC-", // concurrency — VS Code extension model handles this
|
|
160
|
+
"ETHICS-", // ethics/bias — tool extension, not decision system
|
|
161
|
+
"AICS-", // AI code safety — not generating code
|
|
162
|
+
"CICD-", // CI/CD infrastructure — not applicable
|
|
163
|
+
"COST-", // cost optimization — desktop extension
|
|
164
|
+
"DEPS-", // dependency health — VS Code handles deps
|
|
165
|
+
"TEST-", // testing patterns — not test code
|
|
166
|
+
];
|
|
167
|
+
/**
|
|
168
|
+
* Keywords commonly appearing in identifiers that collide with security
|
|
169
|
+
* terms. Maps the triggering keyword to identifier patterns that neutralise
|
|
170
|
+
* the match. If the finding's target line matches the identifier pattern,
|
|
171
|
+
* the finding is a likely FP.
|
|
172
|
+
*/
|
|
173
|
+
const KEYWORD_IDENTIFIER_PATTERNS = [
|
|
174
|
+
{
|
|
175
|
+
// "age" in cacheAge, maxAge, ttlAge, cache-age log, etc.
|
|
176
|
+
trigger: /\bage\b/i,
|
|
177
|
+
identifierContext: /(?:cache|max|ttl|min|avg|token|cookie|session|expir|stale|fresh)\s*[-_]?\s*age|age\s*[-_]?\s*(?:out|limit|check|seconds|minutes|hours|days|ms|header)|\bcache[_-]age\b|\bmax[_-]age\b/i,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
// "delete" in deleteButton, on_delete, handleDelete, isDeleted, softDelete, batchDelete, etc.
|
|
181
|
+
trigger: /\bdelete\b/i,
|
|
182
|
+
identifierContext: /(?:on|handle|is|can|should|will|did|set|get|btn|button|icon|modal|dialog|confirm|soft|hard|mark|pre|post|async|schedule)[-_]?delete|delete[-_]?(?:button|handler|modal|confirm|dialog|flag|status|action|event|click|icon|request|response|result|scheduled|pending|mark)/i,
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
// "exec" in execMode, exec_path, execOptions, child_exec, asyncExec, remoteExec, etc.
|
|
186
|
+
trigger: /\bexec\b/i,
|
|
187
|
+
identifierContext: /exec[-_]?(?:mode|path|option|config|result|status|type|name|id|command|args|timeout|callback|handler|sync|async|promise|queue|batch|parallel|plan|strategy|context|env)|(?:child|fork|spawn|pre|post|async|remote|batch|parallel|deferred|safe|sandbox|shell|docker|container)[-_]?exec/i,
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
// "password" in passwordField, password_input, showPassword, confirm_password, setPassword, etc.
|
|
191
|
+
trigger: /\bpassword\b/i,
|
|
192
|
+
identifierContext: /password[-_]?(?:field|input|label|placeholder|strength|policy|rule|validator|visible|show|hide|toggle|confirm|match|min|max|length|reset|change|update|hash|column|prop|param|check|verify|form|dialog|modal|error|expired|required|schema|type|view|prompt|attempts|manager|service|handler|helper|criteria|complexity|requirements|expiry|expiration|generator|display|store|clear|protect|encode|decode|constraint|icon|text|mask|regex|pattern|hint|enabled|disabled|protected)|(?:confirm|verify|validate|check|reset|new|old|current|previous|hashed|encrypted|forgot|enter|missing|invalid|has|is|no|require|set|get|save|store|update|change|manage|generate|submit|show|hide|reveal|create|remove|clear|compare|match|parse|decode|encode)[-_]?password/i,
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
// "secret" in secretName, secret_arn, secretRef, client_secret, getSecret, etc.
|
|
196
|
+
trigger: /\bsecret\b/i,
|
|
197
|
+
identifierContext: /secret[-_]?(?:name|arn|ref|version|id|key|path|manager|store|engine|backend|rotation|value|error|invalid|missing|config|schema|type|provider|holder|service|handler|helper|resolver|loader|fetcher|reader|creator|generator|deleter|updater|sync|cache)|(?:aws|azure|gcp|vault|k8s|kube|client|app|has|is|no|missing|invalid|create|generate|list|get|set|read|fetch|load|resolve|lookup|delete|remove|update|clear|store|save|manage|rotate|renew|refresh|put|find|retrieve)[-_]?secret/i,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
// "token" in tokenExpiry, token_type, refreshToken, reset_token, getToken, etc.
|
|
201
|
+
trigger: /\btoken\b/i,
|
|
202
|
+
identifierContext: /token[-_]?(?:type|name|expir|ttl|refresh|revoke|validate|verify|field|input|header|prefix|format|length|bucket|count|limit|usage|error|invalid|missing|source|response|config|schema|manager|service|handler|provider|factory|builder|helper|store|cache|parser|encoder|decoder|generator|creator|issuer|resolver|refresher|interceptor)|(?:access|refresh|bearer|csrf|api|auth|jwt|session|reset|verification|missing|invalid|expired|has|is|no|decode|parse|get|set|create|generate|fetch|store|save|delete|clear|invalidate|blacklist|whitelist|validate|verify|revoke|renew|rotate|read|load|find|retrieve|extract|inspect|encode)[-_]?token/i,
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
// "global" in Python's `global` keyword used for variable declarations
|
|
206
|
+
trigger: /\bglobal\b.*\bstate\b|\bstate\b.*\bglobal\b/i,
|
|
207
|
+
identifierContext: /^\s*global\s+\w+/,
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
// "key" in apiKeyHeader, primaryKey, foreignKey, keyName, keyPath, key_vault
|
|
211
|
+
// Note: api/encryption/signing/public/private prefixes require a suffix after "key"
|
|
212
|
+
// (e.g. apiKeyHeader ✓, apiKey ✗) because "apiKey" alone often holds an actual key value.
|
|
213
|
+
trigger: /\bkey\b/i,
|
|
214
|
+
identifierContext: /(?:primary|foreign|partition|sort|composite|cache)\s*[-_]?\s*key|(?:api|encryption|signing|public|private)\s*[-_]?\s*key\w+|key\s*[-_]?\s*(?:name|path|id|vault|ring|store|pair|size|length|spec|ref|alias|header|prefix|column|field|index)|\bkey[_-]vault\b|\bKeyVault\b/i,
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
// "hash" in fileHash, contentHash, checksumHash, hashCode — non-crypto contexts
|
|
218
|
+
trigger: /\bhash\b/i,
|
|
219
|
+
identifierContext: /(?:file|content|checksum|etag|commit|git|fingerprint|bucket|consistent)\s*[-_]?\s*hash|hash\s*[-_]?\s*(?:code|map|set|table|ring|key|value|function|sum|digest|string|name|id)|\bhashCode\b|\bhashMap\b|\bhashSet\b|\bgetHash\b|\bcomputeHash\b/i,
|
|
220
|
+
},
|
|
221
|
+
];
|
|
222
|
+
/**
|
|
223
|
+
* Standard-library / framework calls that are safe but trigger pattern
|
|
224
|
+
* matchers. Each entry maps a false-alarm pattern to the code context
|
|
225
|
+
* that confirms it is a safe idiom.
|
|
226
|
+
*/
|
|
227
|
+
const SAFE_IDIOM_PATTERNS = [
|
|
228
|
+
{
|
|
229
|
+
// dict.get() flagged as HTTP fetch
|
|
230
|
+
findingPattern: /unvalidated.*fetch|http.*get|unsafe.*request/i,
|
|
231
|
+
safeContext: /\.get\s*\(\s*["'`]\w+["'`]\s*[,)]/,
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
// json.dumps / JSON.stringify flagged as data export/leak
|
|
235
|
+
findingPattern: /data\s*(?:export|exfiltrat|leak)/i,
|
|
236
|
+
safeContext: /json\.dumps\s*\(|JSON\.stringify\s*\(/i,
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
// os.path.join / path.join flagged as path traversal when inputs are literals
|
|
240
|
+
findingPattern: /path\s*travers/i,
|
|
241
|
+
safeContext: /(?:os\.path\.join|path\.join|Path\.Combine)\s*\(\s*["'`]/,
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
// json.dumps / JSON.stringify flagged as data export/transfer by SOV judges
|
|
245
|
+
findingPattern: /data\s*(?:export|transfer|egress)|export\s*path|SOV-003/i,
|
|
246
|
+
safeContext: /json\.dumps\s*\(|JSON\.stringify\s*\(|json\.dump\s*\(/i,
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
// Connection string in env var fallback (os.environ.get / process.env)
|
|
250
|
+
findingPattern: /hardcoded.*(?:connection|database|db|redis|mongo|postgres|mysql)|connection.*string.*code|DB-001/i,
|
|
251
|
+
safeContext: /os\.environ\.get\s*\(|os\.getenv\s*\(|process\.env\.|System\.getenv\s*\(|Environment\.GetEnvironmentVariable\s*\(/i,
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
// Justified type: ignore / noqa suppression comments — not reckless suppression
|
|
255
|
+
findingPattern: /suppress|type.*ignore|noqa|lint.*disabl|SWDEV-001|CICD-003/i,
|
|
256
|
+
safeContext: /(?:#\s*type:\s*ignore|#\s*noqa|(?:\/\/|#)\s*eslint-disable).*(?:--|—|because|reason|\bfor\b|\bdue\b|\bruntyped\b|\bstubs\b|\bno\s+stubs)/i,
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
// logger.error / log.warn / console.error containing security keywords in the message string
|
|
260
|
+
// Exclude findings that are specifically ABOUT credential logging (LOGPRIV, LOG-*)
|
|
261
|
+
findingPattern: /password|secret|token|credential|hardcoded/i,
|
|
262
|
+
safeContext: /(?:logger|log|console|logging)\s*\.\s*(?:error|warn|warning|info|debug|critical|fatal)\s*\(/i,
|
|
263
|
+
excludePattern: /\blog(?:ged|ging|s|file)?\b|LOGPRIV|^LOG-/i,
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
// HTTP routing method app.delete() / router.delete() — "delete" is an HTTP verb, not data destruction
|
|
267
|
+
findingPattern: /\bdelete\b.*(?:data|destruct|unprotect|unauthori)|dangerous.*delete/i,
|
|
268
|
+
safeContext: /(?:app|router|server|express|fastify|hapi|koa)\s*\.\s*delete\s*\(\s*["'`/]|@(?:app|router)\s*\.\s*delete\s*\(/i,
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
// Environment variable / config-lookup access for hardcoded credential findings
|
|
272
|
+
// Broader than the DB-001 env-var pattern above — covers all credential keyword findings
|
|
273
|
+
findingPattern: /hardcoded.*(?:password|secret|token|credential|key|api)|DATA-00|AUTH-00/i,
|
|
274
|
+
safeContext: /(?:process\.env\b|os\.environ|os\.getenv\s*\(|System\.getenv\s*\(|Environment\.GetEnvironmentVariable\s*\(|env::var\s*\()/i,
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
// Vault / secrets-manager SDK calls — credentials are fetched at runtime, not hardcoded
|
|
278
|
+
findingPattern: /hardcoded.*(?:password|secret|token|credential|key)|DATA-00|AUTH-00|DSEC-/i,
|
|
279
|
+
safeContext: /(?:vault|secretsmanager|SecretClient|KeyVaultSecret|ssm|parameterStore|keyring|credentialManager)\s*[.(]/i,
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
// Hash/digest function calls — "password" or "secret" is being hashed, not stored in plaintext
|
|
283
|
+
findingPattern: /plaintext|plain.?text|unencrypted|unhashed/i,
|
|
284
|
+
safeContext: /(?:bcrypt|argon2|scrypt|pbkdf2|sha256|sha512|hashlib|crypto\.hash|passwordEncoder|hash_password|hashpw|createHash)\s*[.(]/i,
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
// String concatenation / template literal for error or user-facing messages
|
|
288
|
+
// Finding flags "password" keyword but it's in a UI label or validation message
|
|
289
|
+
findingPattern: /hardcoded.*(?:password|secret|token|credential)|DSEC-/i,
|
|
290
|
+
safeContext: /(?:placeholder|label|hint|title|message|msg|text|caption|tooltip|aria[_-]label)\s*[:=]\s*["'`].*\b(?:password|secret|token|credential)\b/i,
|
|
291
|
+
},
|
|
292
|
+
];
|
|
293
|
+
// ─── Core Filter Function ───────────────────────────────────────────────────
|
|
294
|
+
/**
|
|
295
|
+
* Apply deterministic heuristics to remove likely false positives from
|
|
296
|
+
* an aggregated set of findings. This is called in the tribunal pipeline
|
|
297
|
+
* after all judges have run.
|
|
298
|
+
*
|
|
299
|
+
* The function is conservative — it only removes findings that match
|
|
300
|
+
* well-established FP patterns. When in doubt, it keeps the finding.
|
|
301
|
+
*
|
|
302
|
+
* @param findings – All findings from all judges (post-dedup)
|
|
303
|
+
* @param code – The source code that was analyzed
|
|
304
|
+
* @param language – The programming language
|
|
305
|
+
* @returns Filtered findings and removed findings
|
|
306
|
+
*/
|
|
307
|
+
export function filterFalsePositiveHeuristics(findings, code, language, filePath) {
|
|
308
|
+
if (findings.length === 0) {
|
|
309
|
+
return { filtered: [], removed: [] };
|
|
310
|
+
}
|
|
311
|
+
const lines = code.split("\n");
|
|
312
|
+
const isIaC = isIaCTemplate(code);
|
|
313
|
+
const fileCategory = classifyFile(code, language, filePath);
|
|
314
|
+
const filtered = [];
|
|
315
|
+
const removed = [];
|
|
316
|
+
for (const finding of findings) {
|
|
317
|
+
const reason = getFpReason(finding, lines, isIaC, fileCategory, filePath);
|
|
318
|
+
if (reason) {
|
|
319
|
+
removed.push({ ...finding, description: `${finding.description}\n\n**FP Heuristic:** ${reason}` });
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
filtered.push(finding);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return { filtered, removed };
|
|
326
|
+
}
|
|
327
|
+
// ─── Individual Heuristic Checks ─────────────────────────────────────────────
|
|
328
|
+
/**
|
|
329
|
+
* Returns a short explanation if the finding is a likely FP, or null if it
|
|
330
|
+
* should be kept.
|
|
331
|
+
*/
|
|
332
|
+
function getFpReason(finding, lines, isIaC, fileCategory, filePath) {
|
|
333
|
+
// ── 1. IaC template gating: app-only rules on IaC files ──
|
|
334
|
+
if (isIaC) {
|
|
335
|
+
const isAppOnly = APP_ONLY_RULE_PREFIXES.some((p) => finding.ruleId.startsWith(p));
|
|
336
|
+
if (isAppOnly) {
|
|
337
|
+
return `Application-runtime rule ${finding.ruleId} does not apply to Infrastructure-as-Code templates.`;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
// ── 2. Test file gating: prod-only rules on test files ──
|
|
341
|
+
if (fileCategory === "test" || fileCategory === "config-test") {
|
|
342
|
+
const isProdOnly = PROD_ONLY_RULE_PREFIXES.some((p) => finding.ruleId.startsWith(p));
|
|
343
|
+
if (isProdOnly) {
|
|
344
|
+
return `Production-only rule ${finding.ruleId} does not apply to test files.`;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
// ── 2a. Analysis-tool test files: rules fire on code specimens ──
|
|
348
|
+
// Test suites for code analysis tools necessarily embed template-literal
|
|
349
|
+
// code samples in many languages. Pattern-based rules (TEST-*, SEC-*,
|
|
350
|
+
// HALLU-*) inevitably match content inside those string specimens
|
|
351
|
+
// rather than genuine issues in the test code itself.
|
|
352
|
+
if (fileCategory === "test" && /^(?:TEST|SEC|HALLU)-/.test(finding.ruleId)) {
|
|
353
|
+
const codeText = lines.join("\n");
|
|
354
|
+
const isAnalysisToolTest = /\b(?:evaluateWith|scoreFindings|evaluateCode|filterFalsePositive|classifyFile|TribunalVerdict|JudgeDefinition|judgePanelEvaluate|evaluateWithTribunal)\b/.test(codeText) ||
|
|
355
|
+
// Also detect tests for tool-routing, MCP tools, judge panels, etc.
|
|
356
|
+
/\b(?:judges?\s*panel|tool[_-]?rout|mcp\s*tool|evaluate_code|analyze_code)\b/i.test(codeText);
|
|
357
|
+
if (isAnalysisToolTest) {
|
|
358
|
+
// Verify file is dominated by template literal code specimens
|
|
359
|
+
const templateLiteralCount = (codeText.match(/`[^`]{50,}/g) || []).length;
|
|
360
|
+
if (templateLiteralCount >= 3) {
|
|
361
|
+
return `Rule ${finding.ruleId} triggered by patterns inside code specimens (template literal fixtures) in analysis-tool tests — not actual test code.`;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
// ── 2b. Config/data file gating: code-quality rules on YAML/JSON/config ──
|
|
366
|
+
if (fileCategory === "config") {
|
|
367
|
+
const isCodeOnly = CODE_ONLY_RULE_PREFIXES.some((p) => finding.ruleId.startsWith(p));
|
|
368
|
+
if (isCodeOnly) {
|
|
369
|
+
return `Code-quality rule ${finding.ruleId} does not apply to configuration/data files.`;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
// ── 2c. Type-definition file gating: absence rules on pure type files ──
|
|
373
|
+
// Pure type-definition files (interfaces, type aliases, enums) contain
|
|
374
|
+
// no runtime logic. Absence-based findings like "missing error handling"
|
|
375
|
+
// or "missing authentication" produce noise on these files.
|
|
376
|
+
if (finding.isAbsenceBased && fileCategory === "types") {
|
|
377
|
+
return "Absence-based rule does not apply to pure type-definition files — no runtime logic to evaluate.";
|
|
378
|
+
}
|
|
379
|
+
// ── 2d. Benchmark CLI files: SEC/HALLU on embedded code specimens ──
|
|
380
|
+
// Benchmark files in the commands/ directory contain intentional
|
|
381
|
+
// vulnerable-code snippets embedded as template literal strings. These
|
|
382
|
+
// are test data, not real vulnerabilities.
|
|
383
|
+
if (fileCategory === "cli" && filePath && /benchmark/i.test(filePath) && /^(?:SEC|HALLU)-/.test(finding.ruleId)) {
|
|
384
|
+
const codeText = lines.join("\n");
|
|
385
|
+
const templateLiteralCount = (codeText.match(/`[^`]{50,}/g) || []).length;
|
|
386
|
+
if (templateLiteralCount >= 5) {
|
|
387
|
+
return `Rule ${finding.ruleId} triggered by intentional code specimens in benchmark test data — not a real vulnerability.`;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
// ── 2e. CLI-tool file gating: server/cloud rules on CLI commands ──
|
|
391
|
+
// CLI tools are short-lived processes that legitimately use process.exit(),
|
|
392
|
+
// console.log for output, synchronous I/O, and in-memory data structures.
|
|
393
|
+
// Scalability, observability infrastructure, structured logging, rate
|
|
394
|
+
// limiting, and cloud-readiness rules are not applicable.
|
|
395
|
+
if (fileCategory === "cli") {
|
|
396
|
+
const CLI_INAPPLICABLE_RULE_PREFIXES = [
|
|
397
|
+
"SCALE-", // CLI doesn't need horizontal scaling
|
|
398
|
+
"RATE-", // CLI doesn't need rate limiting
|
|
399
|
+
"CLOUD-", // CLI is not a cloud service
|
|
400
|
+
"OBS-", // CLI doesn't need observability infrastructure
|
|
401
|
+
"LOGPRIV-", // CLI console output is not production logging
|
|
402
|
+
"A11Y-", // CLI is not a web UI
|
|
403
|
+
"UX-", // CLI is not a web UI
|
|
404
|
+
"I18N-", // CLI diagnostic counters don't need locale formatting
|
|
405
|
+
"CACHE-", // CLI doesn't need caching strategy
|
|
406
|
+
"SOV-", // CLI local tool, no data sovereignty concerns
|
|
407
|
+
"COMP-", // CLI tool, no regulatory compliance concerns
|
|
408
|
+
"AGENT-", // agent instructions not applicable to CLI
|
|
409
|
+
"DATA-", // CLI tool doesn't handle sensitive data at rest
|
|
410
|
+
"DB-", // CLI tool has no database concerns
|
|
411
|
+
"API-", // CLI tool is not an API service
|
|
412
|
+
"CYBER-", // CLI tool has no web endpoints
|
|
413
|
+
"AUTH-", // CLI tool has no auth system
|
|
414
|
+
"CONC-", // CLI is single-process short-lived
|
|
415
|
+
"AICS-", // CLI tool is not generating AI code
|
|
416
|
+
"ETHICS-", // CLI tool doesn't make decisions about people
|
|
417
|
+
"FW-", // CLI tool is not a framework consumer
|
|
418
|
+
"TEST-", // testing patterns not relevant to CLI commands
|
|
419
|
+
"CICD-", // CI/CD infrastructure not applicable
|
|
420
|
+
"DEPS-", // dependency health not applicable
|
|
421
|
+
"COMPAT-", // backwards compatibility not applicable
|
|
422
|
+
"CFG-", // config management patterns differ for CLI
|
|
423
|
+
"REL-", // reliability patterns (circuit breakers) not needed in CLI
|
|
424
|
+
];
|
|
425
|
+
const isCLIInapplicable = CLI_INAPPLICABLE_RULE_PREFIXES.some((p) => finding.ruleId.startsWith(p));
|
|
426
|
+
if (isCLIInapplicable) {
|
|
427
|
+
return `Rule ${finding.ruleId} does not apply to CLI tools — short-lived processes do not need cloud/server infrastructure.`;
|
|
428
|
+
}
|
|
429
|
+
// Suppress "abrupt process termination" findings — process.exit() is
|
|
430
|
+
// the standard way for CLI tools to signal success/failure to the shell.
|
|
431
|
+
const titleLower = finding.title.toLowerCase();
|
|
432
|
+
if (titleLower.includes("process.exit") ||
|
|
433
|
+
titleLower.includes("abrupt") ||
|
|
434
|
+
titleLower.includes("hard process termination") ||
|
|
435
|
+
(titleLower.includes("process") && titleLower.includes("termination"))) {
|
|
436
|
+
return "process.exit() is standard in CLI tools for reporting exit codes to the shell.";
|
|
437
|
+
}
|
|
438
|
+
// Suppress "console instead of structured logger" — console is the
|
|
439
|
+
// correct output interface for CLI tools.
|
|
440
|
+
if (titleLower.includes("console") &&
|
|
441
|
+
(titleLower.includes("logger") || titleLower.includes("logging") || titleLower.includes("structured"))) {
|
|
442
|
+
return "Console output is the correct interface for CLI tools — structured logging is for services.";
|
|
443
|
+
}
|
|
444
|
+
// Suppress "unstructured logging" — same reasoning as above
|
|
445
|
+
if (titleLower.includes("unstructured") && titleLower.includes("log")) {
|
|
446
|
+
return "Console output is the correct interface for CLI tools — structured logging is for services.";
|
|
447
|
+
}
|
|
448
|
+
// Suppress "synchronous / blocking I/O" — CLI tools are single-threaded
|
|
449
|
+
// short-lived processes where sync I/O is idiomatic and often preferred.
|
|
450
|
+
if ((titleLower.includes("synchronous") || titleLower.includes("blocking")) &&
|
|
451
|
+
(titleLower.includes("i/o") ||
|
|
452
|
+
titleLower.includes("io") ||
|
|
453
|
+
titleLower.includes("operation") ||
|
|
454
|
+
titleLower.includes("file"))) {
|
|
455
|
+
return "Synchronous I/O is appropriate for CLI tools — short-lived processes do not need async concurrency.";
|
|
456
|
+
}
|
|
457
|
+
// Suppress "in-memory data store" — CLI tools don't need distributed state
|
|
458
|
+
if (titleLower.includes("in-memory") && (titleLower.includes("store") || titleLower.includes("scale"))) {
|
|
459
|
+
return "In-memory data structures are appropriate for CLI tools — no need for distributed state.";
|
|
460
|
+
}
|
|
461
|
+
// Suppress "numeric values formatted without locale" for CLI counter output
|
|
462
|
+
if (titleLower.includes("locale") && titleLower.includes("numeric")) {
|
|
463
|
+
return "CLI diagnostic counters do not need locale-aware formatting.";
|
|
464
|
+
}
|
|
465
|
+
// Suppress STRUCT deep nesting findings — CLI commands with complex
|
|
466
|
+
// argument handling and output formatting have inherent nesting.
|
|
467
|
+
if (/^STRUCT-/.test(finding.ruleId)) {
|
|
468
|
+
return "CLI command logic has inherent nesting from argument handling and output formatting.";
|
|
469
|
+
}
|
|
470
|
+
// Suppress MAINT findings — CLI tools are self-contained scripts where
|
|
471
|
+
// duplicate strings, magic numbers, and file length are acceptable.
|
|
472
|
+
if (/^MAINT-/.test(finding.ruleId)) {
|
|
473
|
+
return "Maintainability patterns differ for CLI tools — self-contained command scripts have different complexity budgets.";
|
|
474
|
+
}
|
|
475
|
+
// Suppress DOC findings — CLI command functions are documented by their
|
|
476
|
+
// --help output, not JSDoc.
|
|
477
|
+
if (/^DOC-/.test(finding.ruleId)) {
|
|
478
|
+
return "CLI commands are documented through --help output, not JSDoc.";
|
|
479
|
+
}
|
|
480
|
+
// Suppress SWDEV findings about long functions, complexity — CLI commands
|
|
481
|
+
// are often single long functions that handle the entire command flow.
|
|
482
|
+
if (/^SWDEV-/.test(finding.ruleId)) {
|
|
483
|
+
return "CLI command handlers are conventionally single functions covering the full command flow.";
|
|
484
|
+
}
|
|
485
|
+
// Suppress PERF/COST findings — CLI tools run once and exit, performance
|
|
486
|
+
// optimizations target long-running services.
|
|
487
|
+
if (/^(?:PERF|COST)-/.test(finding.ruleId)) {
|
|
488
|
+
return "Performance/cost optimizations target long-running services — CLI tools run once and exit.";
|
|
489
|
+
}
|
|
490
|
+
// Suppress ERR findings — CLI tools use process.exit() for error
|
|
491
|
+
// signaling and console.error for messages.
|
|
492
|
+
if (/^ERR-/.test(finding.ruleId)) {
|
|
493
|
+
return "CLI tools use process.exit() and console.error for error signaling — different pattern from services.";
|
|
494
|
+
}
|
|
495
|
+
// Suppress PORTA (portability) findings — CLI tools may use platform-specific paths
|
|
496
|
+
if (/^PORTA-/.test(finding.ruleId)) {
|
|
497
|
+
return "Portability patterns differ for CLI tools — platform-specific paths are often expected.";
|
|
498
|
+
}
|
|
499
|
+
// Suppress absence-based findings on CLI tools — CLI commands don't need
|
|
500
|
+
// missing server infrastructure (rate limiting, monitoring, etc.)
|
|
501
|
+
if (finding.isAbsenceBased) {
|
|
502
|
+
return "Absence-based infrastructure rules do not apply to CLI commands.";
|
|
503
|
+
}
|
|
504
|
+
// Suppress SEC file-system-access findings — CLI tools are designed to
|
|
505
|
+
// read/write files based on user-provided command-line arguments. File
|
|
506
|
+
// system operations with argv/args paths are the tool's core purpose.
|
|
507
|
+
if (/^SEC-/.test(finding.ruleId) && finding.title.toLowerCase().includes("file system access")) {
|
|
508
|
+
return "File system access from CLI arguments is the tool's core purpose — not a vulnerability.";
|
|
509
|
+
}
|
|
510
|
+
// Suppress SEC database-related findings — CLI tools have no database
|
|
511
|
+
// connections; "untrusted input in query" fires on function arguments
|
|
512
|
+
// that are file paths, not SQL.
|
|
513
|
+
if (/^SEC-/.test(finding.ruleId) && /database|sql|query construction/i.test(finding.title)) {
|
|
514
|
+
return "CLI tools have no database connections — argument flow into internal functions is not SQL injection.";
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
// ── 2f. Analysis-tool file gating ──
|
|
518
|
+
// Code analysis tools (judge definitions, evaluators, linters, formatters,
|
|
519
|
+
// AST analyzers) necessarily contain the very patterns they detect. They
|
|
520
|
+
// are single-process developer utilities, not production web services.
|
|
521
|
+
if (fileCategory === "analysis-tool") {
|
|
522
|
+
const isInapplicable = ANALYSIS_TOOL_INAPPLICABLE_RULE_PREFIXES.some((p) => finding.ruleId.startsWith(p));
|
|
523
|
+
if (isInapplicable) {
|
|
524
|
+
return `Rule ${finding.ruleId} does not apply to code analysis tools — pattern definitions are not application logic.`;
|
|
525
|
+
}
|
|
526
|
+
// Suppress nested-loop/complexity findings — pattern matching requires
|
|
527
|
+
// multi-level traversal and deep branching by design.
|
|
528
|
+
const titleLower2e = finding.title.toLowerCase();
|
|
529
|
+
if (/^(?:PERF|COST|STRUCT)-/.test(finding.ruleId) &&
|
|
530
|
+
(titleLower2e.includes("nested") ||
|
|
531
|
+
titleLower2e.includes("complex") ||
|
|
532
|
+
titleLower2e.includes("depth") ||
|
|
533
|
+
titleLower2e.includes("loop"))) {
|
|
534
|
+
return "Complex iteration and deep nesting are inherent to code analysis — pattern matching requires multi-level traversal.";
|
|
535
|
+
}
|
|
536
|
+
// Suppress STRUCT deep nesting findings specifically
|
|
537
|
+
if (/^STRUCT-/.test(finding.ruleId)) {
|
|
538
|
+
return "Deep code structure is inherent to analysis/evaluator logic — multi-level pattern matching requires extensive branching.";
|
|
539
|
+
}
|
|
540
|
+
// Suppress MAINT findings about duplicate strings, magic numbers, file length —
|
|
541
|
+
// analysis patterns legitimately repeat keywords and use numeric thresholds.
|
|
542
|
+
if (/^MAINT-/.test(finding.ruleId)) {
|
|
543
|
+
return "Maintainability patterns in analysis tools reflect detection rule structure, not extractable constants.";
|
|
544
|
+
}
|
|
545
|
+
// Suppress DOC findings — internal analysis code documentation needs differ
|
|
546
|
+
// from public API documentation requirements.
|
|
547
|
+
if (/^DOC-/.test(finding.ruleId)) {
|
|
548
|
+
return "Documentation rules have reduced applicability on internal analysis pattern code.";
|
|
549
|
+
}
|
|
550
|
+
// Suppress SWDEV/ERR findings about function length, error handling, complexity —
|
|
551
|
+
// evaluation functions are necessarily complex.
|
|
552
|
+
if (/^(?:SWDEV|ERR)-/.test(finding.ruleId)) {
|
|
553
|
+
return "Analysis evaluation functions are necessarily complex — pattern matching requires extensive branching and error tolerance.";
|
|
554
|
+
}
|
|
555
|
+
// Suppress PERF/COST findings — analysis tools process single files, not
|
|
556
|
+
// high-throughput production traffic.
|
|
557
|
+
if (/^(?:PERF|COST)-/.test(finding.ruleId)) {
|
|
558
|
+
return "Performance/cost optimizations target production services — analysis tools process single files.";
|
|
559
|
+
}
|
|
560
|
+
// Suppress PORTA (portability) findings — internal developer tool
|
|
561
|
+
if (/^PORTA-/.test(finding.ruleId)) {
|
|
562
|
+
return "Portability rules do not apply to internal code analysis tools.";
|
|
563
|
+
}
|
|
564
|
+
// Suppress absence-based findings — analysis tools don't need server infrastructure
|
|
565
|
+
if (finding.isAbsenceBased) {
|
|
566
|
+
return "Absence-based infrastructure rules do not apply to code analysis tools.";
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
// ── 2g. VS Code extension file gating ──
|
|
570
|
+
// VS Code extensions are desktop plugins running inside the editor process.
|
|
571
|
+
// They use the VS Code API for I/O, diagnostics, and UI — cloud/service
|
|
572
|
+
// rules are not applicable.
|
|
573
|
+
if (fileCategory === "vscode-extension") {
|
|
574
|
+
const isInapplicable = VSCODE_EXT_INAPPLICABLE_RULE_PREFIXES.some((p) => finding.ruleId.startsWith(p));
|
|
575
|
+
if (isInapplicable) {
|
|
576
|
+
return `Rule ${finding.ruleId} does not apply to VS Code extensions — desktop plugin, not a cloud service.`;
|
|
577
|
+
}
|
|
578
|
+
// Suppress absence-based findings — VS Code provides the host infrastructure
|
|
579
|
+
if (finding.isAbsenceBased) {
|
|
580
|
+
return "Absence-based infrastructure rules do not apply to VS Code extensions — the host provides the infrastructure.";
|
|
581
|
+
}
|
|
582
|
+
// Suppress findings about auth endpoints / session management —
|
|
583
|
+
// VS Code extensions authenticate via the VS Code authentication API.
|
|
584
|
+
const titleLower2f = finding.title.toLowerCase();
|
|
585
|
+
if (/^(?:AUTH|CYBER)-/.test(finding.ruleId) &&
|
|
586
|
+
(titleLower2f.includes("endpoint") || titleLower2f.includes("session") || titleLower2f.includes("middleware"))) {
|
|
587
|
+
return "VS Code extensions use the editor's authentication API — no HTTP endpoints or middleware.";
|
|
588
|
+
}
|
|
589
|
+
// Suppress STRUCT/MAINT/DOC/SWDEV/PERF/ERR findings on extension code —
|
|
590
|
+
// extensions have different complexity profiles than web services
|
|
591
|
+
if (/^(?:STRUCT|MAINT|DOC|SWDEV|PERF|ERR|PORTA)-/.test(finding.ruleId)) {
|
|
592
|
+
return "VS Code extension code follows the editor's activation/dispose lifecycle pattern.";
|
|
593
|
+
}
|
|
594
|
+
// Suppress REL/CYBER/AUTH/DATA/FW/LOGPRIV findings on extension code
|
|
595
|
+
if (/^(?:REL|CYBER|AUTH|DATA|FW|LOGPRIV)-/.test(finding.ruleId)) {
|
|
596
|
+
return "VS Code extension code uses the editor's built-in infrastructure for reliability and security.";
|
|
597
|
+
}
|
|
598
|
+
// Suppress UX findings — VS Code extensions use the VS Code UI API
|
|
599
|
+
if (/^UX-/.test(finding.ruleId)) {
|
|
600
|
+
return "VS Code extensions use the editor's built-in UI components.";
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
// ── 2h. Utility module gating ──
|
|
604
|
+
// Utility modules are library code with no HTTP endpoints, no user-facing
|
|
605
|
+
// UI, and no cloud-service responsibilities. Server-infrastructure and
|
|
606
|
+
// cloud-readiness rules do not apply.
|
|
607
|
+
if (fileCategory === "utility") {
|
|
608
|
+
const UTILITY_INAPPLICABLE = [
|
|
609
|
+
"SOV-", // no user data flow
|
|
610
|
+
"COMP-", // no regulated data handling
|
|
611
|
+
"RATE-", // no request rate
|
|
612
|
+
"CLOUD-", // not a cloud service
|
|
613
|
+
"UX-", // no user interface
|
|
614
|
+
"OBS-", // no production observability need
|
|
615
|
+
"AGENT-", // not an AI agent
|
|
616
|
+
"FW-", // framework rules target app code
|
|
617
|
+
"API-", // not an API service
|
|
618
|
+
"DB-", // no database
|
|
619
|
+
"SCALE-", // not a scalable service — CLI utilities use sync I/O legitimately
|
|
620
|
+
"CFG-", // configuration management rules target deployed services
|
|
621
|
+
"PORTA-", // portability rules target deployed apps, not internal tooling
|
|
622
|
+
];
|
|
623
|
+
const isUtilityInapplicable = UTILITY_INAPPLICABLE.some((p) => finding.ruleId.startsWith(p));
|
|
624
|
+
if (isUtilityInapplicable) {
|
|
625
|
+
return `Rule ${finding.ruleId} does not apply to utility library modules — no cloud/service infrastructure.`;
|
|
626
|
+
}
|
|
627
|
+
// For path-confirmed utility modules (not content-based guesses),
|
|
628
|
+
// also suppress code-quality rules that fire on internal CLI internals:
|
|
629
|
+
// sync I/O, empty catches in cache cleanup, structural complexity in
|
|
630
|
+
// data-aggregation code, etc.
|
|
631
|
+
if (filePath) {
|
|
632
|
+
const INTERNAL_UTILITY_INAPPLICABLE = [
|
|
633
|
+
"PERF-", // sync I/O is idiomatic for single-threaded CLI utility internals
|
|
634
|
+
"COST-", // same as PERF — sync I/O is the expected pattern
|
|
635
|
+
"TEST-", // utility modules are tested indirectly through integration tests
|
|
636
|
+
"COMPAT-", // internal data structures, not public API
|
|
637
|
+
"ERR-", // utility modules use intentional swallowed errors (cache cleanup, etc.)
|
|
638
|
+
"STRUCT-", // data-aggregation utilities have inherent branching complexity
|
|
639
|
+
];
|
|
640
|
+
const isInternalInapplicable = INTERNAL_UTILITY_INAPPLICABLE.some((p) => finding.ruleId.startsWith(p));
|
|
641
|
+
if (isInternalInapplicable) {
|
|
642
|
+
return `Rule ${finding.ruleId} does not apply to internal utility modules — CLI internals have different patterns.`;
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
// Suppress absence-based findings on utilities
|
|
646
|
+
if (finding.isAbsenceBased) {
|
|
647
|
+
return "Absence-based infrastructure rules do not apply to utility modules.";
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
// ── 3. All target lines are comments ──
|
|
651
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
652
|
+
// AICS-003 specifically detects TODO/FIXME security placeholders in comments —
|
|
653
|
+
// commenting IS the signal, so exempt it from this filter.
|
|
654
|
+
// COMPAT-* detects renamed/removed fields via comments like "// Was: oldName" —
|
|
655
|
+
// the comment IS the evidence of a breaking change.
|
|
656
|
+
if (!finding.ruleId.startsWith("AICS-") && !finding.ruleId.startsWith("COMPAT-")) {
|
|
657
|
+
const allComments = finding.lineNumbers.every((ln) => {
|
|
658
|
+
const line = lines[ln - 1];
|
|
659
|
+
return line !== undefined && isCommentLine(line);
|
|
660
|
+
});
|
|
661
|
+
if (allComments) {
|
|
662
|
+
return "All flagged lines are comments — the pattern appears in documentation, not executable code.";
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
// ── 4. All target lines are string literals ──
|
|
667
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
668
|
+
// DEPS-* rules specifically target dependency declarations in package manifests
|
|
669
|
+
// where string literal values ARE the finding (e.g., '"express": "^3.0.0"').
|
|
670
|
+
// COMP-* rules detect PII fields inside SQL/query strings — the string literal
|
|
671
|
+
// IS the data-handling code, not inert data.
|
|
672
|
+
if (!finding.ruleId.startsWith("DEPS-") && !finding.ruleId.startsWith("COMP-")) {
|
|
673
|
+
const allStrings = finding.lineNumbers.every((ln) => {
|
|
674
|
+
const line = lines[ln - 1];
|
|
675
|
+
return line !== undefined && isStringLiteralLine(line);
|
|
676
|
+
});
|
|
677
|
+
if (allStrings) {
|
|
678
|
+
return "All flagged lines are string literal values — the keyword appears in data, not code.";
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
// ── 5. Import / type-only line ──
|
|
683
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
684
|
+
// DEPS-* rules specifically target import declarations of deprecated/risky packages —
|
|
685
|
+
// import lines ARE the finding, so skip this filter for them.
|
|
686
|
+
// HALLU-* rules detect dependency confusion via suspicious import specifiers —
|
|
687
|
+
// import lines ARE the finding for hallucination/confusion checks.
|
|
688
|
+
if (!finding.ruleId.startsWith("DEPS-") && !finding.ruleId.startsWith("HALLU-")) {
|
|
689
|
+
const allImportsOrTypes = finding.lineNumbers.every((ln) => {
|
|
690
|
+
const line = lines[ln - 1];
|
|
691
|
+
if (!line)
|
|
692
|
+
return false;
|
|
693
|
+
const trimmed = line.trim();
|
|
694
|
+
return (/^import\s/.test(trimmed) ||
|
|
695
|
+
/^from\s/.test(trimmed) ||
|
|
696
|
+
/^export\s+(?:type|interface|abstract)\s/.test(trimmed) ||
|
|
697
|
+
/^(?:type|interface)\s+\w+/.test(trimmed) ||
|
|
698
|
+
/^using\s/.test(trimmed));
|
|
699
|
+
});
|
|
700
|
+
if (allImportsOrTypes) {
|
|
701
|
+
return "Finding targets import/type declarations — no runtime behavior to evaluate.";
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
// ── 6. Keyword-in-identifier collision ──
|
|
706
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
707
|
+
const titleAndDesc = `${finding.title} ${finding.description}`;
|
|
708
|
+
for (const { trigger, identifierContext } of KEYWORD_IDENTIFIER_PATTERNS) {
|
|
709
|
+
if (trigger.test(titleAndDesc)) {
|
|
710
|
+
const matchingLines = finding.lineNumbers.filter((ln) => {
|
|
711
|
+
const line = lines[ln - 1];
|
|
712
|
+
return line !== undefined && identifierContext.test(line);
|
|
713
|
+
});
|
|
714
|
+
// Require ALL flagged lines to match identifier context, not just any.
|
|
715
|
+
// When cross-evaluator dedup merges line numbers from multiple findings,
|
|
716
|
+
// a single inherited "foreign" line shouldn't suppress the entire finding.
|
|
717
|
+
if (matchingLines.length > 0 && matchingLines.length >= finding.lineNumbers.length) {
|
|
718
|
+
return "Keyword appears as part of an identifier name, not as a dangerous operation.";
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
// ── 7. Safe standard-library idiom ──
|
|
724
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
725
|
+
for (const { findingPattern, safeContext, excludePattern } of SAFE_IDIOM_PATTERNS) {
|
|
726
|
+
if (findingPattern.test(finding.title) || findingPattern.test(finding.ruleId)) {
|
|
727
|
+
// Skip safe-idiom suppression when the finding is about the very thing we'd suppress
|
|
728
|
+
if (excludePattern && (excludePattern.test(finding.title) || excludePattern.test(finding.ruleId))) {
|
|
729
|
+
continue;
|
|
730
|
+
}
|
|
731
|
+
const hasSafeCtx = finding.lineNumbers.some((ln) => {
|
|
732
|
+
const line = lines[ln - 1];
|
|
733
|
+
return line !== undefined && safeContext.test(line);
|
|
734
|
+
});
|
|
735
|
+
if (hasSafeCtx) {
|
|
736
|
+
return "Flagged pattern is a safe standard-library/framework idiom, not a vulnerability.";
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
// ── 8. Absence-based finding with low confidence ──
|
|
742
|
+
// Absence-based findings with low confidence are likely FPs in partial reviews.
|
|
743
|
+
// The upstream pipeline caps absence-based confidence at 0.6, so values near
|
|
744
|
+
// or below 0.45 indicate very weak signal.
|
|
745
|
+
if (finding.isAbsenceBased && finding.confidence !== undefined && finding.confidence < 0.45) {
|
|
746
|
+
return "Absence-based finding with low confidence — likely a false positive in partial code review.";
|
|
747
|
+
}
|
|
748
|
+
// ── 9. Web-only rules on non-web code ──
|
|
749
|
+
// Accessibility, UX rendering, and internationalization rules are only
|
|
750
|
+
// meaningful on files that contain web-facing patterns (HTML, JSX, routes,
|
|
751
|
+
// templates, CSS, or HTTP API responses).
|
|
752
|
+
const WEB_ONLY_PREFIXES = ["A11Y-", "UX-", "I18N-"];
|
|
753
|
+
const isWebOnly = WEB_ONLY_PREFIXES.some((p) => finding.ruleId.startsWith(p));
|
|
754
|
+
if (isWebOnly) {
|
|
755
|
+
const hasWebPatterns = /<\w+[\s>]|className=|style=|href=|jsx|tsx|\.html|\.css|render\s*\(|dangerouslySetInnerHTML|innerHTML|document\.|window\.|querySelector|getElementById|res\.(?:json|send|render|status)|app\.(?:get|post|put|delete|use)\s*\(|router\.(?:get|post|put|delete)\s*\(|@app\.route|@GetMapping|@PostMapping|@RequestMapping|http\.HandleFunc/i.test(lines.join("\n"));
|
|
756
|
+
if (!hasWebPatterns) {
|
|
757
|
+
return `Web-only rule ${finding.ruleId} does not apply — no HTML, JSX, or DOM patterns detected.`;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
// ── 10. Findings targeting empty / whitespace-only lines ──
|
|
761
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
762
|
+
const allBlank = finding.lineNumbers.every((ln) => {
|
|
763
|
+
const line = lines[ln - 1];
|
|
764
|
+
return line !== undefined && line.trim().length === 0;
|
|
765
|
+
});
|
|
766
|
+
if (allBlank) {
|
|
767
|
+
return "All flagged lines are empty or whitespace — no code to evaluate.";
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
// ── 11. Absence-based findings on trivially small files ──
|
|
771
|
+
// Files under 10 substantive lines are usually stubs, barrel exports, or
|
|
772
|
+
// minimal utilities where absence-based rules generate noise.
|
|
773
|
+
if (finding.isAbsenceBased) {
|
|
774
|
+
const substantiveLines = lines.filter((l) => {
|
|
775
|
+
const t = l.trim();
|
|
776
|
+
return t.length > 0 && !/^\s*(?:\/\/|\/\*|\*|#|$)/.test(t);
|
|
777
|
+
}).length;
|
|
778
|
+
if (substantiveLines < 10) {
|
|
779
|
+
return "Absence-based finding on trivially small file — likely a false positive.";
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
// ── 12. Distributed lock presence suppresses local-lock scaling findings ──
|
|
783
|
+
// SCALE-001 flags local file/process locks, but if the same file implements
|
|
784
|
+
// distributed locking (Redlock, Redis lock, etcd, Consul, ZooKeeper), the
|
|
785
|
+
// local lock is a documented single-instance fallback, not a scaling issue.
|
|
786
|
+
if (/^SCALE-/.test(finding.ruleId) &&
|
|
787
|
+
(((finding.title.toLowerCase().includes("local") ||
|
|
788
|
+
finding.title.toLowerCase().includes("process") ||
|
|
789
|
+
finding.title.toLowerCase().includes("file")) &&
|
|
790
|
+
finding.title.toLowerCase().includes("lock")) ||
|
|
791
|
+
/asyncio\.Lock|threading\.Lock/i.test(finding.title))) {
|
|
792
|
+
const fullCode = lines.join("\n");
|
|
793
|
+
const hasDistributedLock = /\bredlock\b|\bredis.*lock\b|\bdistributed.*lock\b|\betcd\b.*lock|\bconsul\b.*lock|\bzookeeper\b.*lock|\bLock\s*\(.*redis/i.test(fullCode);
|
|
794
|
+
if (hasDistributedLock) {
|
|
795
|
+
return "Local lock is a fallback — distributed locking (Redlock/Redis) is implemented in the same module.";
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
// ── 13. Retry/backoff/fallback suppresses resilience-pattern-absence findings ──
|
|
799
|
+
// SOV-001 and REL- rules flag missing circuit breakers, but if the code
|
|
800
|
+
// implements retry with backoff and/or a multi-tier fallback chain, it has
|
|
801
|
+
// equivalent or better resilience than a simple circuit breaker.
|
|
802
|
+
if (/^(?:SOV-001|REL-)/.test(finding.ruleId) &&
|
|
803
|
+
(/circuit.?breaker|resilience/i.test(finding.title) ||
|
|
804
|
+
(finding.title.toLowerCase().includes("without") &&
|
|
805
|
+
(finding.title.toLowerCase().includes("retry") || finding.title.toLowerCase().includes("fallback"))))) {
|
|
806
|
+
const fullCode = lines.join("\n");
|
|
807
|
+
const hasRetryPattern = /\bretry\b.*\b(?:backoff|exponential|delay)\b|\bbackoff\b.*\bretry\b|\btenacity\b|\bretrying\b|@retry\b|with_retry\b|fetch.*retry|retry.*fetch/i.test(fullCode);
|
|
808
|
+
const hasFallbackChain = /\bfallback\b.*\b(?:cache|bundled|default|local|offline)\b|(?:cache|bundled|default|local|offline)\b.*\bfallback\b/i.test(fullCode);
|
|
809
|
+
if (hasRetryPattern || hasFallbackChain) {
|
|
810
|
+
return "Retry/backoff and/or fallback chain detected — equivalent resilience pattern is implemented.";
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
// ── 14. Constant definitions suppress I18N hardcoded-string findings ──
|
|
814
|
+
// I18N-001 flags hardcoded strings, but constant definitions like
|
|
815
|
+
// _F_TITLE = 'title' are JSON field-name keys, not user-facing text.
|
|
816
|
+
if (/^I18N-/.test(finding.ruleId) &&
|
|
817
|
+
finding.title.toLowerCase().includes("hardcoded") &&
|
|
818
|
+
finding.title.toLowerCase().includes("string")) {
|
|
819
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
820
|
+
const allConstants = finding.lineNumbers.every((ln) => {
|
|
821
|
+
const line = lines[ln - 1];
|
|
822
|
+
if (!line)
|
|
823
|
+
return false;
|
|
824
|
+
const trimmed = line.trim();
|
|
825
|
+
// Python/JS/TS constant definitions: ALL_CAPS_NAME = "value" or const NAME = "value"
|
|
826
|
+
return (/^[A-Z_][A-Z_0-9]*\s*=\s*["']/.test(trimmed) ||
|
|
827
|
+
/^(?:const|final|static\s+final)\s+\w+\s*=\s*["']/.test(trimmed) ||
|
|
828
|
+
/^_[A-Z_][A-Z_0-9]*\s*=\s*["']/.test(trimmed));
|
|
829
|
+
});
|
|
830
|
+
if (allConstants) {
|
|
831
|
+
return "Flagged strings are constant definitions (field-name keys), not user-facing text.";
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
// ── 15. Bounded-dataset tree traversal suppresses O(n²) nested-loop findings ──
|
|
836
|
+
// PERF-002/COST-001 flag nested loops as O(n²), but tree traversals
|
|
837
|
+
// (chapters → sections → articles) iterate each item once — O(n total).
|
|
838
|
+
if (/^(?:PERF|COST)-/.test(finding.ruleId) &&
|
|
839
|
+
((finding.title.toLowerCase().includes("nested") && finding.title.toLowerCase().includes("loop")) ||
|
|
840
|
+
/O\(n[²2]\)|quadratic/i.test(finding.title))) {
|
|
841
|
+
const fullCode = lines.join("\n");
|
|
842
|
+
// Detect documented bounded datasets or tree-traversal patterns
|
|
843
|
+
const hasBoundedDatasetDoc = /\bbounded\b.*\b(?:dataset|corpus|data|size)\b|\bfixed[- ]size\b|\bO\(n\)\b|\bO\(total_/i.test(fullCode);
|
|
844
|
+
const hasTreeTraversal = /\bchapter|\bsection|\barticle|\bnode|\bchild(?:ren)?|\btree|\btravers/i.test(fullCode);
|
|
845
|
+
if (hasBoundedDatasetDoc || hasTreeTraversal) {
|
|
846
|
+
return "Nested iteration is a tree traversal over a bounded dataset — total work is O(n), not O(n²).";
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
// ── 16. Read-only content fetch suppresses cross-border data egress findings ──
|
|
850
|
+
// SOV-002 flags external API calls as cross-border data egress, but read-only
|
|
851
|
+
// fetches of public regulatory/reference content are not personal data transfers.
|
|
852
|
+
if (/^SOV-002/.test(finding.ruleId) &&
|
|
853
|
+
(/cross.?border|jurisdiction/i.test(finding.title) ||
|
|
854
|
+
(finding.title.toLowerCase().includes("data") && finding.title.toLowerCase().includes("egress")))) {
|
|
855
|
+
const fullCode = lines.join("\n");
|
|
856
|
+
const isReadOnlyFetch = /\bfetch\b.*\b(?:regulation|reference|content|static|public|gdpr|law)\b|\breadonly\b|\bread[_-]only\b/i.test(fullCode);
|
|
857
|
+
const noPersonalData = !/\buser[_-]?data\b|\bpersonal[_-]?data\b|\bpii\b|\bprofile\b.*\bdata\b/i.test(fullCode);
|
|
858
|
+
if (isReadOnlyFetch && noPersonalData) {
|
|
859
|
+
return "Read-only fetch of public/regulatory content — no personal data egress detected.";
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
// ── 17. Cache-age / TTL context suppresses compliance age-verification findings ──
|
|
863
|
+
// COMP-001 flags "age" as age-verification concern, but in cache/TTL contexts
|
|
864
|
+
// (cache_age, max_age, stale), "age" refers to data freshness, not user age.
|
|
865
|
+
if (/^COMP-/.test(finding.ruleId) && /\bage\b/i.test(finding.title)) {
|
|
866
|
+
const fullCode = lines.join("\n");
|
|
867
|
+
const isCacheAgeContext = /\bcache[_-]?age\b|\bmax[_-]?age\b|\bttl\b.*\bage\b|\bstale\b.*\bage\b|\bage\b.*\bseconds\b|\bage\b.*\bexpir/i.test(fullCode);
|
|
868
|
+
const noUserAgeContext = !/\bdate[_-]?of[_-]?birth\b|\bdob\b|\bminor\b|\bparental\b|\bage[_-]?verif/i.test(fullCode);
|
|
869
|
+
if (isCacheAgeContext && noUserAgeContext) {
|
|
870
|
+
return "Term 'age' appears in cache/TTL context (data freshness), not user age verification.";
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
// ── 18. Barrel / re-export files suppress absence-based findings ──
|
|
874
|
+
// Index files (index.ts, __init__.py, mod.rs) that primarily re-export
|
|
875
|
+
// other modules trigger absence-based findings like "missing error handling"
|
|
876
|
+
// or "missing validation" despite having no logic to validate.
|
|
877
|
+
if (finding.isAbsenceBased) {
|
|
878
|
+
const totalLines = lines.length;
|
|
879
|
+
const reExportLines = lines.filter((l) => {
|
|
880
|
+
const t = l.trim();
|
|
881
|
+
return (/^export\s+\{/.test(t) ||
|
|
882
|
+
/^export\s+\*\s+from\s/.test(t) ||
|
|
883
|
+
/^export\s+(?:default\s+)?(?:type\s+)?\w+\s+from\s/.test(t) ||
|
|
884
|
+
/^from\s+\S+\s+import\s/.test(t) ||
|
|
885
|
+
/^import\s/.test(t) ||
|
|
886
|
+
/^__all__\s*=/.test(t) ||
|
|
887
|
+
/^pub\s+(?:mod|use)\s/.test(t) ||
|
|
888
|
+
t.length === 0 ||
|
|
889
|
+
/^\s*(?:\/\/|\/\*|\*|#|$)/.test(t));
|
|
890
|
+
}).length;
|
|
891
|
+
if (totalLines > 0 && reExportLines / totalLines >= 0.8) {
|
|
892
|
+
return "File is primarily re-exports/barrel — absence-based rules do not apply to aggregation modules.";
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
// ── 19. Decorator/annotation security presence suppresses AUTH absence findings ──
|
|
896
|
+
// If the file contains authentication/authorization decorators or annotations,
|
|
897
|
+
// absence-based AUTH- findings claiming "missing authentication" are FPs —
|
|
898
|
+
// the auth IS present via the decorator.
|
|
899
|
+
if (/^AUTH-/.test(finding.ruleId) && finding.isAbsenceBased) {
|
|
900
|
+
const fullCode = lines.join("\n");
|
|
901
|
+
const hasSecurityDecorator = /@login_required|@requires_auth|@authenticated|@auth_required|@require_login|@jwt_required|\[Authorize\]|\[AllowAnonymous\]|@PreAuthorize|@Secured|@RolesAllowed|@PermitAll|@RequiresPermissions|@RequiresRoles|@Protected\b/i.test(fullCode);
|
|
902
|
+
if (hasSecurityDecorator) {
|
|
903
|
+
return "Authentication decorator/annotation is present — auth is enforced via framework mechanism.";
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
// ── 20. Enum / union type definitions suppress keyword collision findings ──
|
|
907
|
+
// Enum values like `Action.DELETE`, `Method.POST`, or union types like
|
|
908
|
+
// `type Method = "GET" | "DELETE"` contain security keywords as inert values.
|
|
909
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
910
|
+
const allEnumOrUnion = finding.lineNumbers.every((ln) => {
|
|
911
|
+
const line = lines[ln - 1];
|
|
912
|
+
if (!line)
|
|
913
|
+
return false;
|
|
914
|
+
const trimmed = line.trim();
|
|
915
|
+
return (/^\s*(?:export\s+)?enum\s+\w+/.test(trimmed) ||
|
|
916
|
+
/^\s*\w+\s*=\s*["']\w+["']\s*,?\s*(?:\/\/.*)?$/.test(trimmed) ||
|
|
917
|
+
/^\s*(?:export\s+)?type\s+\w+\s*=\s*(?:["'].*["']\s*\|?\s*)+/.test(trimmed) ||
|
|
918
|
+
/^\s*\|\s*["']/.test(trimmed));
|
|
919
|
+
});
|
|
920
|
+
if (allEnumOrUnion) {
|
|
921
|
+
// Require that the file actually contains an enum, type, or class declaration.
|
|
922
|
+
// Without this, bare variable assignments like `password = "admin123"`
|
|
923
|
+
// would incorrectly match the `WORD = "word"` enum-member pattern above.
|
|
924
|
+
const hasEnumTypeContext = lines.some((l) => /^\s*(?:export\s+)?enum\s+\w+/.test(l.trim()) ||
|
|
925
|
+
/^\s*(?:export\s+)?type\s+\w+\s*=/.test(l.trim()) ||
|
|
926
|
+
/^\s*class\s+\w+/.test(l.trim()));
|
|
927
|
+
if (hasEnumTypeContext) {
|
|
928
|
+
const titleAndDesc = `${finding.title} ${finding.description}`;
|
|
929
|
+
const hasSecurityKeyword = /\bdelete\b|\bexec\b|\bpassword\b|\bsecret\b|\btoken\b|\bdrop\b|\bkill\b|\broot\b|\badmin\b/i.test(titleAndDesc);
|
|
930
|
+
if (hasSecurityKeyword) {
|
|
931
|
+
return "Security keyword appears in an enum/union type definition — inert value, not a dangerous operation.";
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
// ── 21. Log/error message strings with security keywords are informational ──
|
|
937
|
+
// Findings triggered by keywords like "password", "token", "secret" inside
|
|
938
|
+
// logging statements (logger.error("Failed to validate password")) are FPs —
|
|
939
|
+
// the log describes the operation, it doesn't leak the actual credential.
|
|
940
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
941
|
+
const titleAndDesc = `${finding.title} ${finding.description}`;
|
|
942
|
+
const hasCredentialKeyword = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b/i.test(titleAndDesc);
|
|
943
|
+
if (hasCredentialKeyword) {
|
|
944
|
+
// Don't suppress findings that are specifically ABOUT credential logging —
|
|
945
|
+
// those findings flag the log line itself as the problem (e.g. LOGPRIV-001).
|
|
946
|
+
const isAboutLogging = /\blog(?:ged|ging|s|file)?\b/i.test(titleAndDesc) || /^LOG|LOGPRIV/i.test(finding.ruleId);
|
|
947
|
+
if (!isAboutLogging) {
|
|
948
|
+
const allLogLines = finding.lineNumbers.every((ln) => {
|
|
949
|
+
const line = lines[ln - 1];
|
|
950
|
+
if (!line)
|
|
951
|
+
return false;
|
|
952
|
+
return /(?:logger|log|console|logging)\s*\.\s*(?:error|warn|warning|info|debug|critical|fatal|log)\s*\(/i.test(line);
|
|
953
|
+
});
|
|
954
|
+
if (allLogLines) {
|
|
955
|
+
return "Security keyword appears inside a logging statement — describes the operation, not a credential leak.";
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
// ── 22. Typed parameter/property declarations with security keywords ──
|
|
961
|
+
// When a security keyword (password, token, secret, credential) appears as
|
|
962
|
+
// a typed parameter name (e.g. `password: string`, `String secret`), it's
|
|
963
|
+
// a declaration describing the input's purpose, not a hardcoded credential.
|
|
964
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
965
|
+
const titleAndDesc22 = `${finding.title} ${finding.description}`;
|
|
966
|
+
const hasCredentialKw22 = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b/i.test(titleAndDesc22);
|
|
967
|
+
if (hasCredentialKw22) {
|
|
968
|
+
// Don't suppress findings specifically about credential LEAKAGE or LOGGING
|
|
969
|
+
const isAboutExposure22 = /\b(?:leak|expos|log(?:ged|ging)?|print|display|transmit|send)\b/i.test(titleAndDesc22) ||
|
|
970
|
+
/^LOG|LOGPRIV/i.test(finding.ruleId);
|
|
971
|
+
if (!isAboutExposure22) {
|
|
972
|
+
const allTypedDeclarations = finding.lineNumbers.every((ln) => {
|
|
973
|
+
const line = lines[ln - 1];
|
|
974
|
+
if (!line)
|
|
975
|
+
return false;
|
|
976
|
+
// TS/Python/Rust typed parameter: `password: string`, `token?: str`
|
|
977
|
+
return (/\b(?:password|secret|token|credential)\b\s*[?!]?\s*:\s*(?:str|string|String|number|int|Integer|boolean|bool|Boolean|any|object|Buffer|bytes|SecureString)\b/i.test(line) ||
|
|
978
|
+
// Java/C# style: `String password`, `SecureString credential`
|
|
979
|
+
/\b(?:String|int|Integer|boolean|char|SecureString|byte\[\])\s+(?:password|secret|token|credential)\b/i.test(line));
|
|
980
|
+
});
|
|
981
|
+
if (allTypedDeclarations) {
|
|
982
|
+
return "Security keyword is a typed parameter/property name — declaration, not a hardcoded credential.";
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
// ── 23. Throw/raise error message strings with security keywords ──
|
|
988
|
+
// throw new Error("Invalid password format") or raise ValueError("Bad token")
|
|
989
|
+
// contain security keywords in a descriptive error message, not a credential
|
|
990
|
+
// leak. Only suppresses static string messages (no variable interpolation).
|
|
991
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
992
|
+
const titleAndDesc23 = `${finding.title} ${finding.description}`;
|
|
993
|
+
const hasCredentialKw23 = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b/i.test(titleAndDesc23);
|
|
994
|
+
if (hasCredentialKw23) {
|
|
995
|
+
const isAboutExposure23 = /\blog(?:ged|ging|s)?\b|LOGPRIV|^LOG-|expos|leak/i.test(titleAndDesc23) || /^LOG|LOGPRIV/i.test(finding.ruleId);
|
|
996
|
+
if (!isAboutExposure23) {
|
|
997
|
+
const allThrowLines = finding.lineNumbers.every((ln) => {
|
|
998
|
+
const line = lines[ln - 1];
|
|
999
|
+
if (!line)
|
|
1000
|
+
return false;
|
|
1001
|
+
// throw new Error("...") / raise ValueError("...") with static string arg
|
|
1002
|
+
return /(?:throw\s+new\s+\w*(?:Error|Exception|Fault)|raise\s+\w*(?:Error|Exception|Warning))\s*\(\s*["'`]/i.test(line);
|
|
1003
|
+
});
|
|
1004
|
+
if (allThrowLines) {
|
|
1005
|
+
return "Security keyword appears in an error/exception message — describes the error, not a credential leak.";
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
}
|
|
1010
|
+
// ── 24. Regex pattern literals containing security keywords ──
|
|
1011
|
+
// Validation patterns like /password|secret|token/ or re.compile(r"password")
|
|
1012
|
+
// contain security keywords as detection/matching targets, not credential values.
|
|
1013
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
1014
|
+
const titleAndDesc24 = `${finding.title} ${finding.description}`;
|
|
1015
|
+
const hasSecurityKw24 = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b|\bexec\b|\bdelete\b/i.test(titleAndDesc24);
|
|
1016
|
+
if (hasSecurityKw24) {
|
|
1017
|
+
const allRegexLines = finding.lineNumbers.every((ln) => {
|
|
1018
|
+
const line = lines[ln - 1];
|
|
1019
|
+
if (!line)
|
|
1020
|
+
return false;
|
|
1021
|
+
// JS regex literal: /...keyword.../flags
|
|
1022
|
+
const hasJsRegex = /\/[^/]*\b(?:password|secret|token|credential|exec|delete)\b[^/]*\/[gimsuy]*/.test(line);
|
|
1023
|
+
// Python re.compile / re.search / re.match / re.findall
|
|
1024
|
+
// Java Pattern.compile / new RegExp
|
|
1025
|
+
const hasCompiledRegex = /(?:re\.(?:compile|search|match|findall|sub)|Pattern\.compile|new\s+RegExp)\s*\(/i.test(line);
|
|
1026
|
+
return hasJsRegex || hasCompiledRegex;
|
|
1027
|
+
});
|
|
1028
|
+
if (allRegexLines) {
|
|
1029
|
+
return "Security keyword appears inside a regex pattern — used for matching/validation, not credential handling.";
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
// ── 25. Config/schema object keys with non-credential values ──
|
|
1034
|
+
// When a security keyword appears as an object/dict key and the assigned
|
|
1035
|
+
// value is a boolean, null, a schema type descriptor, or an ORM field
|
|
1036
|
+
// definition, the line defines field metadata — not a hardcoded credential.
|
|
1037
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
1038
|
+
const titleAndDesc25 = `${finding.title} ${finding.description}`;
|
|
1039
|
+
const hasCredentialKw25 = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b/i.test(titleAndDesc25);
|
|
1040
|
+
if (hasCredentialKw25) {
|
|
1041
|
+
const allConfigKeys = finding.lineNumbers.every((ln) => {
|
|
1042
|
+
const line = lines[ln - 1];
|
|
1043
|
+
if (!line)
|
|
1044
|
+
return false;
|
|
1045
|
+
// Object/dict key followed by non-credential value:
|
|
1046
|
+
// password: true, token: false, secret: null, credential: undefined
|
|
1047
|
+
// "password": { type: "string" }, token: Column(...), secret: Field(...)
|
|
1048
|
+
return /["']?(?:password|secret|token|credential)["']?\s*[:=]\s*(?:true\b|false\b|null\b|undefined\b|None\b|required\b|optional\b|{\s*["']?(?:type|required|default|min|max|enum|validate|format|description)\b|(?:Column|Field|models\.)\s*\()/i.test(line);
|
|
1049
|
+
});
|
|
1050
|
+
if (allConfigKeys) {
|
|
1051
|
+
return "Security keyword is a config/schema object key — describes field structure, not a hardcoded credential.";
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
// ── 26. Assignment from function call / config lookup ──
|
|
1056
|
+
// When a security keyword is assigned the return value of a function call
|
|
1057
|
+
// or config/env lookup (e.g., password = getPassword(), token = config.get("token")),
|
|
1058
|
+
// the value comes from runtime, not hardcoded in source.
|
|
1059
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
1060
|
+
const titleAndDesc26 = `${finding.title} ${finding.description}`;
|
|
1061
|
+
const hasCredentialKw26 = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b/i.test(titleAndDesc26);
|
|
1062
|
+
const isHardcodedFinding26 = /hardcoded|hard.?coded|plaintext|plain.?text/i.test(titleAndDesc26);
|
|
1063
|
+
if (hasCredentialKw26 && isHardcodedFinding26) {
|
|
1064
|
+
const allFunctionCalls = finding.lineNumbers.every((ln) => {
|
|
1065
|
+
const line = lines[ln - 1];
|
|
1066
|
+
if (!line)
|
|
1067
|
+
return false;
|
|
1068
|
+
// keyword = someFunction(...) or keyword = obj.method(...)
|
|
1069
|
+
// keyword = process.env.KEY or keyword = os.environ[...]
|
|
1070
|
+
return /\b(?:password|secret|token|credential)\b\s*=\s*(?:\w+[\w.]*\s*\(|process\.env\b|os\.environ)/i.test(line);
|
|
1071
|
+
});
|
|
1072
|
+
if (allFunctionCalls) {
|
|
1073
|
+
return "Value is assigned from a function call or config lookup — not hardcoded in source.";
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
// ── 28. IaC compile-time property resolution suppresses REL null-check findings ──
|
|
1078
|
+
// Bicep/ARM/Terraform resolves resource property references at deployment
|
|
1079
|
+
// time, not at runtime. Deep property access like vnet.properties.subnets[0].id
|
|
1080
|
+
// is compile-time safe — null checks and optional chaining are inapplicable.
|
|
1081
|
+
if (isIaC && /^REL-/.test(finding.ruleId)) {
|
|
1082
|
+
const titleLower = finding.title.toLowerCase();
|
|
1083
|
+
if (titleLower.includes("null") ||
|
|
1084
|
+
titleLower.includes("optional chain") ||
|
|
1085
|
+
titleLower.includes("property access") ||
|
|
1086
|
+
titleLower.includes("deep property") ||
|
|
1087
|
+
titleLower.includes("undefined")) {
|
|
1088
|
+
return "IaC resource property references are resolved at deploy time — null checks are inapplicable.";
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
// ── 29. IaC domain-convention numbers suppress MAINT magic-number findings ──
|
|
1092
|
+
// IaC templates use well-known numeric conventions: NSG priorities (100–4096),
|
|
1093
|
+
// CIDR prefix lengths, port numbers, regulatory retention periods (365), and
|
|
1094
|
+
// protocol-standard values. These are domain conventions, not arbitrary magic numbers.
|
|
1095
|
+
if (isIaC && /^MAINT-/.test(finding.ruleId)) {
|
|
1096
|
+
const titleLower = finding.title.toLowerCase();
|
|
1097
|
+
if (titleLower.includes("magic number") ||
|
|
1098
|
+
titleLower.includes("magic value") ||
|
|
1099
|
+
titleLower.includes("numeric literal")) {
|
|
1100
|
+
return "Numeric values in IaC templates are domain conventions (priorities, ports, retention periods) — not arbitrary magic numbers.";
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
// ── 30. Schema-mandated nesting depth suppresses MAINT deep-nesting on IaC ──
|
|
1104
|
+
// ARM/Bicep/Terraform resource schemas enforce hierarchical property nesting
|
|
1105
|
+
// (resource → properties → subnets[] → properties → addressPrefix) that
|
|
1106
|
+
// cannot be flattened without breaking the schema.
|
|
1107
|
+
if (isIaC && /^MAINT-/.test(finding.ruleId)) {
|
|
1108
|
+
const titleLower = finding.title.toLowerCase();
|
|
1109
|
+
if (titleLower.includes("nested") ||
|
|
1110
|
+
titleLower.includes("nesting") ||
|
|
1111
|
+
titleLower.includes("depth") ||
|
|
1112
|
+
titleLower.includes("indentation")) {
|
|
1113
|
+
return "Nesting depth in IaC templates is mandated by the resource schema — it cannot be flattened.";
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
// ── 31. IaC schema enum values suppress MAINT duplicate-string findings ──
|
|
1117
|
+
// ARM/Terraform templates repeat schema-constrained enum values ('Tcp', 'Allow',
|
|
1118
|
+
// 'Deny', 'Inbound', 'Outbound') and consistent tag keys across resources.
|
|
1119
|
+
// These are schema-required repetitions, not extractable constants.
|
|
1120
|
+
if (isIaC && /^MAINT-/.test(finding.ruleId)) {
|
|
1121
|
+
const titleLower = finding.title.toLowerCase();
|
|
1122
|
+
if ((titleLower.includes("duplicate") && titleLower.includes("string")) ||
|
|
1123
|
+
titleLower.includes("repeated string") ||
|
|
1124
|
+
titleLower.includes("extract to constant")) {
|
|
1125
|
+
return "Repeated strings in IaC templates are schema-constrained enum values or consistent tag keys — not extractable constants.";
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
// ── 32. Azure Bastion documented-requirement suppresses IAC Internet-HTTPS ──
|
|
1129
|
+
// Azure Bastion requires inbound HTTPS (443) from 'Internet' / '*' per
|
|
1130
|
+
// Microsoft documentation. When the NSG rule is scoped to a Bastion subnet
|
|
1131
|
+
// and compensating controls are documented, the finding is an accepted risk.
|
|
1132
|
+
if (isIaC && /^IAC-/.test(finding.ruleId)) {
|
|
1133
|
+
const titleLower = finding.title.toLowerCase();
|
|
1134
|
+
if ((titleLower.includes("bastion") || titleLower.includes("internet")) &&
|
|
1135
|
+
(titleLower.includes("https") || titleLower.includes("443") || titleLower.includes("inbound"))) {
|
|
1136
|
+
const fullCode = lines.join("\n");
|
|
1137
|
+
const hasBastionSubnet = /bastion/i.test(fullCode);
|
|
1138
|
+
const hasCompensatingControl = /compensat|conditional\s*access|AAD|Entra|MFA|multi.?factor|audit/i.test(fullCode);
|
|
1139
|
+
if (hasBastionSubnet && hasCompensatingControl) {
|
|
1140
|
+
return "Azure Bastion requires inbound HTTPS from Internet per Microsoft documentation — compensating controls are documented.";
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
// ── 33. Destructuring variable extraction suppresses credential findings ──
|
|
1145
|
+
// When a security keyword appears in a destructuring pattern, the code is
|
|
1146
|
+
// extracting a named field from a runtime object (request body, config, etc.),
|
|
1147
|
+
// not declaring a hardcoded credential.
|
|
1148
|
+
// e.g., `const { password, email } = req.body;`
|
|
1149
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
1150
|
+
const titleAndDesc33 = `${finding.title} ${finding.description}`;
|
|
1151
|
+
const hasCredentialKw33 = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b/i.test(titleAndDesc33);
|
|
1152
|
+
const isHardcodedFinding33 = /hardcoded|hard.?coded/i.test(titleAndDesc33);
|
|
1153
|
+
if (hasCredentialKw33 && isHardcodedFinding33) {
|
|
1154
|
+
const allDestructuring = finding.lineNumbers.every((ln) => {
|
|
1155
|
+
const line = lines[ln - 1];
|
|
1156
|
+
if (!line)
|
|
1157
|
+
return false;
|
|
1158
|
+
// JS/TS object destructuring: const { password, ... } = expr
|
|
1159
|
+
// Python tuple unpacking: password, email = get_credentials()
|
|
1160
|
+
return (/(?:const|let|var|final)\s*\{[^}]*\b(?:password|secret|token|credential)\b[^}]*\}\s*=/.test(line) ||
|
|
1161
|
+
/\(\s*\{[^}]*\b(?:password|secret|token|credential)\b[^}]*\}\s*[):,]/.test(line) ||
|
|
1162
|
+
/^\s*\b(?:password|secret|token|credential)\b\s*,\s*\w+\s*=\s*\w+/.test(line));
|
|
1163
|
+
});
|
|
1164
|
+
if (allDestructuring) {
|
|
1165
|
+
return "Security keyword is a destructured variable name — extracted from runtime data, not hardcoded.";
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
// ── 34. Dictionary/map key access suppresses credential findings ──
|
|
1170
|
+
// When a security keyword appears as a dictionary/map key being accessed,
|
|
1171
|
+
// the code is reading a field by name from a runtime data structure.
|
|
1172
|
+
// e.g., `data["password"]`, `request.form.get("token")`, `params[:secret]`
|
|
1173
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
1174
|
+
const titleAndDesc34 = `${finding.title} ${finding.description}`;
|
|
1175
|
+
const hasCredentialKw34 = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b/i.test(titleAndDesc34);
|
|
1176
|
+
const isHardcodedFinding34 = /hardcoded|hard.?coded/i.test(titleAndDesc34);
|
|
1177
|
+
if (hasCredentialKw34 && isHardcodedFinding34) {
|
|
1178
|
+
// Don't suppress findings about credential logging/leakage
|
|
1179
|
+
const isAboutExposure34 = /\b(?:leak|expos|log(?:ged|ging)?|print|display|transmit|send)\b/i.test(titleAndDesc34) ||
|
|
1180
|
+
/^LOG|LOGPRIV/i.test(finding.ruleId);
|
|
1181
|
+
if (!isAboutExposure34) {
|
|
1182
|
+
const allDictAccess = finding.lineNumbers.every((ln) => {
|
|
1183
|
+
const line = lines[ln - 1];
|
|
1184
|
+
if (!line)
|
|
1185
|
+
return false;
|
|
1186
|
+
// obj["password"], obj['token'], data.get("secret"), request.form["credential"]
|
|
1187
|
+
return (/\w\s*\[\s*["'](?:password|secret|token|credential)["']\s*\]/.test(line) ||
|
|
1188
|
+
/\w\s*\.\s*(?:get|pop|setdefault|fetch|read)\s*\(\s*["'](?:password|secret|token|credential)["']/.test(line));
|
|
1189
|
+
});
|
|
1190
|
+
if (allDictAccess) {
|
|
1191
|
+
return "Security keyword is a dictionary/map key — reading a named field from runtime data, not a hardcoded credential.";
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
// ── 35. CLI argument/option definitions suppress credential findings ──
|
|
1197
|
+
// When a security keyword appears in a CLI argument parser definition,
|
|
1198
|
+
// it names a CLI option, not a hardcoded credential.
|
|
1199
|
+
// e.g., `parser.add_argument("--password")`, `.option("--token")`
|
|
1200
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
1201
|
+
const titleAndDesc35 = `${finding.title} ${finding.description}`;
|
|
1202
|
+
const hasCredentialKw35 = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b/i.test(titleAndDesc35);
|
|
1203
|
+
if (hasCredentialKw35) {
|
|
1204
|
+
const allCliDefs = finding.lineNumbers.every((ln) => {
|
|
1205
|
+
const line = lines[ln - 1];
|
|
1206
|
+
if (!line)
|
|
1207
|
+
return false;
|
|
1208
|
+
// Python argparse: add_argument("--password", ...)
|
|
1209
|
+
// Python click: @click.option("--token", ...)
|
|
1210
|
+
// Node commander: .option("--secret <value>", ...)
|
|
1211
|
+
// Node yargs: .option("password", { ... })
|
|
1212
|
+
return (/add_argument\s*\(\s*["']--?(?:password|secret|token|credential)["']/.test(line) ||
|
|
1213
|
+
/@click\.(?:option|argument)\s*\(\s*["']--?(?:password|secret|token|credential)["']/.test(line) ||
|
|
1214
|
+
/\.option\s*\(\s*["'][^"']*-{1,2}(?:password|secret|token|credential)\b/.test(line) ||
|
|
1215
|
+
/\.(?:option|positional)\s*\(\s*["'](?:password|secret|token|credential)["']\s*,/.test(line));
|
|
1216
|
+
});
|
|
1217
|
+
if (allCliDefs) {
|
|
1218
|
+
return "Security keyword is a CLI argument/option name — defines a command-line parameter, not a hardcoded credential.";
|
|
1219
|
+
}
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
// ── 27. String comparison / switch-case dispatch with security keywords ──
|
|
1223
|
+
// When a security keyword appears as a string value in a comparison operator
|
|
1224
|
+
// (=== / ==), switch-case label, or inclusion check (.includes()), the code
|
|
1225
|
+
// is dispatching by field name, not handling a credential.
|
|
1226
|
+
if (finding.lineNumbers && finding.lineNumbers.length > 0) {
|
|
1227
|
+
const titleAndDesc27 = `${finding.title} ${finding.description}`;
|
|
1228
|
+
const hasCredentialKw27 = /\bpassword\b|\bsecret\b|\btoken\b|\bcredential\b/i.test(titleAndDesc27);
|
|
1229
|
+
if (hasCredentialKw27) {
|
|
1230
|
+
const allComparisonDispatch = finding.lineNumbers.every((ln) => {
|
|
1231
|
+
const line = lines[ln - 1];
|
|
1232
|
+
if (!line)
|
|
1233
|
+
return false;
|
|
1234
|
+
return (/\bcase\s+["'](?:password|secret|token|credential)["']\s*:/i.test(line) ||
|
|
1235
|
+
/(?:===?|!==?)\s*["'](?:password|secret|token|credential)["']/i.test(line) ||
|
|
1236
|
+
/["'](?:password|secret|token|credential)["']\s*(?:===?|!==?)/i.test(line) ||
|
|
1237
|
+
/\.includes\s*\(\s*["'](?:password|secret|token|credential)["']/i.test(line) ||
|
|
1238
|
+
/\bin\s+[[(].*["'](?:password|secret|token|credential)["']/i.test(line));
|
|
1239
|
+
});
|
|
1240
|
+
if (allComparisonDispatch) {
|
|
1241
|
+
return "Security keyword is a string value in a comparison/dispatch — routing by field name, not credential handling.";
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
return null;
|
|
1246
|
+
}
|