2 2
3> For the complete documentation index, see [llms.txt](https://learn.chatgpt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.3> For the complete documentation index, see [llms.txt](https://learn.chatgpt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.
4 4
5Start with a standard Codex Security scan for an initial review or a routine5Use a standard scan to review a repository or a selected folder. This guide
6repository or component assessment. It runs the full scan workflow once.6explains how to set the scope, supply security context, and assess the result.
7If you haven't installed the plugin, start with the [plugin
8quickstart](https://learn.chatgpt.com/docs/security/plugin).
7 9
8For a more thorough assessment, review the results and then run a [deep10For repeated reviews of the same scope, use a [deep
9scan](https://learn.chatgpt.com/docs/security/plugin/deep-scans). Deep scans take longer and search11scan](https://learn.chatgpt.com/docs/security/plugin/deep-scans). For a pull request or local diff,
10more extensively.12[review code changes](https://learn.chatgpt.com/docs/security/plugin/code-changes).
11 13
12## Choose the scan area14## Choose the scan area
13 15
16 18
17Scan the whole repository when you need broad coverage and the repository is a19Scan the whole repository when you need broad coverage and the repository is a
18reasonable review unit. For a monorepo, choose one folder when a service,20reasonable review unit. For a monorepo, choose one folder when a service,
19package, or component has a clear owner and security boundary.21package, or component has an owner and security boundary.
20 22
21You can also start a scan from a Codex conversation:23You can also start a scan from a Codex conversation:
22 24
27To focus that conversation on a particular folder, identify the component:29To focus that conversation on a particular folder, identify the component:
28 30
29```text31```text
30Use $codex-security:security-scan to scan this repository for security vulnerabilities, focusing on the services/billing component.32Use $codex-security:security-scan to scan only services/billing in this repository for security vulnerabilities.
31```33```
32 34
33For a large monorepo, start with one meaningful product or service boundary.
34
35## Configure the scan35## Configure the scan
36 36
37For the best scan quality, use `gpt-5.6-sol`37For the best scan quality, use `gpt-5.6-sol`
432. Confirm the selected repository, current branch, and latest revision.432. Confirm the selected repository, current branch, and latest revision.
443. Set **Scan area** to the entire repository or choose one folder.443. Set **Scan area** to the entire repository or choose one folder.
454. Choose a model and reasoning effort.454. Choose a model and reasoning effort.
465. Open **Additional context** only when it changes the review. Useful context465. Use **Additional context** to describe attacker-controlled inputs, trust
47 names attacker-controlled inputs, trust boundaries, sensitive actions, or a47 boundaries, sensitive actions, or an area to prioritize.
48 specific area to prioritize.
496. Select **Start scan**.486. Select **Start scan**.
50 49
51</WorkflowSteps>50</WorkflowSteps>
60Use `AGENTS.md` for supported build and validation commands and other59Use `AGENTS.md` for supported build and validation commands and other
61repository-specific instructions.60repository-specific instructions.
62 61
63## Let the phases complete62## Follow scan progress
64 63
65A scan runs these phases in order:64The workbench shows the current phase and reported progress. Select **View
66 65activity** to inspect the Codex task. Review the final result after the scan
671. **Threat modeling** identifies assets, entry points, trust boundaries, and66finishes, since findings can change while Codex checks the evidence.
68 security invariants.
692. **Finding discovery** reviews the requested code for plausible broken
70 controls and source-to-sink paths.
713. **Validation** tests or otherwise checks each candidate and records evidence
72 or proof gaps.
734. **Impact and path analysis** evaluates each candidate's realistic paths,
74 impact, and severity.
755. **Reporting** records validated findings, coverage, and scan metadata.
76 Detailed per-finding reports are available when requested.
776. **Structural hardening**, when requested, analyzes the finding set and
78 creates design guidance.
797. **Finalization** validates the structured scan contract and generates
80 `report.md`, including links to any detailed reports or hardening guidance.
81
82The workbench shows the active scan phase and any progress the plugin reports.
83Select **View activity** to inspect the Codex task. Wait for the complete
84result instead of judging early candidates or stopping because one phase takes
85longer than another.
86 67
87## Review the completed scan68## Review the completed scan
88 69
89Review the result in this order:70Review the result in this order:
90 71
911. Confirm the target, revision, and scan area.721. Confirm the target, revision, and scan area.
922. Read reviewed surfaces and every explicit deferred or follow-up area.732. Read reviewed surfaces and any deferred or follow-up areas.
933. For each finding, inspect the root control or sink, attacker-controlled743. For each finding, check how an attacker reaches the affected code, which
94 input, validation method, remaining uncertainty, realistic reachability,75 control fails, and what impact the evidence supports. Read the validation
95 severity rationale, and proposed remediation.76 method and any unresolved questions.
964. Dismiss findings whose evidence doesn't support the claimed path or impact.774. Investigate findings with missing evidence. Dismiss a finding when you can
78 explain why it doesn't apply, and keep that explanation with the result.
975. Select one accepted finding before starting a fix.795. Select one accepted finding before starting a fix.
98 80
81A completed scan and complete coverage are separate claims. Read deferred
82areas even when the scan finishes successfully. Source-based validation can
83support a finding without a runtime reproduction. To resolve uncertainty
84that depends on execution, ask for validation of the specific finding.
85
99<figure className="not-prose my-8">86<figure className="not-prose my-8">
100 <CodexScreenshot87 <CodexScreenshot
101 alt="Codex Security finding showing its severity, validation status, root cause, and attack path"88 alt="Codex Security finding showing its severity, validation status, root cause, and attack path"
109 </figcaption>96 </figcaption>
110</figure>97</figure>
111 98
112## Assess a first scan99## Use your first scan as a baseline
113 100
114Before scanning, choose two to four evaluation criteria, such as independent101Before scanning, decide what you want to compare, such as evidence quality
115discovery, evidence quality, false positives, or remediation quality. If you102or false positives. If you
116test against a known finding, record whether you provided it to Codex or103test against a known finding, record whether you provided it to Codex or
117withheld it from the scan.104withheld it from the scan.
118 105
120Use this baseline to compare later scans after the code, security controls, or107Use this baseline to compare later scans after the code, security controls, or
121scan settings change.108scan settings change.
122 109
123## Choose a scan cadence
124
125Set your scan cadence based on the repository's risk and your team's capacity
126to address findings. Scan at these points:
127
128- **Baseline:** Run a standard scan when you onboard a repository, take
129 ownership of a component, or need a starting point for a new threat model.
130- **Code changes:** [Review code
131 changes](https://learn.chatgpt.com/docs/security/plugin/code-changes) when a pull request or commit
132 changes security-sensitive code or an external integration.
133- **Regular review:** Set a recurring review interval based on your system's
134 exposure and how often the code changes. Adjust it to your team's capacity to
135 address findings.
136- **After a fix:** [Fix and verify the
137 finding](https://learn.chatgpt.com/docs/security/plugin/fix-findings). Confirm that the issue no
138 longer reproduces and keep the original scan for comparison.
139
140These scan triggers don't create an automated schedule.
141
142## Reopen a previous scan110## Reopen a previous scan
143 111
144Open **Security**, then select a saved scan from **Scans** to review its112Open **Security**, then select a saved scan from **Scans** to review its
148 116
149## Use the results117## Use the results
150 118
151Use the Security workbench to review findings, coverage, and follow-up areas119Open `report.md` for a portable report, and keep its scan directory together
152without inspecting raw JSON. Open `report.md` when available for the readable120when sharing or archiving it. Use [Export and track
153entry point to the complete scan directory. Keep the directory together when121findings](https://learn.chatgpt.com/docs/security/plugin/export-findings) for other formats or issue
154you share or archive it: the report links to detailed reports in `findings/`122tracking. After accepting a finding, [generate and verify a
155and structural hardening guidance in `hardening/` when those optional artifacts123fix](https://learn.chatgpt.com/docs/security/plugin/fix-findings).
156are available.
157
158Behind the workspace, each scan preserves `scan-manifest.json`, `findings.json`,
159and `coverage.json` for automation and integrations. You normally don't need to
160open these files yourself.
161
162For portable artifacts or external issue tracking, see [Export or track
163findings](https://learn.chatgpt.com/docs/security/plugin/export-findings).
164
165## Next step
166
167After you accept a finding, use [Fix and verify a
168finding](https://learn.chatgpt.com/docs/security/plugin/fix-findings) to generate and review one
169bounded patch. Don't ask Codex to fix every finding from a scan in one chat.