Quick Overview
This video is a practical technical demonstration presented by Dan Shanahan, a Cyber Deployment Engineer at OpenAI. Shanahan walks through the process of setting up and using Codex Security to identify and remediate code vulnerabilities within GitHub pull requests. The walkthrough covers both on-demand and automated review workflows.
Key Points
- 1.OpenAI Codex Security connects to GitHub repositories through the ChatGPT Codex Connector app to review pull requests for security vulnerabilities.
- 2.Developers can trigger an on-demand security review on any pull request by commenting at codex security review.
- 3.Codex can directly consume a pull request URL to analyze reported vulnerabilities, generate code fixes, and push remediation commits back to the branch.
- 4.Pull request security reviews can be automated globally or per repository within Codex settings based on pull request creation or code pushes.
- 5.Custom guidelines and threat models can be supplied to the review agent using AGENTS.md and SECURITY.md markdown files located in the repository.
Summary
Dan Shanahan, a cyber deployment engineer at OpenAI, demonstrates how teams can implement pull request security reviews using Codex Security to catch vulnerabilities before code merges to production. The workflow begins inside GitHub repository settings under GitHub Apps, where the ChatGPT Codex Connector must be installed and configured. Shanahan notes that developers lacking access to this connector must work with their workspace administrator and GitHub repository or organization owner to complete installation.
Once the connector is active, developers can request security reviews on demand. In a demo repository named codex-security-pr, Shanahan navigates to pull request number two, titled Add new endpoint to routes, and posts a comment reading @codex security review. The ChatGPT Codex Connector bot responds with a summary table tracking the review status, commit hash, and trigger type. Upon finishing its scan, Codex leaves an advisory finding classified as medium severity, recommending that the preview message parameter in app.js be encoded before insertion into HTML to avoid reflected cross-site scripting.
To remediate the finding, Shanahan copies the pull request URL into the Codex desktop application and asks the assistant to fix the security issue described in the pull request comments. Codex inspects the repository branch, reviews the advisory note, and updates app.js, routes/preview.js, and preview.spec.js. The model runs verification syntax checks and HTTP test scripts through Express to ensure ordinary messages render properly while script payloads are escaped, then pushes the fix under commit eb51be5. Shanahan returns to GitHub and posts @codex security review again, prompting Codex to confirm that no security issues remain.
Shanahan explains that relying on manual polling by typing comment commands is optional, as reviews can be fully automated. In the Codex application settings under Code Review, users can set personal security review preferences or repository-level automations. Repository settings allow engineers to enforce security scans across all pull requests rather than just personal submissions. Configurable options include trigger timing, such as running scans on pull request open or on every push, as well as minimum severity reporting thresholds ranging from low to critical.
Codex settings also link to repository instruction files, specifically AGENTS.md and SECURITY.md, which allow teams to guide Codex with repository-specific threat models and review conventions. To test automated scanning, Shanahan opens pull request number three, titled Add banner attribute injection demo. Without any manual comments or prompts, the Codex review bot immediately runs in the background and posts an advisory finding flagging an unescaped banner label attribute in HTML.
Setting up the GitHub connector
Before running security reviews, repositories must have the ChatGPT Codex Connector installed under GitHub repository settings. If the connector is not yet available in the development environment, developers need to coordinate with their workspace administrator or repository owner to complete the integration.
Manual security reviews and automated remediation
A security scan can be initiated manually by commenting on an open pull request with a mention of the review agent. In the demonstration, Codex flags an unencoded message parameter causing a reflected cross-site scripting vulnerability. Providing the pull request link to the Codex application prompts the agent to analyze the finding, construct a patch, run verification tests, and push the commit directly to the pull request branch.
Automating pull request security reviews
Security reviews can be automated at either an individual user level or across entire repositories within Codex code review settings. Administrators can choose triggers such as pull request opening or every code push, define severity alert thresholds, and provide repository-specific instructions through AGENTS.md and SECURITY.md files.
The Bottom Line
The video establishes how the ChatGPT Codex Connector integrates automated vulnerability scanning and remediation into standard GitHub pull request lifecycles. It demonstrates both manual mention triggers and automated repository-wide review policies, along with automated patch generation directly inside the Codex desktop interface. The presentation leaves out administrative deployment steps for workspace configuration and does not discuss custom pricing or enterprise tier requirements for the feature.
FAQ
What is Codex Security and how does it review GitHub pull requests?
Codex Security is an OpenAI tool that integrates with GitHub via the ChatGPT Codex Connector app to analyze code changes in pull requests for potential security vulnerabilities and leave advisory comments.
How do developers manually trigger a security review on a GitHub pull request?
Developers can trigger a manual scan by posting a comment containing @codex security review on the target pull request thread.
How can Codex be used to resolve vulnerabilities found during a pull request review?
Developers can paste the pull request link into the Codex application and prompt it to fix the issue; Codex will read the comments, adjust the code, run tests, and push the commit directly to the branch.
Where are automated pull request security review triggers configured in the Codex interface?
Automated review settings are configured inside the Codex application by navigating to Settings, scrolling to the bottom, and selecting the Code Review section.
What markdown files can be added to guide Codex Security during automated repository reviews?
Teams can include AGENTS.md and SECURITY.md files in their repository to provide custom instruction sets, guidelines, and threat models for the Codex review agent.
Worth watching for
Software engineers, security engineers, and DevOps teams seeking to incorporate automated AI-driven security code reviews directly into GitHub pull request workflows.
- codex-security
- github
- pull-requests
- appsec
- vulnerability-remediation
- code-review