@openai/codex-security 0.2.0 → 0.3.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 (463) hide show
  1. package/README.md +437 -2692
  2. package/_bundled_plugin/.app.json +5 -1
  3. package/_bundled_plugin/.codex-plugin/plugin.json +9 -5
  4. package/_bundled_plugin/.mcp.json +2 -0
  5. package/_bundled_plugin/examples/completed-scan/coverage.json +0 -1
  6. package/_bundled_plugin/examples/completed-scan/report.md +28 -26
  7. package/_bundled_plugin/examples/completed-scan/scan-manifest.json +1 -1
  8. package/_bundled_plugin/mcp/helpers.mjs +1 -0
  9. package/_bundled_plugin/mcp/helpers.mjs.br.part-000 +0 -0
  10. package/_bundled_plugin/mcp/native/THIRD_PARTY_NOTICES.txt +6 -213
  11. package/_bundled_plugin/mcp/native/darwin-arm64/unix.node +0 -0
  12. package/_bundled_plugin/mcp/native/darwin-x64/unix.node +0 -0
  13. package/_bundled_plugin/mcp/native/linux-arm64-gnu/unix.node +0 -0
  14. package/_bundled_plugin/mcp/native/linux-arm64-musl/unix.node +0 -0
  15. package/_bundled_plugin/mcp/native/linux-x64-gnu/unix.node +0 -0
  16. package/_bundled_plugin/mcp/native/linux-x64-musl/unix.node +0 -0
  17. package/_bundled_plugin/mcp/native/win32-arm64/windows.node +0 -0
  18. package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
  19. package/_bundled_plugin/mcp/permission-profile-preflight.mjs +563 -0
  20. package/_bundled_plugin/mcp/server.mjs +1 -0
  21. package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
  22. package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
  23. package/_bundled_plugin/preflight/capability-profiles.toml +0 -13
  24. package/_bundled_plugin/references/artifact-storage.md +2 -2
  25. package/_bundled_plugin/references/config-preflight.md +0 -4
  26. package/_bundled_plugin/references/core-scan.md +21 -9
  27. package/_bundled_plugin/references/final-report.md +10 -12
  28. package/_bundled_plugin/references/finding-detail-fields.md +90 -80
  29. package/_bundled_plugin/references/sarif-adapter.md +1 -1
  30. package/_bundled_plugin/references/scan-artifacts.md +1 -2
  31. package/_bundled_plugin/references/scan-contract.md +9 -4
  32. package/_bundled_plugin/references/scan-prologue.md +12 -0
  33. package/_bundled_plugin/references/security-guidance.md +2 -2
  34. package/_bundled_plugin/references/standalone-validation.md +11 -0
  35. package/_bundled_plugin/references/threat-model.md +1 -1
  36. package/_bundled_plugin/schemas/coverage.schema.json +1 -47
  37. package/_bundled_plugin/schemas/definitions/artifact-common.schema.json +2 -24
  38. package/_bundled_plugin/schemas/definitions/discovery-candidate.schema.json +49 -25
  39. package/_bundled_plugin/schemas/findings.schema.json +71 -192
  40. package/_bundled_plugin/schemas/scan-manifest.schema.json +18 -45
  41. package/_bundled_plugin/schemas/tools/candidate-attack-paths.schema.json +91 -83
  42. package/_bundled_plugin/schemas/tools/candidate-validations.schema.json +35 -64
  43. package/_bundled_plugin/schemas/tools/deep-reducer.schema.json +5 -2
  44. package/_bundled_plugin/schemas/tools/discovery-candidates.schema.json +6 -55
  45. package/_bundled_plugin/schemas/tools/review-items.schema.json +2 -38
  46. package/_bundled_plugin/schemas/tools/scan-draft.schema.json +169 -294
  47. package/_bundled_plugin/scripts/codex_profile.mjs +239 -0
  48. package/_bundled_plugin/scripts/codex_session.mjs +53 -0
  49. package/_bundled_plugin/scripts/config_preflight.py +26 -62
  50. package/_bundled_plugin/scripts/deep_scan_config.py +9 -11
  51. package/_bundled_plugin/scripts/deep_scan_workbench.py +129 -150
  52. package/_bundled_plugin/scripts/finalize_scan_contract.py +315 -232
  53. package/_bundled_plugin/scripts/finding_preview.py +39 -9
  54. package/_bundled_plugin/scripts/generate_in_scope_files.py +27 -77
  55. package/_bundled_plugin/scripts/generate_rank_input.py +99 -829
  56. package/_bundled_plugin/scripts/launch_codex_security_mcp +35 -10
  57. package/_bundled_plugin/scripts/launch_codex_security_mcp.cmd +5 -5
  58. package/_bundled_plugin/scripts/rank_preview.py +42 -918
  59. package/_bundled_plugin/scripts/report_projection.py +117 -172
  60. package/_bundled_plugin/scripts/snapshot_sqlite.py +6 -1
  61. package/_bundled_plugin/scripts/threat_model_projection.py +4 -7
  62. package/_bundled_plugin/scripts/validate_scan_contract.py +4 -34
  63. package/_bundled_plugin/scripts/validate_tracking_source.py +3 -13
  64. package/_bundled_plugin/scripts/windows_scan_local_files.py +48 -3
  65. package/_bundled_plugin/scripts/workbench/handoff.py +25 -50
  66. package/_bundled_plugin/scripts/workbench/runtime_toml.py +22 -0
  67. package/_bundled_plugin/scripts/workbench/storage.py +10 -6
  68. package/_bundled_plugin/scripts/workbench_cli.py +94 -179
  69. package/_bundled_plugin/scripts/workbench_db.py +427 -463
  70. package/_bundled_plugin/scripts/workbench_feedback.py +6 -3
  71. package/_bundled_plugin/scripts/workbench_finding_index.py +19 -1
  72. package/_bundled_plugin/scripts/workbench_finding_workflows.py +18 -4
  73. package/_bundled_plugin/scripts/workbench_local_dedupe.py +136 -0
  74. package/_bundled_plugin/scripts/workbench_native_indexes.py +27 -14
  75. package/_bundled_plugin/scripts/workbench_progress.py +14 -58
  76. package/_bundled_plugin/scripts/workbench_publication.py +33 -57
  77. package/_bundled_plugin/scripts/workbench_remediation.py +12 -0
  78. package/_bundled_plugin/scripts/workbench_saved_results.py +172 -49
  79. package/_bundled_plugin/scripts/workbench_scan_history.py +57 -57
  80. package/_bundled_plugin/scripts/workbench_scan_start.py +105 -41
  81. package/_bundled_plugin/scripts/workbench_scan_usage.py +23 -34
  82. package/_bundled_plugin/scripts/workbench_schema.py +37 -1151
  83. package/_bundled_plugin/scripts/workbench_source_excerpt.py +11 -1
  84. package/_bundled_plugin/scripts/workbench_target.py +430 -142
  85. package/_bundled_plugin/scripts/workbench_validation.py +16 -27
  86. package/_bundled_plugin/shared/workbench-history-repairs.json +218 -0
  87. package/_bundled_plugin/shared/workbench-migrations.json +397 -0
  88. package/_bundled_plugin/skills/assess-patch-risk/SKILL.md +15 -4
  89. package/_bundled_plugin/skills/attack-path-analysis/SKILL.md +1 -0
  90. package/_bundled_plugin/skills/cloud-findings/SKILL.md +54 -0
  91. package/_bundled_plugin/skills/cloud-findings/agents/openai.yaml +4 -0
  92. package/_bundled_plugin/skills/deep-security-scan/SKILL.md +3 -3
  93. package/_bundled_plugin/skills/deep-security-scan/agents/openai.yaml +1 -1
  94. package/_bundled_plugin/skills/finding-discovery/SKILL.md +3 -3
  95. package/_bundled_plugin/skills/propose-security-hardening/references/proposal-format.md +50 -20
  96. package/_bundled_plugin/skills/security-diff-scan/SKILL.md +8 -14
  97. package/_bundled_plugin/skills/security-diff-scan/agents/openai.yaml +1 -1
  98. package/_bundled_plugin/skills/security-scan/SKILL.md +22 -7
  99. package/_bundled_plugin/skills/security-scan/agents/openai.yaml +1 -1
  100. package/_bundled_plugin/skills/security-scan/references/desktop-scan.md +1 -1
  101. package/_bundled_plugin/skills/security-scan/references/scan-artifacts-and-ledger.md +13 -1
  102. package/_bundled_plugin/skills/threat-model/SKILL.md +1 -1
  103. package/_bundled_plugin/skills/track-findings/SKILL.md +46 -178
  104. package/_bundled_plugin/skills/track-findings/agents/openai.yaml +1 -1
  105. package/_bundled_plugin/skills/track-findings/references/github-security-advisories.md +16 -24
  106. package/_bundled_plugin/skills/track-findings/references/jira.md +15 -61
  107. package/_bundled_plugin/skills/triage-finding/SKILL.md +50 -289
  108. package/_bundled_plugin/skills/triage-finding/agents/openai.yaml +2 -2
  109. package/_bundled_plugin/skills/triage-finding/references/ticket-intake.md +23 -43
  110. package/_bundled_plugin/skills/triage-finding/references/triage-result-contract.md +7 -1
  111. package/bin/codex-security.mjs +9 -2
  112. package/dist/api.d.ts +60 -10
  113. package/dist/api.d.ts.map +1 -1
  114. package/dist/api.js +803 -380
  115. package/dist/api.js.map +1 -1
  116. package/dist/artifact-export.d.ts +1 -1
  117. package/dist/artifact-export.d.ts.map +1 -1
  118. package/dist/artifact-export.js +28 -13
  119. package/dist/artifact-export.js.map +1 -1
  120. package/dist/auth.d.ts +2 -6
  121. package/dist/auth.d.ts.map +1 -1
  122. package/dist/auth.js +19 -9
  123. package/dist/auth.js.map +1 -1
  124. package/dist/bulk-scan-discovery.d.ts.map +1 -1
  125. package/dist/bulk-scan-discovery.js +1 -0
  126. package/dist/bulk-scan-discovery.js.map +1 -1
  127. package/dist/classify-severity.d.ts +26 -9
  128. package/dist/classify-severity.d.ts.map +1 -1
  129. package/dist/classify-severity.js +13 -30
  130. package/dist/classify-severity.js.map +1 -1
  131. package/dist/cli-help.d.ts.map +1 -1
  132. package/dist/cli-help.js +17 -13
  133. package/dist/cli-help.js.map +1 -1
  134. package/dist/cli-signals.d.ts +8 -0
  135. package/dist/cli-signals.d.ts.map +1 -0
  136. package/dist/cli-signals.js +28 -0
  137. package/dist/cli-signals.js.map +1 -0
  138. package/dist/cli.d.ts +4 -3
  139. package/dist/cli.d.ts.map +1 -1
  140. package/dist/cli.js +1087 -900
  141. package/dist/cli.js.map +1 -1
  142. package/dist/cloud-publish.d.ts.map +1 -1
  143. package/dist/cloud-publish.js +10 -9
  144. package/dist/cloud-publish.js.map +1 -1
  145. package/dist/codeowners.d.ts +19 -0
  146. package/dist/codeowners.d.ts.map +1 -0
  147. package/dist/codeowners.js +138 -0
  148. package/dist/codeowners.js.map +1 -0
  149. package/dist/codex-sdk-environment.d.ts +1 -0
  150. package/dist/codex-sdk-environment.d.ts.map +1 -1
  151. package/dist/codex-sdk-environment.js +40 -2
  152. package/dist/codex-sdk-environment.js.map +1 -1
  153. package/dist/component-plan.d.ts +2 -5
  154. package/dist/component-plan.d.ts.map +1 -1
  155. package/dist/component-plan.js +38 -30
  156. package/dist/component-plan.js.map +1 -1
  157. package/dist/component-scan.d.ts +6 -5
  158. package/dist/component-scan.d.ts.map +1 -1
  159. package/dist/component-scan.js +23 -35
  160. package/dist/component-scan.js.map +1 -1
  161. package/dist/config.d.ts.map +1 -1
  162. package/dist/config.js +64 -74
  163. package/dist/config.js.map +1 -1
  164. package/dist/contract.d.ts +15 -3
  165. package/dist/contract.d.ts.map +1 -1
  166. package/dist/contract.js +87 -252
  167. package/dist/contract.js.map +1 -1
  168. package/dist/cost-model.d.ts +13 -6
  169. package/dist/cost-model.d.ts.map +1 -1
  170. package/dist/cost-model.js +14 -4
  171. package/dist/cost-model.js.map +1 -1
  172. package/dist/cost.d.ts +10 -2
  173. package/dist/cost.d.ts.map +1 -1
  174. package/dist/cost.js +102 -104
  175. package/dist/cost.js.map +1 -1
  176. package/dist/custom-validation-prompt.d.ts.map +1 -1
  177. package/dist/custom-validation-prompt.js +6 -5
  178. package/dist/custom-validation-prompt.js.map +1 -1
  179. package/dist/custom-validation.d.ts +1 -2
  180. package/dist/custom-validation.d.ts.map +1 -1
  181. package/dist/custom-validation.js +9 -3
  182. package/dist/custom-validation.js.map +1 -1
  183. package/dist/deduplication/checkpointed-review.d.ts +4 -2
  184. package/dist/deduplication/checkpointed-review.d.ts.map +1 -1
  185. package/dist/deduplication/checkpointed-review.js +23 -9
  186. package/dist/deduplication/checkpointed-review.js.map +1 -1
  187. package/dist/deduplication/codex-review.d.ts +7 -1
  188. package/dist/deduplication/codex-review.d.ts.map +1 -1
  189. package/dist/deduplication/codex-review.js +126 -17
  190. package/dist/deduplication/codex-review.js.map +1 -1
  191. package/dist/deduplication/deduplication-prompts.d.ts +5 -2
  192. package/dist/deduplication/deduplication-prompts.d.ts.map +1 -1
  193. package/dist/deduplication/deduplication-prompts.js +18 -4
  194. package/dist/deduplication/deduplication-prompts.js.map +1 -1
  195. package/dist/deduplication/deduplication-reviewer.d.ts +26 -4
  196. package/dist/deduplication/deduplication-reviewer.d.ts.map +1 -1
  197. package/dist/deduplication/deduplication-reviewer.js +57 -47
  198. package/dist/deduplication/deduplication-reviewer.js.map +1 -1
  199. package/dist/deduplication/deduplication.d.ts.map +1 -1
  200. package/dist/deduplication/deduplication.js +19 -51
  201. package/dist/deduplication/deduplication.js.map +1 -1
  202. package/dist/deduplication/diagnostics.d.ts +17 -0
  203. package/dist/deduplication/diagnostics.d.ts.map +1 -0
  204. package/dist/deduplication/diagnostics.js +5 -0
  205. package/dist/deduplication/diagnostics.js.map +1 -0
  206. package/dist/deduplication/finding-schema.d.ts.map +1 -1
  207. package/dist/deduplication/finding-schema.js +7 -1
  208. package/dist/deduplication/finding-schema.js.map +1 -1
  209. package/dist/deduplication/local.d.ts +31 -0
  210. package/dist/deduplication/local.d.ts.map +1 -0
  211. package/dist/deduplication/local.js +166 -0
  212. package/dist/deduplication/local.js.map +1 -0
  213. package/dist/deduplication/records-protocol.d.ts.map +1 -1
  214. package/dist/deduplication/records-protocol.js +11 -24
  215. package/dist/deduplication/records-protocol.js.map +1 -1
  216. package/dist/deduplication/records.d.ts +186 -11
  217. package/dist/deduplication/records.d.ts.map +1 -1
  218. package/dist/deduplication/records.js +10 -18
  219. package/dist/deduplication/records.js.map +1 -1
  220. package/dist/deduplication/scan.d.ts +9 -3
  221. package/dist/deduplication/scan.d.ts.map +1 -1
  222. package/dist/deduplication/scan.js +158 -39
  223. package/dist/deduplication/scan.js.map +1 -1
  224. package/dist/deep-config.d.ts +2 -1
  225. package/dist/deep-config.d.ts.map +1 -1
  226. package/dist/deep-config.js +4 -4
  227. package/dist/deep-config.js.map +1 -1
  228. package/dist/deep-progress.d.ts +2 -0
  229. package/dist/deep-progress.d.ts.map +1 -1
  230. package/dist/deep-progress.js +13 -10
  231. package/dist/deep-progress.js.map +1 -1
  232. package/dist/deep-scan.d.ts +20 -0
  233. package/dist/deep-scan.d.ts.map +1 -0
  234. package/dist/deep-scan.js +113 -0
  235. package/dist/deep-scan.js.map +1 -0
  236. package/dist/errors.d.ts +2 -0
  237. package/dist/errors.d.ts.map +1 -1
  238. package/dist/errors.js +2 -0
  239. package/dist/errors.js.map +1 -1
  240. package/dist/feedback.d.ts.map +1 -1
  241. package/dist/feedback.js +53 -21
  242. package/dist/feedback.js.map +1 -1
  243. package/dist/finding-catalogue.d.ts.map +1 -1
  244. package/dist/finding-catalogue.js +4 -8
  245. package/dist/finding-catalogue.js.map +1 -1
  246. package/dist/finding-normalization.d.ts +5 -0
  247. package/dist/finding-normalization.d.ts.map +1 -0
  248. package/dist/finding-normalization.js +120 -0
  249. package/dist/finding-normalization.js.map +1 -0
  250. package/dist/finding-retrieval.d.ts +9 -0
  251. package/dist/finding-retrieval.d.ts.map +1 -1
  252. package/dist/finding-retrieval.js.map +1 -1
  253. package/dist/finding-workflow.d.ts +13 -8
  254. package/dist/finding-workflow.d.ts.map +1 -1
  255. package/dist/finding-workflow.js +14 -6
  256. package/dist/finding-workflow.js.map +1 -1
  257. package/dist/findings-client.d.ts +2 -1
  258. package/dist/findings-client.d.ts.map +1 -1
  259. package/dist/findings-client.js +36 -9
  260. package/dist/findings-client.js.map +1 -1
  261. package/dist/findings-errors.d.ts +16 -0
  262. package/dist/findings-errors.d.ts.map +1 -0
  263. package/dist/findings-errors.js +24 -0
  264. package/dist/findings-errors.js.map +1 -0
  265. package/dist/findings-import.d.ts +1 -1
  266. package/dist/findings-import.d.ts.map +1 -1
  267. package/dist/findings-import.js +12 -30
  268. package/dist/findings-import.js.map +1 -1
  269. package/dist/github.d.ts.map +1 -1
  270. package/dist/github.js +7 -1
  271. package/dist/github.js.map +1 -1
  272. package/dist/import-scan.d.ts.map +1 -1
  273. package/dist/import-scan.js +48 -38
  274. package/dist/import-scan.js.map +1 -1
  275. package/dist/index.d.ts +8 -4
  276. package/dist/index.d.ts.map +1 -1
  277. package/dist/index.js +1 -1
  278. package/dist/index.js.map +1 -1
  279. package/dist/knowledge-base.d.ts +7 -1
  280. package/dist/knowledge-base.d.ts.map +1 -1
  281. package/dist/knowledge-base.js +114 -46
  282. package/dist/knowledge-base.js.map +1 -1
  283. package/dist/linear.d.ts.map +1 -1
  284. package/dist/linear.js +2 -7
  285. package/dist/linear.js.map +1 -1
  286. package/dist/mock-scan.d.ts.map +1 -1
  287. package/dist/mock-scan.js +0 -1
  288. package/dist/mock-scan.js.map +1 -1
  289. package/dist/models.d.ts +0 -2
  290. package/dist/models.d.ts.map +1 -1
  291. package/dist/models.js.map +1 -1
  292. package/dist/multiscan.d.ts +9 -3
  293. package/dist/multiscan.d.ts.map +1 -1
  294. package/dist/multiscan.js +193 -126
  295. package/dist/multiscan.js.map +1 -1
  296. package/dist/owner-evidence.d.ts +10 -2
  297. package/dist/owner-evidence.d.ts.map +1 -1
  298. package/dist/owner-evidence.js +67 -8
  299. package/dist/owner-evidence.js.map +1 -1
  300. package/dist/patch-tui.d.ts.map +1 -1
  301. package/dist/patch-tui.js +3 -2
  302. package/dist/patch-tui.js.map +1 -1
  303. package/dist/project-config.js +3 -3
  304. package/dist/project-config.js.map +1 -1
  305. package/dist/provider-profile.d.ts +21 -0
  306. package/dist/provider-profile.d.ts.map +1 -0
  307. package/dist/provider-profile.js +133 -0
  308. package/dist/provider-profile.js.map +1 -0
  309. package/dist/publication-events.d.ts +6 -8
  310. package/dist/publication-events.d.ts.map +1 -1
  311. package/dist/publication-events.js +25 -50
  312. package/dist/publication-events.js.map +1 -1
  313. package/dist/publication-store.d.ts.map +1 -1
  314. package/dist/publication-store.js +40 -64
  315. package/dist/publication-store.js.map +1 -1
  316. package/dist/publication.d.ts +1 -2
  317. package/dist/publication.d.ts.map +1 -1
  318. package/dist/publication.js +2 -8
  319. package/dist/publication.js.map +1 -1
  320. package/dist/publish.d.ts +1 -5
  321. package/dist/publish.d.ts.map +1 -1
  322. package/dist/publish.js +109 -160
  323. package/dist/publish.js.map +1 -1
  324. package/dist/request-metadata.d.ts +9 -0
  325. package/dist/request-metadata.d.ts.map +1 -0
  326. package/dist/request-metadata.js +13 -0
  327. package/dist/request-metadata.js.map +1 -0
  328. package/dist/runtime.d.ts +15 -4
  329. package/dist/runtime.d.ts.map +1 -1
  330. package/dist/runtime.js +430 -138
  331. package/dist/runtime.js.map +1 -1
  332. package/dist/saved-scan-bootstrap.d.ts +14 -0
  333. package/dist/saved-scan-bootstrap.d.ts.map +1 -0
  334. package/dist/saved-scan-bootstrap.js +261 -0
  335. package/dist/saved-scan-bootstrap.js.map +1 -0
  336. package/dist/saved-scan.d.ts +1 -1
  337. package/dist/saved-scan.d.ts.map +1 -1
  338. package/dist/saved-scan.js +6 -12
  339. package/dist/saved-scan.js.map +1 -1
  340. package/dist/scan-activity.js +11 -8
  341. package/dist/scan-activity.js.map +1 -1
  342. package/dist/scan-comparison.d.ts +28 -15
  343. package/dist/scan-comparison.d.ts.map +1 -1
  344. package/dist/scan-comparison.js +276 -281
  345. package/dist/scan-comparison.js.map +1 -1
  346. package/dist/scan-dashboard.d.ts +3 -0
  347. package/dist/scan-dashboard.d.ts.map +1 -1
  348. package/dist/scan-dashboard.js +345 -77
  349. package/dist/scan-dashboard.js.map +1 -1
  350. package/dist/scan-history-renderer.d.ts.map +1 -1
  351. package/dist/scan-history-renderer.js +54 -13
  352. package/dist/scan-history-renderer.js.map +1 -1
  353. package/dist/scan-inputs.d.ts +6 -0
  354. package/dist/scan-inputs.d.ts.map +1 -0
  355. package/dist/scan-inputs.js +71 -0
  356. package/dist/scan-inputs.js.map +1 -0
  357. package/dist/scan-logs.d.ts +2 -3
  358. package/dist/scan-logs.d.ts.map +1 -1
  359. package/dist/scan-logs.js +12 -6
  360. package/dist/scan-logs.js.map +1 -1
  361. package/dist/scan-sessions.d.ts +4 -0
  362. package/dist/scan-sessions.d.ts.map +1 -1
  363. package/dist/scan-sessions.js +17 -0
  364. package/dist/scan-sessions.js.map +1 -1
  365. package/dist/scan-skill-paths.d.ts +8 -0
  366. package/dist/scan-skill-paths.d.ts.map +1 -0
  367. package/dist/scan-skill-paths.js +47 -0
  368. package/dist/scan-skill-paths.js.map +1 -0
  369. package/dist/security-policy-cli.d.ts.map +1 -1
  370. package/dist/security-policy-cli.js +7 -27
  371. package/dist/security-policy-cli.js.map +1 -1
  372. package/dist/security-policy.d.ts +9 -5
  373. package/dist/security-policy.d.ts.map +1 -1
  374. package/dist/security-policy.js +33 -14
  375. package/dist/security-policy.js.map +1 -1
  376. package/dist/server/api.d.ts +0 -1
  377. package/dist/server/api.d.ts.map +1 -1
  378. package/dist/server/api.js +0 -1
  379. package/dist/server/api.js.map +1 -1
  380. package/dist/server/embeddings.d.ts +3 -1
  381. package/dist/server/embeddings.d.ts.map +1 -1
  382. package/dist/server/embeddings.js +10 -3
  383. package/dist/server/embeddings.js.map +1 -1
  384. package/dist/server/errors.d.ts +5 -2
  385. package/dist/server/errors.d.ts.map +1 -1
  386. package/dist/server/errors.js +7 -0
  387. package/dist/server/errors.js.map +1 -1
  388. package/dist/server/sqlite-store.d.ts +0 -2
  389. package/dist/server/sqlite-store.d.ts.map +1 -1
  390. package/dist/server/sqlite-store.js +54 -44
  391. package/dist/server/sqlite-store.js.map +1 -1
  392. package/dist/server/storage.d.ts +0 -2
  393. package/dist/server/storage.d.ts.map +1 -1
  394. package/dist/server/storage.js.map +1 -1
  395. package/dist/severity-store.js +19 -24
  396. package/dist/severity-store.js.map +1 -1
  397. package/dist/standalone-validation-prompt.d.ts +2 -0
  398. package/dist/standalone-validation-prompt.d.ts.map +1 -0
  399. package/dist/standalone-validation-prompt.js +10 -0
  400. package/dist/standalone-validation-prompt.js.map +1 -0
  401. package/dist/suggest-owners.d.ts +4 -2
  402. package/dist/suggest-owners.d.ts.map +1 -1
  403. package/dist/suggest-owners.js +11 -5
  404. package/dist/suggest-owners.js.map +1 -1
  405. package/dist/targets.d.ts +11 -0
  406. package/dist/targets.d.ts.map +1 -1
  407. package/dist/targets.js +106 -47
  408. package/dist/targets.js.map +1 -1
  409. package/dist/trusted-executable.d.ts +2 -2
  410. package/dist/trusted-executable.d.ts.map +1 -1
  411. package/dist/trusted-executable.js +8 -6
  412. package/dist/trusted-executable.js.map +1 -1
  413. package/dist/value.js +7 -0
  414. package/dist/value.js.map +1 -1
  415. package/dist/version.js.map +1 -1
  416. package/dist/workbench-arguments.d.ts +3 -0
  417. package/dist/workbench-arguments.d.ts.map +1 -0
  418. package/dist/workbench-arguments.js +15 -0
  419. package/dist/workbench-arguments.js.map +1 -0
  420. package/dist/worker-progress.d.ts +1 -0
  421. package/dist/worker-progress.d.ts.map +1 -1
  422. package/dist/worker-progress.js +27 -12
  423. package/dist/worker-progress.js.map +1 -1
  424. package/docs/cli.md +1778 -0
  425. package/docs/findings-service.md +402 -0
  426. package/package.json +18 -19
  427. package/_bundled_plugin/schemas/tools/worker-threat-model.schema.json +0 -18
  428. package/_bundled_plugin/scripts/workbench_dashboard.py +0 -159
  429. package/_bundled_plugin/scripts/workbench_findings.py +0 -221
  430. package/_bundled_plugin/scripts/workbench_severity.py +0 -122
  431. package/_bundled_plugin/skills/assess-patch-risk/scripts/validate_patch_risk_assessment.py +0 -163
  432. package/dist/server/dashboard/THIRD_PARTY_NOTICES.txt +0 -276
  433. package/dist/server/dashboard/app.css +0 -2
  434. package/dist/server/dashboard/app.js +0 -66
  435. package/dist/server/dashboard/index.html +0 -18
  436. package/dist/server/dashboard-types.d.ts +0 -48
  437. package/dist/server/dashboard-types.d.ts.map +0 -1
  438. package/dist/server/dashboard-types.js +0 -2
  439. package/dist/server/dashboard-types.js.map +0 -1
  440. package/dist/server/dashboard.d.ts +0 -6
  441. package/dist/server/dashboard.d.ts.map +0 -1
  442. package/dist/server/dashboard.js +0 -59
  443. package/dist/server/dashboard.js.map +0 -1
  444. package/dist/server/index.d.ts +0 -2
  445. package/dist/server/index.d.ts.map +0 -1
  446. package/dist/server/index.js +0 -6
  447. package/dist/server/index.js.map +0 -1
  448. package/dist/server/routes.d.ts +0 -7
  449. package/dist/server/routes.d.ts.map +0 -1
  450. package/dist/server/routes.js +0 -98
  451. package/dist/server/routes.js.map +0 -1
  452. package/dist/server/serve.d.ts +0 -2
  453. package/dist/server/serve.d.ts.map +0 -1
  454. package/dist/server/serve.js +0 -28
  455. package/dist/server/serve.js.map +0 -1
  456. package/dist/server/server.d.ts +0 -10
  457. package/dist/server/server.d.ts.map +0 -1
  458. package/dist/server/server.js +0 -16
  459. package/dist/server/server.js.map +0 -1
  460. package/dist/server/validation.d.ts +0 -17
  461. package/dist/server/validation.d.ts.map +0 -1
  462. package/dist/server/validation.js +0 -53
  463. package/dist/server/validation.js.map +0 -1
@@ -2,6 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "codex-security://schemas/tools/scan-draft.schema.json",
4
4
  "title": "Codex Security semantic scan draft",
5
+ "$ref": "#/$defs/scanDraftInput",
5
6
  "$defs": {
6
7
  "text": {
7
8
  "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
@@ -9,7 +10,7 @@
9
10
  "textList": {
10
11
  "type": "array",
11
12
  "items": {
12
- "$ref": "#/$defs/text"
13
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
13
14
  }
14
15
  },
15
16
  "scanId": {
@@ -26,18 +27,12 @@
26
27
  "type": "object",
27
28
  "properties": {
28
29
  "path": {
29
- "$ref": "#/$defs/repositoryPath"
30
- },
31
- "startLine": {
32
- "type": "integer",
33
- "minimum": 1
34
- },
35
- "endLine": {
36
- "type": "integer",
37
- "minimum": 1
30
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/repositoryPath"
38
31
  },
32
+ "startLine": { "type": "integer", "minimum": 1 },
33
+ "endLine": { "type": "integer", "minimum": 1 },
39
34
  "role": {
40
- "$ref": "#/$defs/text"
35
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
41
36
  }
42
37
  },
43
38
  "required": ["path", "startLine"],
@@ -46,14 +41,8 @@
46
41
  "identity": {
47
42
  "type": "object",
48
43
  "properties": {
49
- "anchor": {
50
- "type": "string",
51
- "pattern": "^[a-z0-9][a-z0-9._/-]*$"
52
- },
53
- "instance": {
54
- "type": "string",
55
- "pattern": "^[a-z0-9][a-z0-9._/-]*$"
56
- }
44
+ "anchor": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" },
45
+ "instance": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" }
57
46
  },
58
47
  "required": ["anchor"],
59
48
  "additionalProperties": true
@@ -64,22 +53,18 @@
64
53
  "level": {
65
54
  "enum": ["critical", "high", "medium", "low", "informational"]
66
55
  },
67
- "score": {
68
- "type": "number",
69
- "minimum": 0,
70
- "maximum": 10
71
- },
56
+ "score": { "type": "number", "minimum": 0, "maximum": 10 },
72
57
  "scoringSystem": {
73
- "$ref": "#/$defs/text"
58
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
74
59
  },
75
60
  "vector": {
76
- "$ref": "#/$defs/text"
61
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
77
62
  },
78
63
  "rationale": {
79
- "$ref": "#/$defs/text"
64
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
80
65
  },
81
66
  "changeConditions": {
82
- "$ref": "#/$defs/text"
67
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
83
68
  }
84
69
  },
85
70
  "required": ["level"],
@@ -88,11 +73,9 @@
88
73
  "confidence": {
89
74
  "type": "object",
90
75
  "properties": {
91
- "level": {
92
- "enum": ["high", "medium", "low"]
93
- },
76
+ "level": { "enum": ["high", "medium", "low"] },
94
77
  "rationale": {
95
- "$ref": "#/$defs/text"
78
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
96
79
  }
97
80
  },
98
81
  "required": ["level", "rationale"],
@@ -102,12 +85,12 @@
102
85
  "type": "object",
103
86
  "properties": {
104
87
  "category": {
105
- "$ref": "#/$defs/text",
106
- "description": "The actual primary broken security control, not a CWE identifier."
88
+ "description": "The actual primary broken security control, not a CWE identifier.",
89
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
107
90
  },
108
91
  "cwe": {
109
- "$ref": "#/$defs/textList",
110
- "description": "Copy the reviewed candidate's exact cwe_ids array. Use an empty array when no CWE is established; do not invent one."
92
+ "description": "Copy the reviewed candidate's exact cwe_ids array. Use an empty array when no CWE is established; do not invent one.",
93
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
111
94
  }
112
95
  },
113
96
  "required": ["category", "cwe"],
@@ -116,70 +99,48 @@
116
99
  "codeEvidence": {
117
100
  "type": "object",
118
101
  "properties": {
119
- "id": {
120
- "type": "string",
121
- "pattern": "^[a-z0-9][a-z0-9._/-]*$"
122
- },
102
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" },
123
103
  "label": {
124
- "$ref": "#/$defs/text"
104
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
125
105
  },
126
106
  "path": {
127
- "$ref": "#/$defs/repositoryPath"
128
- },
129
- "startLine": {
130
- "type": "integer",
131
- "minimum": 1
132
- },
133
- "endLine": {
134
- "type": "integer",
135
- "minimum": 1
107
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/repositoryPath"
136
108
  },
109
+ "startLine": { "type": "integer", "minimum": 1 },
110
+ "endLine": { "type": "integer", "minimum": 1 },
137
111
  "language": {
138
- "$ref": "#/$defs/text"
112
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
139
113
  },
140
114
  "role": {
141
- "$ref": "#/$defs/text"
115
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
142
116
  },
143
117
  "code": {
144
- "$ref": "#/$defs/text",
145
- "description": "The genuine, nonempty source snippet at this evidence location."
118
+ "description": "The genuine, nonempty source snippet at this evidence location.",
119
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
146
120
  },
147
121
  "explanation": {
148
- "$ref": "#/$defs/text"
122
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
149
123
  }
150
124
  },
151
125
  "required": ["id", "label", "path", "startLine", "code", "explanation"],
152
126
  "additionalProperties": true
153
127
  },
154
- "legacyCodeEvidence": {
155
- "type": "object",
156
- "properties": {
157
- "id": {
158
- "$ref": "#/$defs/text"
159
- },
160
- "code": {
161
- "$ref": "#/$defs/text"
162
- }
163
- },
164
- "required": ["id", "code"],
165
- "additionalProperties": true
166
- },
167
128
  "findingAssessment": {
168
129
  "anyOf": [
169
130
  {
170
- "$ref": "#/$defs/text"
131
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
171
132
  },
172
133
  {
173
134
  "type": "object",
174
135
  "properties": {
175
136
  "level": {
176
- "$ref": "#/$defs/text"
137
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
177
138
  },
178
139
  "rationale": {
179
- "$ref": "#/$defs/text"
140
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
180
141
  },
181
142
  "why": {
182
- "$ref": "#/$defs/text"
143
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
183
144
  }
184
145
  },
185
146
  "additionalProperties": true
@@ -189,32 +150,30 @@
189
150
  "textOrSummary": {
190
151
  "anyOf": [
191
152
  {
192
- "$ref": "#/$defs/text"
153
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
193
154
  },
194
155
  {
195
156
  "type": "object",
196
157
  "properties": {
197
158
  "summary": {
198
- "$ref": "#/$defs/text"
159
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
199
160
  },
200
161
  "source": {
201
- "$ref": "#/$defs/text"
162
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
202
163
  },
203
164
  "sink": {
204
- "$ref": "#/$defs/text"
165
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
205
166
  },
206
167
  "outcome": {
207
- "$ref": "#/$defs/text"
168
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
208
169
  },
209
170
  "transformations": {
210
- "$ref": "#/$defs/textList"
171
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
211
172
  },
212
173
  "evidenceRefs": {
213
- "$ref": "#/$defs/textList"
174
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
214
175
  },
215
- "evidence_refs": {
216
- "$ref": "#/$defs/textList"
217
- }
176
+ "evidence_refs": false
218
177
  },
219
178
  "additionalProperties": true
220
179
  }
@@ -223,38 +182,36 @@
223
182
  "findingReachability": {
224
183
  "anyOf": [
225
184
  {
226
- "$ref": "#/$defs/text"
185
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
227
186
  },
228
187
  {
229
188
  "type": "object",
230
189
  "properties": {
231
190
  "summary": {
232
- "$ref": "#/$defs/text"
191
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
233
192
  },
234
193
  "attacker": {
235
- "$ref": "#/$defs/text"
194
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
236
195
  },
237
196
  "entrypoint": {
238
- "$ref": "#/$defs/text"
197
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
239
198
  },
240
199
  "source": {
241
- "$ref": "#/$defs/text"
200
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
242
201
  },
243
202
  "sink": {
244
- "$ref": "#/$defs/text"
203
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
245
204
  },
246
205
  "outcome": {
247
- "$ref": "#/$defs/text"
206
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
248
207
  },
249
208
  "preconditions": {
250
- "$ref": "#/$defs/textList"
209
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
251
210
  },
252
211
  "evidenceRefs": {
253
- "$ref": "#/$defs/textList"
212
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
254
213
  },
255
- "evidence_refs": {
256
- "$ref": "#/$defs/textList"
257
- }
214
+ "evidence_refs": false
258
215
  },
259
216
  "additionalProperties": true
260
217
  }
@@ -264,64 +221,56 @@
264
221
  "type": "object",
265
222
  "properties": {
266
223
  "assertions": {
267
- "$ref": "#/$defs/textList"
224
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
268
225
  },
269
226
  "counterEvidence": {
270
- "$ref": "#/$defs/textList"
227
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
271
228
  },
272
229
  "evidence": {
273
230
  "anyOf": [
274
231
  {
275
- "$ref": "#/$defs/text"
232
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
276
233
  },
277
234
  {
278
- "$ref": "#/$defs/textList"
235
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
279
236
  }
280
237
  ]
281
238
  },
282
239
  "evidenceRefs": {
283
- "$ref": "#/$defs/textList"
284
- },
285
- "evidence_refs": {
286
- "$ref": "#/$defs/textList"
240
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
287
241
  },
242
+ "evidence_refs": false,
288
243
  "limitations": {
289
- "$ref": "#/$defs/textList"
244
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
290
245
  },
291
246
  "method": {
292
- "$ref": "#/$defs/text"
247
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
293
248
  },
294
249
  "status": {
295
250
  "anyOf": [
296
251
  {
297
- "$ref": "#/$defs/text"
252
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
298
253
  },
299
- {
300
- "type": "null"
301
- }
254
+ { "type": "null" }
302
255
  ]
303
256
  },
304
257
  "summary": {
305
- "$ref": "#/$defs/text"
258
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
306
259
  },
307
260
  "disposition": {
308
261
  "anyOf": [
309
262
  {
310
- "$ref": "#/$defs/text"
263
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
311
264
  },
312
- {
313
- "type": "null"
314
- }
265
+ { "type": "null" }
315
266
  ]
316
267
  },
317
268
  "result": {
318
269
  "anyOf": [
319
270
  {
320
- "$ref": "#/$defs/text"
271
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
321
272
  },
322
- {
323
- "type": "null"
324
- }
273
+ { "type": "null" }
325
274
  ]
326
275
  }
327
276
  },
@@ -331,63 +280,53 @@
331
280
  "type": "object",
332
281
  "properties": {
333
282
  "assumptions": {
334
- "$ref": "#/$defs/textList"
283
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
335
284
  },
336
285
  "blindspots": {
337
- "$ref": "#/$defs/textList"
286
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
338
287
  },
339
288
  "controls": {
340
- "$ref": "#/$defs/textList"
341
- },
342
- "dataFlow": {
343
- "$ref": "#/$defs/textOrSummary"
344
- },
345
- "data_flow": {
346
- "$ref": "#/$defs/textOrSummary"
289
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
347
290
  },
291
+ "dataFlow": false,
292
+ "data_flow": false,
348
293
  "dataflow": {
349
- "$ref": "#/$defs/textOrSummary"
294
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textOrSummary"
350
295
  },
351
296
  "evidenceRefs": {
352
- "$ref": "#/$defs/textList"
353
- },
354
- "evidence_refs": {
355
- "$ref": "#/$defs/textList"
297
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
356
298
  },
299
+ "evidence_refs": false,
357
300
  "impact": {
358
301
  "anyOf": [
359
302
  {
360
- "$ref": "#/$defs/findingAssessment"
303
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingAssessment"
361
304
  },
362
- {
363
- "type": "null"
364
- }
305
+ { "type": "null" }
365
306
  ]
366
307
  },
367
308
  "likelihood": {
368
309
  "anyOf": [
369
310
  {
370
- "$ref": "#/$defs/findingAssessment"
311
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingAssessment"
371
312
  },
372
- {
373
- "type": "null"
374
- }
313
+ { "type": "null" }
375
314
  ]
376
315
  },
377
316
  "limitations": {
378
- "$ref": "#/$defs/textList"
317
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
379
318
  },
380
319
  "preconditions": {
381
- "$ref": "#/$defs/textList"
320
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
382
321
  },
383
322
  "reachability": {
384
- "$ref": "#/$defs/findingReachability"
323
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingReachability"
385
324
  },
386
325
  "steps": {
387
- "$ref": "#/$defs/textList"
326
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
388
327
  },
389
328
  "summary": {
390
- "$ref": "#/$defs/text"
329
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
391
330
  }
392
331
  },
393
332
  "additionalProperties": true
@@ -404,28 +343,28 @@
404
343
  "description": "A stable lowercase vulnerability-family slug, such as prototype-pollution.json-patch; a CWE is taxonomy, not a rule ID."
405
344
  },
406
345
  "identity": {
407
- "$ref": "#/$defs/identity"
346
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/identity"
408
347
  },
409
348
  "title": {
410
- "$ref": "#/$defs/text"
349
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
411
350
  },
412
351
  "summary": {
413
- "$ref": "#/$defs/text"
352
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
414
353
  },
415
354
  "severity": {
416
- "$ref": "#/$defs/severity"
355
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/severity"
417
356
  },
418
357
  "confidence": {
419
- "$ref": "#/$defs/confidence"
358
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/confidence"
420
359
  },
421
360
  "taxonomy": {
422
- "$ref": "#/$defs/taxonomy"
361
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/taxonomy"
423
362
  },
424
363
  "locations": {
425
- "type": "array",
426
364
  "minItems": 1,
365
+ "type": "array",
427
366
  "items": {
428
- "$ref": "#/$defs/location"
367
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/location"
429
368
  }
430
369
  },
431
370
  "writeup": {
@@ -442,97 +381,58 @@
442
381
  "codeEvidence": {
443
382
  "type": "array",
444
383
  "items": {
445
- "$ref": "#/$defs/codeEvidence"
446
- }
447
- },
448
- "code_evidence": {
449
- "type": "array",
450
- "items": {
451
- "$ref": "#/$defs/legacyCodeEvidence"
384
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/codeEvidence"
452
385
  }
453
386
  },
387
+ "code_evidence": false,
454
388
  "rootCause": {
455
389
  "anyOf": [
456
390
  {
457
- "$ref": "#/$defs/text"
391
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
458
392
  },
459
393
  {
460
394
  "type": "object",
461
395
  "properties": {
462
396
  "summary": {
463
- "$ref": "#/$defs/text"
464
- },
465
- "code": {
466
- "$ref": "#/$defs/text"
467
- },
468
- "language": {
469
- "$ref": "#/$defs/text"
397
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
470
398
  },
399
+ "code": false,
400
+ "language": false,
471
401
  "evidenceRefs": {
472
- "$ref": "#/$defs/textList"
473
- }
474
- },
475
- "required": ["summary"],
476
- "additionalProperties": true
477
- }
478
- ]
479
- },
480
- "root_cause": {
481
- "anyOf": [
482
- {
483
- "$ref": "#/$defs/text"
484
- },
485
- {
486
- "type": "object",
487
- "properties": {
488
- "summary": {
489
- "$ref": "#/$defs/text"
402
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
490
403
  },
491
- "code": {
492
- "$ref": "#/$defs/text"
493
- },
494
- "language": {
495
- "$ref": "#/$defs/text"
496
- },
497
- "evidenceRefs": {
498
- "$ref": "#/$defs/textList"
499
- },
500
- "evidence_refs": {
501
- "$ref": "#/$defs/textList"
502
- }
404
+ "evidence_refs": false
503
405
  },
406
+ "required": ["summary"],
504
407
  "additionalProperties": true
505
408
  }
506
409
  ]
507
410
  },
411
+ "root_cause": false,
508
412
  "remediation": {
509
- "$ref": "#/$defs/text"
413
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
510
414
  },
511
415
  "validation": {
512
416
  "anyOf": [
513
417
  {
514
- "$ref": "#/$defs/findingValidation"
418
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingValidation"
515
419
  },
516
- {
517
- "type": "null"
518
- }
420
+ { "type": "null" }
519
421
  ]
520
422
  },
521
423
  "attackPath": {
522
424
  "anyOf": [
523
425
  {
524
- "$ref": "#/$defs/findingAttackPath"
426
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/findingAttackPath"
525
427
  },
526
- {
527
- "type": "null"
528
- }
428
+ { "type": "null" }
529
429
  ]
530
430
  },
531
431
  "remediationTests": {
532
- "$ref": "#/$defs/textList"
432
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
533
433
  },
534
434
  "preventiveControls": {
535
- "$ref": "#/$defs/textList"
435
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
536
436
  },
537
437
  "provenance": {
538
438
  "type": "object",
@@ -540,7 +440,7 @@
540
440
  "sourceFindingIds": {
541
441
  "type": "array",
542
442
  "items": {
543
- "$ref": "#/$defs/text"
443
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
544
444
  },
545
445
  "uniqueItems": true,
546
446
  "description": "Host-provided source finding references represented by this Deep reduction. Preserve every assigned reference exactly once."
@@ -551,10 +451,11 @@
551
451
  "type": "object",
552
452
  "properties": {
553
453
  "id": {
554
- "$ref": "#/$defs/text"
454
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
555
455
  },
556
456
  "finding": {
557
457
  "type": "object",
458
+ "properties": {},
558
459
  "additionalProperties": true
559
460
  }
560
461
  },
@@ -564,8 +465,8 @@
564
465
  "description": "Original source payloads retained by the host for lossless semantic merges."
565
466
  },
566
467
  "source": {
567
- "$ref": "#/$defs/text",
568
- "description": "The actual finding producer. Use local_plugin only for a finding discovered by this plugin."
468
+ "description": "The actual finding producer. Use local_plugin only for a finding discovered by this plugin.",
469
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
569
470
  }
570
471
  },
571
472
  "required": ["source"],
@@ -573,6 +474,7 @@
573
474
  },
574
475
  "extensions": {
575
476
  "type": "object",
477
+ "properties": {},
576
478
  "additionalProperties": true
577
479
  }
578
480
  },
@@ -595,49 +497,48 @@
595
497
  "includePaths": false,
596
498
  "excludePaths": false,
597
499
  "summary": {
598
- "$ref": "#/$defs/text"
500
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
599
501
  },
600
502
  "artifactsReviewed": {
601
- "$ref": "#/$defs/textList"
503
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
602
504
  },
603
505
  "runtimeStatus": {
604
- "$ref": "#/$defs/text"
506
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
605
507
  },
606
508
  "validationMode": {
607
- "$ref": "#/$defs/text"
509
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
608
510
  },
609
511
  "context": {
610
- "$ref": "#/$defs/text"
512
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
611
513
  },
612
514
  "limitations": {
613
- "$ref": "#/$defs/textList"
515
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
614
516
  }
615
517
  },
616
518
  "additionalProperties": true
617
519
  },
618
520
  "threatModel": {
619
- "description": "Retained threat-model content. Existing structured models remain supported; Markdown documents preserve their complete original body.",
620
521
  "anyOf": [
621
522
  {
622
523
  "type": "object",
623
524
  "properties": {
624
525
  "summary": {
625
- "$ref": "#/$defs/text"
526
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
626
527
  },
627
528
  "assets": {
628
- "$ref": "#/$defs/textList"
529
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
629
530
  },
630
531
  "trustBoundaries": {
631
- "$ref": "#/$defs/textList"
532
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
632
533
  },
633
534
  "attackerCapabilities": {
634
- "$ref": "#/$defs/textList"
535
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
635
536
  },
636
537
  "securityObjectives": {
637
- "$ref": "#/$defs/textList"
538
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
638
539
  },
639
540
  "assumptions": {
640
- "$ref": "#/$defs/textList"
541
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
641
542
  }
642
543
  },
643
544
  "required": ["summary"],
@@ -646,37 +547,26 @@
646
547
  {
647
548
  "type": "object",
648
549
  "properties": {
649
- "format": {
650
- "const": "markdown"
651
- },
550
+ "format": { "const": "markdown" },
652
551
  "content": {
653
- "$ref": "#/$defs/text"
552
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
654
553
  },
655
554
  "scope": {
656
555
  "type": "object",
657
- "description": "The modeled source scope, which may differ from the scan scope. Omit when unknown.",
658
556
  "properties": {
659
557
  "includePaths": {
660
558
  "type": "array",
661
- "items": {
662
- "type": "string",
663
- "minLength": 1
664
- }
559
+ "items": { "type": "string", "minLength": 1 }
665
560
  },
666
561
  "excludePaths": {
667
562
  "type": "array",
668
- "items": {
669
- "type": "string",
670
- "minLength": 1
671
- }
563
+ "items": { "type": "string", "minLength": 1 }
672
564
  },
673
- "summary": {
674
- "type": "string",
675
- "minLength": 1
676
- }
565
+ "summary": { "type": "string", "minLength": 1 }
677
566
  },
678
567
  "required": ["includePaths"],
679
- "additionalProperties": true
568
+ "additionalProperties": true,
569
+ "description": "The modeled source scope, which may differ from the scan scope. Omit when unknown."
680
570
  },
681
571
  "origin": {
682
572
  "enum": ["generated", "provided", "reconciled", "recovered"]
@@ -685,28 +575,26 @@
685
575
  "required": ["format", "content"],
686
576
  "additionalProperties": true
687
577
  }
688
- ]
578
+ ],
579
+ "description": "Retained threat-model content. Existing structured models remain supported; Markdown documents preserve their complete original body."
689
580
  },
690
581
  "surface": {
691
582
  "type": "object",
692
583
  "properties": {
693
- "id": {
694
- "type": "string",
695
- "pattern": "^[a-z0-9][a-z0-9._/-]*$"
696
- },
584
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" },
697
585
  "label": {
698
- "$ref": "#/$defs/text",
699
- "description": "The meaningful name of the reviewed security surface."
586
+ "description": "The meaningful name of the reviewed security surface.",
587
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
700
588
  },
701
589
  "disposition": {
702
- "description": "The evidence-supported review result for this surface.",
703
590
  "enum": [
704
591
  "reported",
705
592
  "no_issue_found",
706
593
  "rejected",
707
594
  "not_applicable",
708
595
  "needs_follow_up"
709
- ]
596
+ ],
597
+ "description": "The evidence-supported review result for this surface."
710
598
  },
711
599
  "receiptRefs": {
712
600
  "type": "array",
@@ -717,10 +605,10 @@
717
605
  }
718
606
  },
719
607
  "riskArea": {
720
- "$ref": "#/$defs/text"
608
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
721
609
  },
722
610
  "notes": {
723
- "$ref": "#/$defs/text"
611
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
724
612
  }
725
613
  },
726
614
  "required": ["label", "disposition"],
@@ -736,15 +624,11 @@
736
624
  "includePaths": false,
737
625
  "excludePaths": false,
738
626
  "receiptRefs": false,
739
- "completeness": {
740
- "description": "Use partial if any work is deferred or any surface needs follow-up; use complete only when no such work remains.",
741
- "enum": ["complete", "partial", "unknown"]
742
- },
743
627
  "inventoryStrategy": false,
744
628
  "surfaces": {
745
629
  "type": "array",
746
630
  "items": {
747
- "$ref": "#/$defs/surface"
631
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/surface"
748
632
  }
749
633
  },
750
634
  "explicitExclusions": {
@@ -753,10 +637,10 @@
753
637
  "type": "object",
754
638
  "properties": {
755
639
  "pattern": {
756
- "$ref": "#/$defs/text"
640
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
757
641
  },
758
642
  "reason": {
759
- "$ref": "#/$defs/text"
643
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
760
644
  }
761
645
  },
762
646
  "required": ["pattern", "reason"],
@@ -764,66 +648,63 @@
764
648
  }
765
649
  },
766
650
  "deferred": {
767
- "description": "Each supplied id identifies one task and must be unique within this draft. Reuse saved IDs in later updates.",
768
651
  "type": "array",
769
652
  "items": {
770
653
  "type": "object",
771
654
  "properties": {
772
655
  "id": {
773
- "$ref": "#/$defs/text"
656
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
774
657
  },
775
658
  "candidateId": {
776
659
  "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/candidateId"
777
660
  },
778
661
  "reason": {
779
- "$ref": "#/$defs/text"
662
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
780
663
  },
781
664
  "paths": {
782
- "$ref": "#/$defs/textList"
665
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
783
666
  },
784
667
  "surfaceIds": {
785
- "$ref": "#/$defs/textList"
668
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/textList"
786
669
  }
787
670
  },
788
671
  "required": ["reason"],
789
672
  "additionalProperties": true
790
- }
673
+ },
674
+ "description": "Each supplied id identifies one task and must be unique within this draft. Reuse saved IDs in later updates."
791
675
  },
792
676
  "resolvedDeferred": {
793
- "description": "On final Standard or diff drafts, close generic tasks by saved ID and completion reason. Reuse saved surface IDs for updates. Candidate tasks need findings or dispositions; redundant closure entries for those outcomes are ignored.",
794
677
  "type": "array",
795
678
  "items": {
796
679
  "type": "object",
797
680
  "properties": {
798
681
  "id": {
799
- "$ref": "#/$defs/text"
682
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
800
683
  },
801
684
  "reason": {
802
- "$ref": "#/$defs/text"
685
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
803
686
  }
804
687
  },
805
- "required": [
806
- "id",
807
- "reason"
808
- ],
688
+ "required": ["id", "reason"],
809
689
  "additionalProperties": false
810
- }
690
+ },
691
+ "description": "On final Standard or diff drafts, close generic tasks by saved ID and completion reason. Reuse saved surface IDs for updates. Candidate tasks need findings or dispositions; redundant closure entries for those outcomes are ignored."
811
692
  },
812
693
  "openQuestions": {
813
694
  "type": "array",
814
695
  "items": {
815
696
  "anyOf": [
816
697
  {
817
- "$ref": "#/$defs/text"
698
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
818
699
  },
819
700
  {
820
701
  "type": "object",
821
702
  "properties": {
822
703
  "question": {
823
- "$ref": "#/$defs/text"
704
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
824
705
  },
825
706
  "followUpPrompt": {
826
- "$ref": "#/$defs/text"
707
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/nonEmptyText"
827
708
  }
828
709
  },
829
710
  "required": ["question"],
@@ -833,12 +714,7 @@
833
714
  }
834
715
  }
835
716
  },
836
- "required": [
837
- "completeness",
838
- "surfaces",
839
- "explicitExclusions",
840
- "deferred"
841
- ],
717
+ "required": ["surfaces", "explicitExclusions", "deferred"],
842
718
  "additionalProperties": true
843
719
  },
844
720
  "scanDraftInput": {
@@ -849,25 +725,25 @@
849
725
  "description": "Set false to save progress without declaring this worker or parent audit finished. Omit or set true only for the terminal result. Put provisional candidates in coverage.deferred, not findings."
850
726
  },
851
727
  "scanId": {
852
- "$ref": "#/$defs/scanId"
728
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
853
729
  },
854
730
  "handoffClaimToken": {
855
- "$ref": "#/$defs/handoffClaimToken"
731
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/handoffClaimToken"
856
732
  },
857
733
  "scope": {
858
- "$ref": "#/$defs/scope"
734
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/scope"
859
735
  },
860
736
  "threatModel": {
861
- "$ref": "#/$defs/threatModel"
737
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/threatModel"
862
738
  },
863
739
  "findings": {
864
740
  "type": "array",
865
741
  "items": {
866
- "$ref": "#/$defs/finding"
742
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/finding"
867
743
  }
868
744
  },
869
745
  "coverage": {
870
- "$ref": "#/$defs/coverage"
746
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/coverage"
871
747
  }
872
748
  },
873
749
  "required": ["scanId", "findings", "coverage"],
@@ -877,15 +753,14 @@
877
753
  "type": "object",
878
754
  "properties": {
879
755
  "scanId": {
880
- "$ref": "#/$defs/scanId"
756
+ "$ref": "codex-security://schemas/definitions/artifact-common.schema.json#/$defs/scanId"
881
757
  },
882
758
  "handoffClaimToken": {
883
- "$ref": "#/$defs/handoffClaimToken"
759
+ "$ref": "codex-security://schemas/tools/scan-draft.schema.json#/$defs/handoffClaimToken"
884
760
  }
885
761
  },
886
762
  "required": ["scanId"],
887
763
  "additionalProperties": false
888
764
  }
889
- },
890
- "$ref": "#/$defs/scanDraftInput"
765
+ }
891
766
  }