* feat(cli): add independently reviewed dependency checks * Compare frozen Python advisory versions as releases * fix(cli): bind unnamed root manifests to observed services * test(cli): evaluate dependency investigations across public fixtures * test(sdk): bound the budget wait after the mock scan starts * test(cli): exercise MCP evidence and missing caller access * Bind graded citations to the approved use evidence * test: restore dependency investigation quality controls * fix(cli): restore dependency investigation and report compatibility * test: grade malformed dependency baseline answers * fix(cli): scope headless tool access to the investigator * test(cli): lock down reviewer and external evidence tool access * fix(cli): keep linked evidence tied to its originating call * Reconcile application mappings and expose original evidence hashes * test: verify selected catalog rows against original replies * fix(cli): recover incomplete reviews and preserve selected evidence rows * fix(cli): preserve wire evidence and verify finding citations * Finalize from approved submissions and explain remaining uses * fix(cli): restore coordinator recovery, independent review and report contracts * Review withdrawals under the original dependency assessment ID * test(cli): compare trace progress with completed search scopes * Recheck dependency coverage after concurrent investigation changes * Preserve exploratory scope explanations during dependency review * feat(cli): track shared source work in dependency investigations * Include shared source work in final coverage checks * Require deciding evidence on the caller it establishes * Preserve generic MCP search outcomes and scopes in dependency reports * Share pinned source notes between dependency investigators * Ship the source worklist and search audit modules * refactor(cli): name the dependency coordinator for its ability to resume * refactor(cli): simplify the tools for dependency investigations * fix(cli): keep investigation tool arguments visible to Codex and reuse the evidence store * fix(cli): send missing verdict citations back to the reviewer * fix(cli): verify caller bindings and input flow across investigation steps * fix(cli): require direct citations for asserted runtime facts on every use * test(cli): verify failed catalog lookups without a timed source scan --------- Co-authored-by: utsav-oai <348536218+utsav-oai@users.noreply.github.com>
@openai/codex-security
Scan a repository, selected paths, or Git changes for vulnerabilities. The CLI and TypeScript SDK can validate findings, generate patches, verify fixes, and export results as SARIF, JSON, or CSV. The package includes the Codex runtime and security plugin.
Install
Use Node.js 22.x (22.13.0 or later), 24.x, or 26.x on macOS, Linux, or Windows.
Scans also require Python 3.10 or later. On Python 3.10, install tomli.
Install the CLI
npm install --global @openai/codex-security
The CLI runs as cs or codex-security. To skip the global install, use
npx @openai/codex-security in place of cs in the examples below.
Install the TypeScript SDK
Install the package in your project directory.
npm install @openai/codex-security
Before 1.0, minor releases may change the public API.
Authentication
Run cs login to sign in with ChatGPT. With a local SDK installation, run
npx @openai/codex-security login from your project. In CI, set
OPENAI_API_KEY or CODEX_API_KEY in the scan environment.
Some requests require Trusted Access for Cyber.
CLI
Run a scan from the repository you want to review.
cs scan .
To scan only committed changes from origin/main to HEAD, run
cs scan . --diff origin/main. A completed scan exits with code 0 by default,
even when it finds vulnerabilities. Add --fail-on-severity high to exit with
code 1 for high or critical findings.
Run a scan from TypeScript
Run this ES module from the repository you want to scan.
import { CodexSecurity } from "@openai/codex-security";
const security = new CodexSecurity();
try {
const result = await security.run(".");
console.log(result.reportPath);
console.log(`${result.findings.findings.length} findings`);
} finally {
await security.close();
}
Read results
By default, results are saved in the private Codex Security state directory.
Open the Markdown report at the CLI’s REPORT path or the SDK’s
result.reportPath. Reports and logs can contain source code, credentials, and
vulnerability details. Review them before sharing.
Local security model
Scans run with your operating-system permissions. Start them with only the credentials they need because subprocesses can inherit your environment.
Documentation and security
- CLI reference for scan options, authentication, and exports.
- SDK guide for configuration, progress events, and the full set of examples.
- Security policy for reporting vulnerabilities in this package privately.