Skip to content

fix(runtime): support reviewed scan approval defaults - #441

Open
mldangelo-oai wants to merge 4 commits into
mainfrom
mdangelo/codex/managed-scan-approval-defaults
Open

fix(runtime): support reviewed scan approval defaults#441
mldangelo-oai wants to merge 4 commits into
mainfrom
mdangelo/codex/managed-scan-approval-defaults

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Run security scans in managed Codex environments that require automatic approval review while preserving an explicit deny-all mode.

Changes

  • Default scan execution to on-request approvals reviewed automatically by Codex.
  • Preserve the scanner-owned baseline filesystem profile, credential protections, and hardening of selected configuration profiles.
  • Honor an explicitly requested approval_policy="never", including in the selected profile, in the shared credential home, persisted runtime, saved scan recipe, and actual SDK-created scan thread.
  • Preserve the effective approval policy in saved scan recipes and keep older recipes without a saved policy on strict denial when rerun.
  • Prevent caller-provided reviewer, sandbox, or permission-profile settings from weakening scanner-owned configuration.
  • Document that automatically approved requests can receive additional operation-specific permissions and that independently enforced host and network restrictions still apply.
  • Keep standalone validation, patching, and finding comparison unchanged.

Testing

  • bun test --timeout 30000 --only-failures tests-ts/api-preflight-config.test.ts tests-ts/api.test.ts tests-ts/cli-workbench.test.ts tests-ts/config.test.ts — 175 passed, 0 failed.
  • bun test --timeout 30000 --only-failures --randomize --seed 12345 ./tests-ts — 1,141 passed, 11 skipped, 0 failed.
  • pnpm run types
  • pnpm run format
  • pnpm exec prettier --check ../../SECURITY.md
  • pnpm run build
  • Verified built-CLI dry runs at maximum reasoning effort for both the reviewed default and explicit approval_policy="never".
  • Started a real authenticated scan and verified its live session used automatic review, maximum reasoning effort, and the workspace-write sandbox without a custom Codex launcher; interrupted the smoke scan after verification.

Risk and rollout

This intentionally changes default scan approvals from deny-all to Codex automatic review. The baseline filesystem profile remains unchanged, but an approved request can grant additional permissions for its specific operation. Set --codex 'approval_policy="never"' or use a selected profile with strict denial when required. Existing saved scans without an approval policy continue to deny all requests when rerun. Standalone validation, patching, and finding-comparison commands retain their existing approval behavior.

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.

@github-actions github-actions Bot added the bug Something isn't working label Aug 15, 2026
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e4497300c

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sdk/typescript/src/api.ts Outdated
Comment thread sdk/typescript/README.md Outdated
Comment thread sdk/typescript/src/config.ts
@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: 5e4497300c

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: d40eafdc7f

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: d40eafdc7f

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: d3ed447f33

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Security review completed. No security issues were found in this pull request.

Reviewed commit: d3ed447f33

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant