Updated 2026-11-23. A high-severity finding is a triage problem before it is a fix. The tool has already told you what it thinks and where it is, and the next four decisions are yours: is it real, is it already known, who owns it, and does it go out now or in the next release.
This is the order I use for that hour, with the commands that support each step and the point where the tool stops being the one deciding. Everything below was run today against Codex Security 0.10.0, including the failures, because a runbook that only shows the happy path is a runbook you cannot follow when the run is not happy [1].
findings list
export
classify-severity
dedupe
findings false-positive
validate
suggest-owners
patch
verify-fix
The interesting part is not the command names. It is that steps 2, 3 and 4 are all judgements the tool offers evidence for and does not make for you, and that step 5 is the only one that changes the repository.
Two commands answer different questions, and their exit codes behave differently, which matters in a script.
$ codex-security findings list repository: /tmp findings: [] $ echo $? 0 $ codex-security export codex-security: No completed scans found for the current repository. $ echo $? 2
findings list on a repository with no findings exits 0 with an empty array. export on the same repository exits 2, because exporting requires a completed scan rather than an empty corpus [1]. If your first-hour script uses set -e, the export will abort it, so handle that step explicitly.
set -e
What the report gives you per finding is the location, the rule or category, the scanner's severity, and the evidence the model saw. Read the evidence before the severity: a high severity on unreachable code is less urgent than a medium one on the path a customer can reach, and only you know which is which.
$ codex-security classify-severity --scan latest
The command assesses severity for saved findings, and it also runs against canonical records without a scan (--records, optionally with --runs COUNT). The distinction matters: a scan says "the model thinks this is high", and classification says "here is a severity under the rubric you gave it". For a business owner the second sentence is the one that arrives in an incident channel.
--records
--runs COUNT
The rubric is the part worth writing down before the first finding arrives, and it only needs three questions. Can an unauthenticated or low-privilege user reach it? Does it touch credentials, payments or personal data? Is it in a service that is redeployed from this branch, or in something that has already shipped and is frozen?
$ codex-security dedupe --scan latest
Deduplication compares the new findings against the saved corpus, and the workflow around it is what stops a team from re-triaging the same issue every Monday [1]. Two outcomes need different handling.
If it duplicates something already accepted, mark the decision so future scans stop reporting it:
$ codex-security findings false-positive
That is a decision with a name, and naming it matters: a finding marked as a false positive is a claim you can revisit, whereas a finding that quietly disappears from a filtered report is a claim you cannot.
If it does not duplicate anything, it is new, and the next step is to find out whether it is true.
$ codex-security validate findings.json
The documentation is precise about what this does and does not do: it assesses candidate findings using source evidence only, and its assessments are not applied to the saved findings or to the --fail-on-severity decision [1]. Two consequences follow. The gate in CI still reflects the scan rather than the validation, so a validated finding still fails the build if it crosses your threshold. And the extra model calls the validation makes are not cost-tracked, so a large validation run is the kind of quiet spend we wrote about in the cost of work you did not ask for.
--fail-on-severity
What validation gives you is the answer to the question the incident channel will ask in the first five minutes: is the data flow real, or does the input get sanitised two frames up?
$ codex-security suggest-owners findings.json
Owners come from CODEOWNERS and Git history, which is a useful proxy and not a decision. In a small team the suggestion will often be right. In a team where one person owns the deploy pipeline and another owns the module, take the human answer over the tool's.
CODEOWNERS
Then the only step that writes to the repository:
$ codex-security patch --scan latest --severity high
Patching can also be scoped by issue id, by a Linear issue or project, or resumed against an existing branch with --resume-pr. Whatever path you use, the review still happens like any other change: a diff a person reads, a test run, and a deploy.
--resume-pr
And then verify the fix without touching the repository again:
$ codex-security verify-fix --scan latest --severity high
verify-fix is documented as verifying existing fixes without changing the repository, which is the difference between "the patch applied" and "the finding is gone" [1]. Those are not the same claim, and only the second one belongs in the incident record.
The point of a script here is not automation. It is that the order and the exit-code handling are decided before anyone is tired. This runs the sequence, stops where a human decision is required, and never lets a failed command look like a clean result.
#!/usr/bin/env bash # first-hour.sh - triage a Codex Security finding in a fixed order. # Run from the repository root. Stops at every step that needs a human. set -u scan="${1:-latest}" evidence="/tmp/first-hour-$(date -u +%Y%m%dT%H%M%SZ)" mkdir -p "$evidence" run() { # run a command, keep its output and its code local name="$1"; shift local out; out=$("$@" 2>&1); local code=$? printf '%s\n' "$out" > "$evidence/$name.log" printf ' %-22s exit %s\n' "$name" "$code" return "$code" } run findings codex-security findings list run classify codex-security classify-severity --scan "$scan" run dedupe codex-security dedupe --scan "$scan" # validate needs a findings file; export it first, and treat export's # 2 as "no completed scan" rather than as a finding. if codex-security export --scan "$scan" --export-format json --output "$evidence/findings.json" >/dev/null 2>&1; then run validate codex-security validate "$evidence/findings.json" run owners codex-security suggest-owners "$evidence/findings.json" else echo " export failed: no completed scan for $scan, stop and check the scan ran" echo " evidence kept in $evidence" exit 2 fi echo " evidence kept in $evidence" echo " next: a human decides severity, owner and release timing before any patch"
The two lines that matter are the export branch and the last echo. The branch stops the script when there is no completed scan, rather than letting an empty corpus read as a clean repository, which is the same trap as a CI gate that treats exit 2 as a pass. The echo is where the automation ends: nothing in this script patches anything.
The first hour produces decisions that get questioned later, usually in the shape of "why was this in the release". Two artefacts answer that better than a chat log.
$ codex-security export --scan "$SCAN" --export-format json --output findings.json $ codex-security export /path/to/scan-results --source-root . --output results.sarif
The first keeps the saved findings as JSON. The second writes SARIF with source-line fingerprints from the scanned root, which is what lets a code scanning view match findings across scans, and it only works while the source files are unchanged since the scan [1]. Both are worth keeping next to the incident, because the export is the record of what the scanner saw before anyone edited the branch to fix it.
Then a decision log, one line per finding, which is the part no tool generates because it is the part that is a judgement:
| Finding | Rubric severity | Reached by | Owner | Decision | Release | |---|---|---|---|---|---| | auth bypass in session refresh | high | unauthenticated | @backend-lead | fix now | hotfix | | token logged in debug path | medium | admin only | @platform | patch, next minor | 0.9.2 | | deprecated hash in migration | low | internal tool | @data | accept and schedule | 0.10 | Decided by: <name>, <time>. Validation run: yes. Verified after fix: pending.
Three columns carry the weight. "Reached by" is the question that turns a severity label into a priority, "decision" is what makes the row revisitable, and "verified after fix" is blank until the fix has been checked rather than merely written.
One variant skips the triage sequence entirely. If the finding is a live credential in the source or in the history, the first move is rotation and then triage, because the window where the key is valid is measured in minutes rather than in release cycles. That case has its own runbook in the first hour after a leaked API key, which covers which keys to treat as urgent and what to do about the history. This post is about the code finding where the exploit needs a request rather than a copy.
Every failure below is a real output from a run today, and each one is a trap in a first-hour script.
$ codex-security classify-severity --records {"jsonrpc":"2.0","id":null,"error":{"code":-32000,"message":"Host disconnected before the run completed."}} $ codex-security validate /tmp/nope-findings.json codex-security: ENOENT: no such file or directory, lstat '/tmp/nope-findings.json' $ codex-security patch --scan latest codex-security: No saved scan was found for this repository.
The JSON-RPC error is the one that wastes the most time. The classification, dedupe and host-verification paths start a host process, and when that host cannot start, the error arrives as a protocol message rather than as a sentence about the environment. On a Linux box the usual cause is the sandbox restriction the CLI already explains elsewhere in its output, and on a first attempt it reads like a network problem, which it is not [2].
The ENOENT is honest and easy to fix: the file path is wrong, so the command never reached the model. The patch error is the one to watch in a script, because "no saved scan" and "no vulnerable findings" print differently but both stop a release just as hard if your wrapper treats them the same.
ENOENT
If you are the person receiving this rather than running it, five questions get you the whole picture and nothing else does.
Which claim is it, in one sentence a customer could understand? Can someone outside reach it, or does it need an account first? Is it in something we deployed, or in code that is waiting? Who owns the fix, by name rather than by team? And what will we check afterwards to know it is actually gone?
If the fifth answer is "the scan will re-run next week", the fix is not verified yet, and the incident record should say so. That sentence is also the one that turns the tool into something a business owner can trust: not because it never misses, but because its claim about the fix is checkable.
If you want this triage order written into your own release process, with the decision log and the evidence trail kept somewhere a non-engineer can read, send a written intake and we will start from your last three findings.
The two posts behind this one are the CLI walkthrough and the CI gate with measured exit codes, and the business case for running any of it is in what AI-written code costs to review.
How long should the first hour actually take? Reading the report and ranking it is fifteen minutes if the rubric exists. Validation is the variable, because it costs model calls, and the patch is a normal change with a normal review behind it.
Do I patch first and validate after? Validate first for anything high. A patch to a finding that turns out to be unreachable is a change nobody needed, and it hides the real one in a busy review.
What if the scan itself failed? Then there is nothing to triage yet, and the exit code tells you so: 2 means the scan did not run rather than that the code is clean. Fix the runner before reading anything into an empty report.
Can I skip dedupe in a small team? You can, until the same accepted finding returns every week and someone re-opens it. Marking it once, with a name, is cheaper than the conversation.
Does marking a false positive hide future real findings? No, it records a decision against that finding, which is why the command exists separately from filtering a report. Revisit it when the code changes, because a false positive on old code can become a true positive after a refactor.
Should the decision log live in the repository? It should live where the incident review happens. A file next to the finding export is enough for a small team, and it is the artefact that answers the question nobody wants to answer from memory a month later.
[1] OpenAI, Codex Security CLI reference, fetched 2026-11-23. Source of the command surface used above, the export formats and defaults, the rule that validation does not affect the saved findings or the severity gate, the untracked cost of validation calls, and the exit-code behaviour around completed scans.
[2] OpenAI, Codex Security README, fetched 2026-11-23, referenced for the triage workflow across saved scans and findings, the false-positive marking path, and the local sandbox requirement behind the host error in the failure section.
[3] OpenAI, Codex Security integrations, fetched 2026-11-23, referenced for tracking a finding in an issue tracker from a connected app, which is where the decision log lands in a team that already runs Linear, Jira or GitHub Issues.
[4] OpenAI, Codex Security GitHub Action, fetched 2026-11-23, referenced for the report-only default and the severity threshold that decides whether a finding blocks a pull request rather than an incident.
[5] OpenAI, importing external scanner findings, fetched 2026-11-23, referenced for the path that brings a finding from an existing scanner into the same first-hour sequence.
Maxpertise is an AI-native engineering company. We embed native AI engineers inside your team, live in about 10 days. Please enable JavaScript to view the site, or email contact@maxpertise.net.