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