Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

docs: run README CLI commands with npx (#945)

mluck-openai552f83d8f249
diff --git a/README.md b/README.md
index 2d1306f29..9268655f8 100644
--- a/README.md
+++ b/README.md
@@ -14,8 +14,8 @@ Requires Node.js 22.13.0 or later and Python 3.10 or later.
```bash
npm install @openai/codex-security
-codex-security login
-codex-security scan /path/to/directory
+npx @openai/codex-security login
+npx @openai/codex-security scan /path/to/directory
```
For CI, set `OPENAI_API_KEY` instead of signing in.
@@ -25,8 +25,8 @@ For CI, set `OPENAI_API_KEY` instead of signing in.
Draft repository-wide or component-scoped `SECURITY.md` guidance for future scans:
```bash
-codex-security policy .
-codex-security policy . --path services/api --knowledge-base architecture.md
+npx @openai/codex-security policy .
+npx @openai/codex-security policy . --path services/api --knowledge-base architecture.md
```
The command saves a draft outside the checkout; it does not install it or run a
@@ -67,7 +67,7 @@ findings service, use the same scanner image with the
## Findings service (preview)
-Run `codex-security serve` to start the service without Docker. See
+Run `npx @openai/codex-security serve` to start the service without Docker. See
[running without Docker](sdk/typescript/README.md#running-without-docker)
for prerequisites, credentials, and storage configuration.
@@ -79,13 +79,13 @@ findings with pagination. Its read-only dashboard at `/dashboard` refreshes ever
five seconds and shows stored findings and duplicate groups from the service's
database. It also returns potential duplicates by embedding similarity within a
repository or an explicit all-repository scope. The
-`codex-security publish scan --to custom --findings-url http://localhost:3000`
+`npx @openai/codex-security publish scan --to custom --findings-url http://localhost:3000`
command uploads completed findings and their repository ID. The SDK and
-`codex-security dedupe` command retrieve candidates, run independent Codex
+`npx @openai/codex-security dedupe` command retrieve candidates, run independent Codex
reviews locally, and persist accepted duplicate groups; `--all-repositories`
opts into the broader scope.
-Use `codex-security classify-severity --scan SCAN_ID --rubric /path/to/policy.md`
+Use `npx @openai/codex-security classify-severity --scan SCAN_ID --rubric /path/to/policy.md`
to assess selected findings under your own policy before publishing tickets.
Scan classification checkpoints each finding in SQLite and reuses matching
assessments on reruns; `--reprocess` forces reassessment. The SDK exposes the same
@@ -98,13 +98,13 @@ To use another inference provider, set its API key and select a model:
```bash
export AWS_BEARER_TOKEN_BEDROCK="<your-bedrock-api-key>"
export AWS_REGION="us-east-2"
-codex-security scan . --provider amazon-bedrock --model openai.gpt-5.6-luna
+npx @openai/codex-security scan . --provider amazon-bedrock --model openai.gpt-5.6-luna
export OPENROUTER_API_KEY="<your-openrouter-api-key>"
-codex-security scan . --provider openrouter --model anthropic/claude-sonnet-4.5
+npx @openai/codex-security scan . --provider openrouter --model anthropic/claude-sonnet-4.5
export FIREWORKS_API_KEY="<your-fireworks-api-key>"
-codex-security scan . --provider fireworks --model accounts/fireworks/models/qwen3-235b-a22b
+npx @openai/codex-security scan . --provider fireworks --model accounts/fireworks/models/qwen3-235b-a22b
```
## Documentation