openai/codex-security: SDKs and CLI for Codex Security · GitHub

openai/codex-security: SDKs and CLI for Codex Security · GitHub

@openai/codex-security is a CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities in your code. Scan repositories, review changes, track findings over time, and run security checks in CI.

Documentation

Requires Node.js 22 or later, Python 3.10 or later, and access to Codex Security.

npm install @openai/codex-security
npx @openai/codex-security login
npx @openai/codex-security scan .
npx @openai/codex-security scan . --model gpt-5.6-terra --effort high

For CI, set OPENAI_API_KEY instead of signing in.

If both a ChatGPT sign-in and an API key are available, interactive scans ask
which credential to use. CI and other noninteractive scans keep the existing
API-key precedence. Select a credential explicitly when needed:

npx @openai/codex-security scan . --auth chatgpt
npx @openai/codex-security scan . --auth api-key

To make your ChatGPT sign-in the automatic default, unset any configured API
keys:

unset OPENAI_API_KEY CODEX_API_KEY

Scan history is stored in the Codex Security workbench state directory. If that
directory cannot be written, set CODEX_SECURITY_STATE_DIR to a writable
directory outside the repository.

import { CodexSecurity } from "@openai/codex-security";

const security = new CodexSecurity();
const result = await security.run(".");

console.log(result.reportPath);
await security.close();

For installation, authentication, scan options, and CI setup, see the official documentation.

Source link

Share:

Atbildēt

3 latest news
News Archives
On Key

Related Posts

7 AI models ran real businesses

7 AI models ran real businesses

The shared environment. Seven models, one unlocked Mac mini each. Notice All invoices were immediately voided. All emails and associated accounts were disabled. What happens

De-Brainrot Vacations

– Some cows in the fields. My brain is not the same as it was a few years ago. When I started working as a