128 [--path PATH | --diff BASE | --working-tree]128 [--path PATH | --diff BASE | --working-tree]
129 [--head HEAD] [--base BASE]129 [--head HEAD] [--base BASE]
130 [--knowledge-base PATH] [--scan-prompt-file FILE]130 [--knowledge-base PATH] [--scan-prompt-file FILE]
131 [--validation-prompt-file FILE]131 [--validation-prompt-file FILE] [--rubric FILE]
132 [--post-scan-prompt-file FILE]132 [--post-scan-prompt-file FILE]
133 [--mode {standard,deep}] [--workers N]133 [--mode {standard,deep}] [--workers N]
134 [--subagents N] [--stop-after-no-new N]134 [--subagents N] [--stop-after-no-new N]
190npx @openai/codex-security scan . --auth api-key190npx @openai/codex-security scan . --auth api-key
191```191```
192 192
193To scan with Daybreak Blue, use a key from a project with Blue enabled and add
194`--model gpt-6-sol --cyber-access-program daybreak_blue` to the command.
195For other models, see the [model and access program table](https://developers.openai.com/api/docs/guides/daybreak#choose-the-model-and-access-program).
196
193To make stored credentials the automatic default, run197To make stored credentials the automatic default, run
194`unset OPENAI_API_KEY CODEX_API_KEY`.198`unset OPENAI_API_KEY CODEX_API_KEY`.
195 199
196Use `--auth api-key` with
197`--cyber-access-program standard|daybreak_blue|daybreak_red` to select a
198Cyber access program for OpenAI model requests. Omission preserves Codex
199defaults; `standard` explicitly selects the standard program.
200Selecting a program doesn't grant access; your API project must be approved
201for the selected program. See the [access-program guide](https://github.com/openai/codex-security/blob/main/sdk/typescript/docs/cli.md#select-a-cyber-access-program) for credential requirements.
202
203### Attribute scans to end users200### Attribute scans to end users
204 201
205When scanning on behalf of users, `--safety-identifier ID` accepts a stable,202When scanning on behalf of users, `--safety-identifier ID` accepts a stable,
235### Use Amazon Bedrock232### Use Amazon Bedrock
236 233
237Use `--provider amazon-bedrock` and a Bedrock model ID with `scan` or234Use `--provider amazon-bedrock` and a Bedrock model ID with `scan` or
238`bulk-scan`. After AWS provisions model access, scans use AWS credentials235`bulk-scan`. Bedrock scans use AWS credentials
239without `--auth`, an OpenAI login, or an OpenAI API key.236without `--auth`, an OpenAI login, or an OpenAI API key.
240 237
241#### Daybreak Blue and Daybreak Red238#### Daybreak Blue and Daybreak Red
242 239
243Daybreak Blue and Daybreak Red require Trusted Access for Cyber approval.240Request Daybreak access through your OpenAI account team or the [enterprise access application](https://openai.com/form/enterprise-trusted-access-for-cyber/). [Daybreak Red approval](https://help.openai.com/en/articles/20001258-openai-daybreak-trusted-access-for-cyber-overview) includes GPT-5.6 Cyber.
244To request access, submit the [enterprise access application](https://openai.com/form/enterprise-trusted-access-for-cyber/) or contact your OpenAI account team.241After OpenAI approves your request, ask your AWS account team to provision
245After approval, work with your AWS account team to provision model access242the model in the account you use for scans.
246on Amazon Bedrock.
247
248Daybreak Red approval does not include GPT-5.6-Cyber access. GPT-5.6-Cyber
249requires separate U.S. government (USG) approval. Ask your OpenAI account
250team to request this additional approval before provisioning GPT-5.6-Cyber
251on Amazon Bedrock. See the [Daybreak access requirements](https://help.openai.com/en/articles/20001258-openai-daybreak-trusted-access-for-cyber-overview).
252 243
253| Access | Bedrock model ID | AWS region |244| Access | Bedrock model ID | AWS region |
254| ------------- | ---------------------------------- | ----------- |245| ------------- | ---------------------------------- | ----------- |
257 248
258For availability, check the AWS model cards for [Daybreak Blue](https://docs.aws.amazon.com/en_en/bedrock/latest/userguide/model-card-openai-gpt-daybreak-blue-56-sol.html) and [Daybreak Red](https://docs.aws.amazon.com/en_en/bedrock/latest/userguide/model-card-openai-gpt-56-cyber.html).249For availability, check the AWS model cards for [Daybreak Blue](https://docs.aws.amazon.com/en_en/bedrock/latest/userguide/model-card-openai-gpt-daybreak-blue-56-sol.html) and [Daybreak Red](https://docs.aws.amazon.com/en_en/bedrock/latest/userguide/model-card-openai-gpt-56-cyber.html).
259 250
260To scan with Daybreak Blue, replace `<aws-profile-name>` with an AWS profile251Choose an AWS profile with access to the model. For Daybreak Blue, run:
261that has access to the Daybreak Blue model:
262 252
263```bash253```bash
264export AWS_PROFILE="<aws-profile-name>"254export AWS_PROFILE="<aws-profile-name>"
268 --model openai.gpt-daybreak-blue-5.6-sol --effort high258 --model openai.gpt-daybreak-blue-5.6-sol --effort high
269```259```
270 260
271To scan with Daybreak Red, choose an AWS profile with GPT-5.6-Cyber access.261For Daybreak Red, run:
272This may differ from the profile you use for Daybreak Blue:
273 262
274```bash263```bash
275export AWS_PROFILE="<aws-profile-name>"264export AWS_PROFILE="<aws-profile-name>"
295 284
296The CLI supports cost estimates and `--max-cost` for the Daybreak Blue and285The CLI supports cost estimates and `--max-cost` for the Daybreak Blue and
297Daybreak Red model IDs above. Estimates use AWS Standard286Daybreak Red model IDs above. Estimates use AWS Standard
298commercial in-region prices, including the AWS fee. The cost limit uses287prices, including the AWS fee. The cost limit uses
299`estimatedUsd`, the short-context baseline. Requests already in progress can288`estimatedUsd`, the short-context baseline. Requests already in progress can
300put this estimate above the limit. Long-context pricing can raise the reported289put this estimate above the limit. Long-context pricing can raise the reported
301`estimatedUsdRange` above it. This limit is not a billing cap.290`estimatedUsdRange` above it. This limit is not a billing cap.
356 345
357| Argument | Description |346| Argument | Description |
358| ------------------------ | ----------------------------------------------------------------------------------------------------- |347| ------------------------ | ----------------------------------------------------------------------------------------------------- |
359| `--workers N` | Limit on concurrent independent standard-scan workers. Defaults to `4`. |348| `--workers N` | Maximum standard reviews running at once. Defaults to `4`. |
360| `--subagents N` | Subagents available to each worker. Defaults to `3`. Use `0` to disable them. |349| `--subagents N` | Subagents available to each worker. Defaults to `3`. Use `0` to disable them. |
361| `--stop-after-no-new N` | Stop after `N` consecutive completed worker scans find no new issues. Defaults to `4`. |350| `--stop-after-no-new N` | Stop after `N` consecutive completed worker scans find no new issues. Defaults to `4`. |
362| `--max-discovery-runs N` | Limit on total independent standard-scan runs. Defaults to `40`. |351| `--max-discovery-runs N` | Maximum reviews started, including failed attempts. Defaults to `40`. |
363| `--max-time MINUTES` | Discovery time limit. Accepts positive fractional minutes. The default and maximum are 5,760 minutes. |352| `--max-time MINUTES` | Discovery time limit. Accepts positive fractional minutes. The default and maximum are 5,760 minutes. |
364 353
365For example, use two workers, allow up to ten runs, and stop discovery after 90 minutes:354For example, use two workers, allow up to ten runs, and stop discovery after 90 minutes:
374 --max-time 90363 --max-time 90
375```364```
376 365
377When the time limit expires, the scan stops unfinished workers and combines
378completed findings in its report. For a standard scan, `--max-time` sets an
379advisory investigation time. Reporting can finish later. Custom validation
380and post-scan instructions run outside that allowance.
381
382To reuse these limits, save them in a366To reuse these limits, save them in a
383[project configuration file](#load-project-configuration):367[project configuration file](#load-project-configuration):
384 368
466`--mock`, or a scan cost limit set on the command line or in the project450`--mock`, or a scan cost limit set on the command line or in the project
467configuration.451configuration.
468 452
453### Choose how to grade severity
454
455Standard and deep scans use the bundled severity rubric by default. Pass
456`--rubric FILE` to use your own Markdown policy.
457
469### Set output and policy options458### Set output and policy options
470 459
471Use these options to keep artifacts, preserve earlier results, or create a460Use these options to keep artifacts, preserve earlier results, or create a
474| Argument | Description |463| Argument | Description |
475| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |464| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
476| `--output-dir DIR` | Write scan artifacts to a private directory outside the enclosing Git worktree. Defaults to persistent Codex Security state. |465| `--output-dir DIR` | Write scan artifacts to a private directory outside the enclosing Git worktree. Defaults to persistent Codex Security state. |
477| `--archive-existing` | Move existing results to `DIR.previous-<timestamp>-<id>` and start with an empty output directory. Requires `--output-dir`. |466| `--archive-existing` | Move existing results to a sibling directory and report the archive path. Requires `--output-dir`. |
478| `--fail-on-severity LEVEL` | Return exit `1` when a completed scan reports a finding at or above `critical`, `high`, `medium`, or `low`. |467| `--fail-on-severity LEVEL` | Return exit `1` when a completed scan reports a finding at or above `critical`, `high`, `medium`, or `low`. |
479| `--patch` | Fix and verify selected findings after a complete scan. |468| `--patch` | Fix and verify selected findings after a complete scan. |
480| `--patch-severity LEVEL` | Patch findings at or above `critical`, `high`, `medium`, or `low`. Defaults to `low`. |469| `--patch-severity LEVEL` | Patch findings at or above `critical`, `high`, `medium`, or `low`. Defaults to `low`. |
499in progress can put this estimate above the limit. Long-context pricing can488in progress can put this estimate above the limit. Long-context pricing can
500raise `estimatedUsdRange` above it. This limit is not a billing cap.489raise `estimatedUsdRange` above it. This limit is not a billing cap.
501 490
502If a deep scan reaches the limit491If a deep scan reaches the limit after discovery, the CLI can seal a
503after Codex Security aggregates completed worker results, the CLI can seal a492completed result with a budget warning. Check `scan.scope.limitations` in
504completed result and report the budget warning. It returns `0`, or `1` if493the manifest to see whether the scan deferred validation. A completed scan
505findings meet the configured severity threshold. If it can't produce a valid494returns `0`, or `1` if findings meet the configured severity threshold. If
506completed result, it returns `2` and leaves any available output on disk.495the CLI can't finalize the result, it returns `2` and keeps any available output.
507 496
508When you omit `--output-dir`, results persist under497When you omit `--output-dir`, results persist under
509`$CODEX_HOME/state/plugins/codex-security/scans/<repository>`. `CODEX_HOME`498`$CODEX_HOME/state/plugins/codex-security/scans/<repository>`. `CODEX_HOME`
557| --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |546| --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
558| `--auth {auto,chatgpt,api-key}` | Select the scan credentials. The default is `auto`. |547| `--auth {auto,chatgpt,api-key}` | Select the scan credentials. The default is `auto`. |
559| `--provider {openai,openrouter,fireworks,amazon-bedrock}` | Select the inference provider. The default is `openai`. |548| `--provider {openai,openrouter,fireworks,amazon-bedrock}` | Select the inference provider. The default is `openai`. |
549| `--cyber-access-program PROGRAM` | For OpenAI scans, use `standard`, `daybreak_blue`, or `daybreak_red`. |
560| `--model MODEL` | Select the model. The default is `gpt-5.6-sol`. Required for OpenRouter, Fireworks, and Amazon Bedrock. |550| `--model MODEL` | Select the model. The default is `gpt-5.6-sol`. Required for OpenRouter, Fireworks, and Amazon Bedrock. |
561| `--effort EFFORT` | Select the model's reasoning effort. The default is `xhigh`; supported values depend on the model and provider. |551| `--effort EFFORT` | Select the model's reasoning effort. The default is `xhigh`; supported values depend on the model and provider. |
562| `--plugin-path PATH` | Use a Codex Security plugin directory or ZIP to override the bundled plugin. |552| `--plugin-path PATH` | Use a Codex Security plugin directory or ZIP to override the bundled plugin. |
567Supported combinations depend on the model, provider, Codex version, and your557Supported combinations depend on the model, provider, Codex version, and your
568credentials.558credentials.
569 559
570If the scan's isolated Codex configuration selects a profile, that profile's560To reuse a Codex file profile, put its settings in `$CODEX_HOME/review.config.toml`
571`model` and `model_reasoning_effort` values take precedence over `--model` and561(`~/.codex/review.config.toml` by default). Select it with
572`--effort`. Your normal Codex configuration isn't loaded.562`--codex "profile='review'"` or set `codex.profile` to `review` in your project
563configuration. Explicit scan settings override file profile values, which
564override scanner defaults.
573Add `--dry-run --verbose` to your scan command to inspect the resolved model565Add `--dry-run --verbose` to your scan command to inspect the resolved model
574and effort before starting a scan.566and effort before starting a scan.
575 567
1215 1207
1216Use `--to local` to save imported findings on your machine. With `--to cloud`,1208Use `--to local` to save imported findings on your machine. With `--to cloud`,
1217even a preview contacts the service. It needs a file-backed ChatGPT login and1209even a preview contacts the service. It needs a file-backed ChatGPT login and
1218an authorized repository ID or URL with an existing Cloud environment. A Cloud1210an authorized repository ID or URL. A Cloud import can return a partial result
1219import can return a partial result if the service rejects individual records.1211if the service rejects individual records.
1220See the [GitHub import guide](https://github.com/openai/codex-security/blob/main/sdk/typescript/docs/cli.md#import-github-findings-locally-or-to-cloud) for both workflows.1212See the [GitHub import guide](https://github.com/openai/codex-security/blob/main/sdk/typescript/docs/cli.md#import-github-findings-locally-or-to-cloud) for both workflows.
1221 1213
1222To import Dependabot alerts for a local checkout, you need a saved export from1214### Preview and save a local report
1223the same GitHub repository. Follow the [Dependabot export guide](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/github-dependabot.md) to save all pages outside the checkout using a token with read access to Dependabot alerts.
1224 1215
1225Append `echo "$out/dependabot.jsonl"` to the export script before running it.1216For example, export [Dependabot alerts](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/github-dependabot.md#export-repository-alerts)
1226In a new shell, use the path it printed to preview the file. Replace `./project` and `OWNER/REPO` with your checkout and repository.1217to a private file outside the checkout. Use the matching checkout for
1227If the checkout has network remotes, one must match the alert repository.1218`--repository` and a stable `--source-key` so repeat imports update the same
1228Otherwise, verify that the export belongs to the checkout.1219alerts. If the checkout has network remotes, one must match the alert repository.
1229 1220
1230```bash1221```bash
1231export CODEX_SECURITY_ENABLE_EXTERNAL_IMPORTS=1
1232npx @openai/codex-security publish findings /path/to/dependabot.jsonl \1222npx @openai/codex-security publish findings /path/to/dependabot.jsonl \
1233 --to local --repository ./project --provider github \1223 --to local --repository ./project --provider github \
1234 --source-key github.com/OWNER/REPO/dependabot --dry-run --format json1224 --source-key github.com/OWNER/REPO/dependabot --dry-run --format json
1235```
1236 1225
1237Check the destination and exclusions in the preview. A dry run exits with `0`1226npx @openai/codex-security publish findings /path/to/dependabot.jsonl \
1238even if it lists excluded alerts. To save the accepted alerts, rerun without1227 --to local --repository ./project --provider github \
1239`--dry-run` and confirm, or replace `--dry-run` with `--yes`. If the import1228 --source-key github.com/OWNER/REPO/dependabot
1240excludes any alerts, it saves the accepted ones and exits with `1`. Read the
1241stored alerts in the same shell.
1242 1229
1243```bash
1244npx @openai/codex-security findings imported ./project --format json1230npx @openai/codex-security findings imported ./project --format json
1245```1231```
1246 1232
1247Imported alerts start with the assessment status `not_assessed`. With the same1233Imported findings start as `not_assessed`. Repeat imports update matching
1248source key, a later import updates the stored records for alerts in the file.1234records and retain existing findings that the new report omits. When only some records
1249Omitted alerts keep their last imported state. Alerts that share an advisory remain1235are excluded, the preview exits with `0` and the import saves the accepted
1250separate records.1236records and exits with `1`. A valid report with no findings exits with `0`.
1237If all records are excluded, both commands exit with `2`.
1238
1239### Publish a report to Cloud
1240
1241Keep the file, provider, and source key from the local preview. Set `--to cloud`,
1242pass the connected repository URL or Cloud ID to `--repository`, and preview again
1243with `--dry-run --format json`. To publish, rerun without `--dry-run` and confirm.
1244
1245| Destination in the preview | How to verify the import |
1246| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1247| `privateImport` | The findings go to your private inbox. The repository is the suggested assessment target. Check that `privateJob.status` is `completed` and review the counts of errors and unprocessed rows. |
1248| `requests` | Check the destination environment for each request. Review the receipt for verified, unacknowledged, or failed records before retrying. |
1249
1250If the CLI returns `savedSubmission`, keep the checkpoint and follow the [Cloud import recovery steps](https://github.com/openai/codex-security/blob/main/sdk/typescript/docs/cli.md#resume-interrupted-imports).
1251 1251
1252## Finding review commands1252## Finding review commands
1253 1253
1254These commands work with existing findings:1254These commands work with existing findings:
1255 1255
1256| Command | Example | Behavior |1256| Command | Example | Behavior |
1257| ------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |1257| ------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
1258| `classify-severity` | `codex-security classify-severity --scan latest --rubric policy.md --json` | Apply a rubric without repeating discovery or rewriting original findings. Omit `--rubric` to inherit an existing severity without model calls. Findings without severity require a rubric. |1258| `classify-severity` | `codex-security classify-severity --scan latest --rubric policy.md --json` | Reassess severity with the bundled rubric or a policy supplied with `--rubric` while preserving the original findings. |
1259| `suggest-owners` | `codex-security suggest-owners findings.json --source-root /path/to/repository --json` | Read committed source, CODEOWNERS, blame, and Git history to suggest owners. Doesn't assign tickets. |1259| `suggest-owners` | `codex-security suggest-owners findings.json --source-root /path/to/repository --json` | Read committed source, CODEOWNERS, blame, and Git history to suggest owners. Doesn't assign tickets. |
1260| `dedupe` | `codex-security dedupe --scan SCAN_ID --json` | Identify duplicate findings in local SQLite. Missing or stale embeddings require an embedding API key; fresh reviews require model access. |1260| `dedupe` | `codex-security dedupe --scan SCAN_ID --json` | Identify duplicate findings in local SQLite. Missing or stale embeddings require an embedding API key; fresh reviews require model access. |
1261| `verify-fix` | `codex-security verify-fix --scan SCAN_ID --json` | Check existing fixes in a read-only sandbox. Accepts finding IDs, descriptions, and Linear selectors. |1261| `verify-fix` | `codex-security verify-fix --scan SCAN_ID --json` | Check existing fixes in a read-only sandbox. Accepts finding IDs, descriptions, and Linear selectors. |
1610Python 3.10 also requires `tomli`. Use `--python` with `scan`, `bulk-scan`, or1610Python 3.10 also requires `tomli`. Use `--python` with `scan`, `bulk-scan`, or
1611`export`, or set `PYTHON` for any Python-backed command.1611`export`, or set `PYTHON` for any Python-backed command.
1612 1612
1613To read or resume compressed Codex sessions (`.jsonl.zst`), use Node.js
161422.15.0 or later within 22.x, or Node.js 24 or 26. Plain `.jsonl` sessions work
1615on all supported Node.js versions.
1616
1617Continue with the [CLI quickstart](https://learn.chatgpt.com/docs/security/cli), [bulk-scan1613Continue with the [CLI quickstart](https://learn.chatgpt.com/docs/security/cli), [bulk-scan
1618guide](https://learn.chatgpt.com/docs/security/cli/bulk-scans), [CLI FAQ](https://learn.chatgpt.com/docs/security/cli/faq), [CI1614guide](https://learn.chatgpt.com/docs/security/cli/bulk-scans), [CLI FAQ](https://learn.chatgpt.com/docs/security/cli/faq), [CI
1619guide](https://learn.chatgpt.com/docs/security/cli/ci), or [TypeScript SDK guide](https://learn.chatgpt.com/docs/security/sdk).1615guide](https://learn.chatgpt.com/docs/security/cli/ci), or [TypeScript SDK guide](https://learn.chatgpt.com/docs/security/sdk).