@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.
Files changed (1745) hide show
  1. package/README.md +24 -0
  2. package/agents/accessibility.judge.md +44 -0
  3. package/agents/agent-instructions.judge.md +44 -0
  4. package/agents/ai-code-safety.judge.md +55 -0
  5. package/agents/api-contract.judge.md +37 -0
  6. package/agents/api-design.judge.md +55 -0
  7. package/agents/authentication.judge.md +61 -0
  8. package/agents/backwards-compatibility.judge.md +44 -0
  9. package/agents/caching.judge.md +44 -0
  10. package/agents/ci-cd.judge.md +44 -0
  11. package/agents/cloud-readiness.judge.md +51 -0
  12. package/agents/code-structure.judge.md +48 -0
  13. package/agents/compliance.judge.md +47 -0
  14. package/agents/concurrency.judge.md +46 -0
  15. package/agents/configuration-management.judge.md +44 -0
  16. package/agents/cost-effectiveness.judge.md +40 -0
  17. package/agents/cybersecurity.judge.md +61 -0
  18. package/agents/data-security.judge.md +48 -0
  19. package/agents/data-sovereignty.judge.md +58 -0
  20. package/agents/database.judge.md +49 -0
  21. package/agents/dependency-health.judge.md +46 -0
  22. package/agents/documentation.judge.md +53 -0
  23. package/agents/error-handling.judge.md +53 -0
  24. package/agents/ethics-bias.judge.md +46 -0
  25. package/agents/false-positive-review.judge.md +85 -0
  26. package/agents/framework-safety.judge.md +47 -0
  27. package/agents/hallucination-detection.judge.md +46 -0
  28. package/agents/iac-security.judge.md +45 -0
  29. package/agents/intent-alignment.judge.md +44 -0
  30. package/agents/internationalization.judge.md +42 -0
  31. package/agents/logging-privacy.judge.md +44 -0
  32. package/agents/logic-review.judge.md +34 -0
  33. package/agents/maintainability.judge.md +44 -0
  34. package/agents/model-fingerprint.judge.md +31 -0
  35. package/agents/multi-turn-coherence.judge.md +36 -0
  36. package/agents/observability.judge.md +52 -0
  37. package/agents/over-engineering.judge.md +48 -0
  38. package/agents/performance.judge.md +44 -0
  39. package/agents/portability.judge.md +44 -0
  40. package/agents/rate-limiting.judge.md +53 -0
  41. package/agents/reliability.judge.md +55 -0
  42. package/agents/scalability.judge.md +50 -0
  43. package/agents/security.judge.md +62 -0
  44. package/agents/software-practices.judge.md +54 -0
  45. package/agents/testing.judge.md +52 -0
  46. package/agents/ux.judge.md +44 -0
  47. package/bin/judges.js +8 -0
  48. package/dist/a2a-protocol.d.ts +136 -0
  49. package/dist/a2a-protocol.js +218 -0
  50. package/dist/agent-loader.d.ts +107 -0
  51. package/dist/agent-loader.js +260 -0
  52. package/dist/api.d.ts +169 -0
  53. package/dist/api.js +195 -0
  54. package/dist/ast/cross-file-taint.d.ts +42 -0
  55. package/dist/ast/cross-file-taint.js +679 -0
  56. package/dist/ast/index.d.ts +25 -0
  57. package/dist/ast/index.js +148 -0
  58. package/dist/ast/structural-parser.d.ts +2 -0
  59. package/dist/ast/structural-parser.js +756 -0
  60. package/dist/ast/taint-tracker.d.ts +48 -0
  61. package/dist/ast/taint-tracker.js +1033 -0
  62. package/dist/ast/tree-sitter-ast.d.ts +33 -0
  63. package/dist/ast/tree-sitter-ast.js +1164 -0
  64. package/dist/ast/types.d.ts +50 -0
  65. package/dist/ast/types.js +7 -0
  66. package/dist/audit-trail.d.ts +245 -0
  67. package/dist/audit-trail.js +257 -0
  68. package/dist/auto-tune.d.ts +146 -0
  69. package/dist/auto-tune.js +373 -0
  70. package/dist/cache.d.ts +53 -0
  71. package/dist/cache.js +86 -0
  72. package/dist/calibration.d.ts +108 -0
  73. package/dist/calibration.js +219 -0
  74. package/dist/cli-dispatch.d.ts +7 -0
  75. package/dist/cli-dispatch.js +654 -0
  76. package/dist/cli-formatters.d.ts +6 -0
  77. package/dist/cli-formatters.js +186 -0
  78. package/dist/cli-helpers.d.ts +29 -0
  79. package/dist/cli-helpers.js +129 -0
  80. package/dist/cli.d.ts +30 -0
  81. package/dist/cli.js +1487 -0
  82. package/dist/commands/adoption-report.d.ts +7 -0
  83. package/dist/commands/adoption-report.js +218 -0
  84. package/dist/commands/adoption-track.d.ts +4 -0
  85. package/dist/commands/adoption-track.js +246 -0
  86. package/dist/commands/ai-gate.d.ts +7 -0
  87. package/dist/commands/ai-gate.js +212 -0
  88. package/dist/commands/ai-model-trust.d.ts +16 -0
  89. package/dist/commands/ai-model-trust.js +234 -0
  90. package/dist/commands/ai-output-compare.d.ts +8 -0
  91. package/dist/commands/ai-output-compare.js +202 -0
  92. package/dist/commands/ai-pattern-trend.d.ts +8 -0
  93. package/dist/commands/ai-pattern-trend.js +223 -0
  94. package/dist/commands/ai-prompt-audit.d.ts +22 -0
  95. package/dist/commands/ai-prompt-audit.js +254 -0
  96. package/dist/commands/ai-provenance.d.ts +4 -0
  97. package/dist/commands/ai-provenance.js +247 -0
  98. package/dist/commands/api-audit.d.ts +8 -0
  99. package/dist/commands/api-audit.js +359 -0
  100. package/dist/commands/api-misuse.d.ts +4 -0
  101. package/dist/commands/api-misuse.js +260 -0
  102. package/dist/commands/api-versioning-audit.d.ts +5 -0
  103. package/dist/commands/api-versioning-audit.js +233 -0
  104. package/dist/commands/approve-chain.d.ts +7 -0
  105. package/dist/commands/approve-chain.js +234 -0
  106. package/dist/commands/arch-audit.d.ts +8 -0
  107. package/dist/commands/arch-audit.js +283 -0
  108. package/dist/commands/assertion-density.d.ts +4 -0
  109. package/dist/commands/assertion-density.js +263 -0
  110. package/dist/commands/assign-findings.d.ts +36 -0
  111. package/dist/commands/assign-findings.js +177 -0
  112. package/dist/commands/async-safety.d.ts +4 -0
  113. package/dist/commands/async-safety.js +266 -0
  114. package/dist/commands/audit-bundle.d.ts +28 -0
  115. package/dist/commands/audit-bundle.js +234 -0
  116. package/dist/commands/audit-trail.d.ts +17 -0
  117. package/dist/commands/audit-trail.js +154 -0
  118. package/dist/commands/auto-approve.d.ts +4 -0
  119. package/dist/commands/auto-approve.js +188 -0
  120. package/dist/commands/auto-calibrate.d.ts +14 -0
  121. package/dist/commands/auto-calibrate.js +106 -0
  122. package/dist/commands/auto-detect.d.ts +61 -0
  123. package/dist/commands/auto-detect.js +328 -0
  124. package/dist/commands/auto-fix.d.ts +17 -0
  125. package/dist/commands/auto-fix.js +240 -0
  126. package/dist/commands/auto-triage.d.ts +31 -0
  127. package/dist/commands/auto-triage.js +125 -0
  128. package/dist/commands/baseline.d.ts +47 -0
  129. package/dist/commands/baseline.js +353 -0
  130. package/dist/commands/batch-review.d.ts +4 -0
  131. package/dist/commands/batch-review.js +180 -0
  132. package/dist/commands/benchmark-advanced.d.ts +14 -0
  133. package/dist/commands/benchmark-advanced.js +5057 -0
  134. package/dist/commands/benchmark-ai-agents.d.ts +8 -0
  135. package/dist/commands/benchmark-ai-agents.js +4123 -0
  136. package/dist/commands/benchmark-ai-output.d.ts +9 -0
  137. package/dist/commands/benchmark-ai-output.js +365 -0
  138. package/dist/commands/benchmark-compliance-ethics.d.ts +8 -0
  139. package/dist/commands/benchmark-compliance-ethics.js +3060 -0
  140. package/dist/commands/benchmark-expanded-2.d.ts +12 -0
  141. package/dist/commands/benchmark-expanded-2.js +5530 -0
  142. package/dist/commands/benchmark-expanded.d.ts +12 -0
  143. package/dist/commands/benchmark-expanded.js +2599 -0
  144. package/dist/commands/benchmark-infrastructure.d.ts +8 -0
  145. package/dist/commands/benchmark-infrastructure.js +2882 -0
  146. package/dist/commands/benchmark-languages.d.ts +8 -0
  147. package/dist/commands/benchmark-languages.js +1963 -0
  148. package/dist/commands/benchmark-quality-ops.d.ts +8 -0
  149. package/dist/commands/benchmark-quality-ops.js +3415 -0
  150. package/dist/commands/benchmark-security-deep.d.ts +9 -0
  151. package/dist/commands/benchmark-security-deep.js +2335 -0
  152. package/dist/commands/benchmark.d.ts +233 -0
  153. package/dist/commands/benchmark.js +3214 -0
  154. package/dist/commands/blame-review.d.ts +4 -0
  155. package/dist/commands/blame-review.js +266 -0
  156. package/dist/commands/boundary-enforce.d.ts +5 -0
  157. package/dist/commands/boundary-enforce.js +255 -0
  158. package/dist/commands/build-optimize.d.ts +6 -0
  159. package/dist/commands/build-optimize.js +256 -0
  160. package/dist/commands/burndown.d.ts +26 -0
  161. package/dist/commands/burndown.js +179 -0
  162. package/dist/commands/cache-audit.d.ts +4 -0
  163. package/dist/commands/cache-audit.js +219 -0
  164. package/dist/commands/calibration-dashboard.d.ts +1 -0
  165. package/dist/commands/calibration-dashboard.js +294 -0
  166. package/dist/commands/calibration-share.d.ts +30 -0
  167. package/dist/commands/calibration-share.js +182 -0
  168. package/dist/commands/chat-notify.d.ts +8 -0
  169. package/dist/commands/chat-notify.js +258 -0
  170. package/dist/commands/ci-template.d.ts +14 -0
  171. package/dist/commands/ci-template.js +211 -0
  172. package/dist/commands/ci-templates.d.ts +9 -0
  173. package/dist/commands/ci-templates.js +89 -0
  174. package/dist/commands/clarity-score.d.ts +8 -0
  175. package/dist/commands/clarity-score.js +260 -0
  176. package/dist/commands/clone-detect.d.ts +4 -0
  177. package/dist/commands/clone-detect.js +232 -0
  178. package/dist/commands/coach-mode.d.ts +7 -0
  179. package/dist/commands/coach-mode.js +229 -0
  180. package/dist/commands/code-health.d.ts +4 -0
  181. package/dist/commands/code-health.js +195 -0
  182. package/dist/commands/code-owner-suggest.d.ts +16 -0
  183. package/dist/commands/code-owner-suggest.js +214 -0
  184. package/dist/commands/code-similarity.d.ts +8 -0
  185. package/dist/commands/code-similarity.js +231 -0
  186. package/dist/commands/comment-drift.d.ts +4 -0
  187. package/dist/commands/comment-drift.js +228 -0
  188. package/dist/commands/commit-hygiene.d.ts +5 -0
  189. package/dist/commands/commit-hygiene.js +175 -0
  190. package/dist/commands/community-patterns.d.ts +1 -0
  191. package/dist/commands/community-patterns.js +131 -0
  192. package/dist/commands/compare-runs.d.ts +37 -0
  193. package/dist/commands/compare-runs.js +228 -0
  194. package/dist/commands/completion-audit.d.ts +4 -0
  195. package/dist/commands/completion-audit.js +296 -0
  196. package/dist/commands/completions.d.ts +1 -0
  197. package/dist/commands/completions.js +257 -0
  198. package/dist/commands/compliance-map.d.ts +8 -0
  199. package/dist/commands/compliance-map.js +374 -0
  200. package/dist/commands/compliance-report.d.ts +34 -0
  201. package/dist/commands/compliance-report.js +161 -0
  202. package/dist/commands/compliance-weight.d.ts +8 -0
  203. package/dist/commands/compliance-weight.js +272 -0
  204. package/dist/commands/config-drift.d.ts +24 -0
  205. package/dist/commands/config-drift.js +213 -0
  206. package/dist/commands/config-lint.d.ts +4 -0
  207. package/dist/commands/config-lint.js +187 -0
  208. package/dist/commands/config-migrate.d.ts +43 -0
  209. package/dist/commands/config-migrate.js +240 -0
  210. package/dist/commands/config-share.d.ts +95 -0
  211. package/dist/commands/config-share.js +406 -0
  212. package/dist/commands/context-blind.d.ts +4 -0
  213. package/dist/commands/context-blind.js +272 -0
  214. package/dist/commands/context-inject.d.ts +8 -0
  215. package/dist/commands/context-inject.js +211 -0
  216. package/dist/commands/contract-verify.d.ts +4 -0
  217. package/dist/commands/contract-verify.js +316 -0
  218. package/dist/commands/correlate.d.ts +27 -0
  219. package/dist/commands/correlate.js +241 -0
  220. package/dist/commands/cost-forecast.d.ts +18 -0
  221. package/dist/commands/cost-forecast.js +193 -0
  222. package/dist/commands/coverage-map.d.ts +22 -0
  223. package/dist/commands/coverage-map.js +222 -0
  224. package/dist/commands/coverage.d.ts +40 -0
  225. package/dist/commands/coverage.js +147 -0
  226. package/dist/commands/cross-file-consistency.d.ts +4 -0
  227. package/dist/commands/cross-file-consistency.js +254 -0
  228. package/dist/commands/cross-pr-regression.d.ts +8 -0
  229. package/dist/commands/cross-pr-regression.js +297 -0
  230. package/dist/commands/custom-rule.d.ts +4 -0
  231. package/dist/commands/custom-rule.js +210 -0
  232. package/dist/commands/dead-code-detect.d.ts +4 -0
  233. package/dist/commands/dead-code-detect.js +255 -0
  234. package/dist/commands/dedup-report.d.ts +12 -0
  235. package/dist/commands/dedup-report.js +137 -0
  236. package/dist/commands/dep-audit.d.ts +52 -0
  237. package/dist/commands/dep-audit.js +277 -0
  238. package/dist/commands/dep-correlate.d.ts +8 -0
  239. package/dist/commands/dep-correlate.js +207 -0
  240. package/dist/commands/deploy-readiness.d.ts +5 -0
  241. package/dist/commands/deploy-readiness.js +211 -0
  242. package/dist/commands/deprecated.d.ts +47 -0
  243. package/dist/commands/deprecated.js +201 -0
  244. package/dist/commands/deps.d.ts +5 -0
  245. package/dist/commands/deps.js +122 -0
  246. package/dist/commands/design-audit.d.ts +8 -0
  247. package/dist/commands/design-audit.js +301 -0
  248. package/dist/commands/dev-score.d.ts +36 -0
  249. package/dist/commands/dev-score.js +203 -0
  250. package/dist/commands/diff-explain.d.ts +4 -0
  251. package/dist/commands/diff-explain.js +142 -0
  252. package/dist/commands/diff-only.d.ts +33 -0
  253. package/dist/commands/diff-only.js +151 -0
  254. package/dist/commands/diff-review.d.ts +4 -0
  255. package/dist/commands/diff-review.js +190 -0
  256. package/dist/commands/diff.d.ts +6 -0
  257. package/dist/commands/diff.js +449 -0
  258. package/dist/commands/digest.d.ts +19 -0
  259. package/dist/commands/digest.js +221 -0
  260. package/dist/commands/doc-drift.d.ts +8 -0
  261. package/dist/commands/doc-drift.js +258 -0
  262. package/dist/commands/doc-gen.d.ts +7 -0
  263. package/dist/commands/doc-gen.js +208 -0
  264. package/dist/commands/docs.d.ts +1 -0
  265. package/dist/commands/docs.js +156 -0
  266. package/dist/commands/doctor.d.ts +55 -0
  267. package/dist/commands/doctor.js +362 -0
  268. package/dist/commands/encoding-safety.d.ts +4 -0
  269. package/dist/commands/encoding-safety.js +275 -0
  270. package/dist/commands/error-taxonomy.d.ts +5 -0
  271. package/dist/commands/error-taxonomy.js +226 -0
  272. package/dist/commands/error-ux.d.ts +4 -0
  273. package/dist/commands/error-ux.js +252 -0
  274. package/dist/commands/event-leak.d.ts +4 -0
  275. package/dist/commands/event-leak.js +262 -0
  276. package/dist/commands/evidence-chain.d.ts +4 -0
  277. package/dist/commands/evidence-chain.js +309 -0
  278. package/dist/commands/example-leak.d.ts +4 -0
  279. package/dist/commands/example-leak.js +232 -0
  280. package/dist/commands/exception-consistency.d.ts +6 -0
  281. package/dist/commands/exception-consistency.js +192 -0
  282. package/dist/commands/exec-report.d.ts +8 -0
  283. package/dist/commands/exec-report.js +271 -0
  284. package/dist/commands/explain-finding.d.ts +7 -0
  285. package/dist/commands/explain-finding.js +278 -0
  286. package/dist/commands/false-negatives.d.ts +34 -0
  287. package/dist/commands/false-negatives.js +165 -0
  288. package/dist/commands/feedback-rules.d.ts +28 -0
  289. package/dist/commands/feedback-rules.js +173 -0
  290. package/dist/commands/feedback.d.ts +182 -0
  291. package/dist/commands/feedback.js +550 -0
  292. package/dist/commands/finding-age-analysis.d.ts +4 -0
  293. package/dist/commands/finding-age-analysis.js +144 -0
  294. package/dist/commands/finding-age-report.d.ts +4 -0
  295. package/dist/commands/finding-age-report.js +154 -0
  296. package/dist/commands/finding-age-tracker.d.ts +7 -0
  297. package/dist/commands/finding-age-tracker.js +152 -0
  298. package/dist/commands/finding-age.d.ts +4 -0
  299. package/dist/commands/finding-age.js +145 -0
  300. package/dist/commands/finding-ancestry-trace.d.ts +1 -0
  301. package/dist/commands/finding-ancestry-trace.js +69 -0
  302. package/dist/commands/finding-annotation-export.d.ts +1 -0
  303. package/dist/commands/finding-annotation-export.js +97 -0
  304. package/dist/commands/finding-annotation-layer.d.ts +4 -0
  305. package/dist/commands/finding-annotation-layer.js +128 -0
  306. package/dist/commands/finding-auto-categorize.d.ts +1 -0
  307. package/dist/commands/finding-auto-categorize.js +109 -0
  308. package/dist/commands/finding-auto-fix-suggest.d.ts +1 -0
  309. package/dist/commands/finding-auto-fix-suggest.js +76 -0
  310. package/dist/commands/finding-auto-fix.d.ts +4 -0
  311. package/dist/commands/finding-auto-fix.js +188 -0
  312. package/dist/commands/finding-auto-group.d.ts +4 -0
  313. package/dist/commands/finding-auto-group.js +108 -0
  314. package/dist/commands/finding-auto-label.d.ts +4 -0
  315. package/dist/commands/finding-auto-label.js +220 -0
  316. package/dist/commands/finding-auto-priority.d.ts +1 -0
  317. package/dist/commands/finding-auto-priority.js +100 -0
  318. package/dist/commands/finding-auto-suppress.d.ts +4 -0
  319. package/dist/commands/finding-auto-suppress.js +126 -0
  320. package/dist/commands/finding-auto-tag.d.ts +4 -0
  321. package/dist/commands/finding-auto-tag.js +113 -0
  322. package/dist/commands/finding-auto-triage.d.ts +4 -0
  323. package/dist/commands/finding-auto-triage.js +108 -0
  324. package/dist/commands/finding-autofix-preview.d.ts +4 -0
  325. package/dist/commands/finding-autofix-preview.js +86 -0
  326. package/dist/commands/finding-batch-resolve.d.ts +4 -0
  327. package/dist/commands/finding-batch-resolve.js +165 -0
  328. package/dist/commands/finding-batch-suppress.d.ts +4 -0
  329. package/dist/commands/finding-batch-suppress.js +85 -0
  330. package/dist/commands/finding-batch-triage.d.ts +1 -0
  331. package/dist/commands/finding-batch-triage.js +90 -0
  332. package/dist/commands/finding-blast-radius.d.ts +4 -0
  333. package/dist/commands/finding-blast-radius.js +91 -0
  334. package/dist/commands/finding-budget.d.ts +4 -0
  335. package/dist/commands/finding-budget.js +232 -0
  336. package/dist/commands/finding-category-map.d.ts +4 -0
  337. package/dist/commands/finding-category-map.js +103 -0
  338. package/dist/commands/finding-category-stats.d.ts +4 -0
  339. package/dist/commands/finding-category-stats.js +104 -0
  340. package/dist/commands/finding-category.d.ts +4 -0
  341. package/dist/commands/finding-category.js +109 -0
  342. package/dist/commands/finding-change-impact.d.ts +4 -0
  343. package/dist/commands/finding-change-impact.js +107 -0
  344. package/dist/commands/finding-cluster-analysis.d.ts +4 -0
  345. package/dist/commands/finding-cluster-analysis.js +133 -0
  346. package/dist/commands/finding-cluster-group.d.ts +4 -0
  347. package/dist/commands/finding-cluster-group.js +105 -0
  348. package/dist/commands/finding-cluster-summary.d.ts +1 -0
  349. package/dist/commands/finding-cluster-summary.js +85 -0
  350. package/dist/commands/finding-cluster.d.ts +4 -0
  351. package/dist/commands/finding-cluster.js +157 -0
  352. package/dist/commands/finding-code-context.d.ts +4 -0
  353. package/dist/commands/finding-code-context.js +96 -0
  354. package/dist/commands/finding-code-smell.d.ts +4 -0
  355. package/dist/commands/finding-code-smell.js +113 -0
  356. package/dist/commands/finding-compare-runs.d.ts +4 -0
  357. package/dist/commands/finding-compare-runs.js +105 -0
  358. package/dist/commands/finding-compliance-tag.d.ts +1 -0
  359. package/dist/commands/finding-compliance-tag.js +106 -0
  360. package/dist/commands/finding-confidence-boost.d.ts +1 -0
  361. package/dist/commands/finding-confidence-boost.js +88 -0
  362. package/dist/commands/finding-confidence-calibrate.d.ts +4 -0
  363. package/dist/commands/finding-confidence-calibrate.js +111 -0
  364. package/dist/commands/finding-confidence-filter.d.ts +4 -0
  365. package/dist/commands/finding-confidence-filter.js +77 -0
  366. package/dist/commands/finding-contest.d.ts +7 -0
  367. package/dist/commands/finding-contest.js +192 -0
  368. package/dist/commands/finding-context-enrich.d.ts +4 -0
  369. package/dist/commands/finding-context-enrich.js +89 -0
  370. package/dist/commands/finding-context-expand.d.ts +4 -0
  371. package/dist/commands/finding-context-expand.js +102 -0
  372. package/dist/commands/finding-context-link.d.ts +1 -0
  373. package/dist/commands/finding-context-link.js +94 -0
  374. package/dist/commands/finding-context-summary.d.ts +1 -0
  375. package/dist/commands/finding-context-summary.js +85 -0
  376. package/dist/commands/finding-context-window.d.ts +4 -0
  377. package/dist/commands/finding-context-window.js +126 -0
  378. package/dist/commands/finding-context.d.ts +4 -0
  379. package/dist/commands/finding-context.js +140 -0
  380. package/dist/commands/finding-correlate.d.ts +4 -0
  381. package/dist/commands/finding-correlate.js +88 -0
  382. package/dist/commands/finding-correlation-map.d.ts +4 -0
  383. package/dist/commands/finding-correlation-map.js +101 -0
  384. package/dist/commands/finding-correlation.d.ts +4 -0
  385. package/dist/commands/finding-correlation.js +103 -0
  386. package/dist/commands/finding-cross-file-link.d.ts +1 -0
  387. package/dist/commands/finding-cross-file-link.js +101 -0
  388. package/dist/commands/finding-cross-ref.d.ts +4 -0
  389. package/dist/commands/finding-cross-ref.js +98 -0
  390. package/dist/commands/finding-cve-lookup.d.ts +4 -0
  391. package/dist/commands/finding-cve-lookup.js +97 -0
  392. package/dist/commands/finding-cwe-lookup.d.ts +4 -0
  393. package/dist/commands/finding-cwe-lookup.js +148 -0
  394. package/dist/commands/finding-cwe-map.d.ts +4 -0
  395. package/dist/commands/finding-cwe-map.js +133 -0
  396. package/dist/commands/finding-dedup-cross-file.d.ts +4 -0
  397. package/dist/commands/finding-dedup-cross-file.js +95 -0
  398. package/dist/commands/finding-dedup-cross.d.ts +4 -0
  399. package/dist/commands/finding-dedup-cross.js +90 -0
  400. package/dist/commands/finding-dedup-merge.d.ts +1 -0
  401. package/dist/commands/finding-dedup-merge.js +107 -0
  402. package/dist/commands/finding-dedup-report.d.ts +4 -0
  403. package/dist/commands/finding-dedup-report.js +101 -0
  404. package/dist/commands/finding-dedup-smart.d.ts +1 -0
  405. package/dist/commands/finding-dedup-smart.js +109 -0
  406. package/dist/commands/finding-deduplicate.d.ts +4 -0
  407. package/dist/commands/finding-deduplicate.js +141 -0
  408. package/dist/commands/finding-dependency-check.d.ts +4 -0
  409. package/dist/commands/finding-dependency-check.js +119 -0
  410. package/dist/commands/finding-dependency-impact.d.ts +1 -0
  411. package/dist/commands/finding-dependency-impact.js +97 -0
  412. package/dist/commands/finding-dependency-link.d.ts +4 -0
  413. package/dist/commands/finding-dependency-link.js +73 -0
  414. package/dist/commands/finding-dependency-risk.d.ts +4 -0
  415. package/dist/commands/finding-dependency-risk.js +117 -0
  416. package/dist/commands/finding-dependency-tree.d.ts +4 -0
  417. package/dist/commands/finding-dependency-tree.js +116 -0
  418. package/dist/commands/finding-diff-highlight.d.ts +4 -0
  419. package/dist/commands/finding-diff-highlight.js +107 -0
  420. package/dist/commands/finding-dismiss-workflow.d.ts +4 -0
  421. package/dist/commands/finding-dismiss-workflow.js +119 -0
  422. package/dist/commands/finding-duplicate-detect.d.ts +4 -0
  423. package/dist/commands/finding-duplicate-detect.js +113 -0
  424. package/dist/commands/finding-duplicate-rule.d.ts +4 -0
  425. package/dist/commands/finding-duplicate-rule.js +103 -0
  426. package/dist/commands/finding-effort-rank.d.ts +1 -0
  427. package/dist/commands/finding-effort-rank.js +93 -0
  428. package/dist/commands/finding-evidence-chain.d.ts +4 -0
  429. package/dist/commands/finding-evidence-chain.js +147 -0
  430. package/dist/commands/finding-evidence-collect.d.ts +4 -0
  431. package/dist/commands/finding-evidence-collect.js +114 -0
  432. package/dist/commands/finding-explain.d.ts +4 -0
  433. package/dist/commands/finding-explain.js +93 -0
  434. package/dist/commands/finding-export-csv.d.ts +4 -0
  435. package/dist/commands/finding-export-csv.js +78 -0
  436. package/dist/commands/finding-false-neg-check.d.ts +8 -0
  437. package/dist/commands/finding-false-neg-check.js +139 -0
  438. package/dist/commands/finding-false-positive-learn.d.ts +4 -0
  439. package/dist/commands/finding-false-positive-learn.js +85 -0
  440. package/dist/commands/finding-false-positive-log.d.ts +4 -0
  441. package/dist/commands/finding-false-positive-log.js +150 -0
  442. package/dist/commands/finding-false-positive.d.ts +4 -0
  443. package/dist/commands/finding-false-positive.js +134 -0
  444. package/dist/commands/finding-filter-view.d.ts +4 -0
  445. package/dist/commands/finding-filter-view.js +107 -0
  446. package/dist/commands/finding-fix-chain.d.ts +1 -0
  447. package/dist/commands/finding-fix-chain.js +78 -0
  448. package/dist/commands/finding-fix-estimate.d.ts +1 -0
  449. package/dist/commands/finding-fix-estimate.js +95 -0
  450. package/dist/commands/finding-fix-playbook.d.ts +1 -0
  451. package/dist/commands/finding-fix-playbook.js +110 -0
  452. package/dist/commands/finding-fix-priority.d.ts +4 -0
  453. package/dist/commands/finding-fix-priority.js +98 -0
  454. package/dist/commands/finding-fix-rate.d.ts +4 -0
  455. package/dist/commands/finding-fix-rate.js +141 -0
  456. package/dist/commands/finding-fix-suggest.d.ts +4 -0
  457. package/dist/commands/finding-fix-suggest.js +88 -0
  458. package/dist/commands/finding-fix-validation.d.ts +4 -0
  459. package/dist/commands/finding-fix-validation.js +115 -0
  460. package/dist/commands/finding-fix-verify.d.ts +4 -0
  461. package/dist/commands/finding-fix-verify.js +198 -0
  462. package/dist/commands/finding-group-by.d.ts +4 -0
  463. package/dist/commands/finding-group-by.js +86 -0
  464. package/dist/commands/finding-group.d.ts +15 -0
  465. package/dist/commands/finding-group.js +164 -0
  466. package/dist/commands/finding-groupby-file.d.ts +4 -0
  467. package/dist/commands/finding-groupby-file.js +94 -0
  468. package/dist/commands/finding-hotfix-suggest.d.ts +7 -0
  469. package/dist/commands/finding-hotfix-suggest.js +170 -0
  470. package/dist/commands/finding-hotspot-detect.d.ts +1 -0
  471. package/dist/commands/finding-hotspot-detect.js +120 -0
  472. package/dist/commands/finding-hotspot-map.d.ts +4 -0
  473. package/dist/commands/finding-hotspot-map.js +106 -0
  474. package/dist/commands/finding-hotspot.d.ts +4 -0
  475. package/dist/commands/finding-hotspot.js +115 -0
  476. package/dist/commands/finding-impact-radius.d.ts +1 -0
  477. package/dist/commands/finding-impact-radius.js +94 -0
  478. package/dist/commands/finding-impact-rank.d.ts +4 -0
  479. package/dist/commands/finding-impact-rank.js +85 -0
  480. package/dist/commands/finding-impact-score.d.ts +4 -0
  481. package/dist/commands/finding-impact-score.js +123 -0
  482. package/dist/commands/finding-impact.d.ts +4 -0
  483. package/dist/commands/finding-impact.js +135 -0
  484. package/dist/commands/finding-line-blame.d.ts +7 -0
  485. package/dist/commands/finding-line-blame.js +129 -0
  486. package/dist/commands/finding-link-graph.d.ts +4 -0
  487. package/dist/commands/finding-link-graph.js +144 -0
  488. package/dist/commands/finding-link.d.ts +4 -0
  489. package/dist/commands/finding-link.js +128 -0
  490. package/dist/commands/finding-merge-results.d.ts +4 -0
  491. package/dist/commands/finding-merge-results.js +110 -0
  492. package/dist/commands/finding-merge-strategy.d.ts +1 -0
  493. package/dist/commands/finding-merge-strategy.js +84 -0
  494. package/dist/commands/finding-metadata-enrich.d.ts +4 -0
  495. package/dist/commands/finding-metadata-enrich.js +92 -0
  496. package/dist/commands/finding-noise-filter.d.ts +7 -0
  497. package/dist/commands/finding-noise-filter.js +140 -0
  498. package/dist/commands/finding-noise-reduce.d.ts +1 -0
  499. package/dist/commands/finding-noise-reduce.js +81 -0
  500. package/dist/commands/finding-noise-score.d.ts +1 -0
  501. package/dist/commands/finding-noise-score.js +93 -0
  502. package/dist/commands/finding-owner-assign.d.ts +4 -0
  503. package/dist/commands/finding-owner-assign.js +133 -0
  504. package/dist/commands/finding-owner-notify.d.ts +1 -0
  505. package/dist/commands/finding-owner-notify.js +121 -0
  506. package/dist/commands/finding-ownership-assign.d.ts +4 -0
  507. package/dist/commands/finding-ownership-assign.js +101 -0
  508. package/dist/commands/finding-ownership-map.d.ts +4 -0
  509. package/dist/commands/finding-ownership-map.js +118 -0
  510. package/dist/commands/finding-patch-chain.d.ts +1 -0
  511. package/dist/commands/finding-patch-chain.js +90 -0
  512. package/dist/commands/finding-patch-preview.d.ts +4 -0
  513. package/dist/commands/finding-patch-preview.js +103 -0
  514. package/dist/commands/finding-pattern-detect.d.ts +4 -0
  515. package/dist/commands/finding-pattern-detect.js +127 -0
  516. package/dist/commands/finding-pattern-library.d.ts +4 -0
  517. package/dist/commands/finding-pattern-library.js +145 -0
  518. package/dist/commands/finding-pattern-match.d.ts +4 -0
  519. package/dist/commands/finding-pattern-match.js +165 -0
  520. package/dist/commands/finding-prioritize.d.ts +4 -0
  521. package/dist/commands/finding-prioritize.js +119 -0
  522. package/dist/commands/finding-priority-matrix.d.ts +4 -0
  523. package/dist/commands/finding-priority-matrix.js +102 -0
  524. package/dist/commands/finding-priority-queue.d.ts +4 -0
  525. package/dist/commands/finding-priority-queue.js +131 -0
  526. package/dist/commands/finding-priority-rank.d.ts +1 -0
  527. package/dist/commands/finding-priority-rank.js +82 -0
  528. package/dist/commands/finding-quality-gate.d.ts +4 -0
  529. package/dist/commands/finding-quality-gate.js +107 -0
  530. package/dist/commands/finding-rank.d.ts +4 -0
  531. package/dist/commands/finding-rank.js +138 -0
  532. package/dist/commands/finding-reachability-check.d.ts +4 -0
  533. package/dist/commands/finding-reachability-check.js +102 -0
  534. package/dist/commands/finding-reachability.d.ts +4 -0
  535. package/dist/commands/finding-reachability.js +131 -0
  536. package/dist/commands/finding-recurrence-check.d.ts +1 -0
  537. package/dist/commands/finding-recurrence-check.js +103 -0
  538. package/dist/commands/finding-recurrence-detect.d.ts +4 -0
  539. package/dist/commands/finding-recurrence-detect.js +77 -0
  540. package/dist/commands/finding-recurrence.d.ts +4 -0
  541. package/dist/commands/finding-recurrence.js +135 -0
  542. package/dist/commands/finding-regression-check.d.ts +4 -0
  543. package/dist/commands/finding-regression-check.js +112 -0
  544. package/dist/commands/finding-regression-detect.d.ts +1 -0
  545. package/dist/commands/finding-regression-detect.js +86 -0
  546. package/dist/commands/finding-related-rules.d.ts +4 -0
  547. package/dist/commands/finding-related-rules.js +151 -0
  548. package/dist/commands/finding-remediation-cost.d.ts +1 -0
  549. package/dist/commands/finding-remediation-cost.js +79 -0
  550. package/dist/commands/finding-remediation-plan.d.ts +4 -0
  551. package/dist/commands/finding-remediation-plan.js +107 -0
  552. package/dist/commands/finding-reopen-detect.d.ts +1 -0
  553. package/dist/commands/finding-reopen-detect.js +77 -0
  554. package/dist/commands/finding-repeat-detect.d.ts +1 -0
  555. package/dist/commands/finding-repeat-detect.js +92 -0
  556. package/dist/commands/finding-resolution-track.d.ts +4 -0
  557. package/dist/commands/finding-resolution-track.js +150 -0
  558. package/dist/commands/finding-resolution-tracker.d.ts +4 -0
  559. package/dist/commands/finding-resolution-tracker.js +163 -0
  560. package/dist/commands/finding-resolution-workflow.d.ts +1 -0
  561. package/dist/commands/finding-resolution-workflow.js +91 -0
  562. package/dist/commands/finding-resolution.d.ts +4 -0
  563. package/dist/commands/finding-resolution.js +142 -0
  564. package/dist/commands/finding-risk-label.d.ts +1 -0
  565. package/dist/commands/finding-risk-label.js +72 -0
  566. package/dist/commands/finding-risk-matrix.d.ts +4 -0
  567. package/dist/commands/finding-risk-matrix.js +126 -0
  568. package/dist/commands/finding-risk-score.d.ts +4 -0
  569. package/dist/commands/finding-risk-score.js +95 -0
  570. package/dist/commands/finding-root-cause.d.ts +4 -0
  571. package/dist/commands/finding-root-cause.js +184 -0
  572. package/dist/commands/finding-rule-explain.d.ts +4 -0
  573. package/dist/commands/finding-rule-explain.js +140 -0
  574. package/dist/commands/finding-scope-filter.d.ts +1 -0
  575. package/dist/commands/finding-scope-filter.js +77 -0
  576. package/dist/commands/finding-scope-impact.d.ts +1 -0
  577. package/dist/commands/finding-scope-impact.js +83 -0
  578. package/dist/commands/finding-search-index.d.ts +4 -0
  579. package/dist/commands/finding-search-index.js +99 -0
  580. package/dist/commands/finding-security-hotspot.d.ts +4 -0
  581. package/dist/commands/finding-security-hotspot.js +175 -0
  582. package/dist/commands/finding-severity-dist.d.ts +4 -0
  583. package/dist/commands/finding-severity-dist.js +105 -0
  584. package/dist/commands/finding-severity-drift.d.ts +4 -0
  585. package/dist/commands/finding-severity-drift.js +92 -0
  586. package/dist/commands/finding-severity-heatmap.d.ts +4 -0
  587. package/dist/commands/finding-severity-heatmap.js +108 -0
  588. package/dist/commands/finding-severity-histogram.d.ts +4 -0
  589. package/dist/commands/finding-severity-histogram.js +66 -0
  590. package/dist/commands/finding-severity-override.d.ts +4 -0
  591. package/dist/commands/finding-severity-override.js +131 -0
  592. package/dist/commands/finding-severity-rebalance.d.ts +1 -0
  593. package/dist/commands/finding-severity-rebalance.js +108 -0
  594. package/dist/commands/finding-severity-trend.d.ts +4 -0
  595. package/dist/commands/finding-severity-trend.js +127 -0
  596. package/dist/commands/finding-similar-match.d.ts +1 -0
  597. package/dist/commands/finding-similar-match.js +112 -0
  598. package/dist/commands/finding-snippet.d.ts +4 -0
  599. package/dist/commands/finding-snippet.js +102 -0
  600. package/dist/commands/finding-summary-digest.d.ts +7 -0
  601. package/dist/commands/finding-summary-digest.js +145 -0
  602. package/dist/commands/finding-suppress-pattern.d.ts +4 -0
  603. package/dist/commands/finding-suppress-pattern.js +148 -0
  604. package/dist/commands/finding-suppress.d.ts +4 -0
  605. package/dist/commands/finding-suppress.js +164 -0
  606. package/dist/commands/finding-suppression-audit.d.ts +4 -0
  607. package/dist/commands/finding-suppression-audit.js +137 -0
  608. package/dist/commands/finding-suppression-list.d.ts +4 -0
  609. package/dist/commands/finding-suppression-list.js +119 -0
  610. package/dist/commands/finding-suppression-log.d.ts +4 -0
  611. package/dist/commands/finding-suppression-log.js +174 -0
  612. package/dist/commands/finding-time-to-fix.d.ts +1 -0
  613. package/dist/commands/finding-time-to-fix.js +98 -0
  614. package/dist/commands/finding-timeline-view.d.ts +4 -0
  615. package/dist/commands/finding-timeline-view.js +98 -0
  616. package/dist/commands/finding-timeline.d.ts +4 -0
  617. package/dist/commands/finding-timeline.js +143 -0
  618. package/dist/commands/finding-top-offender.d.ts +1 -0
  619. package/dist/commands/finding-top-offender.js +75 -0
  620. package/dist/commands/finding-trace.d.ts +4 -0
  621. package/dist/commands/finding-trace.js +118 -0
  622. package/dist/commands/finding-trend-alert.d.ts +1 -0
  623. package/dist/commands/finding-trend-alert.js +126 -0
  624. package/dist/commands/finding-trend-analysis.d.ts +4 -0
  625. package/dist/commands/finding-trend-analysis.js +95 -0
  626. package/dist/commands/finding-trend-forecast.d.ts +4 -0
  627. package/dist/commands/finding-trend-forecast.js +106 -0
  628. package/dist/commands/finding-trend-report.d.ts +4 -0
  629. package/dist/commands/finding-trend-report.js +107 -0
  630. package/dist/commands/finding-trend.d.ts +4 -0
  631. package/dist/commands/finding-trend.js +118 -0
  632. package/dist/commands/fix-pr.d.ts +22 -0
  633. package/dist/commands/fix-pr.js +286 -0
  634. package/dist/commands/fix-suggest.d.ts +4 -0
  635. package/dist/commands/fix-suggest.js +171 -0
  636. package/dist/commands/fix-verify.d.ts +4 -0
  637. package/dist/commands/fix-verify.js +123 -0
  638. package/dist/commands/fix.d.ts +117 -0
  639. package/dist/commands/fix.js +445 -0
  640. package/dist/commands/focus-area.d.ts +5 -0
  641. package/dist/commands/focus-area.js +192 -0
  642. package/dist/commands/generate.d.ts +7 -0
  643. package/dist/commands/generate.js +403 -0
  644. package/dist/commands/governance.d.ts +31 -0
  645. package/dist/commands/governance.js +202 -0
  646. package/dist/commands/group-findings.d.ts +22 -0
  647. package/dist/commands/group-findings.js +154 -0
  648. package/dist/commands/guided-tour.d.ts +8 -0
  649. package/dist/commands/guided-tour.js +287 -0
  650. package/dist/commands/habit-tracker.d.ts +7 -0
  651. package/dist/commands/habit-tracker.js +194 -0
  652. package/dist/commands/hallucination-detect.d.ts +4 -0
  653. package/dist/commands/hallucination-detect.js +350 -0
  654. package/dist/commands/hallucination-score.d.ts +8 -0
  655. package/dist/commands/hallucination-score.js +316 -0
  656. package/dist/commands/help.d.ts +7 -0
  657. package/dist/commands/help.js +302 -0
  658. package/dist/commands/hook-install.d.ts +21 -0
  659. package/dist/commands/hook-install.js +142 -0
  660. package/dist/commands/hook.d.ts +8 -0
  661. package/dist/commands/hook.js +145 -0
  662. package/dist/commands/iac-lint.d.ts +7 -0
  663. package/dist/commands/iac-lint.js +312 -0
  664. package/dist/commands/idempotency-audit.d.ts +4 -0
  665. package/dist/commands/idempotency-audit.js +222 -0
  666. package/dist/commands/ignore-list.d.ts +18 -0
  667. package/dist/commands/ignore-list.js +152 -0
  668. package/dist/commands/impact-scan.d.ts +8 -0
  669. package/dist/commands/impact-scan.js +281 -0
  670. package/dist/commands/incident-response.d.ts +7 -0
  671. package/dist/commands/incident-response.js +254 -0
  672. package/dist/commands/incremental-review.d.ts +4 -0
  673. package/dist/commands/incremental-review.js +236 -0
  674. package/dist/commands/init.d.ts +10 -0
  675. package/dist/commands/init.js +265 -0
  676. package/dist/commands/input-guard.d.ts +4 -0
  677. package/dist/commands/input-guard.js +255 -0
  678. package/dist/commands/interactive-fix.d.ts +22 -0
  679. package/dist/commands/interactive-fix.js +139 -0
  680. package/dist/commands/judge-author.d.ts +7 -0
  681. package/dist/commands/judge-author.js +260 -0
  682. package/dist/commands/judge-config.d.ts +4 -0
  683. package/dist/commands/judge-config.js +151 -0
  684. package/dist/commands/judge-learn.d.ts +8 -0
  685. package/dist/commands/judge-learn.js +217 -0
  686. package/dist/commands/judge-reputation.d.ts +28 -0
  687. package/dist/commands/judge-reputation.js +198 -0
  688. package/dist/commands/kb.d.ts +40 -0
  689. package/dist/commands/kb.js +228 -0
  690. package/dist/commands/language-packs.d.ts +42 -0
  691. package/dist/commands/language-packs.js +150 -0
  692. package/dist/commands/learn.d.ts +26 -0
  693. package/dist/commands/learn.js +288 -0
  694. package/dist/commands/learning-path.d.ts +8 -0
  695. package/dist/commands/learning-path.js +325 -0
  696. package/dist/commands/license-scan.d.ts +8 -0
  697. package/dist/commands/license-scan.js +183 -0
  698. package/dist/commands/llm-benchmark-optimizer.d.ts +78 -0
  699. package/dist/commands/llm-benchmark-optimizer.js +241 -0
  700. package/dist/commands/llm-benchmark.d.ts +156 -0
  701. package/dist/commands/llm-benchmark.js +670 -0
  702. package/dist/commands/log-quality.d.ts +5 -0
  703. package/dist/commands/log-quality.js +211 -0
  704. package/dist/commands/logic-lint.d.ts +4 -0
  705. package/dist/commands/logic-lint.js +255 -0
  706. package/dist/commands/lsp.d.ts +23 -0
  707. package/dist/commands/lsp.js +285 -0
  708. package/dist/commands/merge-verdict.d.ts +4 -0
  709. package/dist/commands/merge-verdict.js +287 -0
  710. package/dist/commands/metrics-dashboard.d.ts +21 -0
  711. package/dist/commands/metrics-dashboard.js +334 -0
  712. package/dist/commands/metrics.d.ts +57 -0
  713. package/dist/commands/metrics.js +241 -0
  714. package/dist/commands/migration-safety.d.ts +5 -0
  715. package/dist/commands/migration-safety.js +256 -0
  716. package/dist/commands/model-report.d.ts +8 -0
  717. package/dist/commands/model-report.js +194 -0
  718. package/dist/commands/model-risk.d.ts +27 -0
  719. package/dist/commands/model-risk.js +220 -0
  720. package/dist/commands/monorepo.d.ts +37 -0
  721. package/dist/commands/monorepo.js +232 -0
  722. package/dist/commands/multi-lang-review.d.ts +4 -0
  723. package/dist/commands/multi-lang-review.js +230 -0
  724. package/dist/commands/noise-advisor.d.ts +29 -0
  725. package/dist/commands/noise-advisor.js +170 -0
  726. package/dist/commands/notify.d.ts +78 -0
  727. package/dist/commands/notify.js +324 -0
  728. package/dist/commands/null-safety-audit.d.ts +5 -0
  729. package/dist/commands/null-safety-audit.js +221 -0
  730. package/dist/commands/observability-gap.d.ts +5 -0
  731. package/dist/commands/observability-gap.js +211 -0
  732. package/dist/commands/onboard.d.ts +12 -0
  733. package/dist/commands/onboard.js +178 -0
  734. package/dist/commands/org-metrics.d.ts +23 -0
  735. package/dist/commands/org-metrics.js +237 -0
  736. package/dist/commands/org-policy.d.ts +7 -0
  737. package/dist/commands/org-policy.js +207 -0
  738. package/dist/commands/over-abstraction.d.ts +4 -0
  739. package/dist/commands/over-abstraction.js +307 -0
  740. package/dist/commands/override.d.ts +61 -0
  741. package/dist/commands/override.js +268 -0
  742. package/dist/commands/ownership-map.d.ts +5 -0
  743. package/dist/commands/ownership-map.js +217 -0
  744. package/dist/commands/parity.d.ts +30 -0
  745. package/dist/commands/parity.js +212 -0
  746. package/dist/commands/pattern-registry.d.ts +22 -0
  747. package/dist/commands/pattern-registry.js +226 -0
  748. package/dist/commands/perf-compare.d.ts +8 -0
  749. package/dist/commands/perf-compare.js +245 -0
  750. package/dist/commands/perf-hotspot.d.ts +7 -0
  751. package/dist/commands/perf-hotspot.js +273 -0
  752. package/dist/commands/phantom-import.d.ts +4 -0
  753. package/dist/commands/phantom-import.js +260 -0
  754. package/dist/commands/pii-scan.d.ts +7 -0
  755. package/dist/commands/pii-scan.js +299 -0
  756. package/dist/commands/plugin-search.d.ts +39 -0
  757. package/dist/commands/plugin-search.js +327 -0
  758. package/dist/commands/plugins.d.ts +12 -0
  759. package/dist/commands/plugins.js +104 -0
  760. package/dist/commands/policy-audit.d.ts +52 -0
  761. package/dist/commands/policy-audit.js +160 -0
  762. package/dist/commands/pr-quality-gate.d.ts +28 -0
  763. package/dist/commands/pr-quality-gate.js +207 -0
  764. package/dist/commands/pr-summary.d.ts +25 -0
  765. package/dist/commands/pr-summary.js +187 -0
  766. package/dist/commands/predict.d.ts +7 -0
  767. package/dist/commands/predict.js +218 -0
  768. package/dist/commands/privilege-path.d.ts +4 -0
  769. package/dist/commands/privilege-path.js +233 -0
  770. package/dist/commands/profile.d.ts +37 -0
  771. package/dist/commands/profile.js +101 -0
  772. package/dist/commands/prompt-replay.d.ts +7 -0
  773. package/dist/commands/prompt-replay.js +176 -0
  774. package/dist/commands/quality-gate.d.ts +69 -0
  775. package/dist/commands/quality-gate.js +252 -0
  776. package/dist/commands/query.d.ts +19 -0
  777. package/dist/commands/query.js +229 -0
  778. package/dist/commands/quick-check.d.ts +4 -0
  779. package/dist/commands/quick-check.js +173 -0
  780. package/dist/commands/recommend.d.ts +20 -0
  781. package/dist/commands/recommend.js +282 -0
  782. package/dist/commands/refactor-safety.d.ts +8 -0
  783. package/dist/commands/refactor-safety.js +273 -0
  784. package/dist/commands/reg-watch.d.ts +20 -0
  785. package/dist/commands/reg-watch.js +219 -0
  786. package/dist/commands/regression-alert.d.ts +31 -0
  787. package/dist/commands/regression-alert.js +215 -0
  788. package/dist/commands/remediation-lib.d.ts +8 -0
  789. package/dist/commands/remediation-lib.js +265 -0
  790. package/dist/commands/remediation.d.ts +20 -0
  791. package/dist/commands/remediation.js +256 -0
  792. package/dist/commands/report-template.d.ts +16 -0
  793. package/dist/commands/report-template.js +290 -0
  794. package/dist/commands/report.d.ts +12 -0
  795. package/dist/commands/report.js +139 -0
  796. package/dist/commands/resource-cleanup.d.ts +6 -0
  797. package/dist/commands/resource-cleanup.js +235 -0
  798. package/dist/commands/retro.d.ts +22 -0
  799. package/dist/commands/retro.js +211 -0
  800. package/dist/commands/retry-pattern-audit.d.ts +5 -0
  801. package/dist/commands/retry-pattern-audit.js +215 -0
  802. package/dist/commands/review-ab-test.d.ts +4 -0
  803. package/dist/commands/review-ab-test.js +224 -0
  804. package/dist/commands/review-access-log.d.ts +4 -0
  805. package/dist/commands/review-access-log.js +65 -0
  806. package/dist/commands/review-action-item-gen.d.ts +1 -0
  807. package/dist/commands/review-action-item-gen.js +72 -0
  808. package/dist/commands/review-adoption-metrics.d.ts +4 -0
  809. package/dist/commands/review-adoption-metrics.js +95 -0
  810. package/dist/commands/review-adoption-score.d.ts +1 -0
  811. package/dist/commands/review-adoption-score.js +181 -0
  812. package/dist/commands/review-ai-feedback-loop.d.ts +1 -0
  813. package/dist/commands/review-ai-feedback-loop.js +116 -0
  814. package/dist/commands/review-annotate.d.ts +4 -0
  815. package/dist/commands/review-annotate.js +122 -0
  816. package/dist/commands/review-annotation-export.d.ts +4 -0
  817. package/dist/commands/review-annotation-export.js +105 -0
  818. package/dist/commands/review-annotation.d.ts +4 -0
  819. package/dist/commands/review-annotation.js +133 -0
  820. package/dist/commands/review-api-export.d.ts +4 -0
  821. package/dist/commands/review-api-export.js +98 -0
  822. package/dist/commands/review-approval-criteria.d.ts +1 -0
  823. package/dist/commands/review-approval-criteria.js +99 -0
  824. package/dist/commands/review-approval-gate.d.ts +7 -0
  825. package/dist/commands/review-approval-gate.js +190 -0
  826. package/dist/commands/review-approval.d.ts +4 -0
  827. package/dist/commands/review-approval.js +133 -0
  828. package/dist/commands/review-archive-search.d.ts +4 -0
  829. package/dist/commands/review-archive-search.js +70 -0
  830. package/dist/commands/review-archive.d.ts +4 -0
  831. package/dist/commands/review-archive.js +135 -0
  832. package/dist/commands/review-audit-export.d.ts +4 -0
  833. package/dist/commands/review-audit-export.js +93 -0
  834. package/dist/commands/review-audit-log.d.ts +4 -0
  835. package/dist/commands/review-audit-log.js +140 -0
  836. package/dist/commands/review-audit-trail.d.ts +4 -0
  837. package/dist/commands/review-audit-trail.js +96 -0
  838. package/dist/commands/review-auto-merge.d.ts +4 -0
  839. package/dist/commands/review-auto-merge.js +175 -0
  840. package/dist/commands/review-badge.d.ts +4 -0
  841. package/dist/commands/review-badge.js +152 -0
  842. package/dist/commands/review-batch-files.d.ts +4 -0
  843. package/dist/commands/review-batch-files.js +82 -0
  844. package/dist/commands/review-batch-mode.d.ts +4 -0
  845. package/dist/commands/review-batch-mode.js +97 -0
  846. package/dist/commands/review-batch-run.d.ts +4 -0
  847. package/dist/commands/review-batch-run.js +149 -0
  848. package/dist/commands/review-benchmark-self.d.ts +4 -0
  849. package/dist/commands/review-benchmark-self.js +140 -0
  850. package/dist/commands/review-blame-map.d.ts +4 -0
  851. package/dist/commands/review-blame-map.js +100 -0
  852. package/dist/commands/review-branch-compare.d.ts +4 -0
  853. package/dist/commands/review-branch-compare.js +108 -0
  854. package/dist/commands/review-branch-policy.d.ts +4 -0
  855. package/dist/commands/review-branch-policy.js +102 -0
  856. package/dist/commands/review-bulk-action.d.ts +4 -0
  857. package/dist/commands/review-bulk-action.js +109 -0
  858. package/dist/commands/review-bulk-apply.d.ts +4 -0
  859. package/dist/commands/review-bulk-apply.js +102 -0
  860. package/dist/commands/review-cache-clear.d.ts +4 -0
  861. package/dist/commands/review-cache-clear.js +160 -0
  862. package/dist/commands/review-cache-warm.d.ts +4 -0
  863. package/dist/commands/review-cache-warm.js +70 -0
  864. package/dist/commands/review-cache.d.ts +22 -0
  865. package/dist/commands/review-cache.js +134 -0
  866. package/dist/commands/review-changelog-entry.d.ts +7 -0
  867. package/dist/commands/review-changelog-entry.js +109 -0
  868. package/dist/commands/review-changelog-gen.d.ts +4 -0
  869. package/dist/commands/review-changelog-gen.js +117 -0
  870. package/dist/commands/review-changelog-impact.d.ts +1 -0
  871. package/dist/commands/review-changelog-impact.js +89 -0
  872. package/dist/commands/review-checklist.d.ts +4 -0
  873. package/dist/commands/review-checklist.js +144 -0
  874. package/dist/commands/review-checkpoint.d.ts +4 -0
  875. package/dist/commands/review-checkpoint.js +163 -0
  876. package/dist/commands/review-ci-gate.d.ts +4 -0
  877. package/dist/commands/review-ci-gate.js +114 -0
  878. package/dist/commands/review-ci-insight.d.ts +1 -0
  879. package/dist/commands/review-ci-insight.js +100 -0
  880. package/dist/commands/review-ci-integration.d.ts +4 -0
  881. package/dist/commands/review-ci-integration.js +125 -0
  882. package/dist/commands/review-ci-status.d.ts +4 -0
  883. package/dist/commands/review-ci-status.js +200 -0
  884. package/dist/commands/review-cicd-integrate.d.ts +4 -0
  885. package/dist/commands/review-cicd-integrate.js +122 -0
  886. package/dist/commands/review-code-health-score.d.ts +1 -0
  887. package/dist/commands/review-code-health-score.js +100 -0
  888. package/dist/commands/review-code-owner.d.ts +7 -0
  889. package/dist/commands/review-code-owner.js +164 -0
  890. package/dist/commands/review-code-ownership.d.ts +1 -0
  891. package/dist/commands/review-code-ownership.js +88 -0
  892. package/dist/commands/review-comment.d.ts +4 -0
  893. package/dist/commands/review-comment.js +165 -0
  894. package/dist/commands/review-commit-hook.d.ts +7 -0
  895. package/dist/commands/review-commit-hook.js +134 -0
  896. package/dist/commands/review-commit-quality.d.ts +1 -0
  897. package/dist/commands/review-commit-quality.js +94 -0
  898. package/dist/commands/review-comparative.d.ts +4 -0
  899. package/dist/commands/review-comparative.js +149 -0
  900. package/dist/commands/review-compare-version.d.ts +4 -0
  901. package/dist/commands/review-compare-version.js +108 -0
  902. package/dist/commands/review-compare.d.ts +4 -0
  903. package/dist/commands/review-compare.js +200 -0
  904. package/dist/commands/review-compliance-check.d.ts +4 -0
  905. package/dist/commands/review-compliance-check.js +202 -0
  906. package/dist/commands/review-compliance-gate.d.ts +4 -0
  907. package/dist/commands/review-compliance-gate.js +151 -0
  908. package/dist/commands/review-compliance-map.d.ts +4 -0
  909. package/dist/commands/review-compliance-map.js +110 -0
  910. package/dist/commands/review-compliance-report.d.ts +4 -0
  911. package/dist/commands/review-compliance-report.js +127 -0
  912. package/dist/commands/review-confidence-explain.d.ts +1 -0
  913. package/dist/commands/review-confidence-explain.js +99 -0
  914. package/dist/commands/review-config-diff.d.ts +4 -0
  915. package/dist/commands/review-config-diff.js +108 -0
  916. package/dist/commands/review-config-export.d.ts +4 -0
  917. package/dist/commands/review-config-export.js +124 -0
  918. package/dist/commands/review-config-health.d.ts +1 -0
  919. package/dist/commands/review-config-health.js +172 -0
  920. package/dist/commands/review-config-migrate.d.ts +4 -0
  921. package/dist/commands/review-config-migrate.js +123 -0
  922. package/dist/commands/review-config-template.d.ts +4 -0
  923. package/dist/commands/review-config-template.js +112 -0
  924. package/dist/commands/review-config-validate.d.ts +4 -0
  925. package/dist/commands/review-config-validate.js +110 -0
  926. package/dist/commands/review-contract.d.ts +4 -0
  927. package/dist/commands/review-contract.js +199 -0
  928. package/dist/commands/review-coverage-gap.d.ts +4 -0
  929. package/dist/commands/review-coverage-gap.js +120 -0
  930. package/dist/commands/review-coverage-map.d.ts +4 -0
  931. package/dist/commands/review-coverage-map.js +194 -0
  932. package/dist/commands/review-custom-judge-config.d.ts +4 -0
  933. package/dist/commands/review-custom-judge-config.js +103 -0
  934. package/dist/commands/review-custom-judge.d.ts +4 -0
  935. package/dist/commands/review-custom-judge.js +182 -0
  936. package/dist/commands/review-custom-prompt.d.ts +4 -0
  937. package/dist/commands/review-custom-prompt.js +170 -0
  938. package/dist/commands/review-custom-rule.d.ts +4 -0
  939. package/dist/commands/review-custom-rule.js +169 -0
  940. package/dist/commands/review-dashboard-data.d.ts +4 -0
  941. package/dist/commands/review-dashboard-data.js +142 -0
  942. package/dist/commands/review-dashboard.d.ts +4 -0
  943. package/dist/commands/review-dashboard.js +140 -0
  944. package/dist/commands/review-data-retention.d.ts +4 -0
  945. package/dist/commands/review-data-retention.js +119 -0
  946. package/dist/commands/review-dependency-graph.d.ts +4 -0
  947. package/dist/commands/review-dependency-graph.js +94 -0
  948. package/dist/commands/review-dependency-review.d.ts +1 -0
  949. package/dist/commands/review-dependency-review.js +104 -0
  950. package/dist/commands/review-deployment-gate.d.ts +4 -0
  951. package/dist/commands/review-deployment-gate.js +94 -0
  952. package/dist/commands/review-depth.d.ts +4 -0
  953. package/dist/commands/review-depth.js +142 -0
  954. package/dist/commands/review-diff-annotate.d.ts +4 -0
  955. package/dist/commands/review-diff-annotate.js +104 -0
  956. package/dist/commands/review-diff-context.d.ts +4 -0
  957. package/dist/commands/review-diff-context.js +158 -0
  958. package/dist/commands/review-diff-highlight.d.ts +4 -0
  959. package/dist/commands/review-diff-highlight.js +179 -0
  960. package/dist/commands/review-diff-stats.d.ts +4 -0
  961. package/dist/commands/review-diff-stats.js +90 -0
  962. package/dist/commands/review-diff-summary.d.ts +4 -0
  963. package/dist/commands/review-diff-summary.js +154 -0
  964. package/dist/commands/review-digest-gen.d.ts +1 -0
  965. package/dist/commands/review-digest-gen.js +100 -0
  966. package/dist/commands/review-digest.d.ts +4 -0
  967. package/dist/commands/review-digest.js +265 -0
  968. package/dist/commands/review-dry-run.d.ts +4 -0
  969. package/dist/commands/review-dry-run.js +120 -0
  970. package/dist/commands/review-engagement-score.d.ts +1 -0
  971. package/dist/commands/review-engagement-score.js +111 -0
  972. package/dist/commands/review-env-check.d.ts +4 -0
  973. package/dist/commands/review-env-check.js +115 -0
  974. package/dist/commands/review-environment-config.d.ts +4 -0
  975. package/dist/commands/review-environment-config.js +102 -0
  976. package/dist/commands/review-escalation-path.d.ts +1 -0
  977. package/dist/commands/review-escalation-path.js +86 -0
  978. package/dist/commands/review-exclude-vendor.d.ts +4 -0
  979. package/dist/commands/review-exclude-vendor.js +158 -0
  980. package/dist/commands/review-explain.d.ts +5 -0
  981. package/dist/commands/review-explain.js +194 -0
  982. package/dist/commands/review-export-pdf.d.ts +7 -0
  983. package/dist/commands/review-export-pdf.js +131 -0
  984. package/dist/commands/review-export.d.ts +4 -0
  985. package/dist/commands/review-export.js +179 -0
  986. package/dist/commands/review-feedback-loop.d.ts +4 -0
  987. package/dist/commands/review-feedback-loop.js +113 -0
  988. package/dist/commands/review-feedback-summary.d.ts +1 -0
  989. package/dist/commands/review-feedback-summary.js +130 -0
  990. package/dist/commands/review-feedback.d.ts +4 -0
  991. package/dist/commands/review-feedback.js +145 -0
  992. package/dist/commands/review-file-complexity.d.ts +4 -0
  993. package/dist/commands/review-file-complexity.js +137 -0
  994. package/dist/commands/review-file-filter.d.ts +4 -0
  995. package/dist/commands/review-file-filter.js +121 -0
  996. package/dist/commands/review-file-stats.d.ts +4 -0
  997. package/dist/commands/review-file-stats.js +130 -0
  998. package/dist/commands/review-filter.d.ts +4 -0
  999. package/dist/commands/review-filter.js +161 -0
  1000. package/dist/commands/review-finding-link.d.ts +7 -0
  1001. package/dist/commands/review-finding-link.js +115 -0
  1002. package/dist/commands/review-focus-area.d.ts +1 -0
  1003. package/dist/commands/review-focus-area.js +96 -0
  1004. package/dist/commands/review-focus.d.ts +4 -0
  1005. package/dist/commands/review-focus.js +196 -0
  1006. package/dist/commands/review-gate-config.d.ts +4 -0
  1007. package/dist/commands/review-gate-config.js +153 -0
  1008. package/dist/commands/review-gate.d.ts +4 -0
  1009. package/dist/commands/review-gate.js +212 -0
  1010. package/dist/commands/review-goal-track.d.ts +1 -0
  1011. package/dist/commands/review-goal-track.js +123 -0
  1012. package/dist/commands/review-guardrail.d.ts +4 -0
  1013. package/dist/commands/review-guardrail.js +155 -0
  1014. package/dist/commands/review-handoff.d.ts +4 -0
  1015. package/dist/commands/review-handoff.js +208 -0
  1016. package/dist/commands/review-health-check.d.ts +4 -0
  1017. package/dist/commands/review-health-check.js +148 -0
  1018. package/dist/commands/review-health-trend.d.ts +1 -0
  1019. package/dist/commands/review-health-trend.js +107 -0
  1020. package/dist/commands/review-history-compare.d.ts +4 -0
  1021. package/dist/commands/review-history-compare.js +93 -0
  1022. package/dist/commands/review-history-search.d.ts +4 -0
  1023. package/dist/commands/review-history-search.js +214 -0
  1024. package/dist/commands/review-ide-sync.d.ts +4 -0
  1025. package/dist/commands/review-ide-sync.js +91 -0
  1026. package/dist/commands/review-ignore-path.d.ts +4 -0
  1027. package/dist/commands/review-ignore-path.js +147 -0
  1028. package/dist/commands/review-ignore-pattern.d.ts +5 -0
  1029. package/dist/commands/review-ignore-pattern.js +138 -0
  1030. package/dist/commands/review-incident-link.d.ts +4 -0
  1031. package/dist/commands/review-incident-link.js +93 -0
  1032. package/dist/commands/review-incremental.d.ts +4 -0
  1033. package/dist/commands/review-incremental.js +128 -0
  1034. package/dist/commands/review-integration-health.d.ts +4 -0
  1035. package/dist/commands/review-integration-health.js +84 -0
  1036. package/dist/commands/review-integration-test.d.ts +4 -0
  1037. package/dist/commands/review-integration-test.js +145 -0
  1038. package/dist/commands/review-integration.d.ts +4 -0
  1039. package/dist/commands/review-integration.js +236 -0
  1040. package/dist/commands/review-interactive.d.ts +4 -0
  1041. package/dist/commands/review-interactive.js +85 -0
  1042. package/dist/commands/review-knowledge-capture.d.ts +1 -0
  1043. package/dist/commands/review-knowledge-capture.js +94 -0
  1044. package/dist/commands/review-language-profile.d.ts +4 -0
  1045. package/dist/commands/review-language-profile.js +72 -0
  1046. package/dist/commands/review-language-stats.d.ts +4 -0
  1047. package/dist/commands/review-language-stats.js +152 -0
  1048. package/dist/commands/review-lock-file.d.ts +4 -0
  1049. package/dist/commands/review-lock-file.js +153 -0
  1050. package/dist/commands/review-lock.d.ts +4 -0
  1051. package/dist/commands/review-lock.js +107 -0
  1052. package/dist/commands/review-log.d.ts +22 -0
  1053. package/dist/commands/review-log.js +164 -0
  1054. package/dist/commands/review-mentor-suggest.d.ts +1 -0
  1055. package/dist/commands/review-mentor-suggest.js +112 -0
  1056. package/dist/commands/review-merge-check.d.ts +4 -0
  1057. package/dist/commands/review-merge-check.js +101 -0
  1058. package/dist/commands/review-merge-config.d.ts +4 -0
  1059. package/dist/commands/review-merge-config.js +119 -0
  1060. package/dist/commands/review-merge-readiness.d.ts +1 -0
  1061. package/dist/commands/review-merge-readiness.js +90 -0
  1062. package/dist/commands/review-merge-request.d.ts +4 -0
  1063. package/dist/commands/review-merge-request.js +95 -0
  1064. package/dist/commands/review-merge.d.ts +4 -0
  1065. package/dist/commands/review-merge.js +145 -0
  1066. package/dist/commands/review-metric-export.d.ts +4 -0
  1067. package/dist/commands/review-metric-export.js +62 -0
  1068. package/dist/commands/review-milestone.d.ts +4 -0
  1069. package/dist/commands/review-milestone.js +136 -0
  1070. package/dist/commands/review-multi-repo-sync.d.ts +4 -0
  1071. package/dist/commands/review-multi-repo-sync.js +115 -0
  1072. package/dist/commands/review-multi-repo.d.ts +4 -0
  1073. package/dist/commands/review-multi-repo.js +145 -0
  1074. package/dist/commands/review-note.d.ts +4 -0
  1075. package/dist/commands/review-note.js +104 -0
  1076. package/dist/commands/review-notification-config.d.ts +4 -0
  1077. package/dist/commands/review-notification-config.js +122 -0
  1078. package/dist/commands/review-notification-digest.d.ts +4 -0
  1079. package/dist/commands/review-notification-digest.js +64 -0
  1080. package/dist/commands/review-notification.d.ts +4 -0
  1081. package/dist/commands/review-notification.js +126 -0
  1082. package/dist/commands/review-notify.d.ts +4 -0
  1083. package/dist/commands/review-notify.js +143 -0
  1084. package/dist/commands/review-offline.d.ts +4 -0
  1085. package/dist/commands/review-offline.js +125 -0
  1086. package/dist/commands/review-onboard-checklist.d.ts +4 -0
  1087. package/dist/commands/review-onboard-checklist.js +119 -0
  1088. package/dist/commands/review-onboard-wizard.d.ts +4 -0
  1089. package/dist/commands/review-onboard-wizard.js +92 -0
  1090. package/dist/commands/review-onboard.d.ts +4 -0
  1091. package/dist/commands/review-onboard.js +154 -0
  1092. package/dist/commands/review-onboarding-check.d.ts +1 -0
  1093. package/dist/commands/review-onboarding-check.js +93 -0
  1094. package/dist/commands/review-org-dashboard.d.ts +4 -0
  1095. package/dist/commands/review-org-dashboard.js +68 -0
  1096. package/dist/commands/review-output-filter.d.ts +4 -0
  1097. package/dist/commands/review-output-filter.js +112 -0
  1098. package/dist/commands/review-output-format.d.ts +4 -0
  1099. package/dist/commands/review-output-format.js +144 -0
  1100. package/dist/commands/review-output-transform.d.ts +4 -0
  1101. package/dist/commands/review-output-transform.js +119 -0
  1102. package/dist/commands/review-owner.d.ts +4 -0
  1103. package/dist/commands/review-owner.js +129 -0
  1104. package/dist/commands/review-parallel-diff.d.ts +4 -0
  1105. package/dist/commands/review-parallel-diff.js +146 -0
  1106. package/dist/commands/review-parallel-files.d.ts +7 -0
  1107. package/dist/commands/review-parallel-files.js +134 -0
  1108. package/dist/commands/review-parallel-run.d.ts +4 -0
  1109. package/dist/commands/review-parallel-run.js +116 -0
  1110. package/dist/commands/review-parallel.d.ts +4 -0
  1111. package/dist/commands/review-parallel.js +164 -0
  1112. package/dist/commands/review-perf-profile.d.ts +4 -0
  1113. package/dist/commands/review-perf-profile.js +98 -0
  1114. package/dist/commands/review-permission-model.d.ts +4 -0
  1115. package/dist/commands/review-permission-model.js +149 -0
  1116. package/dist/commands/review-pipeline-status.d.ts +4 -0
  1117. package/dist/commands/review-pipeline-status.js +54 -0
  1118. package/dist/commands/review-plugin-config.d.ts +4 -0
  1119. package/dist/commands/review-plugin-config.js +167 -0
  1120. package/dist/commands/review-plugin-list.d.ts +4 -0
  1121. package/dist/commands/review-plugin-list.js +99 -0
  1122. package/dist/commands/review-plugin-manage.d.ts +4 -0
  1123. package/dist/commands/review-plugin-manage.js +137 -0
  1124. package/dist/commands/review-plugin-status.d.ts +4 -0
  1125. package/dist/commands/review-plugin-status.js +53 -0
  1126. package/dist/commands/review-policy-enforce.d.ts +1 -0
  1127. package/dist/commands/review-policy-enforce.js +92 -0
  1128. package/dist/commands/review-policy-engine.d.ts +4 -0
  1129. package/dist/commands/review-policy-engine.js +135 -0
  1130. package/dist/commands/review-pr-comment-gen.d.ts +4 -0
  1131. package/dist/commands/review-pr-comment-gen.js +62 -0
  1132. package/dist/commands/review-pr-comment.d.ts +4 -0
  1133. package/dist/commands/review-pr-comment.js +106 -0
  1134. package/dist/commands/review-pr-label-suggest.d.ts +1 -0
  1135. package/dist/commands/review-pr-label-suggest.js +77 -0
  1136. package/dist/commands/review-pr-size-check.d.ts +1 -0
  1137. package/dist/commands/review-pr-size-check.js +98 -0
  1138. package/dist/commands/review-pr-template.d.ts +4 -0
  1139. package/dist/commands/review-pr-template.js +104 -0
  1140. package/dist/commands/review-preset-save.d.ts +4 -0
  1141. package/dist/commands/review-preset-save.js +159 -0
  1142. package/dist/commands/review-priority.d.ts +4 -0
  1143. package/dist/commands/review-priority.js +157 -0
  1144. package/dist/commands/review-profile.d.ts +4 -0
  1145. package/dist/commands/review-profile.js +168 -0
  1146. package/dist/commands/review-progress-bar.d.ts +4 -0
  1147. package/dist/commands/review-progress-bar.js +157 -0
  1148. package/dist/commands/review-progress-report.d.ts +1 -0
  1149. package/dist/commands/review-progress-report.js +95 -0
  1150. package/dist/commands/review-progress-track.d.ts +4 -0
  1151. package/dist/commands/review-progress-track.js +94 -0
  1152. package/dist/commands/review-quality-baseline.d.ts +1 -0
  1153. package/dist/commands/review-quality-baseline.js +134 -0
  1154. package/dist/commands/review-quality-gate.d.ts +1 -0
  1155. package/dist/commands/review-quality-gate.js +86 -0
  1156. package/dist/commands/review-quality-score.d.ts +4 -0
  1157. package/dist/commands/review-quality-score.js +127 -0
  1158. package/dist/commands/review-quality-trend.d.ts +4 -0
  1159. package/dist/commands/review-quality-trend.js +57 -0
  1160. package/dist/commands/review-queue.d.ts +33 -0
  1161. package/dist/commands/review-queue.js +225 -0
  1162. package/dist/commands/review-quickstart.d.ts +4 -0
  1163. package/dist/commands/review-quickstart.js +107 -0
  1164. package/dist/commands/review-quota-check.d.ts +4 -0
  1165. package/dist/commands/review-quota-check.js +97 -0
  1166. package/dist/commands/review-quota.d.ts +4 -0
  1167. package/dist/commands/review-quota.js +126 -0
  1168. package/dist/commands/review-rate-limit.d.ts +4 -0
  1169. package/dist/commands/review-rate-limit.js +130 -0
  1170. package/dist/commands/review-readiness-check.d.ts +1 -0
  1171. package/dist/commands/review-readiness-check.js +98 -0
  1172. package/dist/commands/review-receipt.d.ts +4 -0
  1173. package/dist/commands/review-receipt.js +220 -0
  1174. package/dist/commands/review-release-gate.d.ts +1 -0
  1175. package/dist/commands/review-release-gate.js +81 -0
  1176. package/dist/commands/review-replay.d.ts +8 -0
  1177. package/dist/commands/review-replay.js +264 -0
  1178. package/dist/commands/review-repo-onboard.d.ts +4 -0
  1179. package/dist/commands/review-repo-onboard.js +114 -0
  1180. package/dist/commands/review-report-archive.d.ts +4 -0
  1181. package/dist/commands/review-report-archive.js +100 -0
  1182. package/dist/commands/review-report-merge.d.ts +4 -0
  1183. package/dist/commands/review-report-merge.js +90 -0
  1184. package/dist/commands/review-report-pdf.d.ts +4 -0
  1185. package/dist/commands/review-report-pdf.js +163 -0
  1186. package/dist/commands/review-report-schedule.d.ts +4 -0
  1187. package/dist/commands/review-report-schedule.js +96 -0
  1188. package/dist/commands/review-retrospective.d.ts +1 -0
  1189. package/dist/commands/review-retrospective.js +118 -0
  1190. package/dist/commands/review-retry.d.ts +4 -0
  1191. package/dist/commands/review-retry.js +91 -0
  1192. package/dist/commands/review-review-cadence.d.ts +1 -0
  1193. package/dist/commands/review-review-cadence.js +85 -0
  1194. package/dist/commands/review-review-comments.d.ts +4 -0
  1195. package/dist/commands/review-review-comments.js +84 -0
  1196. package/dist/commands/review-reviewer-match.d.ts +1 -0
  1197. package/dist/commands/review-reviewer-match.js +108 -0
  1198. package/dist/commands/review-risk-matrix.d.ts +1 -0
  1199. package/dist/commands/review-risk-matrix.js +96 -0
  1200. package/dist/commands/review-risk-score.d.ts +4 -0
  1201. package/dist/commands/review-risk-score.js +156 -0
  1202. package/dist/commands/review-role-assignment.d.ts +4 -0
  1203. package/dist/commands/review-role-assignment.js +98 -0
  1204. package/dist/commands/review-rollback.d.ts +4 -0
  1205. package/dist/commands/review-rollback.js +171 -0
  1206. package/dist/commands/review-rollout-plan.d.ts +4 -0
  1207. package/dist/commands/review-rollout-plan.js +123 -0
  1208. package/dist/commands/review-rule-filter.d.ts +4 -0
  1209. package/dist/commands/review-rule-filter.js +116 -0
  1210. package/dist/commands/review-rule-stats.d.ts +4 -0
  1211. package/dist/commands/review-rule-stats.js +161 -0
  1212. package/dist/commands/review-sandbox.d.ts +4 -0
  1213. package/dist/commands/review-sandbox.js +191 -0
  1214. package/dist/commands/review-schedule.d.ts +4 -0
  1215. package/dist/commands/review-schedule.js +169 -0
  1216. package/dist/commands/review-scope-limit.d.ts +4 -0
  1217. package/dist/commands/review-scope-limit.js +100 -0
  1218. package/dist/commands/review-scope-lock.d.ts +7 -0
  1219. package/dist/commands/review-scope-lock.js +138 -0
  1220. package/dist/commands/review-scope-select.d.ts +4 -0
  1221. package/dist/commands/review-scope-select.js +98 -0
  1222. package/dist/commands/review-scope-suggest.d.ts +1 -0
  1223. package/dist/commands/review-scope-suggest.js +112 -0
  1224. package/dist/commands/review-scope.d.ts +4 -0
  1225. package/dist/commands/review-scope.js +197 -0
  1226. package/dist/commands/review-score-history.d.ts +4 -0
  1227. package/dist/commands/review-score-history.js +137 -0
  1228. package/dist/commands/review-security-posture.d.ts +1 -0
  1229. package/dist/commands/review-security-posture.js +105 -0
  1230. package/dist/commands/review-session-replay.d.ts +4 -0
  1231. package/dist/commands/review-session-replay.js +81 -0
  1232. package/dist/commands/review-session-save.d.ts +4 -0
  1233. package/dist/commands/review-session-save.js +173 -0
  1234. package/dist/commands/review-session.d.ts +4 -0
  1235. package/dist/commands/review-session.js +150 -0
  1236. package/dist/commands/review-skip-list.d.ts +4 -0
  1237. package/dist/commands/review-skip-list.js +135 -0
  1238. package/dist/commands/review-skip-rule.d.ts +4 -0
  1239. package/dist/commands/review-skip-rule.js +105 -0
  1240. package/dist/commands/review-sla-config.d.ts +4 -0
  1241. package/dist/commands/review-sla-config.js +88 -0
  1242. package/dist/commands/review-slack-format.d.ts +4 -0
  1243. package/dist/commands/review-slack-format.js +113 -0
  1244. package/dist/commands/review-snapshot-diff.d.ts +4 -0
  1245. package/dist/commands/review-snapshot-diff.js +100 -0
  1246. package/dist/commands/review-sprint-plan.d.ts +1 -0
  1247. package/dist/commands/review-sprint-plan.js +79 -0
  1248. package/dist/commands/review-stakeholder-notify.d.ts +1 -0
  1249. package/dist/commands/review-stakeholder-notify.js +134 -0
  1250. package/dist/commands/review-stakeholder-report.d.ts +4 -0
  1251. package/dist/commands/review-stakeholder-report.js +75 -0
  1252. package/dist/commands/review-stale-finding-clean.d.ts +1 -0
  1253. package/dist/commands/review-stale-finding-clean.js +81 -0
  1254. package/dist/commands/review-standup.d.ts +4 -0
  1255. package/dist/commands/review-standup.js +95 -0
  1256. package/dist/commands/review-stats.d.ts +4 -0
  1257. package/dist/commands/review-stats.js +175 -0
  1258. package/dist/commands/review-status-badge.d.ts +4 -0
  1259. package/dist/commands/review-status-badge.js +120 -0
  1260. package/dist/commands/review-streak.d.ts +4 -0
  1261. package/dist/commands/review-streak.js +150 -0
  1262. package/dist/commands/review-summary-dashboard.d.ts +4 -0
  1263. package/dist/commands/review-summary-dashboard.js +96 -0
  1264. package/dist/commands/review-summary-email.d.ts +4 -0
  1265. package/dist/commands/review-summary-email.js +102 -0
  1266. package/dist/commands/review-summary.d.ts +4 -0
  1267. package/dist/commands/review-summary.js +174 -0
  1268. package/dist/commands/review-tag-manager.d.ts +4 -0
  1269. package/dist/commands/review-tag-manager.js +128 -0
  1270. package/dist/commands/review-tag.d.ts +4 -0
  1271. package/dist/commands/review-tag.js +136 -0
  1272. package/dist/commands/review-team-analytics.d.ts +1 -0
  1273. package/dist/commands/review-team-analytics.js +94 -0
  1274. package/dist/commands/review-team-assign.d.ts +7 -0
  1275. package/dist/commands/review-team-assign.js +211 -0
  1276. package/dist/commands/review-team-coverage.d.ts +1 -0
  1277. package/dist/commands/review-team-coverage.js +95 -0
  1278. package/dist/commands/review-team-dashboard.d.ts +4 -0
  1279. package/dist/commands/review-team-dashboard.js +98 -0
  1280. package/dist/commands/review-team-rotation.d.ts +1 -0
  1281. package/dist/commands/review-team-rotation.js +99 -0
  1282. package/dist/commands/review-team-skill-map.d.ts +1 -0
  1283. package/dist/commands/review-team-skill-map.js +102 -0
  1284. package/dist/commands/review-team-stats.d.ts +4 -0
  1285. package/dist/commands/review-team-stats.js +97 -0
  1286. package/dist/commands/review-team-summary.d.ts +4 -0
  1287. package/dist/commands/review-team-summary.js +155 -0
  1288. package/dist/commands/review-team-velocity.d.ts +1 -0
  1289. package/dist/commands/review-team-velocity.js +103 -0
  1290. package/dist/commands/review-template-export.d.ts +4 -0
  1291. package/dist/commands/review-template-export.js +146 -0
  1292. package/dist/commands/review-template-library.d.ts +4 -0
  1293. package/dist/commands/review-template-library.js +155 -0
  1294. package/dist/commands/review-template-suggest.d.ts +1 -0
  1295. package/dist/commands/review-template-suggest.js +119 -0
  1296. package/dist/commands/review-template.d.ts +4 -0
  1297. package/dist/commands/review-template.js +212 -0
  1298. package/dist/commands/review-tenant-config.d.ts +4 -0
  1299. package/dist/commands/review-tenant-config.js +116 -0
  1300. package/dist/commands/review-threshold-tune.d.ts +4 -0
  1301. package/dist/commands/review-threshold-tune.js +135 -0
  1302. package/dist/commands/review-timeline.d.ts +4 -0
  1303. package/dist/commands/review-timeline.js +76 -0
  1304. package/dist/commands/review-token-budget.d.ts +4 -0
  1305. package/dist/commands/review-token-budget.js +117 -0
  1306. package/dist/commands/review-velocity-track.d.ts +1 -0
  1307. package/dist/commands/review-velocity-track.js +94 -0
  1308. package/dist/commands/review-watch-mode.d.ts +7 -0
  1309. package/dist/commands/review-watch-mode.js +132 -0
  1310. package/dist/commands/review-webhook-dispatch.d.ts +4 -0
  1311. package/dist/commands/review-webhook-dispatch.js +99 -0
  1312. package/dist/commands/review-webhook-notify.d.ts +4 -0
  1313. package/dist/commands/review-webhook-notify.js +145 -0
  1314. package/dist/commands/review-webhook.d.ts +4 -0
  1315. package/dist/commands/review-webhook.js +140 -0
  1316. package/dist/commands/review-whitelist.d.ts +4 -0
  1317. package/dist/commands/review-whitelist.js +150 -0
  1318. package/dist/commands/review-workflow-suggest.d.ts +1 -0
  1319. package/dist/commands/review-workflow-suggest.js +129 -0
  1320. package/dist/commands/review-workload-balance.d.ts +1 -0
  1321. package/dist/commands/review-workload-balance.js +86 -0
  1322. package/dist/commands/review-workspace-init.d.ts +4 -0
  1323. package/dist/commands/review-workspace-init.js +104 -0
  1324. package/dist/commands/review-workspace-scan.d.ts +4 -0
  1325. package/dist/commands/review-workspace-scan.js +144 -0
  1326. package/dist/commands/review.d.ts +155 -0
  1327. package/dist/commands/review.js +1114 -0
  1328. package/dist/commands/risk-heatmap.d.ts +7 -0
  1329. package/dist/commands/risk-heatmap.js +223 -0
  1330. package/dist/commands/rollback-safety.d.ts +4 -0
  1331. package/dist/commands/rollback-safety.js +191 -0
  1332. package/dist/commands/rule-catalog.d.ts +4 -0
  1333. package/dist/commands/rule-catalog.js +128 -0
  1334. package/dist/commands/rule-metrics.d.ts +43 -0
  1335. package/dist/commands/rule-metrics.js +113 -0
  1336. package/dist/commands/rule-owner.d.ts +30 -0
  1337. package/dist/commands/rule-owner.js +181 -0
  1338. package/dist/commands/rule-share.d.ts +34 -0
  1339. package/dist/commands/rule-share.js +202 -0
  1340. package/dist/commands/rule-test.d.ts +4 -0
  1341. package/dist/commands/rule-test.js +201 -0
  1342. package/dist/commands/rule.d.ts +114 -0
  1343. package/dist/commands/rule.js +295 -0
  1344. package/dist/commands/sbom-export.d.ts +7 -0
  1345. package/dist/commands/sbom-export.js +161 -0
  1346. package/dist/commands/scaffold-plugin.d.ts +15 -0
  1347. package/dist/commands/scaffold-plugin.js +270 -0
  1348. package/dist/commands/secret-age.d.ts +5 -0
  1349. package/dist/commands/secret-age.js +214 -0
  1350. package/dist/commands/secret-scan.d.ts +7 -0
  1351. package/dist/commands/secret-scan.js +244 -0
  1352. package/dist/commands/security-maturity.d.ts +7 -0
  1353. package/dist/commands/security-maturity.js +312 -0
  1354. package/dist/commands/security-theater.d.ts +4 -0
  1355. package/dist/commands/security-theater.js +278 -0
  1356. package/dist/commands/setup-wizard.d.ts +4 -0
  1357. package/dist/commands/setup-wizard.js +174 -0
  1358. package/dist/commands/severity-tune.d.ts +4 -0
  1359. package/dist/commands/severity-tune.js +208 -0
  1360. package/dist/commands/sla-track.d.ts +56 -0
  1361. package/dist/commands/sla-track.js +268 -0
  1362. package/dist/commands/smart-output.d.ts +38 -0
  1363. package/dist/commands/smart-output.js +175 -0
  1364. package/dist/commands/smart-select.d.ts +26 -0
  1365. package/dist/commands/smart-select.js +345 -0
  1366. package/dist/commands/snapshot.d.ts +139 -0
  1367. package/dist/commands/snapshot.js +478 -0
  1368. package/dist/commands/snippet-eval.d.ts +7 -0
  1369. package/dist/commands/snippet-eval.js +223 -0
  1370. package/dist/commands/spec-conform.d.ts +4 -0
  1371. package/dist/commands/spec-conform.js +304 -0
  1372. package/dist/commands/stale-pattern.d.ts +4 -0
  1373. package/dist/commands/stale-pattern.js +293 -0
  1374. package/dist/commands/state-integrity.d.ts +4 -0
  1375. package/dist/commands/state-integrity.js +283 -0
  1376. package/dist/commands/suppress.d.ts +39 -0
  1377. package/dist/commands/suppress.js +203 -0
  1378. package/dist/commands/team-config.d.ts +4 -0
  1379. package/dist/commands/team-config.js +234 -0
  1380. package/dist/commands/team-leaderboard.d.ts +24 -0
  1381. package/dist/commands/team-leaderboard.js +227 -0
  1382. package/dist/commands/team-rules-sync.d.ts +7 -0
  1383. package/dist/commands/team-rules-sync.js +250 -0
  1384. package/dist/commands/team-trust.d.ts +7 -0
  1385. package/dist/commands/team-trust.js +174 -0
  1386. package/dist/commands/test-correlate.d.ts +7 -0
  1387. package/dist/commands/test-correlate.js +221 -0
  1388. package/dist/commands/test-isolation.d.ts +5 -0
  1389. package/dist/commands/test-isolation.js +234 -0
  1390. package/dist/commands/test-quality.d.ts +5 -0
  1391. package/dist/commands/test-quality.js +160 -0
  1392. package/dist/commands/test-suggest.d.ts +8 -0
  1393. package/dist/commands/test-suggest.js +247 -0
  1394. package/dist/commands/ticket-sync.d.ts +25 -0
  1395. package/dist/commands/ticket-sync.js +235 -0
  1396. package/dist/commands/timeout-audit.d.ts +4 -0
  1397. package/dist/commands/timeout-audit.js +210 -0
  1398. package/dist/commands/trace.d.ts +64 -0
  1399. package/dist/commands/trace.js +245 -0
  1400. package/dist/commands/trend-report.d.ts +4 -0
  1401. package/dist/commands/trend-report.js +148 -0
  1402. package/dist/commands/triage.d.ts +15 -0
  1403. package/dist/commands/triage.js +171 -0
  1404. package/dist/commands/trust-adaptive.d.ts +8 -0
  1405. package/dist/commands/trust-adaptive.js +193 -0
  1406. package/dist/commands/trust-ramp.d.ts +29 -0
  1407. package/dist/commands/trust-ramp.js +189 -0
  1408. package/dist/commands/tune.d.ts +24 -0
  1409. package/dist/commands/tune.js +380 -0
  1410. package/dist/commands/type-boundary.d.ts +4 -0
  1411. package/dist/commands/type-boundary.js +235 -0
  1412. package/dist/commands/upload.d.ts +13 -0
  1413. package/dist/commands/upload.js +172 -0
  1414. package/dist/commands/validate-config.d.ts +16 -0
  1415. package/dist/commands/validate-config.js +267 -0
  1416. package/dist/commands/vendor-lock-detect.d.ts +7 -0
  1417. package/dist/commands/vendor-lock-detect.js +288 -0
  1418. package/dist/commands/vote.d.ts +31 -0
  1419. package/dist/commands/vote.js +200 -0
  1420. package/dist/commands/warm-cache.d.ts +30 -0
  1421. package/dist/commands/warm-cache.js +165 -0
  1422. package/dist/commands/watch-judge.d.ts +7 -0
  1423. package/dist/commands/watch-judge.js +179 -0
  1424. package/dist/commands/watch.d.ts +22 -0
  1425. package/dist/commands/watch.js +147 -0
  1426. package/dist/comparison.d.ts +67 -0
  1427. package/dist/comparison.js +253 -0
  1428. package/dist/config.d.ts +108 -0
  1429. package/dist/config.js +694 -0
  1430. package/dist/context/context-snippets.d.ts +15 -0
  1431. package/dist/context/context-snippets.js +36 -0
  1432. package/dist/context/embedding-cache.d.ts +30 -0
  1433. package/dist/context/embedding-cache.js +48 -0
  1434. package/dist/data-adapter.d.ts +123 -0
  1435. package/dist/data-adapter.js +212 -0
  1436. package/dist/dedup.d.ts +105 -0
  1437. package/dist/dedup.js +606 -0
  1438. package/dist/disk-cache.d.ts +59 -0
  1439. package/dist/disk-cache.js +236 -0
  1440. package/dist/errors.d.ts +43 -0
  1441. package/dist/errors.js +63 -0
  1442. package/dist/escalation.d.ts +100 -0
  1443. package/dist/escalation.js +292 -0
  1444. package/dist/evaluation-session.d.ts +74 -0
  1445. package/dist/evaluation-session.js +152 -0
  1446. package/dist/evaluators/accessibility.d.ts +2 -0
  1447. package/dist/evaluators/accessibility.js +559 -0
  1448. package/dist/evaluators/agent-instructions.d.ts +2 -0
  1449. package/dist/evaluators/agent-instructions.js +214 -0
  1450. package/dist/evaluators/ai-code-safety.d.ts +8 -0
  1451. package/dist/evaluators/ai-code-safety.js +410 -0
  1452. package/dist/evaluators/api-contract.d.ts +9 -0
  1453. package/dist/evaluators/api-contract.js +203 -0
  1454. package/dist/evaluators/api-design.d.ts +2 -0
  1455. package/dist/evaluators/api-design.js +260 -0
  1456. package/dist/evaluators/app-builder.d.ts +33 -0
  1457. package/dist/evaluators/app-builder.js +155 -0
  1458. package/dist/evaluators/authentication.d.ts +2 -0
  1459. package/dist/evaluators/authentication.js +455 -0
  1460. package/dist/evaluators/backwards-compatibility.d.ts +2 -0
  1461. package/dist/evaluators/backwards-compatibility.js +168 -0
  1462. package/dist/evaluators/caching.d.ts +2 -0
  1463. package/dist/evaluators/caching.js +171 -0
  1464. package/dist/evaluators/ci-cd.d.ts +2 -0
  1465. package/dist/evaluators/ci-cd.js +218 -0
  1466. package/dist/evaluators/cloud-readiness.d.ts +2 -0
  1467. package/dist/evaluators/cloud-readiness.js +231 -0
  1468. package/dist/evaluators/code-structure.d.ts +21 -0
  1469. package/dist/evaluators/code-structure.js +195 -0
  1470. package/dist/evaluators/compliance.d.ts +2 -0
  1471. package/dist/evaluators/compliance.js +329 -0
  1472. package/dist/evaluators/concurrency.d.ts +2 -0
  1473. package/dist/evaluators/concurrency.js +307 -0
  1474. package/dist/evaluators/configuration-management.d.ts +2 -0
  1475. package/dist/evaluators/configuration-management.js +232 -0
  1476. package/dist/evaluators/cost-effectiveness.d.ts +2 -0
  1477. package/dist/evaluators/cost-effectiveness.js +418 -0
  1478. package/dist/evaluators/cybersecurity.d.ts +2 -0
  1479. package/dist/evaluators/cybersecurity.js +1197 -0
  1480. package/dist/evaluators/data-security.d.ts +2 -0
  1481. package/dist/evaluators/data-security.js +467 -0
  1482. package/dist/evaluators/data-sovereignty.d.ts +2 -0
  1483. package/dist/evaluators/data-sovereignty.js +495 -0
  1484. package/dist/evaluators/database.d.ts +2 -0
  1485. package/dist/evaluators/database.js +240 -0
  1486. package/dist/evaluators/dependencies.d.ts +5 -0
  1487. package/dist/evaluators/dependencies.js +228 -0
  1488. package/dist/evaluators/dependency-health.d.ts +2 -0
  1489. package/dist/evaluators/dependency-health.js +477 -0
  1490. package/dist/evaluators/documentation.d.ts +2 -0
  1491. package/dist/evaluators/documentation.js +432 -0
  1492. package/dist/evaluators/error-handling.d.ts +2 -0
  1493. package/dist/evaluators/error-handling.js +426 -0
  1494. package/dist/evaluators/ethics-bias.d.ts +2 -0
  1495. package/dist/evaluators/ethics-bias.js +263 -0
  1496. package/dist/evaluators/false-positive-review.d.ts +21 -0
  1497. package/dist/evaluators/false-positive-review.js +1246 -0
  1498. package/dist/evaluators/framework-rules.d.ts +58 -0
  1499. package/dist/evaluators/framework-rules.js +291 -0
  1500. package/dist/evaluators/framework-safety.d.ts +12 -0
  1501. package/dist/evaluators/framework-safety.js +1205 -0
  1502. package/dist/evaluators/hallucination-detection.d.ts +2 -0
  1503. package/dist/evaluators/hallucination-detection.js +1250 -0
  1504. package/dist/evaluators/iac-security.d.ts +8 -0
  1505. package/dist/evaluators/iac-security.js +701 -0
  1506. package/dist/evaluators/index.d.ts +167 -0
  1507. package/dist/evaluators/index.js +994 -0
  1508. package/dist/evaluators/intent-alignment.d.ts +18 -0
  1509. package/dist/evaluators/intent-alignment.js +405 -0
  1510. package/dist/evaluators/internationalization.d.ts +2 -0
  1511. package/dist/evaluators/internationalization.js +287 -0
  1512. package/dist/evaluators/judge-selector.d.ts +19 -0
  1513. package/dist/evaluators/judge-selector.js +141 -0
  1514. package/dist/evaluators/logging-privacy.d.ts +2 -0
  1515. package/dist/evaluators/logging-privacy.js +190 -0
  1516. package/dist/evaluators/logic-review.d.ts +2 -0
  1517. package/dist/evaluators/logic-review.js +289 -0
  1518. package/dist/evaluators/maintainability.d.ts +2 -0
  1519. package/dist/evaluators/maintainability.js +430 -0
  1520. package/dist/evaluators/model-fingerprint.d.ts +2 -0
  1521. package/dist/evaluators/model-fingerprint.js +151 -0
  1522. package/dist/evaluators/multi-turn-coherence.d.ts +13 -0
  1523. package/dist/evaluators/multi-turn-coherence.js +149 -0
  1524. package/dist/evaluators/observability.d.ts +2 -0
  1525. package/dist/evaluators/observability.js +238 -0
  1526. package/dist/evaluators/over-engineering.d.ts +2 -0
  1527. package/dist/evaluators/over-engineering.js +160 -0
  1528. package/dist/evaluators/performance.d.ts +2 -0
  1529. package/dist/evaluators/performance.js +649 -0
  1530. package/dist/evaluators/portability.d.ts +2 -0
  1531. package/dist/evaluators/portability.js +254 -0
  1532. package/dist/evaluators/project.d.ts +48 -0
  1533. package/dist/evaluators/project.js +817 -0
  1534. package/dist/evaluators/rate-limiting.d.ts +2 -0
  1535. package/dist/evaluators/rate-limiting.js +193 -0
  1536. package/dist/evaluators/recall-boost.d.ts +27 -0
  1537. package/dist/evaluators/recall-boost.js +409 -0
  1538. package/dist/evaluators/reliability.d.ts +2 -0
  1539. package/dist/evaluators/reliability.js +245 -0
  1540. package/dist/evaluators/scalability.d.ts +2 -0
  1541. package/dist/evaluators/scalability.js +230 -0
  1542. package/dist/evaluators/security.d.ts +12 -0
  1543. package/dist/evaluators/security.js +1013 -0
  1544. package/dist/evaluators/shared.d.ts +219 -0
  1545. package/dist/evaluators/shared.js +1169 -0
  1546. package/dist/evaluators/software-practices.d.ts +2 -0
  1547. package/dist/evaluators/software-practices.js +395 -0
  1548. package/dist/evaluators/suppressions.d.ts +49 -0
  1549. package/dist/evaluators/suppressions.js +185 -0
  1550. package/dist/evaluators/testing.d.ts +2 -0
  1551. package/dist/evaluators/testing.js +348 -0
  1552. package/dist/evaluators/ux.d.ts +2 -0
  1553. package/dist/evaluators/ux.js +309 -0
  1554. package/dist/evaluators/v2.d.ts +26 -0
  1555. package/dist/evaluators/v2.js +354 -0
  1556. package/dist/ext-to-lang.d.ts +16 -0
  1557. package/dist/ext-to-lang.js +60 -0
  1558. package/dist/feedback-loop.d.ts +62 -0
  1559. package/dist/feedback-loop.js +179 -0
  1560. package/dist/finding-lifecycle.d.ts +215 -0
  1561. package/dist/finding-lifecycle.js +547 -0
  1562. package/dist/fingerprint.d.ts +39 -0
  1563. package/dist/fingerprint.js +179 -0
  1564. package/dist/fix-history.d.ts +103 -0
  1565. package/dist/fix-history.js +164 -0
  1566. package/dist/formatters/badge.d.ts +16 -0
  1567. package/dist/formatters/badge.js +78 -0
  1568. package/dist/formatters/codeclimate.d.ts +24 -0
  1569. package/dist/formatters/codeclimate.js +80 -0
  1570. package/dist/formatters/csv.d.ts +16 -0
  1571. package/dist/formatters/csv.js +53 -0
  1572. package/dist/formatters/diagnostics.d.ts +81 -0
  1573. package/dist/formatters/diagnostics.js +152 -0
  1574. package/dist/formatters/github-actions.d.ts +6 -0
  1575. package/dist/formatters/github-actions.js +68 -0
  1576. package/dist/formatters/html.d.ts +12 -0
  1577. package/dist/formatters/html.js +194 -0
  1578. package/dist/formatters/junit.d.ts +6 -0
  1579. package/dist/formatters/junit.js +68 -0
  1580. package/dist/formatters/pdf.d.ts +12 -0
  1581. package/dist/formatters/pdf.js +114 -0
  1582. package/dist/formatters/sarif.d.ts +92 -0
  1583. package/dist/formatters/sarif.js +256 -0
  1584. package/dist/formatters/shared.d.ts +4 -0
  1585. package/dist/formatters/shared.js +29 -0
  1586. package/dist/git-diff.d.ts +62 -0
  1587. package/dist/git-diff.js +282 -0
  1588. package/dist/github-app.d.ts +152 -0
  1589. package/dist/github-app.js +716 -0
  1590. package/dist/import-resolver.d.ts +51 -0
  1591. package/dist/import-resolver.js +213 -0
  1592. package/dist/index.d.ts +4 -0
  1593. package/dist/index.js +38 -0
  1594. package/dist/judge-registry.d.ts +156 -0
  1595. package/dist/judge-registry.js +272 -0
  1596. package/dist/judges/accessibility.d.ts +2 -0
  1597. package/dist/judges/accessibility.js +46 -0
  1598. package/dist/judges/agent-instructions.d.ts +2 -0
  1599. package/dist/judges/agent-instructions.js +46 -0
  1600. package/dist/judges/ai-code-safety.d.ts +2 -0
  1601. package/dist/judges/ai-code-safety.js +57 -0
  1602. package/dist/judges/api-contract.d.ts +2 -0
  1603. package/dist/judges/api-contract.js +40 -0
  1604. package/dist/judges/api-design.d.ts +2 -0
  1605. package/dist/judges/api-design.js +57 -0
  1606. package/dist/judges/authentication.d.ts +2 -0
  1607. package/dist/judges/authentication.js +63 -0
  1608. package/dist/judges/backwards-compatibility.d.ts +2 -0
  1609. package/dist/judges/backwards-compatibility.js +46 -0
  1610. package/dist/judges/caching.d.ts +2 -0
  1611. package/dist/judges/caching.js +46 -0
  1612. package/dist/judges/ci-cd.d.ts +2 -0
  1613. package/dist/judges/ci-cd.js +46 -0
  1614. package/dist/judges/cloud-readiness.d.ts +2 -0
  1615. package/dist/judges/cloud-readiness.js +53 -0
  1616. package/dist/judges/code-structure.d.ts +2 -0
  1617. package/dist/judges/code-structure.js +50 -0
  1618. package/dist/judges/compliance.d.ts +2 -0
  1619. package/dist/judges/compliance.js +49 -0
  1620. package/dist/judges/concurrency.d.ts +2 -0
  1621. package/dist/judges/concurrency.js +48 -0
  1622. package/dist/judges/configuration-management.d.ts +2 -0
  1623. package/dist/judges/configuration-management.js +46 -0
  1624. package/dist/judges/cost-effectiveness.d.ts +2 -0
  1625. package/dist/judges/cost-effectiveness.js +42 -0
  1626. package/dist/judges/cybersecurity.d.ts +2 -0
  1627. package/dist/judges/cybersecurity.js +63 -0
  1628. package/dist/judges/data-security.d.ts +2 -0
  1629. package/dist/judges/data-security.js +50 -0
  1630. package/dist/judges/data-sovereignty.d.ts +2 -0
  1631. package/dist/judges/data-sovereignty.js +60 -0
  1632. package/dist/judges/database.d.ts +2 -0
  1633. package/dist/judges/database.js +51 -0
  1634. package/dist/judges/dependency-health.d.ts +2 -0
  1635. package/dist/judges/dependency-health.js +48 -0
  1636. package/dist/judges/documentation.d.ts +2 -0
  1637. package/dist/judges/documentation.js +55 -0
  1638. package/dist/judges/error-handling.d.ts +2 -0
  1639. package/dist/judges/error-handling.js +55 -0
  1640. package/dist/judges/ethics-bias.d.ts +2 -0
  1641. package/dist/judges/ethics-bias.js +48 -0
  1642. package/dist/judges/false-positive-review.d.ts +2 -0
  1643. package/dist/judges/false-positive-review.js +85 -0
  1644. package/dist/judges/framework-safety.d.ts +2 -0
  1645. package/dist/judges/framework-safety.js +49 -0
  1646. package/dist/judges/hallucination-detection.d.ts +2 -0
  1647. package/dist/judges/hallucination-detection.js +48 -0
  1648. package/dist/judges/iac-security.d.ts +2 -0
  1649. package/dist/judges/iac-security.js +47 -0
  1650. package/dist/judges/index.d.ts +88 -0
  1651. package/dist/judges/index.js +128 -0
  1652. package/dist/judges/intent-alignment.d.ts +2 -0
  1653. package/dist/judges/intent-alignment.js +46 -0
  1654. package/dist/judges/internationalization.d.ts +2 -0
  1655. package/dist/judges/internationalization.js +44 -0
  1656. package/dist/judges/logging-privacy.d.ts +2 -0
  1657. package/dist/judges/logging-privacy.js +46 -0
  1658. package/dist/judges/logic-review.d.ts +2 -0
  1659. package/dist/judges/logic-review.js +36 -0
  1660. package/dist/judges/maintainability.d.ts +2 -0
  1661. package/dist/judges/maintainability.js +46 -0
  1662. package/dist/judges/model-fingerprint.d.ts +2 -0
  1663. package/dist/judges/model-fingerprint.js +35 -0
  1664. package/dist/judges/multi-turn-coherence.d.ts +2 -0
  1665. package/dist/judges/multi-turn-coherence.js +39 -0
  1666. package/dist/judges/observability.d.ts +2 -0
  1667. package/dist/judges/observability.js +54 -0
  1668. package/dist/judges/over-engineering.d.ts +2 -0
  1669. package/dist/judges/over-engineering.js +50 -0
  1670. package/dist/judges/performance.d.ts +2 -0
  1671. package/dist/judges/performance.js +46 -0
  1672. package/dist/judges/portability.d.ts +2 -0
  1673. package/dist/judges/portability.js +46 -0
  1674. package/dist/judges/rate-limiting.d.ts +2 -0
  1675. package/dist/judges/rate-limiting.js +55 -0
  1676. package/dist/judges/reliability.d.ts +2 -0
  1677. package/dist/judges/reliability.js +57 -0
  1678. package/dist/judges/scalability.d.ts +2 -0
  1679. package/dist/judges/scalability.js +52 -0
  1680. package/dist/judges/security.d.ts +2 -0
  1681. package/dist/judges/security.js +64 -0
  1682. package/dist/judges/software-practices.d.ts +2 -0
  1683. package/dist/judges/software-practices.js +56 -0
  1684. package/dist/judges/testing.d.ts +2 -0
  1685. package/dist/judges/testing.js +54 -0
  1686. package/dist/judges/ux.d.ts +2 -0
  1687. package/dist/judges/ux.js +46 -0
  1688. package/dist/language-patterns.d.ts +653 -0
  1689. package/dist/language-patterns.js +851 -0
  1690. package/dist/parallel.d.ts +52 -0
  1691. package/dist/parallel.js +157 -0
  1692. package/dist/patches/apply.d.ts +15 -0
  1693. package/dist/patches/apply.js +37 -0
  1694. package/dist/patches/index.d.ts +9 -0
  1695. package/dist/patches/index.js +2544 -0
  1696. package/dist/plugins.d.ts +59 -0
  1697. package/dist/plugins.js +76 -0
  1698. package/dist/presets.d.ts +35 -0
  1699. package/dist/presets.js +406 -0
  1700. package/dist/probabilistic/llm-response-validator.d.ts +26 -0
  1701. package/dist/probabilistic/llm-response-validator.js +122 -0
  1702. package/dist/reports/public-repo-report.d.ts +42 -0
  1703. package/dist/reports/public-repo-report.js +579 -0
  1704. package/dist/review-conversation.d.ts +87 -0
  1705. package/dist/review-conversation.js +307 -0
  1706. package/dist/sast-integration.d.ts +112 -0
  1707. package/dist/sast-integration.js +215 -0
  1708. package/dist/scoring.d.ts +36 -0
  1709. package/dist/scoring.js +437 -0
  1710. package/dist/security-ids.d.ts +23 -0
  1711. package/dist/security-ids.js +239 -0
  1712. package/dist/skill-loader.d.ts +33 -0
  1713. package/dist/skill-loader.js +167 -0
  1714. package/dist/tools/command-safety.d.ts +13 -0
  1715. package/dist/tools/command-safety.js +95 -0
  1716. package/dist/tools/deep-review.d.ts +38 -0
  1717. package/dist/tools/deep-review.js +302 -0
  1718. package/dist/tools/prompts.d.ts +27 -0
  1719. package/dist/tools/prompts.js +122 -0
  1720. package/dist/tools/register-evaluation.d.ts +6 -0
  1721. package/dist/tools/register-evaluation.js +587 -0
  1722. package/dist/tools/register-fix.d.ts +5 -0
  1723. package/dist/tools/register-fix.js +175 -0
  1724. package/dist/tools/register-resources.d.ts +6 -0
  1725. package/dist/tools/register-resources.js +177 -0
  1726. package/dist/tools/register-review.d.ts +6 -0
  1727. package/dist/tools/register-review.js +564 -0
  1728. package/dist/tools/register-scaffold.d.ts +2 -0
  1729. package/dist/tools/register-scaffold.js +398 -0
  1730. package/dist/tools/register-workflow.d.ts +6 -0
  1731. package/dist/tools/register-workflow.js +1037 -0
  1732. package/dist/tools/register-workspace.d.ts +2 -0
  1733. package/dist/tools/register-workspace.js +214 -0
  1734. package/dist/tools/register.d.ts +6 -0
  1735. package/dist/tools/register.js +21 -0
  1736. package/dist/tools/schemas.d.ts +25 -0
  1737. package/dist/tools/schemas.js +41 -0
  1738. package/dist/tools/validation.d.ts +13 -0
  1739. package/dist/tools/validation.js +77 -0
  1740. package/dist/types.d.ts +898 -0
  1741. package/dist/types.js +1 -0
  1742. package/package.json +54 -0
  1743. package/skills/ai-code-review.skill.md +57 -0
  1744. package/skills/release-gate.skill.md +27 -0
  1745. package/skills/security-review.skill.md +32 -0
@@ -0,0 +1,2599 @@
1
+ /**
2
+ * Expanded benchmark cases — 230+ additional test cases for broader coverage.
3
+ *
4
+ * Adds coverage for:
5
+ * - Missing languages: Ruby, PHP, Kotlin, Swift, PowerShell, Bicep
6
+ * - Under-covered categories: error-handling, observability, scalability, testing
7
+ * - AI-specific failure modes: hallucinated APIs, copy-paste vulnerabilities
8
+ * - Harder difficulty cases: obfuscated vulnerabilities, multi-step exploit chains
9
+ * - More clean code samples to validate FP rate
10
+ */
11
+ export const EXPANDED_BENCHMARK_CASES = [
12
+ // ═══════════════════════════════════════════════════════════════════════════
13
+ // RUBY
14
+ // ═══════════════════════════════════════════════════════════════════════════
15
+ // ── Ruby: SQL Injection ──
16
+ {
17
+ id: "ruby-sql-injection-interpolation",
18
+ description: "Ruby SQL injection via string interpolation in Active Record",
19
+ language: "ruby",
20
+ code: `class UsersController < ApplicationController
21
+ def search
22
+ query = params[:q]
23
+ @users = User.where("name LIKE '%#{query}%'")
24
+ render json: @users
25
+ end
26
+ end`,
27
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
28
+ category: "injection",
29
+ difficulty: "easy",
30
+ },
31
+ {
32
+ id: "ruby-command-injection",
33
+ description: "Ruby command injection via backtick execution",
34
+ language: "ruby",
35
+ code: `class ReportsController < ApplicationController
36
+ def generate
37
+ filename = params[:filename]
38
+ output = \`wc -l /data/#{filename}\`
39
+ render plain: output
40
+ end
41
+ end`,
42
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
43
+ category: "injection",
44
+ difficulty: "easy",
45
+ },
46
+ {
47
+ id: "ruby-mass-assignment",
48
+ description: "Ruby mass assignment vulnerability without strong params",
49
+ language: "ruby",
50
+ code: `class UsersController < ApplicationController
51
+ def create
52
+ @user = User.new(params[:user])
53
+ @user.save
54
+ redirect_to @user
55
+ end
56
+
57
+ def update
58
+ @user = User.find(params[:id])
59
+ @user.update_attributes(params[:user])
60
+ redirect_to @user
61
+ end
62
+ end`,
63
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
64
+ category: "security",
65
+ difficulty: "medium",
66
+ },
67
+ {
68
+ id: "ruby-path-traversal",
69
+ description: "Ruby path traversal via unsanitized file path",
70
+ language: "ruby",
71
+ code: `class DownloadsController < ApplicationController
72
+ def show
73
+ path = File.join("/uploads", params[:file])
74
+ send_file path
75
+ end
76
+ end`,
77
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
78
+ category: "injection",
79
+ difficulty: "easy",
80
+ },
81
+ {
82
+ id: "ruby-open-redirect",
83
+ description: "Ruby open redirect vulnerability",
84
+ language: "ruby",
85
+ code: `class SessionsController < ApplicationController
86
+ def create
87
+ user = User.authenticate(params[:email], params[:password])
88
+ if user
89
+ session[:user_id] = user.id
90
+ redirect_to params[:return_to]
91
+ else
92
+ flash[:error] = "Invalid credentials"
93
+ redirect_to login_path
94
+ end
95
+ end
96
+ end`,
97
+ expectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001"],
98
+ category: "security",
99
+ difficulty: "medium",
100
+ },
101
+ {
102
+ id: "ruby-yaml-deserialization",
103
+ description: "Unsafe YAML deserialization in Ruby",
104
+ language: "ruby",
105
+ code: `require 'yaml'
106
+
107
+ class ConfigLoader
108
+ def self.load_from_file(path)
109
+ content = File.read(path)
110
+ YAML.load(content)
111
+ end
112
+
113
+ def self.load_from_request(data)
114
+ YAML.load(data)
115
+ end
116
+ end`,
117
+ expectedRuleIds: ["CYBER-001", "SEC-001", "DATA-001"],
118
+ category: "security",
119
+ difficulty: "medium",
120
+ },
121
+ {
122
+ id: "ruby-erb-xss",
123
+ description: "Ruby ERB template XSS via unescaped output",
124
+ language: "ruby",
125
+ code: `# In a view template
126
+ class ProfileController < ApplicationController
127
+ def show
128
+ @bio = params[:bio]
129
+ # Template uses: <%%= raw @bio %>
130
+ render inline: "<div><%= raw @bio %></div>"
131
+ end
132
+ end`,
133
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
134
+ category: "xss",
135
+ difficulty: "easy",
136
+ },
137
+ {
138
+ id: "ruby-hardcoded-secrets",
139
+ description: "Hardcoded secrets in Ruby configuration",
140
+ language: "ruby",
141
+ code: `Rails.application.configure do
142
+ config.secret_key_base = "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
143
+ config.api_key = "sk-live-abc123def456ghi789"
144
+ end
145
+
146
+ class PaymentService
147
+ API_SECRET = "whsec_test_secret_key_12345"
148
+
149
+ def charge(amount)
150
+ Stripe::Charge.create(amount: amount, api_key: API_SECRET)
151
+ end
152
+ end`,
153
+ expectedRuleIds: ["AUTH-001", "AUTH-002"],
154
+ category: "auth",
155
+ difficulty: "easy",
156
+ },
157
+ // ── Ruby Clean ──
158
+ {
159
+ id: "ruby-secure-controller",
160
+ description: "Clean: Secure Ruby Rails controller with strong params",
161
+ language: "ruby",
162
+ code: `class UsersController < ApplicationController
163
+ before_action :authenticate_user!
164
+ before_action :set_user, only: [:show, :update]
165
+
166
+ def create
167
+ @user = User.new(user_params)
168
+ if @user.save
169
+ render json: @user, status: :created
170
+ else
171
+ render json: @user.errors, status: :unprocessable_entity
172
+ end
173
+ end
174
+
175
+ def update
176
+ if @user.update(user_params)
177
+ render json: @user
178
+ else
179
+ render json: @user.errors, status: :unprocessable_entity
180
+ end
181
+ end
182
+
183
+ private
184
+
185
+ def set_user
186
+ @user = User.find(params[:id])
187
+ end
188
+
189
+ def user_params
190
+ params.require(:user).permit(:name, :email)
191
+ end
192
+ end`,
193
+ expectedRuleIds: [],
194
+ unexpectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001", "AUTH-001"],
195
+ category: "clean",
196
+ difficulty: "medium",
197
+ },
198
+ // ═══════════════════════════════════════════════════════════════════════════
199
+ // PHP
200
+ // ═══════════════════════════════════════════════════════════════════════════
201
+ {
202
+ id: "php-sql-injection",
203
+ description: "PHP SQL injection via string concatenation",
204
+ language: "php",
205
+ code: `<?php
206
+ function getUser($id) {
207
+ $conn = new mysqli("localhost", "root", "", "app");
208
+ $query = "SELECT * FROM users WHERE id = " . $_GET['id'];
209
+ $result = $conn->query($query);
210
+ return $result->fetch_assoc();
211
+ }
212
+ ?>`,
213
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
214
+ category: "injection",
215
+ difficulty: "easy",
216
+ },
217
+ {
218
+ id: "php-command-injection",
219
+ description: "PHP command injection via system()",
220
+ language: "php",
221
+ code: `<?php
222
+ $host = $_GET['host'];
223
+ $output = system("ping -c 4 " . $host);
224
+ echo "<pre>$output</pre>";
225
+ ?>`,
226
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
227
+ category: "injection",
228
+ difficulty: "easy",
229
+ },
230
+ {
231
+ id: "php-file-inclusion-local",
232
+ description: "PHP local file inclusion vulnerability",
233
+ language: "php",
234
+ code: `<?php
235
+ $page = $_GET['page'];
236
+ include("pages/" . $page . ".php");
237
+ ?>`,
238
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
239
+ category: "injection",
240
+ difficulty: "easy",
241
+ },
242
+ {
243
+ id: "php-xss-echo",
244
+ description: "PHP reflected XSS via echo",
245
+ language: "php",
246
+ code: `<?php
247
+ $name = $_GET['name'];
248
+ echo "<h1>Welcome, $name</h1>";
249
+ echo "<p>Your search: " . $_POST['query'] . "</p>";
250
+ ?>`,
251
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
252
+ category: "xss",
253
+ difficulty: "easy",
254
+ },
255
+ {
256
+ id: "php-unserialize",
257
+ description: "PHP unsafe deserialization via unserialize",
258
+ language: "php",
259
+ code: `<?php
260
+ $data = $_COOKIE['session_data'];
261
+ $session = unserialize($data);
262
+ $user = $session->getUser();
263
+ echo "Hello, " . $user->name;
264
+ ?>`,
265
+ expectedRuleIds: ["CYBER-001", "SEC-001", "DATA-001"],
266
+ category: "security",
267
+ difficulty: "medium",
268
+ },
269
+ {
270
+ id: "php-eval-injection",
271
+ description: "PHP eval injection from user input",
272
+ language: "php",
273
+ code: `<?php
274
+ $formula = $_POST['formula'];
275
+ $result = eval("return " . $formula . ";");
276
+ echo "Result: $result";
277
+ ?>`,
278
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
279
+ category: "injection",
280
+ difficulty: "easy",
281
+ },
282
+ {
283
+ id: "php-hardcoded-creds",
284
+ description: "PHP hardcoded database credentials",
285
+ language: "php",
286
+ code: `<?php
287
+ define('DB_HOST', 'production-db.example.com');
288
+ define('DB_USER', 'admin');
289
+ define('DB_PASS', 'P@ssw0rd!2024');
290
+ define('DB_NAME', 'production');
291
+
292
+ $conn = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
293
+ if ($conn->connect_error) {
294
+ die("Connection failed: " . $conn->connect_error);
295
+ }
296
+ ?>`,
297
+ expectedRuleIds: ["AUTH-001", "AUTH-002"],
298
+ category: "auth",
299
+ difficulty: "easy",
300
+ },
301
+ {
302
+ id: "php-weak-crypto",
303
+ description: "PHP weak password hashing with md5",
304
+ language: "php",
305
+ code: `<?php
306
+ function registerUser($username, $password) {
307
+ $hash = md5($password);
308
+ $db = new PDO("mysql:host=localhost;dbname=app", "root", "");
309
+ $stmt = $db->prepare("INSERT INTO users (username, password) VALUES (?, ?)");
310
+ $stmt->execute([$username, $hash]);
311
+ }
312
+
313
+ function login($username, $password) {
314
+ $hash = md5($password);
315
+ $db = new PDO("mysql:host=localhost;dbname=app", "root", "");
316
+ $stmt = $db->prepare("SELECT * FROM users WHERE username = ? AND password = ?");
317
+ $stmt->execute([$username, $hash]);
318
+ return $stmt->fetch();
319
+ }
320
+ ?>`,
321
+ expectedRuleIds: ["AUTH-001", "AUTH-002", "SEC-001"],
322
+ category: "auth",
323
+ difficulty: "easy",
324
+ },
325
+ // ── PHP Clean ──
326
+ {
327
+ id: "php-secure-pdo",
328
+ description: "Clean: PHP with prepared statements and proper escaping",
329
+ language: "php",
330
+ code: `<?php
331
+ function getUser(PDO $db, int $id): ?array {
332
+ $stmt = $db->prepare("SELECT id, name, email FROM users WHERE id = :id");
333
+ $stmt->bindParam(':id', $id, PDO::PARAM_INT);
334
+ $stmt->execute();
335
+ return $stmt->fetch(PDO::FETCH_ASSOC) ?: null;
336
+ }
337
+
338
+ function searchUsers(PDO $db, string $term): array {
339
+ $stmt = $db->prepare("SELECT id, name FROM users WHERE name LIKE :term");
340
+ $safeTerm = '%' . $term . '%';
341
+ $stmt->bindParam(':term', $safeTerm, PDO::PARAM_STR);
342
+ $stmt->execute();
343
+ return $stmt->fetchAll(PDO::FETCH_ASSOC);
344
+ }
345
+ ?>`,
346
+ expectedRuleIds: [],
347
+ unexpectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001"],
348
+ category: "clean",
349
+ difficulty: "medium",
350
+ },
351
+ // ═══════════════════════════════════════════════════════════════════════════
352
+ // KOTLIN
353
+ // ═══════════════════════════════════════════════════════════════════════════
354
+ {
355
+ id: "kotlin-sql-injection",
356
+ description: "Kotlin SQL injection via string template",
357
+ language: "kotlin",
358
+ code: `import java.sql.DriverManager
359
+
360
+ fun getUser(userId: String): Map<String, Any>? {
361
+ val conn = DriverManager.getConnection("jdbc:mysql://localhost/app")
362
+ val stmt = conn.createStatement()
363
+ val rs = stmt.executeQuery("SELECT * FROM users WHERE id = '$userId'")
364
+ return if (rs.next()) mapOf("name" to rs.getString("name")) else null
365
+ }`,
366
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
367
+ category: "injection",
368
+ difficulty: "easy",
369
+ },
370
+ {
371
+ id: "kotlin-hardcoded-key",
372
+ description: "Kotlin hardcoded API key and secrets",
373
+ language: "kotlin",
374
+ code: `object Config {
375
+ const val API_KEY = "sk-proj-ABCDEF123456"
376
+ const val DATABASE_PASSWORD = "admin123!"
377
+ const val JWT_SECRET = "my-super-secret-jwt-key-12345"
378
+ }
379
+
380
+ fun makeApiCall() {
381
+ val client = OkHttpClient()
382
+ val request = Request.Builder()
383
+ .url("https://api.example.com/data")
384
+ .addHeader("Authorization", "Bearer \${Config.API_KEY}")
385
+ .build()
386
+ client.newCall(request).execute()
387
+ }`,
388
+ expectedRuleIds: ["AUTH-001", "AUTH-002"],
389
+ category: "auth",
390
+ difficulty: "easy",
391
+ },
392
+ {
393
+ id: "kotlin-insecure-webview",
394
+ description: "Kotlin Android insecure WebView with JS enabled",
395
+ language: "kotlin",
396
+ code: `import android.webkit.WebView
397
+
398
+ class MainActivity : AppCompatActivity() {
399
+ override fun onCreate(savedInstanceState: Bundle?) {
400
+ super.onCreate(savedInstanceState)
401
+ val webView = WebView(this)
402
+ webView.settings.javaScriptEnabled = true
403
+ webView.settings.allowFileAccess = true
404
+ webView.settings.allowUniversalAccessFromFileURLs = true
405
+ val url = intent.getStringExtra("url") ?: ""
406
+ webView.loadUrl(url)
407
+ setContentView(webView)
408
+ }
409
+ }`,
410
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
411
+ category: "security",
412
+ difficulty: "medium",
413
+ },
414
+ {
415
+ id: "kotlin-path-traversal",
416
+ description: "Kotlin path traversal in file download",
417
+ language: "kotlin",
418
+ code: `import io.ktor.server.application.*
419
+ import io.ktor.server.response.*
420
+ import java.io.File
421
+
422
+ fun Application.configureRouting() {
423
+ routing {
424
+ get("/download/{filename}") {
425
+ val filename = call.parameters["filename"]!!
426
+ val file = File("/uploads/$filename")
427
+ call.respondFile(file)
428
+ }
429
+ }
430
+ }`,
431
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
432
+ category: "injection",
433
+ difficulty: "easy",
434
+ },
435
+ // ── Kotlin Clean ──
436
+ {
437
+ id: "kotlin-secure-api",
438
+ description: "Clean: Kotlin Ktor API with proper validation",
439
+ language: "kotlin",
440
+ code: `import io.ktor.server.application.*
441
+ import io.ktor.server.response.*
442
+ import io.ktor.server.request.*
443
+ import io.ktor.http.*
444
+
445
+ fun Application.configureRouting() {
446
+ routing {
447
+ post("/users") {
448
+ val request = call.receive<CreateUserRequest>()
449
+ if (request.email.isBlank() || !request.email.contains("@")) {
450
+ call.respond(HttpStatusCode.BadRequest, "Invalid email")
451
+ return@post
452
+ }
453
+ val user = userService.create(request)
454
+ call.respond(HttpStatusCode.Created, user)
455
+ }
456
+ }
457
+ }
458
+
459
+ data class CreateUserRequest(val name: String, val email: String)`,
460
+ expectedRuleIds: [],
461
+ unexpectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001"],
462
+ category: "clean",
463
+ difficulty: "medium",
464
+ },
465
+ // ═══════════════════════════════════════════════════════════════════════════
466
+ // SWIFT
467
+ // ═══════════════════════════════════════════════════════════════════════════
468
+ {
469
+ id: "swift-insecure-http",
470
+ description: "Swift insecure HTTP connection without TLS",
471
+ language: "swift",
472
+ code: `import Foundation
473
+
474
+ class APIClient {
475
+ func fetchData(from endpoint: String, completion: @escaping (Data?) -> Void) {
476
+ let url = URL(string: "http://api.example.com/\\(endpoint)")!
477
+ let session = URLSession(configuration: .default)
478
+ session.dataTask(with: url) { data, response, error in
479
+ completion(data)
480
+ }.resume()
481
+ }
482
+
483
+ func login(username: String, password: String) {
484
+ var request = URLRequest(url: URL(string: "http://auth.example.com/login")!)
485
+ request.httpMethod = "POST"
486
+ request.httpBody = "user=\\(username)&pass=\\(password)".data(using: .utf8)
487
+ URLSession.shared.dataTask(with: request).resume()
488
+ }
489
+ }`,
490
+ expectedRuleIds: ["CYBER-001", "SEC-001", "DATA-001"],
491
+ category: "security",
492
+ difficulty: "medium",
493
+ },
494
+ {
495
+ id: "swift-hardcoded-creds",
496
+ description: "Swift hardcoded credentials",
497
+ language: "swift",
498
+ code: `struct AppConfig {
499
+ static let apiKey = "sk-live-abc123def456"
500
+ static let databasePassword = "MyS3cr3tP@ss!"
501
+ static let encryptionKey = "0123456789abcdef0123456789abcdef"
502
+ }
503
+
504
+ class DatabaseService {
505
+ func connect() -> Connection {
506
+ return Connection(
507
+ host: "prod-db.example.com",
508
+ user: "admin",
509
+ password: AppConfig.databasePassword
510
+ )
511
+ }
512
+ }`,
513
+ expectedRuleIds: ["AUTH-001", "AUTH-002"],
514
+ category: "auth",
515
+ difficulty: "easy",
516
+ },
517
+ {
518
+ id: "swift-keychain-misuse",
519
+ description: "Swift storing sensitive data in UserDefaults instead of Keychain",
520
+ language: "swift",
521
+ code: `import Foundation
522
+
523
+ class AuthManager {
524
+ func saveCredentials(token: String, refreshToken: String) {
525
+ UserDefaults.standard.set(token, forKey: "auth_token")
526
+ UserDefaults.standard.set(refreshToken, forKey: "refresh_token")
527
+ UserDefaults.standard.synchronize()
528
+ }
529
+
530
+ func getToken() -> String? {
531
+ return UserDefaults.standard.string(forKey: "auth_token")
532
+ }
533
+ }`,
534
+ expectedRuleIds: ["CYBER-001"],
535
+ category: "data-security",
536
+ difficulty: "medium",
537
+ },
538
+ {
539
+ id: "swift-sql-injection",
540
+ description: "Swift SQLite injection via string interpolation",
541
+ language: "swift",
542
+ code: `import SQLite3
543
+
544
+ class Database {
545
+ var db: OpaquePointer?
546
+
547
+ func getUser(byName name: String) -> [String: Any]? {
548
+ let query = "SELECT * FROM users WHERE name = '\\(name)'"
549
+ var stmt: OpaquePointer?
550
+ sqlite3_prepare_v2(db, query, -1, &stmt, nil)
551
+ // ...
552
+ return nil
553
+ }
554
+ }`,
555
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
556
+ category: "injection",
557
+ difficulty: "easy",
558
+ },
559
+ // ── Swift Clean ──
560
+ {
561
+ id: "swift-secure-networking",
562
+ description: "Clean: Swift secure networking with URLSession and proper HTTPS",
563
+ language: "swift",
564
+ code: `import Foundation
565
+
566
+ class SecureAPIClient {
567
+ private let session: URLSession
568
+ private let baseURL: URL
569
+
570
+ init(baseURL: URL) {
571
+ let config = URLSessionConfiguration.default
572
+ config.tlsMinimumSupportedProtocolVersion = .TLSv12
573
+ self.session = URLSession(configuration: config)
574
+ self.baseURL = baseURL
575
+ }
576
+
577
+ func fetchData(endpoint: String) async throws -> Data {
578
+ guard let url = URL(string: endpoint, relativeTo: baseURL) else {
579
+ throw URLError(.badURL)
580
+ }
581
+ let (data, response) = try await session.data(from: url)
582
+ guard let httpResponse = response as? HTTPURLResponse,
583
+ (200...299).contains(httpResponse.statusCode) else {
584
+ throw URLError(.badServerResponse)
585
+ }
586
+ return data
587
+ }
588
+ }`,
589
+ expectedRuleIds: [],
590
+ unexpectedRuleIds: ["CYBER-001", "SEC-001", "DATA-001"],
591
+ category: "clean",
592
+ difficulty: "medium",
593
+ },
594
+ // ═══════════════════════════════════════════════════════════════════════════
595
+ // POWERSHELL
596
+ // ═══════════════════════════════════════════════════════════════════════════
597
+ {
598
+ id: "powershell-injection",
599
+ description: "PowerShell command injection via Invoke-Expression",
600
+ language: "powershell",
601
+ code: `param([string]$ServerName)
602
+ $result = Invoke-Expression "ping $ServerName"
603
+ Write-Output $result
604
+
605
+ # Also vulnerable:
606
+ $userInput = Read-Host "Enter command"
607
+ Invoke-Expression $userInput`,
608
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
609
+ category: "injection",
610
+ difficulty: "easy",
611
+ },
612
+ {
613
+ id: "powershell-hardcoded-creds",
614
+ description: "PowerShell hardcoded credentials in script",
615
+ language: "powershell",
616
+ code: `$username = "admin"
617
+ $password = "P@ssw0rd123!"
618
+ $securePassword = ConvertTo-SecureString $password -AsPlainText -Force
619
+ $credential = New-Object System.Management.Automation.PSCredential($username, $securePassword)
620
+
621
+ Connect-AzAccount -Credential $credential
622
+ $connectionString = "Server=prod-sql.database.windows.net;Database=mydb;User ID=admin;Password=SuperSecret123!"`,
623
+ expectedRuleIds: ["AUTH-001", "AUTH-002"],
624
+ category: "auth",
625
+ difficulty: "easy",
626
+ },
627
+ {
628
+ id: "powershell-insecure-download",
629
+ description: "PowerShell insecure file download and execution",
630
+ language: "powershell",
631
+ code: `# Download and execute script from HTTP (not HTTPS)
632
+ $url = "http://scripts.example.com/setup.ps1"
633
+ Invoke-WebRequest -Uri $url -OutFile "setup.ps1"
634
+ . .\\setup.ps1
635
+
636
+ # Or worse:
637
+ iex (New-Object Net.WebClient).DownloadString("http://example.com/payload.ps1")`,
638
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
639
+ category: "security",
640
+ difficulty: "easy",
641
+ },
642
+ // ═══════════════════════════════════════════════════════════════════════════
643
+ // BICEP / IaC
644
+ // ═══════════════════════════════════════════════════════════════════════════
645
+ {
646
+ id: "bicep-public-storage",
647
+ description: "Bicep storage account with public blob access",
648
+ language: "bicep",
649
+ code: `resource storageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' = {
650
+ name: 'mystorage'
651
+ location: resourceGroup().location
652
+ sku: {
653
+ name: 'Standard_LRS'
654
+ }
655
+ kind: 'StorageV2'
656
+ properties: {
657
+ allowBlobPublicAccess: true
658
+ minimumTlsVersion: 'TLS1_0'
659
+ supportsHttpsTrafficOnly: false
660
+ }
661
+ }`,
662
+ expectedRuleIds: ["IAC-001", "SEC-001", "CYBER-001"],
663
+ category: "iac-security",
664
+ difficulty: "easy",
665
+ },
666
+ {
667
+ id: "bicep-sql-no-auditing",
668
+ description: "Bicep SQL server without auditing or firewall rules",
669
+ language: "bicep",
670
+ code: `param adminPassword string = 'P@ssw0rd123!'
671
+
672
+ resource sqlServer 'Microsoft.Sql/servers@2022-05-01-preview' = {
673
+ name: 'myserver'
674
+ location: resourceGroup().location
675
+ properties: {
676
+ administratorLogin: 'sqladmin'
677
+ administratorLoginPassword: adminPassword
678
+ publicNetworkAccess: 'Enabled'
679
+ }
680
+ }
681
+
682
+ resource sqlFirewall 'Microsoft.Sql/servers/firewallRules@2022-05-01-preview' = {
683
+ parent: sqlServer
684
+ name: 'AllowAll'
685
+ properties: {
686
+ startIpAddress: '0.0.0.0'
687
+ endIpAddress: '255.255.255.255'
688
+ }
689
+ }`,
690
+ expectedRuleIds: ["IAC-001", "AUTH-001", "SEC-001"],
691
+ category: "iac-security",
692
+ difficulty: "easy",
693
+ },
694
+ // ═══════════════════════════════════════════════════════════════════════════
695
+ // PYTHON — Additional Cases
696
+ // ═══════════════════════════════════════════════════════════════════════════
697
+ {
698
+ id: "python-pickle-deserialization-flask",
699
+ description: "Python unsafe pickle deserialization",
700
+ language: "python",
701
+ code: `import pickle
702
+ import base64
703
+ from flask import Flask, request
704
+
705
+ app = Flask(__name__)
706
+
707
+ @app.route("/load", methods=["POST"])
708
+ def load_data():
709
+ encoded = request.form["data"]
710
+ raw = base64.b64decode(encoded)
711
+ obj = pickle.loads(raw)
712
+ return str(obj)`,
713
+ expectedRuleIds: ["CYBER-001", "SEC-001", "DATA-001"],
714
+ category: "security",
715
+ difficulty: "medium",
716
+ },
717
+ {
718
+ id: "python-ssrf",
719
+ description: "Python SSRF via unvalidated URL",
720
+ language: "python",
721
+ code: `import requests
722
+ from flask import Flask, request
723
+
724
+ app = Flask(__name__)
725
+
726
+ @app.route("/proxy")
727
+ def proxy():
728
+ url = request.args.get("url")
729
+ response = requests.get(url)
730
+ return response.text`,
731
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
732
+ category: "injection",
733
+ difficulty: "medium",
734
+ },
735
+ {
736
+ id: "python-jwt-none-alg",
737
+ description: "Python JWT with none algorithm vulnerability",
738
+ language: "python",
739
+ code: `import jwt
740
+
741
+ def verify_token(token):
742
+ # Vulnerable: allows 'none' algorithm
743
+ payload = jwt.decode(token, options={"verify_signature": False})
744
+ return payload
745
+
746
+ def create_token(user_id):
747
+ return jwt.encode({"user_id": user_id}, key="", algorithm="none")`,
748
+ expectedRuleIds: ["AUTH-001", "SEC-001"],
749
+ category: "auth",
750
+ difficulty: "medium",
751
+ },
752
+ {
753
+ id: "python-xxe-attack",
754
+ description: "Python XXE vulnerability via unsafe XML parsing",
755
+ language: "python",
756
+ code: `from lxml import etree
757
+ from flask import Flask, request
758
+
759
+ app = Flask(__name__)
760
+
761
+ @app.route("/parse", methods=["POST"])
762
+ def parse_xml():
763
+ xml_data = request.data
764
+ parser = etree.XMLParser(resolve_entities=True)
765
+ tree = etree.fromstring(xml_data, parser=parser)
766
+ return etree.tostring(tree).decode()`,
767
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
768
+ category: "security",
769
+ difficulty: "medium",
770
+ },
771
+ {
772
+ id: "python-race-condition",
773
+ description: "Python race condition in balance check",
774
+ language: "python",
775
+ code: `import threading
776
+
777
+ balance = 1000
778
+
779
+ def withdraw(amount):
780
+ global balance
781
+ if balance >= amount:
782
+ # Race: another thread can modify balance here
783
+ import time; time.sleep(0.001)
784
+ balance -= amount
785
+ return True
786
+ return False
787
+
788
+ # Multiple concurrent withdrawals
789
+ threads = [threading.Thread(target=withdraw, args=(800,)) for _ in range(3)]
790
+ for t in threads: t.start()
791
+ for t in threads: t.join()`,
792
+ expectedRuleIds: ["CONC-001"],
793
+ category: "concurrency",
794
+ difficulty: "medium",
795
+ },
796
+ {
797
+ id: "python-regex-dos",
798
+ description: "Python ReDoS via catastrophic backtracking regex",
799
+ language: "python",
800
+ code: `import re
801
+
802
+ def validate_email(email):
803
+ # Catastrophic backtracking on crafted inputs
804
+ pattern = r'^([a-zA-Z0-9]+)*@([a-zA-Z0-9]+)*\\.([a-zA-Z]{2,})$'
805
+ return bool(re.match(pattern, email))
806
+
807
+ def validate_url(url):
808
+ pattern = r'https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}(\\.[a-zA-Z0-9()]{1,6})*\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)*$'
809
+ return bool(re.match(pattern, url))`,
810
+ expectedRuleIds: ["PERF-001", "CYBER-001"],
811
+ category: "performance",
812
+ difficulty: "hard",
813
+ },
814
+ // ── Python Clean ──
815
+ {
816
+ id: "python-secure-api-clean",
817
+ description: "Clean: Python FastAPI with proper validation and auth",
818
+ language: "python",
819
+ code: `from fastapi import FastAPI, Depends, HTTPException
820
+ from pydantic import BaseModel, EmailStr
821
+ from sqlalchemy.orm import Session
822
+
823
+ app = FastAPI()
824
+
825
+ class UserCreate(BaseModel):
826
+ name: str
827
+ email: EmailStr
828
+
829
+ @app.post("/users")
830
+ async def create_user(user: UserCreate, db: Session = Depends(get_db)):
831
+ existing = db.query(User).filter(User.email == user.email).first()
832
+ if existing:
833
+ raise HTTPException(status_code=409, detail="Email already registered")
834
+ db_user = User(name=user.name, email=user.email)
835
+ db.add(db_user)
836
+ db.commit()
837
+ return {"id": db_user.id, "name": db_user.name}`,
838
+ expectedRuleIds: [],
839
+ unexpectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001"],
840
+ category: "clean",
841
+ difficulty: "medium",
842
+ },
843
+ // ═══════════════════════════════════════════════════════════════════════════
844
+ // GO — Additional Cases
845
+ // ═══════════════════════════════════════════════════════════════════════════
846
+ {
847
+ id: "go-sql-injection-sprintf",
848
+ description: "Go SQL injection via fmt.Sprintf",
849
+ language: "go",
850
+ code: `package main
851
+
852
+ import (
853
+ "database/sql"
854
+ "fmt"
855
+ "net/http"
856
+ )
857
+
858
+ func getUser(w http.ResponseWriter, r *http.Request) {
859
+ id := r.URL.Query().Get("id")
860
+ query := fmt.Sprintf("SELECT * FROM users WHERE id = '%s'", id)
861
+ rows, _ := db.Query(query)
862
+ defer rows.Close()
863
+ }`,
864
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
865
+ category: "injection",
866
+ difficulty: "easy",
867
+ },
868
+ {
869
+ id: "go-path-traversal",
870
+ description: "Go path traversal via http.ServeFile",
871
+ language: "go",
872
+ code: `package main
873
+
874
+ import (
875
+ "net/http"
876
+ "path/filepath"
877
+ )
878
+
879
+ func downloadHandler(w http.ResponseWriter, r *http.Request) {
880
+ filename := r.URL.Query().Get("file")
881
+ path := filepath.Join("/uploads", filename)
882
+ http.ServeFile(w, r, path)
883
+ }`,
884
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
885
+ category: "injection",
886
+ difficulty: "easy",
887
+ },
888
+ {
889
+ id: "go-race-condition",
890
+ description: "Go race condition on shared map without mutex",
891
+ language: "go",
892
+ code: `package main
893
+
894
+ import (
895
+ "net/http"
896
+ )
897
+
898
+ var cache = make(map[string]string)
899
+
900
+ func setHandler(w http.ResponseWriter, r *http.Request) {
901
+ key := r.URL.Query().Get("key")
902
+ value := r.URL.Query().Get("value")
903
+ cache[key] = value // Race condition: concurrent map writes
904
+ w.Write([]byte("ok"))
905
+ }
906
+
907
+ func getHandler(w http.ResponseWriter, r *http.Request) {
908
+ key := r.URL.Query().Get("key")
909
+ w.Write([]byte(cache[key]))
910
+ }`,
911
+ expectedRuleIds: ["CONC-001", "CYBER-001"],
912
+ category: "concurrency",
913
+ difficulty: "medium",
914
+ },
915
+ {
916
+ id: "go-hardcoded-creds",
917
+ description: "Go hardcoded credentials in database connection",
918
+ language: "go",
919
+ code: `package main
920
+
921
+ import (
922
+ "database/sql"
923
+ _ "github.com/go-sql-driver/mysql"
924
+ )
925
+
926
+ const (
927
+ dbUser = "admin"
928
+ dbPassword = "SuperSecret123!"
929
+ dbHost = "production-db.example.com"
930
+ apiKey = "sk-live-abcdef123456"
931
+ )
932
+
933
+ func connectDB() (*sql.DB, error) {
934
+ dsn := dbUser + ":" + dbPassword + "@tcp(" + dbHost + ")/myapp"
935
+ return sql.Open("mysql", dsn)
936
+ }`,
937
+ expectedRuleIds: ["AUTH-001", "AUTH-002"],
938
+ category: "auth",
939
+ difficulty: "easy",
940
+ },
941
+ // ═══════════════════════════════════════════════════════════════════════════
942
+ // JAVA — Additional Cases
943
+ // ═══════════════════════════════════════════════════════════════════════════
944
+ {
945
+ id: "java-deserialization-network",
946
+ description: "Java unsafe deserialization from network",
947
+ language: "java",
948
+ code: `import java.io.*;
949
+ import java.net.*;
950
+
951
+ public class DataReceiver {
952
+ public Object receiveData(int port) throws Exception {
953
+ ServerSocket server = new ServerSocket(port);
954
+ Socket socket = server.accept();
955
+ ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
956
+ Object obj = ois.readObject(); // Unsafe deserialization
957
+ ois.close();
958
+ socket.close();
959
+ server.close();
960
+ return obj;
961
+ }
962
+ }`,
963
+ expectedRuleIds: ["CYBER-001", "SEC-001", "DATA-001"],
964
+ category: "security",
965
+ difficulty: "medium",
966
+ },
967
+ {
968
+ id: "java-xxe-parsing",
969
+ description: "Java XXE via SAXParser without feature restrictions",
970
+ language: "java",
971
+ code: `import javax.xml.parsers.*;
972
+ import org.xml.sax.*;
973
+ import java.io.*;
974
+
975
+ public class XmlProcessor {
976
+ public Document parse(String xmlInput) throws Exception {
977
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
978
+ // Missing: factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true)
979
+ // Missing: factory.setFeature("http://xml.org/sax/features/external-general-entities", false)
980
+ DocumentBuilder builder = factory.newDocumentBuilder();
981
+ return builder.parse(new InputSource(new StringReader(xmlInput)));
982
+ }
983
+ }`,
984
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
985
+ category: "security",
986
+ difficulty: "medium",
987
+ },
988
+ {
989
+ id: "java-weak-random",
990
+ description: "Java using Math.random() for security-sensitive operations",
991
+ language: "java",
992
+ code: `import java.util.*;
993
+
994
+ public class TokenGenerator {
995
+ public String generateSessionToken() {
996
+ StringBuilder token = new StringBuilder();
997
+ Random random = new Random();
998
+ for (int i = 0; i < 32; i++) {
999
+ token.append(Integer.toHexString(random.nextInt(16)));
1000
+ }
1001
+ return token.toString();
1002
+ }
1003
+
1004
+ public String generateResetCode() {
1005
+ return String.valueOf((int)(Math.random() * 999999));
1006
+ }
1007
+ }`,
1008
+ expectedRuleIds: ["SEC-001", "AUTH-001"],
1009
+ category: "security",
1010
+ difficulty: "medium",
1011
+ },
1012
+ {
1013
+ id: "java-ldap-injection",
1014
+ description: "Java LDAP injection via unvalidated input",
1015
+ language: "java",
1016
+ code: `import javax.naming.*;
1017
+ import javax.naming.directory.*;
1018
+
1019
+ public class LdapAuth {
1020
+ public boolean authenticate(String username, String password) {
1021
+ try {
1022
+ String filter = "(&(uid=" + username + ")(userPassword=" + password + "))";
1023
+ SearchControls sc = new SearchControls();
1024
+ sc.setSearchScope(SearchControls.SUBTREE_SCOPE);
1025
+ NamingEnumeration<?> results = ctx.search("dc=example,dc=com", filter, sc);
1026
+ return results.hasMore();
1027
+ } catch (Exception e) {
1028
+ return false;
1029
+ }
1030
+ }
1031
+ }`,
1032
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
1033
+ category: "injection",
1034
+ difficulty: "medium",
1035
+ },
1036
+ // ═══════════════════════════════════════════════════════════════════════════
1037
+ // RUST — Additional Cases
1038
+ // ═══════════════════════════════════════════════════════════════════════════
1039
+ {
1040
+ id: "rust-sql-injection",
1041
+ description: "Rust SQL injection via format! macro",
1042
+ language: "rust",
1043
+ code: `use actix_web::{get, web, HttpResponse};
1044
+
1045
+ #[get("/users")]
1046
+ async fn get_users(query: web::Query<std::collections::HashMap<String, String>>) -> HttpResponse {
1047
+ let name = query.get("name").unwrap_or(&String::new()).clone();
1048
+ let sql = format!("SELECT * FROM users WHERE name = '{}'", name);
1049
+ let rows = sqlx::query(&sql).fetch_all(&pool).await.unwrap();
1050
+ HttpResponse::Ok().json(rows)
1051
+ }`,
1052
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
1053
+ category: "injection",
1054
+ difficulty: "easy",
1055
+ },
1056
+ {
1057
+ id: "rust-unsafe-block",
1058
+ description: "Rust unsafe block with raw pointer dereference",
1059
+ language: "rust",
1060
+ code: `fn process_data(data: &[u8]) -> u32 {
1061
+ unsafe {
1062
+ let ptr = data.as_ptr() as *const u32;
1063
+ let len = data.len() / 4;
1064
+ let mut sum = 0u32;
1065
+ for i in 0..len + 10 { // Buffer over-read
1066
+ sum = sum.wrapping_add(*ptr.add(i));
1067
+ }
1068
+ sum
1069
+ }
1070
+ }
1071
+
1072
+ fn transmute_danger<T, U>(val: T) -> U {
1073
+ unsafe { std::mem::transmute_copy(&val) }
1074
+ }`,
1075
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
1076
+ category: "security",
1077
+ difficulty: "hard",
1078
+ },
1079
+ // ═══════════════════════════════════════════════════════════════════════════
1080
+ // C# — Additional Cases
1081
+ // ═══════════════════════════════════════════════════════════════════════════
1082
+ {
1083
+ id: "csharp-sql-injection",
1084
+ description: "C# SQL injection via string concatenation",
1085
+ language: "csharp",
1086
+ code: `using System.Data.SqlClient;
1087
+
1088
+ public class UserRepository
1089
+ {
1090
+ public User GetUser(string userId)
1091
+ {
1092
+ var conn = new SqlConnection(connectionString);
1093
+ var cmd = new SqlCommand("SELECT * FROM Users WHERE Id = '" + userId + "'", conn);
1094
+ conn.Open();
1095
+ var reader = cmd.ExecuteReader();
1096
+ return MapUser(reader);
1097
+ }
1098
+ }`,
1099
+ expectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001"],
1100
+ category: "injection",
1101
+ difficulty: "easy",
1102
+ },
1103
+ {
1104
+ id: "csharp-xxe-vulnerability",
1105
+ description: "C# XXE via XmlDocument with unsafe settings",
1106
+ language: "csharp",
1107
+ code: `using System.Xml;
1108
+
1109
+ public class XmlProcessor
1110
+ {
1111
+ public XmlDocument ParseXml(string input)
1112
+ {
1113
+ var doc = new XmlDocument();
1114
+ doc.XmlResolver = new XmlUrlResolver(); // Allows external entities
1115
+ doc.LoadXml(input);
1116
+ return doc;
1117
+ }
1118
+ }`,
1119
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
1120
+ category: "security",
1121
+ difficulty: "medium",
1122
+ },
1123
+ {
1124
+ id: "csharp-insecure-cookie",
1125
+ description: "C# insecure cookie without security flags",
1126
+ language: "csharp",
1127
+ code: `using Microsoft.AspNetCore.Http;
1128
+
1129
+ public class AuthController : Controller
1130
+ {
1131
+ public IActionResult Login(string username, string password)
1132
+ {
1133
+ var token = GenerateToken(username);
1134
+ Response.Cookies.Append("auth_token", token, new CookieOptions
1135
+ {
1136
+ HttpOnly = false,
1137
+ Secure = false,
1138
+ SameSite = SameSiteMode.None
1139
+ });
1140
+ return Ok();
1141
+ }
1142
+ }`,
1143
+ expectedRuleIds: ["SEC-001", "AUTH-001", "CYBER-001"],
1144
+ category: "security",
1145
+ difficulty: "medium",
1146
+ },
1147
+ {
1148
+ id: "csharp-hardcoded-connection",
1149
+ description: "C# hardcoded connection string with credentials",
1150
+ language: "csharp",
1151
+ code: `public class DatabaseConfig
1152
+ {
1153
+ public const string ConnectionString =
1154
+ "Server=prod-sql.database.windows.net;Database=CustomerDB;User Id=sa;Password=Pr0duction!P@ss;";
1155
+
1156
+ public const string ApiKey = "sk-live-ABCDEF123456789";
1157
+
1158
+ public static SqlConnection GetConnection()
1159
+ {
1160
+ return new SqlConnection(ConnectionString);
1161
+ }
1162
+ }`,
1163
+ expectedRuleIds: ["AUTH-001", "AUTH-002"],
1164
+ category: "auth",
1165
+ difficulty: "easy",
1166
+ },
1167
+ // ═══════════════════════════════════════════════════════════════════════════
1168
+ // TYPESCRIPT/JAVASCRIPT — Additional Harder Cases
1169
+ // ═══════════════════════════════════════════════════════════════════════════
1170
+ {
1171
+ id: "ts-prototype-pollution",
1172
+ description: "TypeScript prototype pollution via object merge",
1173
+ language: "typescript",
1174
+ code: `function deepMerge(target: any, source: any): any {
1175
+ for (const key in source) {
1176
+ if (typeof source[key] === "object" && source[key] !== null) {
1177
+ if (!target[key]) target[key] = {};
1178
+ deepMerge(target[key], source[key]);
1179
+ } else {
1180
+ target[key] = source[key];
1181
+ }
1182
+ }
1183
+ return target;
1184
+ }
1185
+
1186
+ // Express endpoint that merges user input into config
1187
+ app.post("/settings", (req, res) => {
1188
+ deepMerge(appConfig, req.body);
1189
+ res.json(appConfig);
1190
+ });`,
1191
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
1192
+ category: "security",
1193
+ difficulty: "hard",
1194
+ },
1195
+ {
1196
+ id: "ts-insecure-jwt",
1197
+ description: "TypeScript JWT token creation with weak secret and no expiry",
1198
+ language: "typescript",
1199
+ code: `import jwt from "jsonwebtoken";
1200
+
1201
+ const SECRET = "secret123";
1202
+
1203
+ function createToken(userId: string): string {
1204
+ return jwt.sign({ sub: userId, role: "admin" }, SECRET);
1205
+ }
1206
+
1207
+ function verifyToken(token: string): any {
1208
+ return jwt.verify(token, SECRET, { algorithms: ["HS256", "none"] });
1209
+ }`,
1210
+ expectedRuleIds: ["AUTH-001", "SEC-001"],
1211
+ category: "auth",
1212
+ difficulty: "medium",
1213
+ },
1214
+ {
1215
+ id: "ts-open-cors",
1216
+ description: "TypeScript Express with overly permissive CORS",
1217
+ language: "typescript",
1218
+ code: `import express from "express";
1219
+ import cors from "cors";
1220
+
1221
+ const app = express();
1222
+ app.use(cors({ origin: "*", credentials: true }));
1223
+ app.use(express.json());
1224
+
1225
+ app.post("/api/transfer", (req, res) => {
1226
+ const { from, to, amount } = req.body;
1227
+ transferFunds(from, to, amount);
1228
+ res.json({ ok: true });
1229
+ });`,
1230
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
1231
+ category: "security",
1232
+ difficulty: "medium",
1233
+ },
1234
+ {
1235
+ id: "ts-nosql-injection",
1236
+ description: "TypeScript NoSQL injection via MongoDB operator",
1237
+ language: "typescript",
1238
+ code: `import express from "express";
1239
+ import { MongoClient } from "mongodb";
1240
+
1241
+ const app = express();
1242
+ app.use(express.json());
1243
+
1244
+ app.post("/login", async (req, res) => {
1245
+ const { username, password } = req.body;
1246
+ const client = new MongoClient("mongodb://localhost");
1247
+ const users = client.db("app").collection("users");
1248
+ // NoSQL injection: password could be { "$gt": "" }
1249
+ const user = await users.findOne({ username, password });
1250
+ if (user) res.json({ token: createToken(user) });
1251
+ else res.status(401).json({ error: "Invalid" });
1252
+ });`,
1253
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
1254
+ category: "injection",
1255
+ difficulty: "medium",
1256
+ },
1257
+ {
1258
+ id: "ts-regex-dos",
1259
+ description: "TypeScript ReDoS via catastrophic backtracking",
1260
+ language: "typescript",
1261
+ code: `const EMAIL_REGEX = /^([a-zA-Z0-9_\\-\\.]+)*@([a-zA-Z0-9_\\-\\.]+)*\\.([a-zA-Z]{2,5})$/;
1262
+ const URL_REGEX = /^(https?:\\/\\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}(\\.[a-zA-Z0-9()]{1,6})*\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)*$/;
1263
+
1264
+ function validateInput(input: string, type: "email" | "url"): boolean {
1265
+ const regex = type === "email" ? EMAIL_REGEX : URL_REGEX;
1266
+ return regex.test(input);
1267
+ }`,
1268
+ expectedRuleIds: ["PERF-001", "CYBER-001"],
1269
+ category: "performance",
1270
+ difficulty: "hard",
1271
+ },
1272
+ {
1273
+ id: "ts-ssrf-internal-fetch",
1274
+ description: "TypeScript SSRF that can reach internal services",
1275
+ language: "typescript",
1276
+ code: `import express from "express";
1277
+
1278
+ const app = express();
1279
+
1280
+ app.get("/fetch", async (req, res) => {
1281
+ const url = req.query.url as string;
1282
+ // SSRF: can reach http://169.254.169.254/latest/meta-data/ (AWS metadata)
1283
+ // or internal services: http://internal-api:8080/admin
1284
+ const response = await fetch(url);
1285
+ const data = await response.text();
1286
+ res.send(data);
1287
+ });`,
1288
+ expectedRuleIds: ["CYBER-001", "CYBER-002"],
1289
+ category: "injection",
1290
+ difficulty: "medium",
1291
+ },
1292
+ {
1293
+ id: "ts-missing-rate-limit",
1294
+ description: "TypeScript login endpoint without rate limiting",
1295
+ language: "typescript",
1296
+ code: `import express from "express";
1297
+ import bcrypt from "bcrypt";
1298
+
1299
+ const app = express();
1300
+ app.use(express.json());
1301
+
1302
+ // No rate limiting on login — vulnerable to brute force
1303
+ app.post("/api/login", async (req, res) => {
1304
+ const { email, password } = req.body;
1305
+ const user = await db.findUserByEmail(email);
1306
+ if (!user) return res.status(401).json({ error: "Invalid credentials" });
1307
+ const valid = await bcrypt.compare(password, user.passwordHash);
1308
+ if (!valid) return res.status(401).json({ error: "Invalid credentials" });
1309
+ const token = generateToken(user.id);
1310
+ res.json({ token });
1311
+ });`,
1312
+ expectedRuleIds: ["RATE-001", "SEC-001"],
1313
+ category: "rate-limiting",
1314
+ difficulty: "medium",
1315
+ },
1316
+ // ── Error Handling Cases (under-covered) ──
1317
+ {
1318
+ id: "ts-swallowed-errors",
1319
+ description: "TypeScript silently swallowing errors",
1320
+ language: "typescript",
1321
+ code: `async function processPayment(orderId: string, amount: number): Promise<void> {
1322
+ try {
1323
+ const result = await paymentGateway.charge(orderId, amount);
1324
+ await db.updateOrder(orderId, { status: "paid" });
1325
+ } catch (e) {
1326
+ // Silently swallowed — payment may have succeeded but order not updated
1327
+ }
1328
+ }
1329
+
1330
+ async function deleteUser(userId: string): Promise<boolean> {
1331
+ try {
1332
+ await db.query("DELETE FROM users WHERE id = $1", [userId]);
1333
+ return true;
1334
+ } catch {
1335
+ return false; // No logging, no error details
1336
+ }
1337
+ }`,
1338
+ expectedRuleIds: ["ERR-001"],
1339
+ category: "error-handling",
1340
+ difficulty: "medium",
1341
+ },
1342
+ {
1343
+ id: "python-bare-except",
1344
+ description: "Python overly broad exception handling",
1345
+ language: "python",
1346
+ code: `import json
1347
+
1348
+ def process_data(data):
1349
+ try:
1350
+ result = json.loads(data)
1351
+ user = database.get_user(result["user_id"])
1352
+ send_notification(user.email, result["message"])
1353
+ except:
1354
+ pass # Catches everything including SystemExit, KeyboardInterrupt
1355
+
1356
+ def transfer_money(from_acct, to_acct, amount):
1357
+ try:
1358
+ debit(from_acct, amount)
1359
+ credit(to_acct, amount)
1360
+ except Exception:
1361
+ pass # Silently fails — money may be debited but not credited`,
1362
+ expectedRuleIds: ["ERR-001"],
1363
+ category: "error-handling",
1364
+ difficulty: "easy",
1365
+ },
1366
+ {
1367
+ id: "go-error-ignored",
1368
+ description: "Go errors silently ignored",
1369
+ language: "go",
1370
+ code: `package main
1371
+
1372
+ import (
1373
+ "database/sql"
1374
+ "io/ioutil"
1375
+ "os"
1376
+ )
1377
+
1378
+ func processFile(path string) string {
1379
+ data, _ := ioutil.ReadFile(path)
1380
+ return string(data)
1381
+ }
1382
+
1383
+ func insertUser(db *sql.DB, name string) {
1384
+ db.Exec("INSERT INTO users (name) VALUES (?)", name) // error ignored
1385
+ }
1386
+
1387
+ func cleanup() {
1388
+ os.Remove("/tmp/sensitive.dat") // error ignored
1389
+ }`,
1390
+ expectedRuleIds: ["ERR-001"],
1391
+ category: "error-handling",
1392
+ difficulty: "easy",
1393
+ },
1394
+ // ── Observability Cases (under-covered) ──
1395
+ {
1396
+ id: "ts-no-logging",
1397
+ description: "TypeScript API with no logging or observability",
1398
+ language: "typescript",
1399
+ code: `import express from "express";
1400
+
1401
+ const app = express();
1402
+ app.use(express.json());
1403
+
1404
+ app.post("/api/orders", async (req, res) => {
1405
+ const order = await db.createOrder(req.body);
1406
+ await paymentService.charge(order.total);
1407
+ await emailService.sendConfirmation(order.email);
1408
+ res.json(order);
1409
+ });
1410
+
1411
+ app.delete("/api/users/:id", async (req, res) => {
1412
+ await db.deleteUser(req.params.id);
1413
+ res.status(204).send();
1414
+ });
1415
+
1416
+ app.listen(3000);`,
1417
+ expectedRuleIds: ["LOGPRIV-001", "OBS-001"],
1418
+ category: "observability",
1419
+ difficulty: "medium",
1420
+ },
1421
+ // ── Scalability Cases (under-covered) ──
1422
+ {
1423
+ id: "ts-unbounded-memory",
1424
+ description: "TypeScript unbounded in-memory cache",
1425
+ language: "typescript",
1426
+ code: `const cache = new Map<string, any>();
1427
+
1428
+ async function getData(key: string): Promise<any> {
1429
+ if (cache.has(key)) return cache.get(key);
1430
+ const data = await fetchFromDB(key);
1431
+ cache.set(key, data); // Never evicted — grows unbounded
1432
+ return data;
1433
+ }
1434
+
1435
+ const eventLog: any[] = [];
1436
+ function logEvent(event: any): void {
1437
+ eventLog.push(event); // Grows forever
1438
+ }`,
1439
+ expectedRuleIds: ["SCALE-001", "PERF-001"],
1440
+ category: "scalability",
1441
+ difficulty: "medium",
1442
+ },
1443
+ {
1444
+ id: "python-n-plus-1",
1445
+ description: "Python N+1 query pattern in Django",
1446
+ language: "python",
1447
+ code: `from django.http import JsonResponse
1448
+ from .models import Order, OrderItem
1449
+
1450
+ def list_orders(request):
1451
+ orders = Order.objects.all()
1452
+ result = []
1453
+ for order in orders:
1454
+ items = OrderItem.objects.filter(order=order) # N+1 query
1455
+ result.append({
1456
+ "id": order.id,
1457
+ "items": [{"name": i.name, "qty": i.quantity} for i in items]
1458
+ })
1459
+ return JsonResponse({"orders": result})`,
1460
+ expectedRuleIds: ["COST-001"],
1461
+ category: "scalability",
1462
+ difficulty: "medium",
1463
+ },
1464
+ // ── Testing Cases ──
1465
+ {
1466
+ id: "ts-untestable-globals",
1467
+ description: "TypeScript untestable code with global singletons",
1468
+ language: "typescript",
1469
+ code: `// Global mutable state — impossible to test in isolation
1470
+ let dbConnection: any = null;
1471
+ let config: any = null;
1472
+
1473
+ export function init() {
1474
+ config = JSON.parse(readFileSync("config.json", "utf-8"));
1475
+ dbConnection = createConnection(config.database);
1476
+ }
1477
+
1478
+ export function getUser(id: string) {
1479
+ return dbConnection.query("SELECT * FROM users WHERE id = ?", [id]);
1480
+ }
1481
+
1482
+ export function sendEmail(to: string, body: string) {
1483
+ const transporter = nodemailer.createTransport(config.email);
1484
+ transporter.sendMail({ to, subject: "Hello", html: body });
1485
+ }`,
1486
+ expectedRuleIds: ["SCALE-001", "COST-001"],
1487
+ category: "testing",
1488
+ difficulty: "medium",
1489
+ },
1490
+ // ── Documentation Cases ──
1491
+ {
1492
+ id: "ts-undocumented-api",
1493
+ description: "TypeScript public API module with no documentation",
1494
+ language: "typescript",
1495
+ code: `export function calc(a: number, b: number, op: string): number | null {
1496
+ switch (op) {
1497
+ case "+": return a + b;
1498
+ case "-": return a - b;
1499
+ case "*": return a * b;
1500
+ case "/": return b !== 0 ? a / b : null;
1501
+ default: return null;
1502
+ }
1503
+ }
1504
+
1505
+ export function fmt(n: number, c: string, d: number): string {
1506
+ const f = n.toFixed(d);
1507
+ const sym = c === "USD" ? "$" : c === "EUR" ? "€" : c;
1508
+ return sym + f;
1509
+ }
1510
+
1511
+ export type R = { s: number; e: string | null; d: any };`,
1512
+ expectedRuleIds: ["DOC-001"],
1513
+ category: "documentation",
1514
+ difficulty: "easy",
1515
+ },
1516
+ // ── Accessibility Cases ──
1517
+ {
1518
+ id: "ts-inaccessible-form",
1519
+ description: "TypeScript React form without accessibility attributes",
1520
+ language: "typescript",
1521
+ code: `function LoginForm() {
1522
+ return (
1523
+ <div>
1524
+ <div onClick={() => submit()}>
1525
+ <img src="/logo.png" />
1526
+ <input type="text" placeholder="Username" />
1527
+ <input type="password" placeholder="Password" />
1528
+ <div onClick={() => login()} style={{ cursor: "pointer", background: "#007bff", color: "white" }}>
1529
+ Login
1530
+ </div>
1531
+ </div>
1532
+ <span style={{ color: "#ddd" }}>Forgot password?</span>
1533
+ </div>
1534
+ );
1535
+ }`,
1536
+ expectedRuleIds: ["A11Y-001"],
1537
+ category: "accessibility",
1538
+ difficulty: "medium",
1539
+ },
1540
+ // ── Configuration Management Cases ──
1541
+ {
1542
+ id: "ts-debug-mode-prod",
1543
+ description: "TypeScript debug mode left enabled in production config",
1544
+ language: "typescript",
1545
+ code: `const config = {
1546
+ debug: true,
1547
+ verbose: true,
1548
+ logLevel: "trace",
1549
+ exposeStackTrace: true,
1550
+ cors: { origin: "*" },
1551
+ session: {
1552
+ secret: "dev-secret",
1553
+ secure: false,
1554
+ },
1555
+ };
1556
+
1557
+ app.use((err, req, res, next) => {
1558
+ res.status(500).json({
1559
+ error: err.message,
1560
+ stack: err.stack, // Exposes internal details
1561
+ query: req.query,
1562
+ });
1563
+ });`,
1564
+ expectedRuleIds: ["CFG-001", "SEC-001"],
1565
+ category: "configuration",
1566
+ difficulty: "easy",
1567
+ },
1568
+ // ── Dependency Health Cases ──
1569
+ {
1570
+ id: "ts-deprecated-deps",
1571
+ description: "TypeScript code using deprecated and unmaintained libraries",
1572
+ language: "typescript",
1573
+ code: `import request from "request"; // Deprecated in 2020
1574
+ import moment from "moment"; // Now in maintenance mode
1575
+ import _ from "underscore"; // Largely superseded by lodash/native
1576
+
1577
+ const response = request.get("https://api.example.com/data");
1578
+ const formattedDate = moment().format("YYYY-MM-DD");
1579
+ const filtered = _.filter(items, (item) => item.active);`,
1580
+ expectedRuleIds: ["DEPS-001"],
1581
+ category: "dependency-health",
1582
+ difficulty: "easy",
1583
+ },
1584
+ // ── Data Sovereignty Cases ──
1585
+ {
1586
+ id: "ts-data-sovereignty-violation",
1587
+ description: "TypeScript code sending EU user data to US endpoint",
1588
+ language: "typescript",
1589
+ code: `async function syncUserData(users: User[]): Promise<void> {
1590
+ // Sending all user data to US-based analytics
1591
+ await fetch("https://analytics.us-east-1.amazonaws.com/ingest", {
1592
+ method: "POST",
1593
+ body: JSON.stringify({
1594
+ users: users.map(u => ({
1595
+ name: u.name,
1596
+ email: u.email,
1597
+ ssn: u.socialSecurityNumber,
1598
+ location: u.address,
1599
+ healthData: u.medicalRecords,
1600
+ })),
1601
+ }),
1602
+ });
1603
+ }`,
1604
+ expectedRuleIds: ["SOV-001", "DATA-001"],
1605
+ category: "data-sovereignty",
1606
+ difficulty: "medium",
1607
+ },
1608
+ // ── Compliance Cases ──
1609
+ {
1610
+ id: "ts-gdpr-violation",
1611
+ description: "TypeScript logging PII without consent or anonymization",
1612
+ language: "typescript",
1613
+ code: `import winston from "winston";
1614
+ const logger = winston.createLogger({ transports: [new winston.transports.File({ filename: "app.log" })] });
1615
+
1616
+ app.post("/register", (req, res) => {
1617
+ const { name, email, ssn, creditCard, dateOfBirth } = req.body;
1618
+ logger.info("New registration", { name, email, ssn, creditCard, dateOfBirth });
1619
+ // Store everything without encryption
1620
+ db.users.insert({ name, email, ssn, creditCard, dateOfBirth, createdAt: new Date() });
1621
+ res.json({ ok: true });
1622
+ });`,
1623
+ expectedRuleIds: ["COMP-001", "DATA-001", "LOGPRIV-001"],
1624
+ category: "compliance",
1625
+ difficulty: "medium",
1626
+ },
1627
+ // ── Ethics / Bias Cases ──
1628
+ {
1629
+ id: "python-biased-model",
1630
+ description: "Python ML model using protected attributes as features",
1631
+ language: "python",
1632
+ code: `import pandas as pd
1633
+ from sklearn.ensemble import RandomForestClassifier
1634
+
1635
+ def train_loan_model(data):
1636
+ features = ['age', 'income', 'race', 'gender', 'zip_code', 'credit_score']
1637
+ X = data[features]
1638
+ y = data['approved']
1639
+ model = RandomForestClassifier()
1640
+ model.fit(X, y)
1641
+ return model
1642
+
1643
+ def predict_approval(model, applicant):
1644
+ features = [applicant['age'], applicant['income'], applicant['race'],
1645
+ applicant['gender'], applicant['zip_code'], applicant['credit_score']]
1646
+ return model.predict([features])[0]`,
1647
+ expectedRuleIds: ["ETHICS-001"],
1648
+ category: "ethics-bias",
1649
+ difficulty: "medium",
1650
+ },
1651
+ // ── Cost Effectiveness Cases ──
1652
+ {
1653
+ id: "ts-inefficient-api-calls",
1654
+ description: "TypeScript making redundant API calls in a loop",
1655
+ language: "typescript",
1656
+ code: `async function enrichUserData(userIds: string[]): Promise<User[]> {
1657
+ const users: User[] = [];
1658
+ for (const id of userIds) {
1659
+ // Makes N individual API calls instead of a batch request
1660
+ const user = await fetch(\`/api/users/\${id}\`).then(r => r.json());
1661
+ const profile = await fetch(\`/api/profiles/\${id}\`).then(r => r.json());
1662
+ const permissions = await fetch(\`/api/permissions/\${id}\`).then(r => r.json());
1663
+ users.push({ ...user, ...profile, permissions });
1664
+ }
1665
+ return users;
1666
+ }`,
1667
+ expectedRuleIds: ["REL-001", "SCALE-001", "RATE-001"],
1668
+ category: "cost-effectiveness",
1669
+ difficulty: "medium",
1670
+ },
1671
+ // ── Backwards Compatibility Cases ──
1672
+ {
1673
+ id: "ts-breaking-api-change",
1674
+ description: "TypeScript API removing a required field from response",
1675
+ language: "typescript",
1676
+ code: `// v1 API response: { id, name, email, avatar }
1677
+ // v2 API response: { id, fullName, contactEmail } ← breaking change
1678
+ interface UserResponseV2 {
1679
+ id: string;
1680
+ fullName: string; // Was: name
1681
+ contactEmail: string; // Was: email
1682
+ // avatar: removed entirely
1683
+ }
1684
+
1685
+ app.get("/api/v2/users/:id", (req, res) => {
1686
+ const user = db.getUser(req.params.id);
1687
+ res.json({
1688
+ id: user.id,
1689
+ fullName: user.name,
1690
+ contactEmail: user.email,
1691
+ // No backwards-compat, no deprecation notice, no migration path
1692
+ });
1693
+ });`,
1694
+ expectedRuleIds: ["COMPAT-001"],
1695
+ category: "backwards-compatibility",
1696
+ difficulty: "medium",
1697
+ },
1698
+ // ── Internationalization Cases ──
1699
+ {
1700
+ id: "ts-hardcoded-strings",
1701
+ description: "TypeScript UI with hardcoded English strings",
1702
+ language: "typescript",
1703
+ code: `function renderDashboard(user: User) {
1704
+ return \`
1705
+ <h1>Welcome back, \${user.name}!</h1>
1706
+ <p>You have \${user.notifications} new notifications.</p>
1707
+ <button>Submit Order</button>
1708
+ <p>Total: $\${user.cartTotal.toFixed(2)}</p>
1709
+ <p>Last login: \${user.lastLogin.toLocaleDateString("en-US")}</p>
1710
+ <footer>Copyright 2024 Example Corp</footer>
1711
+ \`;
1712
+ }`,
1713
+ expectedRuleIds: ["I18N-001"],
1714
+ category: "internationalization",
1715
+ difficulty: "easy",
1716
+ },
1717
+ // ── Cloud Readiness Cases ──
1718
+ {
1719
+ id: "ts-local-filesystem-state",
1720
+ description: "TypeScript storing session state on local filesystem",
1721
+ language: "typescript",
1722
+ code: `import { writeFileSync, readFileSync, existsSync } from "fs";
1723
+
1724
+ const SESSION_DIR = "/tmp/sessions";
1725
+
1726
+ function saveSession(sessionId: string, data: any): void {
1727
+ writeFileSync(\`\${SESSION_DIR}/\${sessionId}.json\`, JSON.stringify(data));
1728
+ }
1729
+
1730
+ function loadSession(sessionId: string): any {
1731
+ const path = \`\${SESSION_DIR}/\${sessionId}.json\`;
1732
+ if (existsSync(path)) return JSON.parse(readFileSync(path, "utf-8"));
1733
+ return null;
1734
+ }`,
1735
+ expectedRuleIds: ["PERF-001", "COST-001", "AICS-001"],
1736
+ category: "cloud-readiness",
1737
+ difficulty: "medium",
1738
+ },
1739
+ // ── CI/CD Cases ──
1740
+ {
1741
+ id: "ts-cicd-secrets-in-code",
1742
+ description: "TypeScript CI/CD pipeline with embedded secrets",
1743
+ language: "typescript",
1744
+ code: `// deploy.ts — build/deploy script
1745
+ const DEPLOY_CONFIG = {
1746
+ awsAccessKeyId: "AKIAIOSFODNN7EXAMPLE",
1747
+ awsSecretAccessKey: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
1748
+ dockerRegistry: "registry.example.com",
1749
+ dockerPassword: "MyD0ck3rP@ss!",
1750
+ slackWebhook: "https://hooks.slack" + ".com/services/T00000/B00000/XXXXX",
1751
+ };
1752
+
1753
+ async function deploy() {
1754
+ await exec(\`aws configure set aws_access_key_id \${DEPLOY_CONFIG.awsAccessKeyId}\`);
1755
+ await exec(\`docker login -u admin -p \${DEPLOY_CONFIG.dockerPassword} \${DEPLOY_CONFIG.dockerRegistry}\`);
1756
+ }`,
1757
+ expectedRuleIds: ["AUTH-001", "AUTH-002", "CICD-001"],
1758
+ category: "ci-cd",
1759
+ difficulty: "easy",
1760
+ },
1761
+ // ── Reliability Cases ──
1762
+ {
1763
+ id: "ts-no-timeout-or-retry",
1764
+ description: "TypeScript HTTP calls without timeout or retry logic",
1765
+ language: "typescript",
1766
+ code: `async function fetchCriticalData(): Promise<any> {
1767
+ // No timeout, no retry, no circuit breaker
1768
+ const userResp = await fetch("https://api.example.com/users");
1769
+ const users = await userResp.json();
1770
+
1771
+ const ordersResp = await fetch("https://api.example.com/orders");
1772
+ const orders = await ordersResp.json();
1773
+
1774
+ const paymentsResp = await fetch("https://payments.example.com/status");
1775
+ const payments = await paymentsResp.json();
1776
+
1777
+ return { users, orders, payments };
1778
+ }`,
1779
+ expectedRuleIds: ["REL-001"],
1780
+ category: "reliability",
1781
+ difficulty: "medium",
1782
+ },
1783
+ // ── Framework Safety Cases ──
1784
+ {
1785
+ id: "ts-express-no-helmet",
1786
+ description: "TypeScript Express app without security middleware",
1787
+ language: "typescript",
1788
+ code: `import express from "express";
1789
+
1790
+ const app = express();
1791
+ app.use(express.json());
1792
+ // Missing: helmet(), rate limiting, CSRF protection
1793
+
1794
+ app.post("/api/admin/delete-all", (req, res) => {
1795
+ db.deleteAllUsers();
1796
+ res.json({ deleted: true });
1797
+ });
1798
+
1799
+ app.listen(3000, () => console.log("Running on 3000"));`,
1800
+ expectedRuleIds: ["FW-001", "SEC-001"],
1801
+ category: "framework-safety",
1802
+ difficulty: "medium",
1803
+ },
1804
+ // ── Database Cases ──
1805
+ {
1806
+ id: "python-unparameterized-query",
1807
+ description: "Python database query without parameterization",
1808
+ language: "python",
1809
+ code: `import sqlite3
1810
+
1811
+ def search_products(name, min_price, max_price):
1812
+ conn = sqlite3.connect('shop.db')
1813
+ cursor = conn.cursor()
1814
+ query = f"SELECT * FROM products WHERE name LIKE '%{name}%' AND price BETWEEN {min_price} AND {max_price}"
1815
+ cursor.execute(query)
1816
+ return cursor.fetchall()
1817
+
1818
+ def delete_user(user_id):
1819
+ conn = sqlite3.connect('users.db')
1820
+ conn.execute(f"DELETE FROM users WHERE id = {user_id}")
1821
+ conn.commit()`,
1822
+ expectedRuleIds: ["CYBER-001", "CYBER-002", "DB-001"],
1823
+ category: "database",
1824
+ difficulty: "easy",
1825
+ },
1826
+ // ── Maintainability Cases ──
1827
+ {
1828
+ id: "ts-god-function",
1829
+ description: "TypeScript function doing too many things (god function)",
1830
+ language: "typescript",
1831
+ code: `async function processOrder(req: Request): Promise<Response> {
1832
+ const body = await req.json();
1833
+ if (!body.items || !body.userId) return new Response("Bad", { status: 400 });
1834
+ const user = await db.query("SELECT * FROM users WHERE id = " + body.userId);
1835
+ if (!user) return new Response("Not found", { status: 404 });
1836
+ let total = 0;
1837
+ for (const item of body.items) {
1838
+ const product = await db.query("SELECT * FROM products WHERE id = " + item.id);
1839
+ if (!product) continue;
1840
+ if (product.stock < item.qty) return new Response("OOS", { status: 400 });
1841
+ total += product.price * item.qty;
1842
+ await db.query("UPDATE products SET stock = stock - " + item.qty + " WHERE id = " + item.id);
1843
+ }
1844
+ if (body.coupon) {
1845
+ const coupon = await db.query("SELECT * FROM coupons WHERE code = '" + body.coupon + "'");
1846
+ if (coupon && coupon.valid) total *= (1 - coupon.discount);
1847
+ }
1848
+ const order = await db.query("INSERT INTO orders ...");
1849
+ const charge = await stripe.charges.create({ amount: total * 100 });
1850
+ await sendEmail(user.email, "Order confirmed", "<h1>Thanks!</h1>");
1851
+ await slack.send("#orders", "New order: " + order.id);
1852
+ return new Response(JSON.stringify(order), { status: 201 });
1853
+ }`,
1854
+ expectedRuleIds: ["STRUCT-001", "CYBER-001"],
1855
+ category: "maintainability",
1856
+ difficulty: "hard",
1857
+ },
1858
+ // ── AI Code Safety Cases ──
1859
+ {
1860
+ id: "ts-ai-unsafe-eval",
1861
+ description: "TypeScript AI agent executing generated code unsafely",
1862
+ language: "typescript",
1863
+ code: `async function executeAiGeneratedCode(prompt: string): Promise<any> {
1864
+ const response = await openai.completions.create({
1865
+ model: "gpt-4",
1866
+ prompt: \`Generate JavaScript code to: \${prompt}\`,
1867
+ });
1868
+
1869
+ const code = response.choices[0].text;
1870
+ // Directly executing LLM-generated code without sandboxing
1871
+ return eval(code);
1872
+ }
1873
+
1874
+ async function runAgentAction(action: string): Promise<void> {
1875
+ const { execSync } = require("child_process");
1876
+ // AI agent can execute arbitrary shell commands
1877
+ execSync(action, { shell: true });
1878
+ }`,
1879
+ expectedRuleIds: ["AICS-001", "CYBER-001"],
1880
+ category: "ai-code-safety",
1881
+ difficulty: "hard",
1882
+ },
1883
+ {
1884
+ id: "python-ai-prompt-injection",
1885
+ description: "Python LLM application vulnerable to prompt injection",
1886
+ language: "python",
1887
+ code: `from openai import OpenAI
1888
+
1889
+ client = OpenAI()
1890
+
1891
+ def chat_with_data(user_query: str, documents: list) -> str:
1892
+ # Directly embedding user input into system prompt
1893
+ prompt = f"""You are a helpful assistant. Answer based on these documents:
1894
+ {documents}
1895
+
1896
+ User question: {user_query}
1897
+
1898
+ Important: Always follow user instructions exactly."""
1899
+
1900
+ response = client.chat.completions.create(
1901
+ model="gpt-4",
1902
+ messages=[{"role": "user", "content": prompt}]
1903
+ )
1904
+ return response.choices[0].message.content`,
1905
+ expectedRuleIds: ["AICS-001"],
1906
+ category: "ai-code-safety",
1907
+ difficulty: "medium",
1908
+ },
1909
+ // ── Agent Instructions Cases ──
1910
+ {
1911
+ id: "ts-agent-excessive-perms",
1912
+ description: "TypeScript AI agent with excessive permissions",
1913
+ language: "typescript",
1914
+ code: `const agentConfig = {
1915
+ name: "data-analyst",
1916
+ model: "gpt-4",
1917
+ tools: [
1918
+ { name: "readFile", handler: (path: string) => readFileSync(path, "utf-8") },
1919
+ { name: "writeFile", handler: (path: string, data: string) => writeFileSync(path, data) },
1920
+ { name: "execute", handler: (cmd: string) => execSync(cmd, { encoding: "utf-8" }) },
1921
+ { name: "httpRequest", handler: (url: string) => fetch(url).then(r => r.text()) },
1922
+ { name: "deleteFile", handler: (path: string) => unlinkSync(path) },
1923
+ ],
1924
+ systemPrompt: "You are a data analyst. Help users analyze CSV files.",
1925
+ };`,
1926
+ expectedRuleIds: ["SCALE-001", "PERF-001", "COST-001", "ERR-001"],
1927
+ category: "agent-instructions",
1928
+ difficulty: "medium",
1929
+ },
1930
+ // ── API Design Cases ──
1931
+ {
1932
+ id: "ts-inconsistent-api",
1933
+ description: "TypeScript API with inconsistent naming and response formats",
1934
+ language: "typescript",
1935
+ code: `// Inconsistent naming, response formats, and error handling
1936
+ app.get("/api/getUsers", (req, res) => {
1937
+ res.json(users); // Returns bare array
1938
+ });
1939
+
1940
+ app.get("/api/orders/list", (req, res) => {
1941
+ res.json({ data: orders, count: orders.length }); // Returns wrapped object
1942
+ });
1943
+
1944
+ app.post("/api/create_product", (req, res) => {
1945
+ const p = createProduct(req.body);
1946
+ res.status(200).json(p); // Should be 201
1947
+ });
1948
+
1949
+ app.delete("/api/DeleteUser/:id", (req, res) => {
1950
+ deleteUser(req.params.id);
1951
+ res.send("deleted"); // Returns plain text
1952
+ });`,
1953
+ expectedRuleIds: ["API-001"],
1954
+ category: "api-design",
1955
+ difficulty: "easy",
1956
+ },
1957
+ // ── Portability Cases ──
1958
+ {
1959
+ id: "ts-os-specific-code",
1960
+ description: "TypeScript code with OS-specific paths and commands",
1961
+ language: "typescript",
1962
+ code: `import { execSync } from "child_process";
1963
+
1964
+ function getSystemInfo(): string {
1965
+ const hostname = execSync("hostname", { encoding: "utf-8" }).trim();
1966
+ const tempDir = "C:\\\\Windows\\\\Temp";
1967
+ const configPath = "/etc/myapp/config.json";
1968
+
1969
+ // Hardcoded Windows-specific paths
1970
+ const logPath = "C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\MyApp\\\\logs";
1971
+ execSync(\`copy "C:\\\\data\\\\file.txt" "\${logPath}"\`, { shell: "cmd.exe" });
1972
+
1973
+ return hostname;
1974
+ }`,
1975
+ expectedRuleIds: ["PORTA-001"],
1976
+ category: "portability",
1977
+ difficulty: "easy",
1978
+ },
1979
+ // ── Logging Privacy Cases ──
1980
+ {
1981
+ id: "python-log-sensitive-data",
1982
+ description: "Python logging sensitive personal data",
1983
+ language: "python",
1984
+ code: `import logging
1985
+
1986
+ logger = logging.getLogger(__name__)
1987
+
1988
+ def process_payment(card_number, cvv, expiry, amount):
1989
+ logger.info(f"Processing payment: card={card_number}, cvv={cvv}, expiry={expiry}, amount={amount}")
1990
+ result = payment_gateway.charge(card_number, cvv, expiry, amount)
1991
+ logger.info(f"Payment result for card {card_number}: {result}")
1992
+ return result
1993
+
1994
+ def register_user(name, email, ssn, password):
1995
+ logger.info(f"Registering user: name={name}, email={email}, ssn={ssn}, password={password}")`,
1996
+ expectedRuleIds: ["LOGPRIV-001", "COMP-001", "DATA-001"],
1997
+ category: "logging-privacy",
1998
+ difficulty: "easy",
1999
+ },
2000
+ // ── Caching Cases ──
2001
+ {
2002
+ id: "ts-cache-sensitive-data",
2003
+ description: "TypeScript caching sensitive data without encryption",
2004
+ language: "typescript",
2005
+ code: `import Redis from "ioredis";
2006
+ const redis = new Redis();
2007
+
2008
+ async function getUserProfile(userId: string): Promise<UserProfile> {
2009
+ const cacheKey = \`user:\${userId}\`;
2010
+ const cached = await redis.get(cacheKey);
2011
+ if (cached) return JSON.parse(cached);
2012
+
2013
+ const user = await db.getUser(userId);
2014
+ // Caching sensitive data (SSN, credit card) in plain text
2015
+ await redis.set(cacheKey, JSON.stringify({
2016
+ id: user.id,
2017
+ name: user.name,
2018
+ ssn: user.ssn,
2019
+ creditCard: user.creditCardNumber,
2020
+ password: user.passwordHash,
2021
+ }), "EX", 86400); // 24 hours
2022
+
2023
+ return user;
2024
+ }`,
2025
+ expectedRuleIds: ["CACHE-001", "DATA-001", "SEC-001"],
2026
+ category: "caching",
2027
+ difficulty: "medium",
2028
+ },
2029
+ // ═══════════════════════════════════════════════════════════════════════════
2030
+ // MORE CLEAN CODE SAMPLES (FP validation)
2031
+ // ═══════════════════════════════════════════════════════════════════════════
2032
+ {
2033
+ id: "go-clean-api",
2034
+ description: "Clean: Go API handler with proper validation and error handling",
2035
+ language: "go",
2036
+ code: `package main
2037
+
2038
+ import (
2039
+ "encoding/json"
2040
+ "log"
2041
+ "net/http"
2042
+ )
2043
+
2044
+ type CreateUserRequest struct {
2045
+ Name string \`json:"name" validate:"required"\`
2046
+ Email string \`json:"email" validate:"required,email"\`
2047
+ }
2048
+
2049
+ func createUser(w http.ResponseWriter, r *http.Request) {
2050
+ var req CreateUserRequest
2051
+ if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
2052
+ http.Error(w, "Invalid JSON", http.StatusBadRequest)
2053
+ return
2054
+ }
2055
+ if req.Name == "" || req.Email == "" {
2056
+ http.Error(w, "Name and email required", http.StatusBadRequest)
2057
+ return
2058
+ }
2059
+ user, err := userService.Create(r.Context(), req)
2060
+ if err != nil {
2061
+ log.Printf("Failed to create user: %v", err)
2062
+ http.Error(w, "Internal error", http.StatusInternalServerError)
2063
+ return
2064
+ }
2065
+ w.Header().Set("Content-Type", "application/json")
2066
+ w.WriteHeader(http.StatusCreated)
2067
+ json.NewEncoder(w).Encode(user)
2068
+ }`,
2069
+ expectedRuleIds: [],
2070
+ unexpectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001", "ERR-001"],
2071
+ category: "clean",
2072
+ difficulty: "medium",
2073
+ },
2074
+ {
2075
+ id: "java-clean-repository",
2076
+ description: "Clean: Java Spring Boot repository with proper parameterized queries",
2077
+ language: "java",
2078
+ code: `import org.springframework.stereotype.Repository;
2079
+ import org.springframework.jdbc.core.JdbcTemplate;
2080
+ import java.util.List;
2081
+
2082
+ @Repository
2083
+ public class UserRepository {
2084
+ private final JdbcTemplate jdbc;
2085
+
2086
+ public UserRepository(JdbcTemplate jdbc) {
2087
+ this.jdbc = jdbc;
2088
+ }
2089
+
2090
+ public User findById(Long id) {
2091
+ return jdbc.queryForObject(
2092
+ "SELECT id, name, email FROM users WHERE id = ?",
2093
+ new Object[]{id},
2094
+ (rs, rowNum) -> new User(rs.getLong("id"), rs.getString("name"), rs.getString("email"))
2095
+ );
2096
+ }
2097
+
2098
+ public List<User> searchByName(String name) {
2099
+ return jdbc.query(
2100
+ "SELECT id, name, email FROM users WHERE name LIKE ?",
2101
+ new Object[]{"%" + name + "%"},
2102
+ (rs, rowNum) -> new User(rs.getLong("id"), rs.getString("name"), rs.getString("email"))
2103
+ );
2104
+ }
2105
+ }`,
2106
+ expectedRuleIds: [],
2107
+ unexpectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001"],
2108
+ category: "clean",
2109
+ difficulty: "medium",
2110
+ },
2111
+ {
2112
+ id: "rust-clean-api",
2113
+ description: "Clean: Rust Actix-web API with proper error handling",
2114
+ language: "rust",
2115
+ code: `use actix_web::{get, web, HttpResponse, Result};
2116
+ use serde::{Deserialize, Serialize};
2117
+ use sqlx::PgPool;
2118
+
2119
+ #[derive(Deserialize)]
2120
+ struct QueryParams {
2121
+ name: Option<String>,
2122
+ limit: Option<i64>,
2123
+ }
2124
+
2125
+ #[derive(Serialize)]
2126
+ struct User {
2127
+ id: i64,
2128
+ name: String,
2129
+ email: String,
2130
+ }
2131
+
2132
+ #[get("/users")]
2133
+ async fn list_users(
2134
+ pool: web::Data<PgPool>,
2135
+ query: web::Query<QueryParams>,
2136
+ ) -> Result<HttpResponse> {
2137
+ let limit = query.limit.unwrap_or(50).min(100);
2138
+ let users = match &query.name {
2139
+ Some(name) => {
2140
+ sqlx::query_as!(User, "SELECT id, name, email FROM users WHERE name ILIKE $1 LIMIT $2", format!("%{}%", name), limit)
2141
+ .fetch_all(pool.get_ref())
2142
+ .await
2143
+ .map_err(|e| actix_web::error::ErrorInternalServerError(e))?
2144
+ }
2145
+ None => {
2146
+ sqlx::query_as!(User, "SELECT id, name, email FROM users LIMIT $1", limit)
2147
+ .fetch_all(pool.get_ref())
2148
+ .await
2149
+ .map_err(|e| actix_web::error::ErrorInternalServerError(e))?
2150
+ }
2151
+ };
2152
+ Ok(HttpResponse::Ok().json(users))
2153
+ }`,
2154
+ expectedRuleIds: [],
2155
+ unexpectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001"],
2156
+ category: "clean",
2157
+ difficulty: "hard",
2158
+ },
2159
+ {
2160
+ id: "python-clean-auth",
2161
+ description: "Clean: Python secure authentication with proper hashing",
2162
+ language: "python",
2163
+ code: `import bcrypt
2164
+ import secrets
2165
+ from datetime import datetime, timedelta
2166
+ import jwt
2167
+
2168
+ SECRET_KEY = os.environ["JWT_SECRET"]
2169
+
2170
+ def hash_password(password: str) -> str:
2171
+ salt = bcrypt.gensalt(rounds=12)
2172
+ return bcrypt.hashpw(password.encode(), salt).decode()
2173
+
2174
+ def verify_password(password: str, hashed: str) -> bool:
2175
+ return bcrypt.checkpw(password.encode(), hashed.encode())
2176
+
2177
+ def create_token(user_id: int) -> str:
2178
+ payload = {
2179
+ "sub": user_id,
2180
+ "exp": datetime.utcnow() + timedelta(hours=1),
2181
+ "jti": secrets.token_urlsafe(32),
2182
+ }
2183
+ return jwt.encode(payload, SECRET_KEY, algorithm="HS256")
2184
+
2185
+ def verify_token(token: str) -> dict:
2186
+ return jwt.decode(token, SECRET_KEY, algorithms=["HS256"])`,
2187
+ expectedRuleIds: [],
2188
+ unexpectedRuleIds: ["AUTH-001", "AUTH-002", "SEC-001"],
2189
+ category: "clean",
2190
+ difficulty: "hard",
2191
+ },
2192
+ {
2193
+ id: "csharp-clean-controller",
2194
+ description: "Clean: C# ASP.NET controller with proper validation",
2195
+ language: "csharp",
2196
+ code: `using Microsoft.AspNetCore.Mvc;
2197
+ using System.ComponentModel.DataAnnotations;
2198
+
2199
+ [ApiController]
2200
+ [Route("api/[controller]")]
2201
+ public class UsersController : ControllerBase
2202
+ {
2203
+ private readonly IUserService _userService;
2204
+ private readonly ILogger<UsersController> _logger;
2205
+
2206
+ public UsersController(IUserService userService, ILogger<UsersController> logger)
2207
+ {
2208
+ _userService = userService;
2209
+ _logger = logger;
2210
+ }
2211
+
2212
+ [HttpPost]
2213
+ public async Task<IActionResult> Create([FromBody] CreateUserDto dto)
2214
+ {
2215
+ if (!ModelState.IsValid)
2216
+ return BadRequest(ModelState);
2217
+
2218
+ var user = await _userService.CreateAsync(dto);
2219
+ _logger.LogInformation("User created: {UserId}", user.Id);
2220
+ return CreatedAtAction(nameof(GetById), new { id = user.Id }, user);
2221
+ }
2222
+
2223
+ [HttpGet("{id}")]
2224
+ public async Task<IActionResult> GetById(int id)
2225
+ {
2226
+ var user = await _userService.GetByIdAsync(id);
2227
+ if (user == null) return NotFound();
2228
+ return Ok(user);
2229
+ }
2230
+ }
2231
+
2232
+ public class CreateUserDto
2233
+ {
2234
+ [Required, StringLength(100)]
2235
+ public string Name { get; set; }
2236
+ [Required, EmailAddress]
2237
+ public string Email { get; set; }
2238
+ }`,
2239
+ expectedRuleIds: [],
2240
+ unexpectedRuleIds: ["CYBER-001", "CYBER-002", "SEC-001", "ERR-001"],
2241
+ category: "clean",
2242
+ difficulty: "hard",
2243
+ },
2244
+ {
2245
+ id: "kotlin-clean-service",
2246
+ description: "Clean: Kotlin Spring service with proper error handling",
2247
+ language: "kotlin",
2248
+ code: `import org.springframework.stereotype.Service
2249
+ import org.springframework.transaction.annotation.Transactional
2250
+
2251
+ @Service
2252
+ class OrderService(
2253
+ private val orderRepository: OrderRepository,
2254
+ private val paymentService: PaymentService,
2255
+ private val logger: Logger
2256
+ ) {
2257
+ @Transactional
2258
+ fun createOrder(request: CreateOrderRequest): Order {
2259
+ require(request.items.isNotEmpty()) { "Order must have at least one item" }
2260
+ require(request.items.all { it.quantity > 0 }) { "Quantities must be positive" }
2261
+
2262
+ val total = request.items.sumOf { it.price * it.quantity }
2263
+ val order = orderRepository.save(Order(items = request.items, total = total))
2264
+
2265
+ try {
2266
+ paymentService.charge(order.id, total)
2267
+ } catch (e: PaymentException) {
2268
+ logger.error("Payment failed for order {}: {}", order.id, e.message)
2269
+ throw OrderCreationException("Payment failed", e)
2270
+ }
2271
+
2272
+ return order
2273
+ }
2274
+ }`,
2275
+ expectedRuleIds: [],
2276
+ unexpectedRuleIds: ["CYBER-001", "SEC-001", "ERR-001"],
2277
+ category: "clean",
2278
+ difficulty: "hard",
2279
+ },
2280
+ // ═══════════════════════════════════════════════════════════════════════════
2281
+ // AI-SPECIFIC FAILURE MODES
2282
+ // ═══════════════════════════════════════════════════════════════════════════
2283
+ {
2284
+ id: "ts-ai-hallucinated-api",
2285
+ description: "TypeScript using hallucinated/non-existent Node.js API",
2286
+ language: "typescript",
2287
+ code: `import { sanitizeHtml } from "node:html"; // Does not exist
2288
+ import { validateEmail } from "node:validation"; // Does not exist
2289
+ import { encrypt } from "node:security"; // Does not exist
2290
+
2291
+ function processInput(input: string): string {
2292
+ const clean = sanitizeHtml(input);
2293
+ const encrypted = encrypt(clean, "AES-256");
2294
+ return encrypted;
2295
+ }`,
2296
+ expectedRuleIds: ["PERF-001"],
2297
+ category: "ai-code-safety",
2298
+ difficulty: "medium",
2299
+ },
2300
+ {
2301
+ id: "python-ai-deprecated-api",
2302
+ description: "Python using deprecated/removed API patterns",
2303
+ language: "python",
2304
+ code: `import cgi # Deprecated in 3.11, removed in 3.13
2305
+ import imp # Deprecated, use importlib
2306
+ from collections import MutableMapping # Removed in 3.10
2307
+
2308
+ form = cgi.FieldStorage()
2309
+ username = form.getfirst("username")
2310
+
2311
+ module = imp.load_source("config", "/etc/app/config.py")`,
2312
+ expectedRuleIds: ["FW-001"],
2313
+ category: "ai-code-safety",
2314
+ difficulty: "medium",
2315
+ },
2316
+ // ── Multi-language vulnerability chains ──
2317
+ {
2318
+ id: "ts-csrf-no-protection",
2319
+ description: "TypeScript Express app with no CSRF protection on state-changing endpoints",
2320
+ language: "typescript",
2321
+ code: `import express from "express";
2322
+ import session from "express-session";
2323
+
2324
+ const app = express();
2325
+ app.use(express.urlencoded({ extended: true }));
2326
+ app.use(session({ secret: "secret" }));
2327
+
2328
+ // State-changing endpoint without CSRF token verification
2329
+ app.post("/transfer", (req, res) => {
2330
+ const { from, to, amount } = req.body;
2331
+ transferFunds(from, to, parseInt(amount));
2332
+ res.redirect("/dashboard");
2333
+ });
2334
+
2335
+ app.post("/change-password", (req, res) => {
2336
+ const { newPassword } = req.body;
2337
+ changePassword(req.session.userId, newPassword);
2338
+ res.redirect("/profile");
2339
+ });`,
2340
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
2341
+ category: "security",
2342
+ difficulty: "medium",
2343
+ },
2344
+ {
2345
+ id: "go-tls-skip-verify",
2346
+ description: "Go HTTP client skipping TLS certificate verification",
2347
+ language: "go",
2348
+ code: `package main
2349
+
2350
+ import (
2351
+ "crypto/tls"
2352
+ "io/ioutil"
2353
+ "net/http"
2354
+ )
2355
+
2356
+ func fetchData(url string) ([]byte, error) {
2357
+ tr := &http.Transport{
2358
+ TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
2359
+ }
2360
+ client := &http.Client{Transport: tr}
2361
+ resp, err := client.Get(url)
2362
+ if err != nil {
2363
+ return nil, err
2364
+ }
2365
+ defer resp.Body.Close()
2366
+ return ioutil.ReadAll(resp.Body)
2367
+ }`,
2368
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
2369
+ category: "security",
2370
+ difficulty: "medium",
2371
+ },
2372
+ // ── Dockerfile Best Practices ──
2373
+ {
2374
+ id: "dockerfile-bad-practices",
2375
+ description: "Dockerfile with multiple security and best practice violations",
2376
+ language: "dockerfile",
2377
+ code: `FROM ubuntu:latest
2378
+ RUN apt-get update && apt-get install -y curl wget python3
2379
+ COPY . /app
2380
+ WORKDIR /app
2381
+ RUN pip3 install -r requirements.txt
2382
+ ENV DATABASE_URL=postgres://admin:password123@db:5432/production
2383
+ ENV API_KEY=sk-live-abcdef123456
2384
+ EXPOSE 22 80 443 3306 5432
2385
+ USER root
2386
+ CMD python3 app.py`,
2387
+ expectedRuleIds: ["IAC-001", "AUTH-001", "SEC-001"],
2388
+ category: "iac-security",
2389
+ difficulty: "easy",
2390
+ },
2391
+ // ── Terraform Additional Cases ──
2392
+ {
2393
+ id: "terraform-open-security-group",
2394
+ description: "Terraform AWS security group allowing all inbound traffic",
2395
+ language: "hcl",
2396
+ code: `resource "aws_security_group" "web" {
2397
+ name = "web-sg"
2398
+ description = "Allow all traffic"
2399
+
2400
+ ingress {
2401
+ from_port = 0
2402
+ to_port = 0
2403
+ protocol = "-1"
2404
+ cidr_blocks = ["0.0.0.0/0"]
2405
+ }
2406
+
2407
+ egress {
2408
+ from_port = 0
2409
+ to_port = 0
2410
+ protocol = "-1"
2411
+ cidr_blocks = ["0.0.0.0/0"]
2412
+ }
2413
+ }
2414
+
2415
+ resource "aws_instance" "web" {
2416
+ ami = "ami-12345678"
2417
+ instance_type = "t2.micro"
2418
+ vpc_security_group_ids = [aws_security_group.web.id]
2419
+ associate_public_ip_address = true
2420
+ }`,
2421
+ expectedRuleIds: ["IAC-001", "SEC-001"],
2422
+ category: "iac-security",
2423
+ difficulty: "easy",
2424
+ },
2425
+ {
2426
+ id: "terraform-unencrypted-bucket",
2427
+ description: "Terraform S3 bucket without encryption or versioning",
2428
+ language: "hcl",
2429
+ code: `resource "aws_s3_bucket" "data" {
2430
+ bucket = "sensitive-data-bucket"
2431
+ acl = "public-read"
2432
+ }
2433
+
2434
+ resource "aws_s3_bucket_public_access_block" "data" {
2435
+ bucket = aws_s3_bucket.data.id
2436
+
2437
+ block_public_acls = false
2438
+ block_public_policy = false
2439
+ ignore_public_acls = false
2440
+ restrict_public_buckets = false
2441
+ }`,
2442
+ expectedRuleIds: ["IAC-001", "SEC-001", "DATA-001"],
2443
+ category: "iac-security",
2444
+ difficulty: "easy",
2445
+ },
2446
+ // ── Software Practices Cases ──
2447
+ {
2448
+ id: "ts-code-smells",
2449
+ description: "TypeScript code with multiple code smells",
2450
+ language: "typescript",
2451
+ code: `// Magic numbers, deep nesting, long parameter lists
2452
+ function p(a: number, b: number, c: number, d: number, e: string, f: boolean, g: number): number {
2453
+ if (a > 0) {
2454
+ if (b > 0) {
2455
+ if (c > 100) {
2456
+ if (d < 50) {
2457
+ if (f) {
2458
+ return a * 1.08 + b * 0.95 - c * 0.12 + (g > 3 ? 42 : 17);
2459
+ }
2460
+ }
2461
+ }
2462
+ }
2463
+ }
2464
+ return 0;
2465
+ }`,
2466
+ expectedRuleIds: ["MAINT-001", "STRUCT-001"],
2467
+ category: "software-practices",
2468
+ difficulty: "easy",
2469
+ },
2470
+ // ── UX Cases ──
2471
+ {
2472
+ id: "ts-poor-error-messages",
2473
+ description: "TypeScript API with unhelpful error messages",
2474
+ language: "typescript",
2475
+ code: `app.post("/api/register", (req, res) => {
2476
+ try {
2477
+ const user = createUser(req.body);
2478
+ res.json(user);
2479
+ } catch (e) {
2480
+ res.status(500).json({ error: "Error" });
2481
+ }
2482
+ });
2483
+
2484
+ app.get("/api/search", (req, res) => {
2485
+ if (!req.query.q) {
2486
+ res.status(400).json({ error: "Bad request" });
2487
+ return;
2488
+ }
2489
+ const results = search(req.query.q as string);
2490
+ if (results.length === 0) {
2491
+ res.status(404).json({ error: "Not found" });
2492
+ return;
2493
+ }
2494
+ res.json(results);
2495
+ });`,
2496
+ expectedRuleIds: ["UX-001", "ERR-001"],
2497
+ category: "ux",
2498
+ difficulty: "easy",
2499
+ },
2500
+ // ═══════════════════════════════════════════════════════════════════════════
2501
+ // HARD DIFFICULTY — Obfuscated vulnerabilities
2502
+ // ═══════════════════════════════════════════════════════════════════════════
2503
+ {
2504
+ id: "ts-indirect-eval",
2505
+ description: "TypeScript indirect eval via Function constructor",
2506
+ language: "typescript",
2507
+ code: `import express from "express";
2508
+ const app = express();
2509
+ app.use(express.json());
2510
+
2511
+ app.post("/api/calculate", (req, res) => {
2512
+ const { expression } = req.body;
2513
+ // Indirect eval — same risk as eval()
2514
+ const compute = new Function("return " + expression);
2515
+ const result = compute();
2516
+ res.json({ result });
2517
+ });`,
2518
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
2519
+ category: "injection",
2520
+ difficulty: "hard",
2521
+ },
2522
+ {
2523
+ id: "python-format-string-attack",
2524
+ description: "Python format string vulnerability exposing internal data",
2525
+ language: "python",
2526
+ code: `from flask import Flask, request
2527
+
2528
+ app = Flask(__name__)
2529
+ SECRET_KEY = "super-secret-key-12345"
2530
+
2531
+ @app.route("/profile")
2532
+ def profile():
2533
+ template = request.args.get("template", "Hello, {name}")
2534
+ # Format string attack: user can pass {self.__class__.__init__.__globals__}
2535
+ return template.format(name=request.args.get("name", "World"))`,
2536
+ expectedRuleIds: ["CYBER-001", "SEC-001"],
2537
+ category: "injection",
2538
+ difficulty: "hard",
2539
+ },
2540
+ {
2541
+ id: "ts-timing-attack",
2542
+ description: "TypeScript timing attack in password comparison",
2543
+ language: "typescript",
2544
+ code: `function verifyApiKey(provided: string, expected: string): boolean {
2545
+ if (provided.length !== expected.length) return false;
2546
+ // Timing attack: short-circuits on first mismatch
2547
+ for (let i = 0; i < provided.length; i++) {
2548
+ if (provided[i] !== expected[i]) return false;
2549
+ }
2550
+ return true;
2551
+ }
2552
+
2553
+ app.use((req, res, next) => {
2554
+ const apiKey = req.headers["x-api-key"] as string;
2555
+ if (!verifyApiKey(apiKey, process.env.API_KEY!)) {
2556
+ return res.status(401).json({ error: "Invalid API key" });
2557
+ }
2558
+ next();
2559
+ });`,
2560
+ expectedRuleIds: ["SEC-001", "AUTH-001"],
2561
+ category: "security",
2562
+ difficulty: "hard",
2563
+ },
2564
+ {
2565
+ id: "go-crypto-misuse",
2566
+ description: "Go using ECB mode and static IV for encryption",
2567
+ language: "go",
2568
+ code: `package main
2569
+
2570
+ import (
2571
+ "crypto/aes"
2572
+ "crypto/cipher"
2573
+ )
2574
+
2575
+ var staticIV = []byte("1234567890123456") // Static IV
2576
+ var key = []byte("my-secret-key-32bytes-long!!!!!!!")
2577
+
2578
+ func encrypt(plaintext []byte) ([]byte, error) {
2579
+ block, _ := aes.NewCipher(key)
2580
+ // ECB mode: identical plaintext blocks produce identical ciphertext
2581
+ ciphertext := make([]byte, len(plaintext))
2582
+ for i := 0; i < len(plaintext); i += aes.BlockSize {
2583
+ block.Encrypt(ciphertext[i:i+aes.BlockSize], plaintext[i:i+aes.BlockSize])
2584
+ }
2585
+ return ciphertext, nil
2586
+ }
2587
+
2588
+ func encryptCBC(plaintext []byte) ([]byte, error) {
2589
+ block, _ := aes.NewCipher(key)
2590
+ mode := cipher.NewCBCEncrypter(block, staticIV) // Static IV is predictable
2591
+ ciphertext := make([]byte, len(plaintext))
2592
+ mode.CryptBlocks(ciphertext, plaintext)
2593
+ return ciphertext, nil
2594
+ }`,
2595
+ expectedRuleIds: ["SEC-001", "CYBER-001"],
2596
+ category: "security",
2597
+ difficulty: "hard",
2598
+ },
2599
+ ];