@openai/codex-security 0.1.31 → 0.2.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 (314) hide show
  1. package/README.md +295 -32
  2. package/_bundled_plugin/.mcp.json +1 -0
  3. package/_bundled_plugin/mcp/helpers.mjs.br.part-000 +0 -0
  4. package/_bundled_plugin/mcp/native/THIRD_PARTY_NOTICES.txt +4 -4
  5. package/_bundled_plugin/mcp/native/darwin-arm64/unix.node +0 -0
  6. package/_bundled_plugin/mcp/native/darwin-x64/unix.node +0 -0
  7. package/_bundled_plugin/mcp/native/linux-arm64-gnu/unix.node +0 -0
  8. package/_bundled_plugin/mcp/native/linux-arm64-musl/unix.node +0 -0
  9. package/_bundled_plugin/mcp/native/linux-x64-gnu/unix.node +0 -0
  10. package/_bundled_plugin/mcp/native/linux-x64-musl/unix.node +0 -0
  11. package/_bundled_plugin/mcp/native/win32-arm64/windows.node +0 -0
  12. package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
  13. package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
  14. package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
  15. package/_bundled_plugin/references/artifact-storage.md +4 -4
  16. package/_bundled_plugin/references/config-preflight.md +1 -1
  17. package/_bundled_plugin/references/core-scan.md +14 -2
  18. package/_bundled_plugin/references/final-report.md +4 -2
  19. package/_bundled_plugin/references/scan-artifacts.md +2 -2
  20. package/_bundled_plugin/references/scan-contract.md +2 -2
  21. package/_bundled_plugin/references/threat-model.md +2 -2
  22. package/_bundled_plugin/schemas/coverage.schema.json +22 -0
  23. package/_bundled_plugin/schemas/scan-manifest.schema.json +100 -85
  24. package/_bundled_plugin/schemas/tools/scan-draft.schema.json +116 -102
  25. package/_bundled_plugin/scripts/config_preflight.py +4 -8
  26. package/_bundled_plugin/scripts/deep_scan_workbench.py +83 -217
  27. package/_bundled_plugin/scripts/filesystem_identity.py +1 -5
  28. package/_bundled_plugin/scripts/finalize_scan_contract.py +441 -166
  29. package/_bundled_plugin/scripts/finding_preview.py +42 -82
  30. package/_bundled_plugin/scripts/generate_in_scope_files.py +30 -34
  31. package/_bundled_plugin/scripts/generate_rank_input.py +58 -99
  32. package/_bundled_plugin/scripts/launch_codex_security_mcp +5 -1
  33. package/_bundled_plugin/scripts/rank_preview.py +85 -68
  34. package/_bundled_plugin/scripts/report_projection.py +37 -58
  35. package/_bundled_plugin/scripts/threat_model_projection.py +164 -0
  36. package/_bundled_plugin/scripts/windows_scan_local_files.py +11 -6
  37. package/_bundled_plugin/scripts/workbench/storage.py +11 -0
  38. package/_bundled_plugin/scripts/workbench_cli.py +11 -17
  39. package/_bundled_plugin/scripts/workbench_constants.py +6 -14
  40. package/_bundled_plugin/scripts/workbench_db.py +116 -228
  41. package/_bundled_plugin/scripts/workbench_finding_index.py +1 -6
  42. package/_bundled_plugin/scripts/workbench_native_indexes.py +1 -4
  43. package/_bundled_plugin/scripts/workbench_progress.py +12 -34
  44. package/_bundled_plugin/scripts/workbench_publication.py +47 -62
  45. package/_bundled_plugin/scripts/workbench_remediation.py +2 -20
  46. package/_bundled_plugin/scripts/workbench_saved_results.py +1246 -230
  47. package/_bundled_plugin/scripts/workbench_scan_start.py +4 -11
  48. package/_bundled_plugin/scripts/workbench_scan_usage.py +7 -15
  49. package/_bundled_plugin/scripts/workbench_schema.py +86 -271
  50. package/_bundled_plugin/scripts/workbench_severity.py +3 -0
  51. package/_bundled_plugin/scripts/workbench_source_excerpt.py +5 -6
  52. package/_bundled_plugin/scripts/workbench_target.py +98 -10
  53. package/_bundled_plugin/scripts/workbench_target_state.py +1 -5
  54. package/_bundled_plugin/scripts/workbench_validation.py +6 -20
  55. package/_bundled_plugin/skills/deep-security-scan/SKILL.md +3 -3
  56. package/_bundled_plugin/skills/security-diff-scan/SKILL.md +3 -3
  57. package/_bundled_plugin/skills/security-scan/SKILL.md +2 -2
  58. package/_bundled_plugin/skills/security-scan/references/desktop-scan.md +2 -2
  59. package/_bundled_plugin/skills/threat-model/SKILL.md +2 -2
  60. package/dist/api.d.ts +3 -5
  61. package/dist/api.d.ts.map +1 -1
  62. package/dist/api.js +201 -207
  63. package/dist/api.js.map +1 -1
  64. package/dist/artifact-export.d.ts +70 -0
  65. package/dist/artifact-export.d.ts.map +1 -0
  66. package/dist/artifact-export.js +277 -0
  67. package/dist/artifact-export.js.map +1 -0
  68. package/dist/auth.d.ts.map +1 -1
  69. package/dist/auth.js +8 -3
  70. package/dist/auth.js.map +1 -1
  71. package/dist/bulk-scan-discovery.d.ts +1 -0
  72. package/dist/bulk-scan-discovery.d.ts.map +1 -1
  73. package/dist/bulk-scan-discovery.js +8 -9
  74. package/dist/bulk-scan-discovery.js.map +1 -1
  75. package/dist/classify-scan-severity.d.ts.map +1 -1
  76. package/dist/classify-scan-severity.js +2 -5
  77. package/dist/classify-scan-severity.js.map +1 -1
  78. package/dist/classify-severity.d.ts +2 -8
  79. package/dist/classify-severity.d.ts.map +1 -1
  80. package/dist/classify-severity.js +3 -5
  81. package/dist/classify-severity.js.map +1 -1
  82. package/dist/cli-help.d.ts +3 -0
  83. package/dist/cli-help.d.ts.map +1 -0
  84. package/dist/cli-help.js +281 -0
  85. package/dist/cli-help.js.map +1 -0
  86. package/dist/cli.d.ts +19 -22
  87. package/dist/cli.d.ts.map +1 -1
  88. package/dist/cli.js +631 -714
  89. package/dist/cli.js.map +1 -1
  90. package/dist/cloud-publish.d.ts.map +1 -1
  91. package/dist/cloud-publish.js +1 -8
  92. package/dist/cloud-publish.js.map +1 -1
  93. package/dist/codex-prompt.d.ts.map +1 -1
  94. package/dist/codex-prompt.js +1 -2
  95. package/dist/codex-prompt.js.map +1 -1
  96. package/dist/codex-sdk-environment.d.ts +2 -0
  97. package/dist/codex-sdk-environment.d.ts.map +1 -0
  98. package/dist/codex-sdk-environment.js +30 -0
  99. package/dist/codex-sdk-environment.js.map +1 -0
  100. package/dist/component-plan.d.ts.map +1 -1
  101. package/dist/component-plan.js +2 -6
  102. package/dist/component-plan.js.map +1 -1
  103. package/dist/component-scan.d.ts +1 -0
  104. package/dist/component-scan.d.ts.map +1 -1
  105. package/dist/component-scan.js +31 -9
  106. package/dist/component-scan.js.map +1 -1
  107. package/dist/config.d.ts.map +1 -1
  108. package/dist/config.js +32 -33
  109. package/dist/config.js.map +1 -1
  110. package/dist/contract.d.ts +2 -1
  111. package/dist/contract.d.ts.map +1 -1
  112. package/dist/contract.js +63 -122
  113. package/dist/contract.js.map +1 -1
  114. package/dist/cost-model.d.ts.map +1 -1
  115. package/dist/cost-model.js +65 -34
  116. package/dist/cost-model.js.map +1 -1
  117. package/dist/cost.d.ts.map +1 -1
  118. package/dist/cost.js +15 -31
  119. package/dist/cost.js.map +1 -1
  120. package/dist/custom-validation-prompt.js +4 -4
  121. package/dist/custom-validation-prompt.js.map +1 -1
  122. package/dist/custom-validation.d.ts.map +1 -1
  123. package/dist/custom-validation.js +17 -16
  124. package/dist/custom-validation.js.map +1 -1
  125. package/dist/deduplication/checkpointed-review.d.ts.map +1 -1
  126. package/dist/deduplication/checkpointed-review.js +10 -11
  127. package/dist/deduplication/checkpointed-review.js.map +1 -1
  128. package/dist/deduplication/codex-review.d.ts +2 -0
  129. package/dist/deduplication/codex-review.d.ts.map +1 -1
  130. package/dist/deduplication/codex-review.js +3 -3
  131. package/dist/deduplication/codex-review.js.map +1 -1
  132. package/dist/deduplication/deduplication-reviewer.d.ts.map +1 -1
  133. package/dist/deduplication/deduplication-reviewer.js +2 -0
  134. package/dist/deduplication/deduplication-reviewer.js.map +1 -1
  135. package/dist/deduplication/deduplication.js +40 -62
  136. package/dist/deduplication/deduplication.js.map +1 -1
  137. package/dist/deduplication/records-protocol.d.ts.map +1 -1
  138. package/dist/deduplication/records-protocol.js +1 -4
  139. package/dist/deduplication/records-protocol.js.map +1 -1
  140. package/dist/deduplication/records.d.ts +2 -1
  141. package/dist/deduplication/records.d.ts.map +1 -1
  142. package/dist/deduplication/records.js +24 -6
  143. package/dist/deduplication/records.js.map +1 -1
  144. package/dist/deduplication/review.d.ts +7 -0
  145. package/dist/deduplication/review.d.ts.map +1 -1
  146. package/dist/deduplication/review.js.map +1 -1
  147. package/dist/deduplication/scan.js +3 -7
  148. package/dist/deduplication/scan.js.map +1 -1
  149. package/dist/deep-config.d.ts.map +1 -1
  150. package/dist/deep-config.js +3 -19
  151. package/dist/deep-config.js.map +1 -1
  152. package/dist/deep-progress.d.ts +0 -1
  153. package/dist/deep-progress.d.ts.map +1 -1
  154. package/dist/deep-progress.js +22 -40
  155. package/dist/deep-progress.js.map +1 -1
  156. package/dist/errors.d.ts +3 -2
  157. package/dist/errors.d.ts.map +1 -1
  158. package/dist/errors.js +5 -7
  159. package/dist/errors.js.map +1 -1
  160. package/dist/finding-catalogue.d.ts.map +1 -1
  161. package/dist/finding-catalogue.js +22 -22
  162. package/dist/finding-catalogue.js.map +1 -1
  163. package/dist/finding-workflow.d.ts.map +1 -1
  164. package/dist/finding-workflow.js +4 -7
  165. package/dist/finding-workflow.js.map +1 -1
  166. package/dist/findings-import.d.ts.map +1 -1
  167. package/dist/findings-import.js +7 -17
  168. package/dist/findings-import.js.map +1 -1
  169. package/dist/github.d.ts.map +1 -1
  170. package/dist/github.js +2 -3
  171. package/dist/github.js.map +1 -1
  172. package/dist/import-scan.js +2 -2
  173. package/dist/import-scan.js.map +1 -1
  174. package/dist/index.d.ts +4 -2
  175. package/dist/index.d.ts.map +1 -1
  176. package/dist/index.js +2 -1
  177. package/dist/index.js.map +1 -1
  178. package/dist/knowledge-base.js +2 -2
  179. package/dist/knowledge-base.js.map +1 -1
  180. package/dist/linear.d.ts.map +1 -1
  181. package/dist/linear.js +2 -3
  182. package/dist/linear.js.map +1 -1
  183. package/dist/models.d.ts +24 -0
  184. package/dist/models.d.ts.map +1 -1
  185. package/dist/models.js.map +1 -1
  186. package/dist/multiscan.d.ts.map +1 -1
  187. package/dist/multiscan.js +36 -31
  188. package/dist/multiscan.js.map +1 -1
  189. package/dist/owner-evidence.d.ts.map +1 -1
  190. package/dist/owner-evidence.js +2 -6
  191. package/dist/owner-evidence.js.map +1 -1
  192. package/dist/patch-tui.d.ts.map +1 -1
  193. package/dist/patch-tui.js +2 -4
  194. package/dist/patch-tui.js.map +1 -1
  195. package/dist/project-config-schema.d.ts +10 -0
  196. package/dist/project-config-schema.d.ts.map +1 -1
  197. package/dist/project-config-schema.js +1 -0
  198. package/dist/project-config-schema.js.map +1 -1
  199. package/dist/project-config.d.ts +1 -0
  200. package/dist/project-config.d.ts.map +1 -1
  201. package/dist/project-config.js +2 -0
  202. package/dist/project-config.js.map +1 -1
  203. package/dist/prompt-files.d.ts +0 -1
  204. package/dist/prompt-files.d.ts.map +1 -1
  205. package/dist/prompt-files.js +2 -4
  206. package/dist/prompt-files.js.map +1 -1
  207. package/dist/publication-events.d.ts.map +1 -1
  208. package/dist/publication-events.js +15 -29
  209. package/dist/publication-events.js.map +1 -1
  210. package/dist/publication-store.d.ts.map +1 -1
  211. package/dist/publication-store.js +9 -13
  212. package/dist/publication-store.js.map +1 -1
  213. package/dist/publication.d.ts.map +1 -1
  214. package/dist/publication.js +11 -14
  215. package/dist/publication.js.map +1 -1
  216. package/dist/publish.d.ts.map +1 -1
  217. package/dist/publish.js +31 -41
  218. package/dist/publish.js.map +1 -1
  219. package/dist/record.d.ts +2 -0
  220. package/dist/record.d.ts.map +1 -0
  221. package/dist/record.js +4 -0
  222. package/dist/record.js.map +1 -0
  223. package/dist/result.d.ts +4 -1
  224. package/dist/result.d.ts.map +1 -1
  225. package/dist/result.js +7 -0
  226. package/dist/result.js.map +1 -1
  227. package/dist/runtime.d.ts +10 -13
  228. package/dist/runtime.d.ts.map +1 -1
  229. package/dist/runtime.js +203 -131
  230. package/dist/runtime.js.map +1 -1
  231. package/dist/saved-scan.d.ts.map +1 -1
  232. package/dist/saved-scan.js +10 -20
  233. package/dist/saved-scan.js.map +1 -1
  234. package/dist/scan-activity.d.ts.map +1 -1
  235. package/dist/scan-activity.js +8 -22
  236. package/dist/scan-activity.js.map +1 -1
  237. package/dist/scan-comparison.d.ts +3 -3
  238. package/dist/scan-comparison.d.ts.map +1 -1
  239. package/dist/scan-comparison.js +38 -73
  240. package/dist/scan-comparison.js.map +1 -1
  241. package/dist/scan-dashboard.d.ts +0 -1
  242. package/dist/scan-dashboard.d.ts.map +1 -1
  243. package/dist/scan-dashboard.js +10 -19
  244. package/dist/scan-dashboard.js.map +1 -1
  245. package/dist/scan-history-renderer.d.ts.map +1 -1
  246. package/dist/scan-history-renderer.js +1 -2
  247. package/dist/scan-history-renderer.js.map +1 -1
  248. package/dist/scan-logs.d.ts.map +1 -1
  249. package/dist/scan-logs.js +2 -6
  250. package/dist/scan-logs.js.map +1 -1
  251. package/dist/scan-sessions.d.ts.map +1 -1
  252. package/dist/scan-sessions.js +1 -3
  253. package/dist/scan-sessions.js.map +1 -1
  254. package/dist/scan-settings.d.ts +5 -0
  255. package/dist/scan-settings.d.ts.map +1 -1
  256. package/dist/scan-settings.js +4 -0
  257. package/dist/scan-settings.js.map +1 -1
  258. package/dist/security-policy-cli.d.ts.map +1 -1
  259. package/dist/security-policy-cli.js +8 -6
  260. package/dist/security-policy-cli.js.map +1 -1
  261. package/dist/security-policy.d.ts +8 -4
  262. package/dist/security-policy.d.ts.map +1 -1
  263. package/dist/security-policy.js +98 -84
  264. package/dist/security-policy.js.map +1 -1
  265. package/dist/server/dashboard/app.js +5 -5
  266. package/dist/server/embeddings.d.ts.map +1 -1
  267. package/dist/server/embeddings.js +1 -0
  268. package/dist/server/embeddings.js.map +1 -1
  269. package/dist/server/routes.d.ts +3 -2
  270. package/dist/server/routes.d.ts.map +1 -1
  271. package/dist/server/routes.js +19 -7
  272. package/dist/server/routes.js.map +1 -1
  273. package/dist/server/server.d.ts.map +1 -1
  274. package/dist/server/server.js +2 -3
  275. package/dist/server/server.js.map +1 -1
  276. package/dist/server/sqlite-store.d.ts.map +1 -1
  277. package/dist/server/sqlite-store.js +4 -14
  278. package/dist/server/sqlite-store.js.map +1 -1
  279. package/dist/severity-store.js +8 -15
  280. package/dist/severity-store.js.map +1 -1
  281. package/dist/suggest-owners.d.ts +2 -3
  282. package/dist/suggest-owners.d.ts.map +1 -1
  283. package/dist/suggest-owners.js +4 -5
  284. package/dist/suggest-owners.js.map +1 -1
  285. package/dist/targets.d.ts +1 -0
  286. package/dist/targets.d.ts.map +1 -1
  287. package/dist/targets.js +24 -21
  288. package/dist/targets.js.map +1 -1
  289. package/dist/trusted-executable.d.ts +5 -0
  290. package/dist/trusted-executable.d.ts.map +1 -1
  291. package/dist/trusted-executable.js +22 -5
  292. package/dist/trusted-executable.js.map +1 -1
  293. package/dist/value.d.ts +2 -0
  294. package/dist/value.d.ts.map +1 -0
  295. package/dist/value.js +20 -0
  296. package/dist/value.js.map +1 -0
  297. package/dist/version.d.ts.map +1 -1
  298. package/dist/version.js +3 -6
  299. package/dist/version.js.map +1 -1
  300. package/dist/windows-path.d.ts.map +1 -1
  301. package/dist/windows-path.js +1 -2
  302. package/dist/windows-path.js.map +1 -1
  303. package/dist/worker-progress.d.ts +1 -0
  304. package/dist/worker-progress.d.ts.map +1 -1
  305. package/dist/worker-progress.js +13 -34
  306. package/dist/worker-progress.js.map +1 -1
  307. package/docs/dedupe-records.md +24 -0
  308. package/package.json +11 -10
  309. package/schemas/project-config.schema.json +5 -0
  310. package/_bundled_plugin/scripts/normalize_candidates.py +0 -338
  311. package/dist/server/findings-service.d.ts +0 -20
  312. package/dist/server/findings-service.d.ts.map +0 -1
  313. package/dist/server/findings-service.js +0 -31
  314. package/dist/server/findings-service.js.map +0 -1
package/README.md CHANGED
@@ -45,6 +45,36 @@ make extra model calls; see [Progress and cost](#progress-and-cost).
45
45
  Keep results outside the repository and restrict access: reports can contain
46
46
  source code, vulnerability details, and reproduction steps.
47
47
 
48
+ ### Select a Cyber access program
49
+
50
+ For the built-in OpenAI provider, select `standard`, `daybreak_blue`, or
51
+ `daybreak_red` per scan:
52
+
53
+ ```ts
54
+ await security.run("/path/to/repository", {
55
+ auth: "api-key",
56
+ cyberAccessProgram: "daybreak_blue",
57
+ });
58
+ ```
59
+
60
+ ```sh
61
+ codex-security scan . --auth api-key --cyber-access-program daybreak_blue
62
+ ```
63
+
64
+ `scan-components` accepts the same flag. Project files use
65
+ `scan.cyber_access_program`, including for bulk scans. An explicit CLI or SDK
66
+ selection overrides the project setting. Omission preserves Codex defaults;
67
+ `standard` explicitly selects the standard program.
68
+
69
+ The selection applies to Deep Scan discovery and reducer workers, resumed
70
+ workers, custom validation, and post-scan turns. Saved scan recipes retain it
71
+ for resume and rerun. Automatic component planning and finding matching also
72
+ use the selected program. API-key selection enables Codex's experimental Cyber
73
+ support unless the effective native configuration explicitly disables
74
+ `features.api_key_cyber_access_programs`.
75
+ Explicit disables and API entitlement failures remain errors. Selecting a
76
+ program does not grant access; the API verifies the key's entitlement.
77
+
48
78
  ### Validate an existing finding
49
79
 
50
80
  ```ts
@@ -218,12 +248,14 @@ npx @openai/codex-security login
218
248
  npx @openai/codex-security scan .
219
249
  ```
220
250
 
221
- Use device authentication on remote or headless machines:
251
+ On remote or headless machines, use device auth if your workspace allows it:
222
252
 
223
253
  ```bash
224
254
  npx @openai/codex-security login --device-auth
225
255
  ```
226
256
 
257
+ If device auth is disabled, [sign in over SSH](#remote-login-with-ssh-forwarding).
258
+
227
259
  For CI, set `OPENAI_API_KEY` or `CODEX_API_KEY`. To save a key, pass it on stdin:
228
260
 
229
261
  ```bash
@@ -234,6 +266,28 @@ Environment API keys apply to the current command; only `login --with-api-key`
234
266
  saves them. Pass Codex access tokens on stdin to `login --with-access-token`.
235
267
  Access-token environment variables are not scan API keys.
236
268
 
269
+ ### Remote login with SSH forwarding
270
+
271
+ Use an SSH tunnel when device auth is disabled.
272
+
273
+ On your local machine, replace `user@remote-host` with your SSH address and run:
274
+
275
+ ```bash
276
+ ssh -L 1455:localhost:1455 user@remote-host
277
+ ```
278
+
279
+ Run login in that SSH session:
280
+
281
+ ```bash
282
+ npx @openai/codex-security login
283
+ ```
284
+
285
+ Open the sign-in URL in your local browser. Keep SSH connected until login finishes.
286
+
287
+ See the [authentication guide](https://learn.chatgpt.com/docs/auth?surface=cli#cli-fallback-forward-the-localhost-callback-over-ssh).
288
+
289
+ ### Native command authentication and other providers
290
+
237
291
  SDK callers can select native command authentication through
238
292
  `codexOverrides.model_providers.<id>.auth` and `model_provider` (including a
239
293
  selected `profile`). Scans, comparisons, and deduplication reviews preserve
@@ -252,16 +306,68 @@ npx @openai/codex-security scan . --provider openrouter --model anthropic/claude
252
306
 
253
307
  export FIREWORKS_API_KEY="<your-fireworks-api-key>"
254
308
  npx @openai/codex-security scan . --provider fireworks --model accounts/fireworks/models/qwen3-235b-a22b
309
+ ```
310
+
311
+ ### Amazon Bedrock
312
+
313
+ Bedrock uses Codex's native provider; no custom connector or adapter is needed.
314
+ Choose an AWS identity and a region with access to the exact Bedrock model ID:
255
315
 
256
- export AWS_BEARER_TOKEN_BEDROCK="<your-bedrock-api-key>"
316
+ ```bash
317
+ export AWS_PROFILE="security-scan"
257
318
  export AWS_REGION="us-east-2"
258
319
  npx @openai/codex-security scan . --provider amazon-bedrock --model openai.gpt-5.6-luna
259
320
  ```
260
321
 
261
- Bedrock also accepts AWS access keys, profiles, web identity, container
262
- credentials, and the default AWS credential chain. Set `AWS_REGION` and choose
263
- a Bedrock model with `--model`; OpenAI models such as `openai.gpt-5.6-luna`
264
- support `--max-cost`.
322
+ For an AWS account with approved Daybreak Blue access in `us-east-2`:
323
+
324
+ ```bash
325
+ npx @openai/codex-security scan . --provider amazon-bedrock \
326
+ --model openai.gpt-daybreak-blue-5.6-sol --effort high
327
+ ```
328
+
329
+ For separately approved Daybreak Red model access in the same region:
330
+
331
+ ```bash
332
+ npx @openai/codex-security scan . --provider amazon-bedrock \
333
+ --model openai.gpt-5.6-cyber --effort high
334
+ ```
335
+
336
+ Both require OpenAI approval/enrollment followed by AWS model-access provisioning.
337
+ Red requires separate Red approval and the model-specific approval for
338
+ GPT-5.6-Cyber; Blue access does not include it. Contact your AWS account team.
339
+ See the AWS model cards for
340
+ [Blue](https://docs.aws.amazon.com/en_en/bedrock/latest/userguide/model-card-openai-gpt-daybreak-blue-56-sol.html)
341
+ and [Red](https://docs.aws.amazon.com/en_en/bedrock/latest/userguide/model-card-openai-gpt-56-cyber.html),
342
+ and [OpenAI's access overview](https://help.openai.com/en/articles/20001258-openai-daybreak-trusted-access-for-cyber-overview).
343
+
344
+ Run the exports and CLI command in the same shell, job, or container. Environment
345
+ changes in another terminal or a completed subprocess do not reach the scan.
346
+ Instead of a profile, you can use `AWS_BEARER_TOKEN_BEDROCK`, AWS access keys, web
347
+ identity, container credentials, or the default AWS credential chain. Temporary
348
+ access keys require all three of `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`,
349
+ and `AWS_SESSION_TOKEN`. Set `AWS_REGION` for the selected model's region and
350
+ avoid mixing a profile with unrelated credential environment variables.
351
+
352
+ Once model access is provisioned, native Bedrock scans, including Deep Scan
353
+ workers, use AWS authentication without a separate `codex-security login` or
354
+ OpenAI API key. AWS still controls whether that identity can invoke the model.
355
+ Reading local reports, `scans show`, and `export` requires no cloud login.
356
+ [Publishing to Cloud](#publish-findings-to-cloud) is a separate operation that
357
+ requires ChatGPT credentials; AWS inference credentials do not grant that access.
358
+
359
+ `info` and `scan --dry-run` inspect local configuration and inputs. They do not
360
+ verify AWS credentials or invoke the model. A model-metadata or OpenAI access
361
+ advisory does not establish Bedrock access; use the actual inference result.
362
+ An AWS authentication error or model-access denial must be resolved for the
363
+ selected AWS identity, model, and region. See the
364
+ [Bedrock verification guide](../../docs/bedrock.md) for a live scan recipe.
365
+
366
+ OpenAI models such as `openai.gpt-5.6-luna` support `--max-cost`. The exact
367
+ `openai.gpt-daybreak-blue-5.6-sol` ID has AWS Standard commercial in-region price
368
+ estimates, including short/long-context ranges and the included AWS fee. These
369
+ estimates enable `--max-cost`; they are not billing totals or a guaranteed bill
370
+ limit. This pricing entry does not change other Bedrock models' estimates.
265
371
 
266
372
  Bedrock scans, including Deep Scan workers, default to
267
373
  `model_reasoning_summary = "none"` because some Bedrock models reject
@@ -270,7 +376,10 @@ settings in `--codex` overrides or the selected Codex profile take precedence.
270
376
  For standard scans on older CLI versions, append
271
377
  `--codex 'model_reasoning_summary="none"'` to your scan command if Bedrock
272
378
  reports that `reasoning.summary` is unsupported. Deep scans require a CLI
273
- version that forwards this setting to workers.
379
+ version that forwards this setting to discovery and reducer workers, including
380
+ resumed workers. Version `0.1.27` and later includes that fix.
381
+
382
+ ### OpenAI credentials
274
383
 
275
384
  On Windows, set the API key in PowerShell:
276
385
 
@@ -429,13 +538,13 @@ npx @openai/codex-security policy . --path services/api \
429
538
 
430
539
  The artifact directory contains:
431
540
 
432
- | File | Purpose |
433
- | ---------------------- | --------------------------------------------------------- |
434
- | `SECURITY.md` | Editable policy draft. |
435
- | `THREAT_MODEL.md` | Detailed threat model with source references. |
436
- | `project-spec.md` | System description and security boundaries. |
437
- | `previous-SECURITY.md` | Original policy used for the diff. |
438
- | `policy-draft.json` | Target, policy hashes, revision, model, and review notes. |
541
+ | File | Purpose |
542
+ | ---------------------- | --------------------------------------------------------------------------------------- |
543
+ | `SECURITY.md` | Editable policy draft. |
544
+ | `threatmodel.md` | Detailed threat model with source references. |
545
+ | `project-spec.md` | System description and security boundaries. |
546
+ | `previous-SECURITY.md` | Original policy used for the diff. |
547
+ | `policy-draft.json` | Target, policy hashes, revision, retained threat model, stage status, and review notes. |
439
548
 
440
549
  Keep supporting documents private until reviewed for disclosure. A generated
441
550
  threat scenario is neither owner approval nor a confirmed vulnerability.
@@ -488,7 +597,12 @@ npx @openai/codex-security scan /path/to/repository --output-dir /path/outside/r
488
597
  npx @openai/codex-security scan /path/to/repository --dry-run
489
598
  ```
490
599
 
491
- Use `scan --help` for options, `--version` for the installed version, and
600
+ Use `--help` to browse commands by task, or `<command> --help` (or `-h`) for
601
+ options and examples. `scan --help` groups options by scope, Deep Scan, results,
602
+ and patching; `publish scan --help` groups destination settings. `scans` and
603
+ `findings` run `list` when no subcommand is given.
604
+
605
+ Use `--version` for the installed version, and
492
606
  `info --json` for package, plugin, runtime, and model details. `--dry-run`
493
607
  runs local preflight checks. `info -c FILE --json` inspects resolved configuration
494
608
  and its sources without a repository or runtime.
@@ -855,14 +969,30 @@ max_concurrent_threads_per_session = 9
855
969
  sandbox = "unelevated"
856
970
  ```
857
971
 
858
- Use `--model` to choose a model and `--effort minimal|low|medium|high|xhigh|max`
859
- for reasoning effort. Repeat `--codex KEY=VALUE` for other TOML settings:
972
+ Use `--model MODEL` to choose a model and `--effort EFFORT`
973
+ for reasoning effort. Both flags work with `scan`, `bulk-scan`, `scan-components`,
974
+ `policy`, `validate`, `patch`, `verify-fix`, `suggest-owners`, `classify-severity`,
975
+ `scans match`, and `scans compare`.
976
+
977
+ Model IDs and reasoning effort values are passed through to Codex unchanged.
978
+ The wrapper accepts values such as `minimal`, `none`, and `high`, as
979
+ well as future values, without requiring a wrapper update. Supported combinations
980
+ depend on the model, inference provider, installed Codex version, and credentials.
981
+ Codex and provider errors are reported without substituting another model or effort.
982
+ Omitting these flags preserves each command's defaults: scans, policy generation,
983
+ validation, patching, verification, and owner suggestions use `gpt-5.6-sol`/`xhigh`;
984
+ matching and severity classification use Codex's configured model and `medium` effort.
985
+
986
+ Repeat `--codex KEY=VALUE` for other TOML settings on commands that support it:
860
987
 
861
988
  ```bash
862
989
  npx @openai/codex-security scan . \
863
- --model gpt-5.6-terra \
990
+ --model gpt-6.1-sol \
864
991
  --effort high \
865
992
  --codex features.multi_agent_v2.max_concurrent_threads_per_session=4
993
+
994
+ npx @openai/codex-security patch issues.md --model gpt-6-astra --effort max
995
+ npx @openai/codex-security verify-fix issues.md --model gpt-6.1-sol --effort high
866
996
  ```
867
997
 
868
998
  The thread limit of `9` includes the parent and up to eight delegated workers.
@@ -879,9 +1009,39 @@ or `features.plugins` are rejected, including in profiles. Multi-agent v2 must
879
1009
  stay enabled: `agents.max_threads` and
880
1010
  `features.multi_agent_v2.enabled=false` are rejected.
881
1011
 
882
- `validate`, `patch`, and `verify-fix` accept `--auth`, `--effort`, and the `model`,
883
- `model_reasoning_effort`, and `analytics.enabled` keys in `--codex`, but no
884
- other runtime overrides.
1012
+ `validate`, `patch`, and `verify-fix` accept `--auth`, `--model`, and `--effort`.
1013
+ Their `--codex` overrides are limited to `model`, `model_reasoning_effort`,
1014
+ `model_provider`, `model_providers`, and `analytics.enabled`.
1015
+ Use the same provider settings as `scan` when routing a standalone patch
1016
+ through a custom inference gateway:
1017
+
1018
+ ```bash
1019
+ npx @openai/codex-security patch "Security issue" \
1020
+ --model gateway-model \
1021
+ --codex 'model_provider="gateway"' \
1022
+ --codex 'model_providers.gateway.name="Gateway"' \
1023
+ --codex 'model_providers.gateway.base_url="https://gateway.example.test/v1"' \
1024
+ --codex 'model_providers.gateway.wire_api="responses"' \
1025
+ --codex 'model_providers.gateway.env_key="GATEWAY_API_KEY"'
1026
+ ```
1027
+
1028
+ Set the selected provider's API-key environment variable before running the
1029
+ command; `--auth api-key` uses that configured variable. For `patch` and
1030
+ `verify-fix`, provider overrides preserve unspecified fields from the provider's
1031
+ existing Codex configuration. With `auto` or `api-key` authentication, a configured
1032
+ `env_key` takes precedence over OpenAI account authentication, matching native Codex.
1033
+ Explicit `--auth chatgpt` omits the selected custom provider's API-key environment
1034
+ variable, clears any configured `experimental_bearer_token`, and selects stored
1035
+ account authentication in its runtime configuration, even if the provider normally
1036
+ uses only an API key or bearer token. The original environment and
1037
+ Codex configuration remain unchanged.
1038
+ Model, effort, and provider settings also apply to
1039
+ `patch --assess-patch-risk`.
1040
+ Sandbox, approval, and plugin settings remain controlled by the command.
1041
+
1042
+ `scans resume` and `scans rerun` retain the saved scan's settings. `dedupe` uses
1043
+ separate screening and review models, so it does not expose a single model/effort
1044
+ override.
885
1045
 
886
1046
  Use `--codex 'analytics.enabled=false'` to disable Codex usage analytics and
887
1047
  built-in metrics for a command:
@@ -918,7 +1078,7 @@ restrictions.
918
1078
  | `CODEX_SECURITY_LINEAR_TEAM`, `CODEX_SECURITY_LINEAR_PROJECT` | Default team and project for completed-scan publication. |
919
1079
  | `CODEX_SECURITY_LINEAR_API_KEY` | Personal API key for Linear patching and direct publication. |
920
1080
  | `CODEX_SECURITY_LOG_LEVEL` | CLI-only; `debug` enables verbose diagnostics. |
921
- | `LOG_LEVEL` | CLI-only fallback when `CODEX_SECURITY_LOG_LEVEL` is unset. |
1081
+ | `LOG_LEVEL` | CLI-only fallback when `CODEX_SECURITY_LOG_LEVEL` is unset or blank. |
922
1082
  | `CODEX_SECURITY_STATE_DIR` | Private scan-history, workbench, and default artifact directory. |
923
1083
  | `CODEX_SECURITY_PROJECT_CONFIG` | Trusted project file for `scan`, `bulk-scan`, `scan-components`, and `info`; `-c` wins. Unset by default. |
924
1084
  | `CODEX_HOME` | Ambient Codex home for file-based sign-in and default state; defaults to `~/.codex`. |
@@ -939,6 +1099,24 @@ Python lookup order: `--python` (on `scan`, `bulk-scan`, or `export`) or SDK
939
1099
  on `PATH` (`py` also works on Windows). `CODEX_SECURITY_STATE_DIR` overrides
940
1100
  `CODEX_HOME` for state storage. Keep state and results outside the repository.
941
1101
 
1102
+ ### Troubleshooting
1103
+
1104
+ By default, scans show progress, state transitions, warnings, and summaries.
1105
+ Add `--verbose` or set
1106
+ `CODEX_SECURITY_LOG_LEVEL=debug` to include lifecycle, configuration, retry,
1107
+ and worker diagnostics on stderr. `LOG_LEVEL=debug` is the fallback when
1108
+ `CODEX_SECURITY_LOG_LEVEL` is unset or blank.
1109
+
1110
+ ```bash
1111
+ npx @openai/codex-security scan . --verbose
1112
+ ```
1113
+
1114
+ Codex Security preserves diagnostic text, including credential-shaped values,
1115
+ in CLI output, stored failures, publication receipts, and patch-risk summaries.
1116
+ Verbosity controls the amount of diagnostic detail. Native Codex and upstream
1117
+ SDK output may already have been redacted before reaching Codex Security.
1118
+ Review output and artifacts for sensitive information before sharing them.
1119
+
942
1120
  ### Progress and cost
943
1121
 
944
1122
  Interactive scans show full-screen progress; CI, redirected output, and
@@ -967,6 +1145,8 @@ means an upper estimate is unavailable, including models without verified
967
1145
  long-context rates. `cost.pricing` records the price source, verification date,
968
1146
  processing tier, short-context rates, and verified long-context rates when known.
969
1147
  Models without known short-context prices still have no cost estimate.
1148
+ GPT-6 Astra, GPT-6.1 Sol, and GPT-6 Luna have verified standard prices for cost
1149
+ estimates and `--max-cost` limits.
970
1150
 
971
1151
  For compatibility, `cacheWriteInputTokens` remains the reported token subtotal.
972
1152
  `cacheWriteInputTokensReported: false` means at least one included usage record
@@ -1583,7 +1763,16 @@ retaining stable finding identities. Ctrl-C keeps comparisons already saved.
1583
1763
  Only high-confidence duplicates are grouped; uncertain and independently
1584
1764
  related findings stay separate. Matching preserves triage and sealed artifacts.
1585
1765
 
1586
- Codex is called only when a new decision is needed, using existing authentication.
1766
+ Codex runs only for new matching decisions, using existing authentication.
1767
+ `scans match` and `scans compare` accept `--model` and `--effort`; the defaults
1768
+ are Codex's configured model and `medium` effort. Cached matches are reused
1769
+ even when these flags change. To recompute all matches:
1770
+
1771
+ ```bash
1772
+ npx @openai/codex-security scans match --all --force \
1773
+ --model gpt-6.1-sol --effort high
1774
+ ```
1775
+
1587
1776
  Scans without sealed artifacts are skipped, but their confirmed links can still
1588
1777
  be reused. Older custom plugins save confirmed and uncertain matches; use the
1589
1778
  bundled plugin for related links and large comparisons.
@@ -1633,13 +1822,79 @@ contain them. Press `d` during a scan for details, then `a` for all sources,
1633
1822
 
1634
1823
  ### Exports and CI
1635
1824
 
1636
- `export` writes CSV, JSON, or SARIF from a completed, sealed scan, defaulting to
1637
- the current repository's latest completed scan. It doesn't start Codex or load
1638
- credentials. Use `--output -` for stdout and `--source-root PATH` to add SARIF
1639
- source-line fingerprints. `export --help` lists all options.
1825
+ `export` reads saved results without starting Codex or loading credentials.
1826
+ It defaults to the current repository's latest completed scan. Select a result
1827
+ directory positionally, or use `--scan ID` with a scan ID or unique prefix;
1828
+ these source selectors cannot be combined. `--artifact findings` is the default
1829
+ and requires sealed results. Findings support `--export-format csv|json|sarif`,
1830
+ with `sarif` as the default. Use `--source-root PATH` to add SARIF source-line
1831
+ fingerprints.
1832
+
1833
+ Standard, Deep, Diff, and policy workflows save threat models with
1834
+ their results. They also write `threatmodel.md`; if that file cannot be written,
1835
+ the saved model remains available for export. Component and bulk scans keep a
1836
+ separate model for each child run. New documents record the model and scan
1837
+ scopes and identify provisional or recovered content. Some results have no
1838
+ saved model.
1839
+
1840
+ Use `--artifact threat-model` to export the retained model as Markdown. The
1841
+ format is `md` and the default destination is `./threatmodel.md`. Explicitly
1842
+ selected results can expose a saved model before scan completion or after a
1843
+ later failure. Policy result directories and historical saved Markdown models
1844
+ are also supported. A historical document in a sealed scan must be listed in
1845
+ the manifest with a matching digest. A missing model returns an error; export
1846
+ does not substitute an older run or generate a new model.
1847
+
1848
+ ```bash
1849
+ codex-security export --artifact threat-model
1850
+ codex-security export --scan SCAN_ID --artifact threat-model --output docs/threatmodel.md
1851
+ codex-security export /path/to/policy-results --artifact threat-model --output -
1852
+ codex-security scan . --knowledge-base docs/threatmodel.md
1853
+ ```
1854
+
1855
+ `--output -` emits only artifact content, with diagnostics on stderr. Markdown
1856
+ and CSV stdout cannot be combined with JSON command output. Exporting into a
1857
+ repository does not make the document automatic scan input; use the existing
1858
+ `--knowledge-base` option when you want to provide it as context.
1859
+
1860
+ `ScanResult.threatModel` contains the saved structured model or Markdown.
1861
+ `threatModelPath` points to its current document, including supported historical
1862
+ filenames. Either can be null. The model remains exportable when the document
1863
+ could not be written. Scan JSON and policy results expose these fields. History
1864
+ reports model availability, provenance, and the document path without including
1865
+ the model body. Policy generation saves its model before drafting `SECURITY.md`,
1866
+ so a later drafting failure does not discard it.
1867
+
1868
+ SDK scan methods verify model paths before returning them. A manually
1869
+ constructed `ScanResult` uses the `threatModelPath` supplied in its options, or
1870
+ `null` if omitted.
1871
+
1872
+ The SDK offers the same offline export without an authenticated session:
1873
+
1874
+ ```ts
1875
+ import { exportArtifact } from "@openai/codex-security";
1876
+
1877
+ const exported = await exportArtifact({
1878
+ source: { directory: "/path/to/scan-results" }, // Or { scanId: "SCAN_ID" }.
1879
+ artifact: "threat-model",
1880
+ output: "/path/to/threatmodel.md",
1881
+ });
1882
+ console.log(exported.path, exported.provenance);
1883
+ ```
1884
+
1885
+ `exportArtifact` also supports findings with `format: "csv" | "json" | "sarif"`.
1886
+ For threat-model file exports, returned provenance belongs to the same saved
1887
+ snapshot as the exported document. `output: "-"` streams to stdout and returns
1888
+ null path/provenance. `pythonPath` selects the helper interpreter and `signal`
1889
+ cancels the export. `export --help` lists the CLI options.
1640
1890
 
1641
1891
  JSON preserves the sealed findings document. CSV marks findings as open,
1642
1892
  omits local triage state, and cannot go to stdout when JSON output is requested.
1893
+ CSV escapes spreadsheet formula prefixes and literal leading apostrophes with
1894
+ an extra apostrophe; import removes that escape. Older CSV exports cannot
1895
+ distinguish some literal apostrophes from escapes. Use the JSON export when
1896
+ recovering those values from an older scan. Distinct CSV occurrence IDs are
1897
+ retained even when their finding IDs match, including when publishing CSV.
1643
1898
 
1644
1899
  For CI, save output outside the checkout and set a severity threshold:
1645
1900
 
@@ -1763,9 +2018,10 @@ npx @openai/codex-security patch --scan SCAN_ID --assess-patch-risk --create-pr
1763
2018
  npx @openai/codex-security patch --linear-issue SEC-123 --assess-patch-risk --create-pr
1764
2019
  ```
1765
2020
 
1766
- `--scan latest` selects the current repository's latest scan. Patch commands
1767
- support `--json`, including literal-text and file inputs. Change
1768
- the model with `--codex 'model="gpt-5.6-sol"'` or effort with `--effort high`.
2021
+ `--scan latest` selects the current repository's latest completed scan. Patch
2022
+ commands support `--json`, including literal-text and file inputs. Change
2023
+ the model with `--model gpt-6.1-sol` or effort with `--effort high`.
2024
+ The existing `--codex 'model="..."'` syntax is also supported.
1769
2025
  Each finding gets its own saved Codex desktop task.
1770
2026
 
1771
2027
  Before patching, the CLI runs a command with the task's sandbox policy. If the
@@ -1941,6 +2197,12 @@ network binding.
1941
2197
 
1942
2198
  ### API
1943
2199
 
2200
+ Mutation requests to `POST /v1/bulk/findings` and `POST /v1/dedupe-groups` require
2201
+ `Content-Type: application/json`; charset parameters are accepted. Other media
2202
+ types, including a missing content type, return HTTP 400 `invalid_request`
2203
+ before embedding or storage. The API remains unauthenticated and requires an
2204
+ authenticated TLS proxy before sharing access.
2205
+
1944
2206
  `POST /v1/bulk/findings` accepts `{"findings": [...]}`, using the existing SDK
1945
2207
  `Finding` model, including `findingId`, `occurrenceId`, and `fingerprints`.
1946
2208
  A complete exported `findings.json` document is also accepted; only its
@@ -2530,8 +2792,8 @@ Local defaults are `HOST=127.0.0.1` and `PORT=3000`. The existing
2530
2792
  without a state override, the service uses the same default state directory as
2531
2793
  the CLI. These settings also work on Windows.
2532
2794
 
2533
- HTTP routing, orchestration, embedding generation, and the SQLite adapter live
2534
- separately under `src/server/`. `FindingsService` receives a `FindingEmbedder`
2795
+ HTTP routing, embedding generation, and the SQLite adapter live
2796
+ separately under `src/server/`. `startFindingsServer` receives a `FindingEmbedder`
2535
2797
  whose `embed(findings)` method returns one `{ model, vector }` per finding in
2536
2798
  input order. `OpenAiFindingEmbedder` handles tokenization, batching, API calls,
2537
2799
  and vector normalization; it does not access storage. The `FindingsStore`
@@ -2568,6 +2830,7 @@ runtime dependencies.
2568
2830
  ## Containerized bulk scans
2569
2831
 
2570
2832
  Create `repositories.csv` as described under [Bulk scans](#bulk-scans).
2833
+ Use device login only if your workspace allows it.
2571
2834
  With a published image, run from the Codex Security repository root:
2572
2835
 
2573
2836
  ```bash
@@ -35,6 +35,7 @@
35
35
  "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",
36
36
  "PYTHON",
37
37
  "PYTHONUTF8",
38
+ "CODEX_SECURITY_GIT",
38
39
  "CODEX_SECURITY_KNOWLEDGE_BASE",
39
40
  "CODEX_SECURITY_CONFIG_PATH",
40
41
  "CODEX_SECURITY_DEEP_SCAN_CONFIG_PATH",
@@ -466,7 +466,7 @@ DEALINGS IN THE SOFTWARE.
466
466
 
467
467
  ---
468
468
 
469
- convert_case@0.11.0
469
+ convert_case@0.12.0
470
470
 
471
471
  MIT License
472
472
 
@@ -3088,7 +3088,7 @@ THE SOFTWARE.
3088
3088
 
3089
3089
  ---
3090
3090
 
3091
- napi-build@2.4.1
3091
+ napi-build@2.5.0
3092
3092
 
3093
3093
  MIT License
3094
3094
 
@@ -3137,7 +3137,7 @@ SOFTWARE.
3137
3137
 
3138
3138
  ---
3139
3139
 
3140
- napi-derive-backend@6.1.2
3140
+ napi-derive-backend@6.1.4
3141
3141
 
3142
3142
  MIT License
3143
3143
 
@@ -3186,7 +3186,7 @@ SOFTWARE.
3186
3186
 
3187
3187
  ---
3188
3188
 
3189
- napi-derive@3.6.3
3189
+ napi-derive@3.6.9
3190
3190
 
3191
3191
  MIT License
3192
3192
 
@@ -10,7 +10,7 @@ Keep structured outputs on their existing tools: inventories, candidate discover
10
10
 
11
11
  ## Supplemental files
12
12
 
13
- Use the existing plugin MCP's `save_codex_security_artifact` and `read_codex_security_artifact` for Markdown, optional finding write-ups, hardening documents/diagrams, validation evidence and retained helper output. Do not write these retained files with shell redirection, `apply_patch`, Python or other ordinary file-writing tools.
13
+ Use the existing plugin MCP's `save_codex_security_artifact` and `read_codex_security_artifact` for standalone Markdown, optional finding write-ups, hardening documents/diagrams, validation evidence and retained helper output. The host derives a scan's root-level `threatmodel.md` from its canonical `threatModel`; submit that model through the existing semantic draft tool instead of authoring a second document. Do not write retained supplemental files with shell redirection, `apply_patch`, Python or other ordinary file-writing tools.
14
14
 
15
15
  Identify the owner with exactly one of:
16
16
 
@@ -29,12 +29,12 @@ Omit `path`, `content` and `sourcePath` to prepare the selected directory. Use t
29
29
  Example for a running scan:
30
30
 
31
31
  ```text
32
- save_codex_security_artifact({ scanId, handoffClaimToken?, storage: "persistent", path: "artifacts/01_context/threat_model.md", content: "<exact Markdown>" })
32
+ read_codex_security_artifact({ scanId, handoffClaimToken?, storage: "persistent", path: "threatmodel.md" })
33
33
  save_codex_security_artifact({ scanId, handoffClaimToken?, storage: "temporary" })
34
34
  save_codex_security_artifact({ scanId, handoffClaimToken?, storage: "persistent", path: "artifacts/02_discovery/validation_artifacts/<candidate_id>/poc.bin", sourcePath: "<returned temporary directory>/poc.bin" })
35
35
  ```
36
36
 
37
- `path` is a portable relative filename under `artifacts/`, `findings/` or `hardening/`; `report_validation.md` is also supported. Standalone collections additionally support `threat_model.md`. Use the existing relative artifact layouts for each phase. The tool returns the physical `path`, canonical `relativePath` and content digest. Use the persistent relative path in scan evidence references. Read with the same identity, `storage` and relative `path`; request `encoding: "base64"` only for binary content.
37
+ `path` is a portable relative filename under `artifacts/`, `findings/` or `hardening/`; `report_validation.md` is also supported. Standalone collections additionally support saving `threatmodel.md`; the former `threat_model.md` remains readable. Running scans can read the host-generated `threatmodel.md`, but cannot replace it through the supplemental save tool. Use the existing relative artifact layouts for each phase. The tool returns the physical `path`, canonical `relativePath` and content digest. Use persistent evidence paths in scan evidence references; the derived threat-model document is not a coverage receipt. Read with the same identity, `storage` and relative `path`; request `encoding: "base64"` only for binary content.
38
38
 
39
39
  Source/configuration edits and external-publication request bodies are separate from scan artifacts and retain their existing tools and authorization. Explicit user instructions still take precedence. If a required output destination cannot be represented by managed storage, explain that limitation instead of silently substituting a different destination or claiming it was written.
40
40
 
@@ -46,7 +46,7 @@ For standalone/legacy mutable ledgers, use the save tool to replace their comple
46
46
 
47
47
  ## Threat-model cache and completed results
48
48
 
49
- For the shared repository threat model, use `targetPath: <repo_root>`, `storage: "persistent"`, `path: "threat_model.md"`. Read that collection's cached file only when the threat-model workflow allows cache reuse and its exact repository/version footer matches. Save the exact selected text into `artifacts/01_context/threat_model.md` with the running scan's `scanId`. Preserve the workflow's conditions that forbid reading or replacing the shared cache; the storage tool does not authorize a cache update.
49
+ For a standalone repository threat model, use `targetPath: <repo_root>`, `storage: "persistent"`, `path: "threatmodel.md"`. Read a shared cached file only when the threat-model workflow allows cache reuse and its exact repository/version footer matches; if the new filename is absent, the legacy `threat_model.md` may be read under the same rules. For a running scan, retain the selected text as `{ "format": "markdown", "content": "<exact Markdown>" }` in its canonical `threatModel`, using an early `complete: false` semantic checkpoint with partial coverage. The host writes `<scan_dir>/threatmodel.md` from that content. Preserve the workflow's conditions that forbid reading or replacing the shared cache; saving or exporting a scan's model does not authorize a cache update.
50
50
 
51
51
  End each shared threat model with these two lines:
52
52
 
@@ -90,7 +90,7 @@ Codex CLI and other hosts use the same prompt-based preflight before substantive
90
90
 
91
91
  ## Daybreak Access Advisory
92
92
 
93
- After capability preflight is `ready` and immediately before the workflow's first substantive scan action, call the plugin's `get_codex_security_daybreak_access` tool once only if it is available in the current session. If the tool is unavailable, skip the advisory silently: do not attempt a call, probe for it, or use a replacement access tool or connector. ChatGPT-authenticated desktop and CLI sessions support this advisory; skip it silently in known API-key-only sessions, which cannot verify account access. For Deep Security Scan, make the call immediately before `start_codex_security_deep_scan`. Reuse an existing result when continuing the same scan.
93
+ After capability preflight is `ready` and immediately before the workflow's first substantive scan action, call the plugin's `get_codex_security_daybreak_access` tool once only if it is available in the current session. If the tool is unavailable, skip the advisory silently: do not attempt a call, probe for it, or use a replacement access tool or connector. This advisory checks the connected ChatGPT account or workspace; it does not check Amazon Bedrock model access or access to local CLI scan results. ChatGPT-authenticated desktop and CLI sessions support it. Skip it silently for Amazon Bedrock scans and known API-key-only sessions; neither requires an OpenAI account advisory. Use the selected runtime provider to identify Bedrock, not merely the presence of AWS environment variables. For Deep Security Scan, make the call immediately before `start_codex_security_deep_scan`. Reuse an existing result when continuing the same scan.
94
94
 
95
95
  If the call fails, returns `status: "unknown"`, or returns `stale: true`, continue silently. Do not expose the unavailable check, unknown status, empty program list, or a speculative protected-output warning in progress messages or the final response. For a fresh `granted` result, report the exact status and available Daybreak programs. For a fresh `not_granted` result, before any other scan-start progress, present a separate, prominent warning that Daybreak access is not granted for this account and protected scan outputs may not be displayable. Include the returned `enrollmentUrl` as a clickable application link, falling back to `https://chatgpt.com/cyber` when absent.
96
96