Codex Security: Inside the Scan, Validate, Patch Loop
Codex security is organised as a closed loop rather than a scan: threat model, discovery, sandbox validation, minimal patch, human review, revalidation after merge.
See what it builds → Official site
Why codex security is not described as a scanner
OpenAI's help centre article makes the distinction early: it is designed to work more like a security researcher than a traditional scanner. Concretely that means reading code, running tests, exploring realistic attack paths, and proposing patches teams can handle in their normal workflow, rather than pattern-matching source against a rule set and emitting a list. The stated purpose is identifying, validating and remediating vulnerabilities in connected repositories. That word validating is doing most of the work in the sentence, and it is the reason the rest of the pipeline looks different from the tools most teams already ignore. A finding that has been reproduced is a different object from a finding that has been flagged.
The threat model comes before the findings
On connecting to a repository, it scans commits in reverse chronological order and builds a threat model specific to that codebase. The model captures attacker entry points, trust boundaries, sensitive data and high-impact code paths, and analysis is then focused through it so the tool looks at realistic attack scenarios rather than every theoretically reachable line. Teams can inspect that model and edit it so it matches their actual deployment assumptions, which is the part worth taking seriously. A threat model nobody corrects is a set of guesses about your architecture, and a tool that lets you correct it is asking for the context that turns a generic alert into a relevant one.
Reproduction in a sandbox is the differentiator
Before a finding is surfaced at all, an automated validator attempts to reproduce it in an isolated environment. It records reproduction results, execution details and proof-of-concept artifacts, so what reaches a human has already been shown to work rather than merely inferred from source. Alongside that, attack-path analysis traces how attacker-controlled input could travel from an entry point to a sensitive outcome, scores the path by likelihood and impact, and makes its underlying assumptions visible. Visible assumptions are unusual and valuable: they let a reviewer disagree with the reasoning rather than only with the conclusion, which is how a security queue stops being a list of things nobody can argue with.
Patches are proposed, never applied
For validated findings it generates a minimal patch aimed at the root cause. The documentation is emphatic that this does not automatically modify your code: the patch is surfaced for human review and can be turned into a pull request in your existing workflow. After a confirmed issue is patched and merged, it can revalidate the fix, which closes the loop from detection through to remediation. Minimal is a deliberate choice as well. A small diff scoped to the cause is reviewable by someone who did not write the original code, whereas a sweeping refactor offered as a security fix tends to sit unmerged until the finding is stale. Scope is a review-throughput decision as much as an engineering one, and this pipeline reads as though that was understood.
Getting access, and the administrative prerequisites
Start at chatgpt.com/codex/cloud/security, connect and enable the GitHub repositories you want covered, then wait out the first scan. Expect that one to be slow on a large project, because it builds the threat model and works through repository history before anything useful appears; scans of new code afterwards are faster. On the administrative side, Enterprise and Edu workspaces manage access through workspace permissions, and both Codex Cloud and Codex Security have to be enabled for the workspace. Access can be narrowed to particular roles or groups through role-based access control, including groups synchronised over SCIM. Sort that out before promising anyone a timeline. Enabling a preview feature across a workspace is a shorter conversation than retrofitting role restrictions after several teams have already connected repositories.
The parts that matter
Research preview, limited tiers
Available to ChatGPT Enterprise, Edu, Business and Pro users. Preview status means the behaviour described here is current rather than settled, which is worth stating in any internal proposal.
Validated before surfaced
An automated validator reproduces each candidate issue in an isolated environment and captures proof-of-concept artifacts, so review time goes to findings that were demonstrated rather than merely suspected.
Your code is not edited
Patches are proposals. They are surfaced for human review and can become a pull request in your normal workflow, and the loop closes with revalidation after a fix is merged.
Two switches, not one
Enterprise and Edu workspaces need both Codex Cloud and Codex Security enabled, with access optionally limited to roles or SCIM-synced groups through role-based access control.
Stage by stage
| Stage or property | Codex Security | Begin.sh |
|---|---|---|
| Identification | Builds a codebase-specific threat model from source and commit history | Does no analysis of any kind; it generates code, it does not audit it |
| Discovery | Explores realistic code paths through that model to find candidate issues | Not applicable |
| Validation | Reproduces the issue in an isolated environment and records artifacts | You review the generated files yourself before using them |
| Remediation | Proposes a minimal patch at the root cause, without applying it | Delivers editable source in a downloadable zip |
| Human gate | Findings and patches go to review and can become pull requests | Nothing ships until you ship it |
| Revalidation | Re-checks a merged fix, closing the loop from detection to remediation | Regenerate and compare the output |
| Access | Research preview for Enterprise, Edu, Business and Pro; connects to GitHub | No repository access requested; output includes no backend or auth |
Rolling it out without surprises
- Clear the permissions first
In Enterprise and Edu workspaces, confirm that both Codex Cloud and Codex Security are enabled, and decide which roles or SCIM-synced groups should have access before anyone tries to connect a repository. - Connect one repository
Go to chatgpt.com/codex/cloud/security and enable a single project first. A repository you know well gives you a way to judge whether the findings are worth the review time. - Budget for the first scan
The initial pass builds a threat model and works through repository history, so it takes longer on large projects. Later scans covering new code are faster, and that is the steady state to plan around. - Correct the threat model
Inspect what it inferred about entry points, trust boundaries and sensitive data, and edit it to match your real deployment. Every later finding is filtered through those assumptions.
What teams ask before enabling it
Who can use codex security today?
It is a research preview available to ChatGPT Enterprise, Edu, Business and Pro users. Enterprise and Edu workspaces additionally control access through workspace permissions, and both Codex Cloud and Codex Security must be enabled before anyone in the workspace can connect a repository.
Will it change my code without asking?
No. The documentation states plainly that the patch does not automatically modify your code. Validated findings produce a minimal patch suggestion that is surfaced for human review, and you decide whether it becomes a pull request in your normal workflow.
How does it decide what to look at?
Through a threat model it builds from your repository and commit history, capturing attacker entry points, trust boundaries, sensitive data and high-impact code paths. Teams can inspect and edit that model, which changes what subsequent analysis treats as realistic. Correcting it early is the highest-leverage thing a reviewer can do with the tool.
What stops it flooding us with false positives?
A validation stage before anything is shown. An automated validator tries to reproduce each issue in an isolated environment, recording execution details and proof-of-concept artifacts, so findings that could not be demonstrated do not consume your reviewers' attention. What arrives carries execution details, which means a reviewer starts from evidence rather than from a line number and a severity label.
Why is the first scan so slow?
Because it is doing two jobs at once: building the project's threat model and scanning repository history for issues that already exist. The documentation notes this takes longer on large projects and that scans of new code afterwards are faster.
Does Begin.sh do anything security related?
No, and it should not be presented that way. It generates a static site or Expo app from a prompt or a URL and returns a zip, with no hosting, backend or authentication attached. The only honest connection is that a static artifact with no server has less to review.
Less code on the server means less to review
Begin.sh produces a static site or Expo app from a prompt or a URL to clone and hands you the source as a zip. It is not a security tool and makes no claim to be one, but output with no backend and no auth is output with a smaller surface.
See what it builds →