OpenAI officially announced the open-source command-line security tool Codex Security CLI today, helping developers scan code repositories, identify and verify security vulnerabilities in their daily coding workflow, and support seamless integration of security checks into CI/CD delivery pipelines. Interestingly, OpenAI admitted that the tool was already "discovered" by the community before its official release, and it is still in an early version stage.

openai

Two channels: Command line + SDK, directly connecting to CI/CD pipeline

Codex Security CLI uses a command-line interface as its core interaction method, and also provides a TypeScript SDK interface. Developers can use it to scan code repositories, view code changes, track security issues across different run cycles, and verify the effectiveness of vulnerability fixes.

For continuously developed software projects, after embedding this tool into the CI/CD process, each code submission can automatically trigger a security check, exposing potential risks in advance. The installation method is extremely simple, just one line of command via npm. The tool requires Node.js 22 or higher, Python 3.10 or higher, and access rights to Codex Security. After completing authentication, developers just need to execute the scan command to perform a security review of the code repository.

In a CI environment, there is no need for interactive login; automated authentication can be completed by setting the OPENAI_API_KEY environment variable. The tool also supports two authentication methods: ChatGPT account login and API key, meeting the different needs of individual developers and enterprise teams.

The scan history will be saved in the Codex Security working directory. If the default directory is not writable, users can also customize the storage path through environment variables. For advanced users, the TypeScript SDK allows direct invocation of the security scanning function within a TypeScript project, obtaining the scan report path to achieve more flexible toolchain integration.