@openai/codex-security 0.1.30 → 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.
- package/README.md +386 -37
- package/_bundled_plugin/.mcp.json +1 -0
- package/_bundled_plugin/mcp/helpers.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/native/THIRD_PARTY_NOTICES.txt +4 -4
- package/_bundled_plugin/mcp/native/darwin-arm64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/darwin-x64/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-arm64-musl/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-x64-gnu/unix.node +0 -0
- package/_bundled_plugin/mcp/native/linux-x64-musl/unix.node +0 -0
- package/_bundled_plugin/mcp/native/win32-arm64/windows.node +0 -0
- package/_bundled_plugin/mcp/native/win32-x64/windows.node +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-000 +0 -0
- package/_bundled_plugin/mcp/server.mjs.br.part-001 +0 -0
- package/_bundled_plugin/references/artifact-storage.md +4 -4
- package/_bundled_plugin/references/config-preflight.md +1 -1
- package/_bundled_plugin/references/core-scan.md +14 -2
- package/_bundled_plugin/references/final-report.md +4 -2
- package/_bundled_plugin/references/scan-artifacts.md +2 -2
- package/_bundled_plugin/references/scan-contract.md +2 -2
- package/_bundled_plugin/references/threat-model.md +2 -2
- package/_bundled_plugin/schemas/coverage.schema.json +22 -0
- package/_bundled_plugin/schemas/scan-manifest.schema.json +100 -85
- package/_bundled_plugin/schemas/tools/deep-reducer.schema.json +19 -4
- package/_bundled_plugin/schemas/tools/scan-draft.schema.json +116 -102
- package/_bundled_plugin/scripts/config_preflight.py +4 -8
- package/_bundled_plugin/scripts/deep_scan_workbench.py +83 -217
- package/_bundled_plugin/scripts/filesystem_identity.py +1 -5
- package/_bundled_plugin/scripts/finalize_scan_contract.py +441 -166
- package/_bundled_plugin/scripts/finding_preview.py +42 -82
- package/_bundled_plugin/scripts/generate_in_scope_files.py +30 -34
- package/_bundled_plugin/scripts/generate_rank_input.py +58 -99
- package/_bundled_plugin/scripts/launch_codex_security_mcp +5 -1
- package/_bundled_plugin/scripts/rank_preview.py +86 -68
- package/_bundled_plugin/scripts/report_projection.py +37 -58
- package/_bundled_plugin/scripts/threat_model_projection.py +164 -0
- package/_bundled_plugin/scripts/windows_scan_local_files.py +11 -6
- package/_bundled_plugin/scripts/workbench/storage.py +11 -0
- package/_bundled_plugin/scripts/workbench_cli.py +11 -17
- package/_bundled_plugin/scripts/workbench_constants.py +6 -14
- package/_bundled_plugin/scripts/workbench_db.py +116 -228
- package/_bundled_plugin/scripts/workbench_finding_index.py +1 -6
- package/_bundled_plugin/scripts/workbench_native_indexes.py +1 -4
- package/_bundled_plugin/scripts/workbench_progress.py +12 -34
- package/_bundled_plugin/scripts/workbench_publication.py +47 -62
- package/_bundled_plugin/scripts/workbench_remediation.py +2 -20
- package/_bundled_plugin/scripts/workbench_saved_results.py +1246 -230
- package/_bundled_plugin/scripts/workbench_scan_start.py +4 -11
- package/_bundled_plugin/scripts/workbench_scan_usage.py +7 -15
- package/_bundled_plugin/scripts/workbench_schema.py +86 -271
- package/_bundled_plugin/scripts/workbench_severity.py +3 -0
- package/_bundled_plugin/scripts/workbench_source_excerpt.py +5 -6
- package/_bundled_plugin/scripts/workbench_target.py +98 -10
- package/_bundled_plugin/scripts/workbench_target_state.py +1 -5
- package/_bundled_plugin/scripts/workbench_validation.py +6 -20
- package/_bundled_plugin/skills/deep-security-scan/SKILL.md +3 -3
- package/_bundled_plugin/skills/security-diff-scan/SKILL.md +3 -3
- package/_bundled_plugin/skills/security-scan/SKILL.md +2 -2
- package/_bundled_plugin/skills/security-scan/references/desktop-scan.md +2 -2
- package/_bundled_plugin/skills/threat-model/SKILL.md +2 -2
- package/dist/api.d.ts +3 -5
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +201 -207
- package/dist/api.js.map +1 -1
- package/dist/artifact-export.d.ts +70 -0
- package/dist/artifact-export.d.ts.map +1 -0
- package/dist/artifact-export.js +277 -0
- package/dist/artifact-export.js.map +1 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +9 -4
- package/dist/auth.js.map +1 -1
- package/dist/bulk-scan-discovery.d.ts +1 -0
- package/dist/bulk-scan-discovery.d.ts.map +1 -1
- package/dist/bulk-scan-discovery.js +8 -9
- package/dist/bulk-scan-discovery.js.map +1 -1
- package/dist/classify-scan-severity.d.ts.map +1 -1
- package/dist/classify-scan-severity.js +2 -5
- package/dist/classify-scan-severity.js.map +1 -1
- package/dist/classify-severity.d.ts +2 -8
- package/dist/classify-severity.d.ts.map +1 -1
- package/dist/classify-severity.js +3 -5
- package/dist/classify-severity.js.map +1 -1
- package/dist/cli-help.d.ts +3 -0
- package/dist/cli-help.d.ts.map +1 -0
- package/dist/cli-help.js +281 -0
- package/dist/cli-help.js.map +1 -0
- package/dist/cli.d.ts +21 -22
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +673 -701
- package/dist/cli.js.map +1 -1
- package/dist/cloud-publish.d.ts.map +1 -1
- package/dist/cloud-publish.js +1 -8
- package/dist/cloud-publish.js.map +1 -1
- package/dist/codex-prompt.d.ts.map +1 -1
- package/dist/codex-prompt.js +1 -2
- package/dist/codex-prompt.js.map +1 -1
- package/dist/codex-sdk-environment.d.ts +2 -0
- package/dist/codex-sdk-environment.d.ts.map +1 -0
- package/dist/codex-sdk-environment.js +30 -0
- package/dist/codex-sdk-environment.js.map +1 -0
- package/dist/component-plan.d.ts.map +1 -1
- package/dist/component-plan.js +2 -6
- package/dist/component-plan.js.map +1 -1
- package/dist/component-scan.d.ts +1 -0
- package/dist/component-scan.d.ts.map +1 -1
- package/dist/component-scan.js +31 -9
- package/dist/component-scan.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +32 -33
- package/dist/config.js.map +1 -1
- package/dist/contract.d.ts +2 -1
- package/dist/contract.d.ts.map +1 -1
- package/dist/contract.js +63 -122
- package/dist/contract.js.map +1 -1
- package/dist/cost-model.d.ts.map +1 -1
- package/dist/cost-model.js +65 -34
- package/dist/cost-model.js.map +1 -1
- package/dist/cost.d.ts.map +1 -1
- package/dist/cost.js +15 -31
- package/dist/cost.js.map +1 -1
- package/dist/custom-validation-prompt.js +4 -4
- package/dist/custom-validation-prompt.js.map +1 -1
- package/dist/custom-validation.d.ts.map +1 -1
- package/dist/custom-validation.js +17 -16
- package/dist/custom-validation.js.map +1 -1
- package/dist/deduplication/checkpointed-review.d.ts.map +1 -1
- package/dist/deduplication/checkpointed-review.js +10 -11
- package/dist/deduplication/checkpointed-review.js.map +1 -1
- package/dist/deduplication/codex-review.d.ts +2 -0
- package/dist/deduplication/codex-review.d.ts.map +1 -1
- package/dist/deduplication/codex-review.js +3 -3
- package/dist/deduplication/codex-review.js.map +1 -1
- package/dist/deduplication/deduplication-reviewer.d.ts.map +1 -1
- package/dist/deduplication/deduplication-reviewer.js +2 -0
- package/dist/deduplication/deduplication-reviewer.js.map +1 -1
- package/dist/deduplication/deduplication.js +40 -62
- package/dist/deduplication/deduplication.js.map +1 -1
- package/dist/deduplication/records-protocol.d.ts.map +1 -1
- package/dist/deduplication/records-protocol.js +1 -4
- package/dist/deduplication/records-protocol.js.map +1 -1
- package/dist/deduplication/records.d.ts +2 -1
- package/dist/deduplication/records.d.ts.map +1 -1
- package/dist/deduplication/records.js +24 -6
- package/dist/deduplication/records.js.map +1 -1
- package/dist/deduplication/review.d.ts +7 -0
- package/dist/deduplication/review.d.ts.map +1 -1
- package/dist/deduplication/review.js.map +1 -1
- package/dist/deduplication/scan.js +3 -7
- package/dist/deduplication/scan.js.map +1 -1
- package/dist/deep-config.d.ts.map +1 -1
- package/dist/deep-config.js +3 -19
- package/dist/deep-config.js.map +1 -1
- package/dist/deep-progress.d.ts +0 -1
- package/dist/deep-progress.d.ts.map +1 -1
- package/dist/deep-progress.js +22 -40
- package/dist/deep-progress.js.map +1 -1
- package/dist/errors.d.ts +3 -2
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +5 -7
- package/dist/errors.js.map +1 -1
- package/dist/finding-catalogue.d.ts.map +1 -1
- package/dist/finding-catalogue.js +22 -22
- package/dist/finding-catalogue.js.map +1 -1
- package/dist/finding-workflow.d.ts.map +1 -1
- package/dist/finding-workflow.js +4 -7
- package/dist/finding-workflow.js.map +1 -1
- package/dist/findings-import.d.ts.map +1 -1
- package/dist/findings-import.js +7 -17
- package/dist/findings-import.js.map +1 -1
- package/dist/github.d.ts.map +1 -1
- package/dist/github.js +2 -3
- package/dist/github.js.map +1 -1
- package/dist/import-scan.js +2 -2
- package/dist/import-scan.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/knowledge-base.js +7 -3
- package/dist/knowledge-base.js.map +1 -1
- package/dist/linear.d.ts.map +1 -1
- package/dist/linear.js +2 -3
- package/dist/linear.js.map +1 -1
- package/dist/models.d.ts +24 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js.map +1 -1
- package/dist/multiscan.d.ts.map +1 -1
- package/dist/multiscan.js +36 -31
- package/dist/multiscan.js.map +1 -1
- package/dist/owner-evidence.d.ts +29 -0
- package/dist/owner-evidence.d.ts.map +1 -0
- package/dist/owner-evidence.js +192 -0
- package/dist/owner-evidence.js.map +1 -0
- package/dist/patch-tui.d.ts.map +1 -1
- package/dist/patch-tui.js +2 -4
- package/dist/patch-tui.js.map +1 -1
- package/dist/project-config-schema.d.ts +10 -0
- package/dist/project-config-schema.d.ts.map +1 -1
- package/dist/project-config-schema.js +1 -0
- package/dist/project-config-schema.js.map +1 -1
- package/dist/project-config.d.ts +1 -0
- package/dist/project-config.d.ts.map +1 -1
- package/dist/project-config.js +2 -0
- package/dist/project-config.js.map +1 -1
- package/dist/prompt-files.d.ts +0 -1
- package/dist/prompt-files.d.ts.map +1 -1
- package/dist/prompt-files.js +2 -4
- package/dist/prompt-files.js.map +1 -1
- package/dist/publication-events.d.ts.map +1 -1
- package/dist/publication-events.js +15 -29
- package/dist/publication-events.js.map +1 -1
- package/dist/publication-store.d.ts.map +1 -1
- package/dist/publication-store.js +9 -13
- package/dist/publication-store.js.map +1 -1
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +11 -14
- package/dist/publication.js.map +1 -1
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +31 -41
- package/dist/publish.js.map +1 -1
- package/dist/record.d.ts +2 -0
- package/dist/record.d.ts.map +1 -0
- package/dist/record.js +4 -0
- package/dist/record.js.map +1 -0
- package/dist/result.d.ts +4 -1
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +7 -0
- package/dist/result.js.map +1 -1
- package/dist/runtime.d.ts +10 -13
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +230 -145
- package/dist/runtime.js.map +1 -1
- package/dist/saved-scan.d.ts.map +1 -1
- package/dist/saved-scan.js +10 -20
- package/dist/saved-scan.js.map +1 -1
- package/dist/scan-activity.d.ts.map +1 -1
- package/dist/scan-activity.js +8 -22
- package/dist/scan-activity.js.map +1 -1
- package/dist/scan-comparison.d.ts +4 -4
- package/dist/scan-comparison.d.ts.map +1 -1
- package/dist/scan-comparison.js +38 -73
- package/dist/scan-comparison.js.map +1 -1
- package/dist/scan-dashboard.d.ts +0 -1
- package/dist/scan-dashboard.d.ts.map +1 -1
- package/dist/scan-dashboard.js +10 -19
- package/dist/scan-dashboard.js.map +1 -1
- package/dist/scan-history-renderer.d.ts.map +1 -1
- package/dist/scan-history-renderer.js +1 -2
- package/dist/scan-history-renderer.js.map +1 -1
- package/dist/scan-logs.d.ts.map +1 -1
- package/dist/scan-logs.js +2 -6
- package/dist/scan-logs.js.map +1 -1
- package/dist/scan-sessions.d.ts.map +1 -1
- package/dist/scan-sessions.js +1 -3
- package/dist/scan-sessions.js.map +1 -1
- package/dist/scan-settings.d.ts +5 -0
- package/dist/scan-settings.d.ts.map +1 -1
- package/dist/scan-settings.js +4 -0
- package/dist/scan-settings.js.map +1 -1
- package/dist/security-policy-cli.d.ts.map +1 -1
- package/dist/security-policy-cli.js +8 -6
- package/dist/security-policy-cli.js.map +1 -1
- package/dist/security-policy.d.ts +8 -4
- package/dist/security-policy.d.ts.map +1 -1
- package/dist/security-policy.js +98 -84
- package/dist/security-policy.js.map +1 -1
- package/dist/server/dashboard/app.js +5 -5
- package/dist/server/embeddings.d.ts.map +1 -1
- package/dist/server/embeddings.js +1 -0
- package/dist/server/embeddings.js.map +1 -1
- package/dist/server/routes.d.ts +3 -2
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +19 -7
- package/dist/server/routes.js.map +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/server.js +2 -3
- package/dist/server/server.js.map +1 -1
- package/dist/server/sqlite-store.d.ts.map +1 -1
- package/dist/server/sqlite-store.js +4 -14
- package/dist/server/sqlite-store.js.map +1 -1
- package/dist/severity-store.js +8 -15
- package/dist/severity-store.js.map +1 -1
- package/dist/suggest-owners.d.ts +37 -0
- package/dist/suggest-owners.d.ts.map +1 -0
- package/dist/suggest-owners.js +111 -0
- package/dist/suggest-owners.js.map +1 -0
- package/dist/targets.d.ts +7 -2
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +29 -25
- package/dist/targets.js.map +1 -1
- package/dist/thread-source.d.ts +1 -0
- package/dist/thread-source.d.ts.map +1 -1
- package/dist/thread-source.js +1 -0
- package/dist/thread-source.js.map +1 -1
- package/dist/trusted-executable.d.ts +5 -0
- package/dist/trusted-executable.d.ts.map +1 -1
- package/dist/trusted-executable.js +22 -5
- package/dist/trusted-executable.js.map +1 -1
- package/dist/value.d.ts +2 -0
- package/dist/value.d.ts.map +1 -0
- package/dist/value.js +20 -0
- package/dist/value.js.map +1 -0
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +3 -6
- package/dist/version.js.map +1 -1
- package/dist/windows-path.d.ts.map +1 -1
- package/dist/windows-path.js +1 -2
- package/dist/windows-path.js.map +1 -1
- package/dist/worker-progress.d.ts +1 -0
- package/dist/worker-progress.d.ts.map +1 -1
- package/dist/worker-progress.js +13 -34
- package/dist/worker-progress.js.map +1 -1
- package/docs/dedupe-records.md +24 -0
- package/package.json +15 -13
- package/schemas/project-config.schema.json +5 -0
- package/_bundled_plugin/scripts/normalize_candidates.py +0 -338
- package/dist/server/findings-service.d.ts +0 -20
- package/dist/server/findings-service.d.ts.map +0 -1
- package/dist/server/findings-service.js +0 -31
- 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
|
-
|
|
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
|
|
255
312
|
|
|
256
|
-
|
|
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:
|
|
315
|
+
|
|
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
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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
|
-
| `
|
|
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
|
|
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
|
|
859
|
-
for reasoning effort.
|
|
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-
|
|
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`, `--
|
|
883
|
-
`
|
|
884
|
-
|
|
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
|
|
@@ -1425,6 +1605,53 @@ once before they can be reused.
|
|
|
1425
1605
|
Pass `signal` to cancel any classification operation. Keep human overrides in the
|
|
1426
1606
|
calling workflow or issue tracker; assessments remain separate recommendations.
|
|
1427
1607
|
|
|
1608
|
+
### Suggest finding owners
|
|
1609
|
+
|
|
1610
|
+
Suggest contributors who can fix findings in a local Git repository:
|
|
1611
|
+
|
|
1612
|
+
```bash
|
|
1613
|
+
npx @openai/codex-security suggest-owners findings.json --source-root /path/to/repo --json > owners.json
|
|
1614
|
+
```
|
|
1615
|
+
|
|
1616
|
+
The input is a Codex Security findings document or a JSON object containing a
|
|
1617
|
+
`findings` array, such as the output of `export --export-format json`. The source
|
|
1618
|
+
root defaults to the current directory. The command reads committed `HEAD`,
|
|
1619
|
+
source around each finding location, blame for the affected lines, and file
|
|
1620
|
+
history reachable from that commit. It does not read uncommitted source or change
|
|
1621
|
+
findings, files, or ticket assignments.
|
|
1622
|
+
|
|
1623
|
+
The checkout must own its Git references and objects. Linked worktrees and bound
|
|
1624
|
+
separate Git directories are supported. Checkouts that borrow external object
|
|
1625
|
+
stores, including `git clone --shared`, are rejected; use an independent clone.
|
|
1626
|
+
|
|
1627
|
+
Each result preserves the finding and occurrence IDs and has status `identified`,
|
|
1628
|
+
`abstained`, or `error`. Identified results include an observed Git author name
|
|
1629
|
+
and email, a reason, and checked Git citations. Missing source or unclear
|
|
1630
|
+
ownership produces an abstention. Git identities do not establish active
|
|
1631
|
+
employment or an issue tracker account. Match accounts before assigning tickets.
|
|
1632
|
+
Use a checkout that matches the findings; otherwise their line ranges may be stale.
|
|
1633
|
+
|
|
1634
|
+
The command uses existing Codex credentials and the Codex Security default model and effort.
|
|
1635
|
+
Use `--model` and `--effort` to override them. Model selection runs with tools and
|
|
1636
|
+
network access disabled. Exit code `0` includes successful recommendations and
|
|
1637
|
+
abstentions; `2` means invalid input or at least one failed recommendation. A
|
|
1638
|
+
per-finding failure retains the other results in the report. Cancellation uses
|
|
1639
|
+
exit code `130` for SIGINT or `143` for SIGTERM.
|
|
1640
|
+
|
|
1641
|
+
The SDK accepts finding IDs, titles, summaries, and source locations directly:
|
|
1642
|
+
|
|
1643
|
+
```ts
|
|
1644
|
+
import { suggestOwners } from "@openai/codex-security";
|
|
1645
|
+
|
|
1646
|
+
const owners = await suggestOwners("/path/to/repo", result.findings, {
|
|
1647
|
+
reasoningEffort: "high",
|
|
1648
|
+
});
|
|
1649
|
+
```
|
|
1650
|
+
|
|
1651
|
+
SDK inputs may include `sourceRevision`. If it differs from `HEAD`, the collector
|
|
1652
|
+
ignores the old line ranges and reports the mismatch. Reports record the analyzed
|
|
1653
|
+
revision, model, effort, and limitations; they remain separate from scan artifacts.
|
|
1654
|
+
|
|
1428
1655
|
### Feedback
|
|
1429
1656
|
|
|
1430
1657
|
Send a problem report to OpenAI and share the returned feedback ID with support:
|
|
@@ -1536,7 +1763,16 @@ retaining stable finding identities. Ctrl-C keeps comparisons already saved.
|
|
|
1536
1763
|
Only high-confidence duplicates are grouped; uncertain and independently
|
|
1537
1764
|
related findings stay separate. Matching preserves triage and sealed artifacts.
|
|
1538
1765
|
|
|
1539
|
-
Codex
|
|
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
|
+
|
|
1540
1776
|
Scans without sealed artifacts are skipped, but their confirmed links can still
|
|
1541
1777
|
be reused. Older custom plugins save confirmed and uncertain matches; use the
|
|
1542
1778
|
bundled plugin for related links and large comparisons.
|
|
@@ -1586,13 +1822,79 @@ contain them. Press `d` during a scan for details, then `a` for all sources,
|
|
|
1586
1822
|
|
|
1587
1823
|
### Exports and CI
|
|
1588
1824
|
|
|
1589
|
-
`export`
|
|
1590
|
-
the current repository's latest completed scan.
|
|
1591
|
-
|
|
1592
|
-
source
|
|
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.
|
|
1593
1890
|
|
|
1594
1891
|
JSON preserves the sealed findings document. CSV marks findings as open,
|
|
1595
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.
|
|
1596
1898
|
|
|
1597
1899
|
For CI, save output outside the checkout and set a severity threshold:
|
|
1598
1900
|
|
|
@@ -1611,9 +1913,45 @@ runtime/export error, `130` for interruption, and `143` for termination.
|
|
|
1611
1913
|
JSON scans do not use interactive controls. `validate`, `login`, and `logout`
|
|
1612
1914
|
reject `--json`.
|
|
1613
1915
|
|
|
1614
|
-
`install-hook`
|
|
1615
|
-
|
|
1616
|
-
|
|
1916
|
+
`install-hook` adds an optional local Git pre-commit check for staged and
|
|
1917
|
+
unstaged changes. It's advisory; use a required CI check to enforce a passing
|
|
1918
|
+
scan. When Git runs the hook, it blocks commits if the scan can't finish or
|
|
1919
|
+
finds an issue at or above the threshold (`high` by default). Set it when
|
|
1920
|
+
installing with `--fail-on-severity`. The installer respects `core.hooksPath`
|
|
1921
|
+
and leaves custom hooks alone.
|
|
1922
|
+
|
|
1923
|
+
We recommend installing the CLI outside the repository and running that copy
|
|
1924
|
+
directly. For a global installation:
|
|
1925
|
+
|
|
1926
|
+
```bash
|
|
1927
|
+
npm install --global @openai/codex-security
|
|
1928
|
+
```
|
|
1929
|
+
|
|
1930
|
+
If the repository also has a local copy, `npx` may run it instead.
|
|
1931
|
+
|
|
1932
|
+
Before installing or replacing a hook, run
|
|
1933
|
+
`git -C /path/to/repository rev-parse --git-path hooks/pre-commit`. Git may
|
|
1934
|
+
return a path relative to `/path/to/repository`. Check the hook, if it exists,
|
|
1935
|
+
and the path to its directory for symlinks or shared locations. Leave custom,
|
|
1936
|
+
linked, shared, or unverified hooks alone. If they need to change, contact the
|
|
1937
|
+
owner or use a required CI check. Check older generated hooks too; the installer
|
|
1938
|
+
can update them automatically.
|
|
1939
|
+
|
|
1940
|
+
If the hooks directory belongs only to this repository and there is no hook,
|
|
1941
|
+
run the global CLI from outside the repository:
|
|
1942
|
+
|
|
1943
|
+
```bash
|
|
1944
|
+
codex-security install-hook /path/to/repository
|
|
1945
|
+
```
|
|
1946
|
+
|
|
1947
|
+
To migrate a hook, confirm it's a regular file used only by this repository
|
|
1948
|
+
and contains only the generated Codex Security command. Keep its severity.
|
|
1949
|
+
The installer can update older hooks that invoke `npx` if you use the same
|
|
1950
|
+
severity. Newer hooks store absolute paths to Node and the CLI. If either path
|
|
1951
|
+
changes, the installer won't replace the hook: back it up, remove it, and rerun
|
|
1952
|
+
`codex-security install-hook /path/to/repository` with the same
|
|
1953
|
+
`--fail-on-severity` value (default: `high`). If reinstallation fails, restore
|
|
1954
|
+
the backup and verify the hook before relying on it.
|
|
1617
1955
|
|
|
1618
1956
|
### Import alerts from the CLI
|
|
1619
1957
|
|
|
@@ -1680,9 +2018,10 @@ npx @openai/codex-security patch --scan SCAN_ID --assess-patch-risk --create-pr
|
|
|
1680
2018
|
npx @openai/codex-security patch --linear-issue SEC-123 --assess-patch-risk --create-pr
|
|
1681
2019
|
```
|
|
1682
2020
|
|
|
1683
|
-
`--scan latest` selects the current repository's latest scan. Patch
|
|
1684
|
-
support `--json`, including literal-text and file inputs. Change
|
|
1685
|
-
the model with `--
|
|
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.
|
|
1686
2025
|
Each finding gets its own saved Codex desktop task.
|
|
1687
2026
|
|
|
1688
2027
|
Before patching, the CLI runs a command with the task's sandbox policy. If the
|
|
@@ -1858,6 +2197,12 @@ network binding.
|
|
|
1858
2197
|
|
|
1859
2198
|
### API
|
|
1860
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
|
+
|
|
1861
2206
|
`POST /v1/bulk/findings` accepts `{"findings": [...]}`, using the existing SDK
|
|
1862
2207
|
`Finding` model, including `findingId`, `occurrenceId`, and `fingerprints`.
|
|
1863
2208
|
A complete exported `findings.json` document is also accepted; only its
|
|
@@ -2447,8 +2792,8 @@ Local defaults are `HOST=127.0.0.1` and `PORT=3000`. The existing
|
|
|
2447
2792
|
without a state override, the service uses the same default state directory as
|
|
2448
2793
|
the CLI. These settings also work on Windows.
|
|
2449
2794
|
|
|
2450
|
-
HTTP routing,
|
|
2451
|
-
separately under `src/server/`. `
|
|
2795
|
+
HTTP routing, embedding generation, and the SQLite adapter live
|
|
2796
|
+
separately under `src/server/`. `startFindingsServer` receives a `FindingEmbedder`
|
|
2452
2797
|
whose `embed(findings)` method returns one `{ model, vector }` per finding in
|
|
2453
2798
|
input order. `OpenAiFindingEmbedder` handles tokenization, batching, API calls,
|
|
2454
2799
|
and vector normalization; it does not access storage. The `FindingsStore`
|
|
@@ -2485,6 +2830,7 @@ runtime dependencies.
|
|
|
2485
2830
|
## Containerized bulk scans
|
|
2486
2831
|
|
|
2487
2832
|
Create `repositories.csv` as described under [Bulk scans](#bulk-scans).
|
|
2833
|
+
Use device login only if your workspace allows it.
|
|
2488
2834
|
With a published image, run from the Codex Security repository root:
|
|
2489
2835
|
|
|
2490
2836
|
```bash
|
|
@@ -2506,8 +2852,9 @@ Compose accepts `CODEX_SECURITY_IMAGE`, `CODEX_SECURITY_USER`,
|
|
|
2506
2852
|
`CODEX_SECURITY_SECCOMP`, `CODEX_SECURITY_CSV`, `CODEX_SECURITY_RESULTS`, and
|
|
2507
2853
|
`CODEX_SECURITY_STATE` for the image, user, seccomp profile, and mounts.
|
|
2508
2854
|
|
|
2855
|
+
Codex 0.156.1 requires Bubblewrap for filesystem-restricted execution on Linux.
|
|
2509
2856
|
On Ubuntu hosts that restrict unprivileged user namespaces, an administrator
|
|
2510
|
-
|
|
2857
|
+
must install the AppArmor profile and use the Compose override:
|
|
2511
2858
|
|
|
2512
2859
|
```bash
|
|
2513
2860
|
sudo install -m 0644 docker/codex-security.apparmor /etc/apparmor.d/codex-security-container
|
|
@@ -2516,7 +2863,9 @@ docker compose -f compose.yaml -f compose.apparmor.yaml run --rm codex-security
|
|
|
2516
2863
|
```
|
|
2517
2864
|
|
|
2518
2865
|
The override keeps the nonroot user, dropped capabilities, no-new-privileges,
|
|
2519
|
-
and seccomp policy.
|
|
2866
|
+
and seccomp policy. It enables the nested namespaces required by Bubblewrap.
|
|
2867
|
+
The legacy Landlock fallback is no longer supported for these scans. Other
|
|
2868
|
+
Docker hosts that permit nested user namespaces do not need this override.
|
|
2520
2869
|
|
|
2521
2870
|
## Local security model
|
|
2522
2871
|
|
|
Binary file
|
|
@@ -466,7 +466,7 @@ DEALINGS IN THE SOFTWARE.
|
|
|
466
466
|
|
|
467
467
|
---
|
|
468
468
|
|
|
469
|
-
convert_case@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.
|
|
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.
|
|
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.
|
|
3189
|
+
napi-derive@3.6.9
|
|
3190
3190
|
|
|
3191
3191
|
MIT License
|
|
3192
3192
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|