Deep Dive · Security Tooling

Codex Security: An Official Walkthrough, and the Two Things It Compresses

Six minutes, forty-seven seconds from OpenAI's own cyber deployment engineer: install the plugin, scan a repository, triage a finding, generate a patch, open a pull request, then automate it with the CLI. The demo is clean. What it compresses is the access gate in front of the whole product — and the verification discipline its own documentation insists on.

How to run your first Codex Security scan — video thumbnail
Video: OpenAI 6:47 11 November 2026
Codex Security Daybreak secure code review CI/CD

🎬 What the video is 0:00

A first-party product walkthrough by Dan Shanahan, a cyber deployment engineer at OpenAI. Three movements: install the Codex Security plugin, work through findings on a repository, then reach for the CLI to make it repeatable in CI/CD.

SegmentContentTime
PrerequisiteConfirm Daybreak Blue access in settings0:33
InstallFind and install the Codex Security plugin from the marketplace0:51
ScanPick repository, model, reasoning level, optional deep scan, additional context1:29
FindingSummary, attack path, supporting evidence2:59
FixGenerate a patch in a new thread, review the diff, publish a pull request3:17
AutomationCodex Security CLI, npm install, scan, triage, embed in CI/CD4:45
It is a walkthrough, not an evaluation. No precision numbers, no false-positive discussion, no comparison with an existing scanner, and no example of a scan that produced a bad finding. Everything here is the happy path — which is what a first-scan tutorial should be, but it means the article has to supply the missing context from OpenAI's own documentation.

🔐 Step zero: the access gate 0:33

The video's first step takes four seconds: "check to make sure that I have access to Daybreak Blue." On screen it is a line in settings. In practice it is an approvals programme, and nothing in the walkthrough works without it.

TierWhat it grantsAccess route
Daybreak Blue (GPT-Daybreak-Blue)Flagship models with reduced refusals for authorized defensive workflows: vulnerability discovery, secure code review, threat modelling, detection engineering, malware analysis in a controlled environment, patch validationApplication through Trusted Access for Cyber — individual or enterprise; approval required
Daybreak Red (GPT-Daybreak-Red)Specialist cyber models for explicitly authorized research: controlled reproduction, proof-of-concept validation, penetration testing, red teamingSeparate approval and provisioning; not automatic, not on every surface
This is the biggest thing the video compresses. Access is granted per identity, per workspace or API organisation and project, and per product surface — and submitting an application does not guarantee approval. Blue access does not imply Red access: they are separate approvals. If you watched this and assumed you could install the plugin and start scanning, that assumption is the gap.

One more documented line worth knowing before planning around it: Trusted Access does not automatically grant Zero Data Retention. Retention has to be confirmed separately for the exact organisation and endpoint.

🧩 Install, and the skills model 0:51

StepDetail
WherePlugins marketplace inside Codex (desktop app), or /plugins in the CLI
Package contentsA set of skills — triage findings, deep scan, security scan, fix finding, review code changes, hardening proposals, vulnerability reports
SidebarA Security section with a workbench: scans, findings, repository history
Separate cloud pluginDaybreak Defense Factory (Preview) for scanning connected GitHub repositories; a different install
The plugin is a skills package, not a single button — which is why the same capabilities are reachable from a conversation. The documented invocations are explicit: $codex-security:security-scan and $codex-security:deep-security-scan. Anything you can click, you can also ask for, including scoping a scan to one folder such as services/billing.

⚙️ Configuring a scan 1:29

SettingWhat he choosesWhat the documentation adds
RepositoryA locally staged repositoryWhole repository, or one folder when a service has its own owner and security boundary
ModelDaybreakFor best scan quality the docs recommend gpt-5.6-sol with xhigh reasoning effort
Deep scanLeft offMultiple independent standard scans, combined
Additional context"Focus on the authentication service"The intended field for attacker-controlled inputs, trust boundaries, sensitive actions and priority areas
Persistent contextNot mentionedA SECURITY.md at the repository root: threat model, invariants, reportable criteria, exclusions, severity context — with nested files overriding by proximity
The SECURITY.md omission is the most practical gap in the video. Instead of retyping context into a box before every scan, a repository can carry its threat model and finding criteria as a file, and the tool treats it as policy context rather than executable instructions — a small but meaningful design decision, since the whole point of the file is to influence the model.
On the model choice: the walkthrough uses the Daybreak model, while the documentation's quality recommendation is gpt-5.6-sol with xhigh. These are two documented options rather than a contradiction, but if you are chasing detection quality on a real codebase, the docs are telling you something the video does not.

🧠 What the scan does 2:30

PhasePurpose
PrepareLoad the repository and its context
Understand the codebaseBuild a working picture of structure and entry points
Threat modelEnumerate likely attack surfaces before looking for bugs
Review codeGenerate candidate findings
FinaliseReduce candidates to the list worth acting on
Threat model before bug hunt is the right order, and it is the part most scanner integrations skip: knowing which surfaces matter is what turns a pattern match into a finding with an attack path. It is also why additional context changes results — you are not tuning a filter, you are shaping the model of the system.

🔎 Reading a finding 2:59

ComponentWhat it gives you
SummaryThe vulnerability in one statement
Attack pathThe sequence from input to impact — the part that decides whether it is real
EvidenceCode references supporting the claim
RecommendationHow to remediate, and what the impact is on this codebase
"Attack path" is the field that separates this class of tool from a linter. A static rule tells you a sink exists; an attack path claims reachability. That is also exactly the claim you should test first — an unreachable sink and a remotely exploitable one look identical in a rule's output and nothing alike in an attack path.

🩹 Patch, then pull request 3:17

He generates a fix, which spins up a new Codex thread carrying the finding's context through a "fix finding" skill; reviews the diff (new authorization parameters in the case shown), and publishes a pull request to GitHub.

StepIn the videoIn the documentation
GenerateOne click, new threadWrites a patch artifact; the checkout is left unchanged
Review"I feel confident in this change"Check for unrelated refactors or weakened security controls
ApplyImplicitExplicit step; applying changes the working tree — review that diff too
VerifyNot shownRe-runs the reproducer; regression test must fail before and pass after; records any remaining proof gap
CloseMerge on GitHubVerification does not auto-close a finding; a human closes it with a reason

🧾 Verification the video skips 3:45

OpenAI's own documentation contains a sentence that is a better safety lesson than anything in the demo:

"A generated or applied patch isn't yet a verified fix."
Documented behaviourWhy it matters
Verification re-runs the original reproducer or another exploit checkThe fix is tested against the attack, not against the diff's plausibility
Regression test must fail before the fix and pass afterProves the test actually exercises the vulnerability
If it cannot run such a test, it records the verification gap and what it could checkStates the limit instead of implying coverage
Also checks legitimate behaviour, nearby bypasses and repository testsGuards against a fix that breaks the app or leaves a sibling hole
Verification does not close the findingA human accepts the evidence and closes it deliberately
The walkthrough shows the weaker path: generate, read the diff, feel confident, open the PR. Nothing in that sequence proves the vulnerability is gone — the diff added authorization parameters, which is suggestive, not evidence. On a real codebase, use Verify fix and read the recorded proof gap before you merge. And note the merge is still a normal review: the tool proposes, your process decides.

💻 The CLI, properly 4:45

He says the CLI is "installable using npm" and that npm "pulls it down from GitHub". The documented facts are more specific and more useful.

ItemDocumented value
Package@openai/codex-security — public npm package, providing the codex-security command and a cs alias
Install or runnpm install -g @openai/codex-security, or npx @openai/codex-security scan .
PrerequisitesNode.js 24 or 26, or 22 from 22.13.0; Python 3.10+ (and tomli on 3.10)
Authentication--auth chatgpt for stored credentials, --auth api-key to force OPENAI_API_KEY or CODEX_API_KEY
Bulk scanningbulk-scan repositories.csv --workers 4; resumable — completed repositories are skipped, --max-attempts retries transient errors
Reviewing resultsscans list, scans show SCAN_ID, scans logs SCAN_ID
CI integrationsGitHub Actions (SARIF upload, enforcement) and GitLab CI/CD (SARIF, optional draft merge requests with verified fixes)
The resumable bulk scan is the underrated feature for anyone with a large estate: point it at a CSV inventory of repositories, run it with several workers, and re-run the identical command after an interruption — the completed ones are not redone. That is what makes a first pass across hundreds of repositories feasible rather than a batch job you have to babysit.

⚠️ The operational warnings 5:00

Three documented properties of the CLI are security-relevant, and none appear in the walkthrough. They matter most precisely because he is recommending the CLI for CI.

PropertyConsequence
Runs with your operating-system permissions and does not pause for approvalNo sandbox and no prompt: whatever the scan process decides to run, runs
Scan processes can inherit your environmentThe docs say to remove unrelated credentials before starting — a CI runner full of secrets is exactly the wrong environment
Scan logs are not redactedThey can contain source code or credentials, so treat the state directory as sensitive
An environment API key wins by defaultIf OPENAI_API_KEY is set, non-interactive and JSON scans use it even after a successful ChatGPT login
Put together, this is the article's main practical warning: a security scanner that runs unsandboxed, inherits your environment, and writes unredacted logs is a new high-value target sitting inside your build pipeline. Run it in a container with only the credentials it needs, keep the scan state directory outside the repository, and treat it as you would any other tool that executes code and writes secrets to disk.

🔁 Standard versus deep 2:03

Standard scanDeep scan
ReviewOne passMultiple independent standard scans, findings combined
Use forFirst scan, defined scopeRepeated review where runtime and tokens are acceptable
Diff targetsSupported via the change-review workflowNot supported
Runtime control—Concurrency and duration limits in ~/.codex/codex-security/config.toml
GuaranteeRepeated review can find issues an earlier pass missed, but detection completeness and run-to-run consistency are explicitly not guaranteed
Two details in the deep-scan docs are unusually honest and worth internalising: a scan is complete only when finalisation succeeds and produces report.md — an aggregation message or a manifest file alone does not mean done — and you should read the coverage summary before the findings, because deferred surfaces and proof gaps tell you what the scan never looked at.

🗺 Four surfaces, four jobs 4:53

SurfaceUse whenWhere it runs
Daybreak Defense Factory (Preview)You want GitHub repositories scanned continuously and fixes proposed for a teamCloud, connected repositories
Codex Security pluginYou want to scan a local repository and work findings interactivelyDesktop app or Codex CLI
Codex Security CLIYou want repeatable scans, bulk inventory runs, or a CI gateTerminal, CI runners
TypeScript SDKYou want scans inside your own internal toolingYour application
The video's own arc is the sensible adoption order: local plugin first, on a codebase you know, to calibrate what the findings look like; then the CLI to make it repeatable; then CI once you trust the signal. Going straight to a CI gate means shipping a scanner whose false-positive rate you have never measured into the pipeline that decides whether engineers can merge.

📉 What it does not promise 6:00

Assumption a viewer might formWhat the documentation actually says
"It finds the vulnerabilities"No completeness guarantee; deep scans are repeated review, not exhaustive analysis
"A patch fixes the issue"A generated or applied patch is not a verified fix; verification records gaps
"Verification closes the finding"It does not — a human closes it with a reason
"Two runs give the same result"Identical results between runs are explicitly not promised
"Access is a settings toggle"It is an approved programme, per identity, workspace, model and surface
"The scan is sandboxed"The CLI runs with OS permissions, no approval prompts, inheriting your environment

✅ Claims checked

ClaimVerdictEvidence
Codex Security exists as a product with plugin, CLI and SDKCorrectFull documentation section under Codex Security, plus a documented SDK
Requires Daybreak Blue access before useCorrect — and far more gated than shownTrusted Access for Cyber, application and approval; per identity, workspace, model, surface
The plugin exposes skills such as triage findings and deep scanCorrectInvoked as $codex-security:security-scan and $codex-security:deep-security-scan
Scan phases run prepare → understand → threat model → review → findingsCorrectMatches the documented workflow and the on-screen progress
Additional context directs the analysisCorrectDocumented field for attacker inputs, trust boundaries and priority areas
Fixes are generated in a separate thread via a fix skillCorrectPatch artifacts are written without modifying the checkout until applied
"All the analysis has been done locally on my machine"Misleading as statedThe scan runs locally in the plugin, but inference is remote and the cloud Defense Factory surface is a separate product; scan artefacts land on disk
CLI installable with npmCorrect, but understatedPackage is @openai/codex-security, runnable via npx; Node 24/26 or ≥22.13.0 and Python 3.10+ required
CLI is the route to CI/CD scale-outCorrectGitHub Actions and GitLab CI integrations, SARIF output, bulk scans from a CSV inventory
The product name at 6:04–6:40 ("Codacy Security")Caption errorCodacy is an unrelated vendor; the audio and the rest of the video say Codex Security throughout
Best scan quality model settingDiffers from the docsDocumentation recommends gpt-5.6-sol with xhigh; the demo selects the Daybreak model
SECURITY.md carries persistent threat-model contextDocumented, not mentioned in the videoTreated as policy context, not executable instructions; nested files override by proximity
Patches must be verified before closing a findingDocumented, not shown"A generated or applied patch isn't yet a verified fix"
CLI runs unsandboxed with inherited environment and unredacted logsDocumented risk, absent from the walkthroughLocal scan permissions section; logs "aren't redacted and can contain source code or credentials"

Basis note. Built from the full 6:47 recording and checked line by line against OpenAI's Codex Security documentation (overview, plugin quickstart, scan and deep-scan guides, fix-and-verify, CLI quickstart, CLI FAQ, and the Models and Trusted Access page). Where the video and the docs differ, the docs are quoted rather than paraphrased. No exploit details are involved here; the corrections concern access gating, verification discipline and operating the CLI safely.

🔑 Key takeaways

  • The prerequisite is an approvals programme, not a toggle. Daybreak Blue is granted per identity, workspace, model and surface — and Blue does not imply Red.
  • Threat model first, then bug hunt. That ordering is why additional context improves results: you are shaping the model of the system, not tuning a filter.
  • A finding's value is its attack path, not its rule. Reachability is the claim to test first.
  • A generated patch is not a verified fix. OpenAI's own docs say so, and the demo skips the verification step entirely.
  • Verification is a reproducer, not a plausibility check: re-run the attack, and require a regression test that fails before and passes after.
  • Verification does not close findings. A human accepts the evidence — the right division of labour for security work.
  • Put the threat model in SECURITY.md. Persistent, versioned context beats retyping into a box; and it is treated as policy, not instructions.
  • The docs recommend gpt-5.6-sol at xhigh for scan quality; the demo uses the Daybreak model. Two options, not the same one.
  • The CLI is @openai/codex-security, runnable with npx, on Node 24/26 or ≥22.13.0 with Python 3.10+.
  • The CLI runs unsandboxed, without approval prompts, inheriting your environment — so a CI runner full of secrets is the worst place to launch it.
  • Scan logs are not redacted. Treat the scan state directory as sensitive material, not as build output.
  • Bulk scans are resumable from a CSV inventory, which is what makes a first pass across hundreds of repositories realistic.
  • Read the coverage summary before the findings, and know that a scan is only complete when report.md exists.
  • Adopt in the order the video follows: local scan on code you know, then repeatable CLI, then a CI gate — once you have measured the false-positive rate.

🔗 Resources

Basis note. This article's corrections come from documentation the video does not cite: the access programme, SECURITY.md, the verify-fix workflow, and the CLI's permission and logging behaviour. Quotes are taken verbatim from those pages. Nothing here is exploitation guidance — it is about running a security scanner without turning it into a liability.

⏱ Timestamp index

0:00The three things this video will show
0:33Checking Daybreak Blue access
0:51Finding the plugin in the marketplace
1:11Installed — the skills it exposes
1:29Starting a new scan: repository and model
2:03Deep scan and additional context
2:30Scan phases: prepare to finalise
2:59A finding: summary, attack path, evidence
3:17Generating a fix in a new thread
3:45Reviewing and publishing the patch
4:18The pull request on GitHub
4:45Why the CLI exists
5:00Installing the CLI with npm
5:20Running a scan and triaging in the CLI
6:00Embedding in CI/CD
6:25Recap and next step
☰ View all