Skip to content

feat: add safety identifiers to scans - #609

Open
ianw-oai wants to merge 2 commits into
mainfrom
dev/ianw/safety-identifiers
Open

feat: add safety identifiers to scans#609
ianw-oai wants to merge 2 commits into
mainfrom
dev/ianw/safety-identifiers

Conversation

@ianw-oai

@ianw-oai ianw-oai commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Applications that serve multiple users need each scan's model requests to carry the originating user's safety identifier. The SDK and CLI have no per-scan option, and a value in shared configuration cannot safely distinguish concurrent users.

Changes

Add optional ScanOptions.safetyIdentifier and codex-security scan --safety-identifier ID. Accept a nonblank identifier of 1–64 characters with no NUL. Require API-key authentication. Omitting the option keeps ordinary scans unchanged.

Copy the identifier into each scan's process environment and forward it to nested workers. Keep it on scan comparisons and automatic patch tasks. Do not change process.env or save the identifier in shared configuration or scan recipes. Add regression tests and setup instructions.

Testing

  • pnpm run test --seed 12345 and pnpm run test: each passed 1,556 tests, with 30 platform skips and no failures.
  • pnpm run types and pnpm run format: passed.
  • pnpm pack --pack-destination ../../dist and pnpm run check:package ../../dist/openai-codex-security-0.1.16.tgz: passed, including installed imports, types, CLI startup, and a nested worker without a global Codex install.
  • A local fake API verified separate identifiers in concurrent parent and worker request bodies, client reuse, and omission. This used a compatible native build. No live model API was used.

Risk and rollout

Requires native Codex safety identifier support. The currently bundled runtime does not support this option. Use CODEX_CLI_PATH with a compatible build until the native change is released and the bundled version is updated.

The plugin must also forward CODEX_SAFETY_IDENTIFIER. The SDK does not check runtime or plugin compatibility. Older versions may omit the identifier. Preflight checks the identifier's format only; authentication is checked when the scan starts.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@ianw-oai ianw-oai changed the title [codex] Add safety identifiers to scans feat: add safety identifiers to scans Aug 21, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Aug 21, 2026
@ianw-oai
ianw-oai marked this pull request as ready for review August 22, 2026 00:19
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-08-22T00:21:56.435689Z c8c7323 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants