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(examples): describe automatic sample PR scans (#1183)

mldangelo-oaie4e4ba507fbd
diff --git a/examples/invoice-desk/README.md b/examples/invoice-desk/README.md
index 9af97a852..9d68a68c0 100644
--- a/examples/invoice-desk/README.md
+++ b/examples/invoice-desk/README.md
@@ -52,23 +52,25 @@ installing dependencies.
The [Invoice Desk workflow](../../.github/workflows/invoice-desk.yml) runs behavior
tests on PRs targeting `main`, including drafts and forks, regardless of which
files changed. A separate [OpenAI scan workflow](../../.github/workflows/invoice-desk-scan.yml)
-scans the entire application at the PR's exact head, subject to protected
-environment approval. Failed behavior tests do not suppress a scan.
+scans the entire application at the PR's exact head. Scans run automatically
+without a manual approval step. Failed behavior tests do not suppress a scan.
### Setup
Both workflows must be on `main` before automatic scans can run. Configure the
-`invoice-desk-inference` environment with required reviewers and a deployment
-branch rule allowing only protected `main`. Store a dedicated service-account
-key in its `OPENAI_API_KEY` environment secret, with access to `gpt-5.6-sol` and
-permission to use the API from the selected runner's network. Creating a service
-account alone does not grant that network access. Do not use a repository or
-organization Actions secret for this workflow. A missing key fails the scan
-with a setup error.
-
-Review the source commit before approving inference. Behavior tests receive no
-inference credentials; GitHub may separately require approval to run them for a
-first-time contributor.
+`invoice-desk-inference` environment without required reviewers or a wait timer,
+and with a deployment branch rule allowing only protected `main`. Store a
+dedicated service-account key in its `OPENAI_API_KEY` environment secret, with
+access to `gpt-5.6-sol` and permission to use the API from the selected runner's
+network. Creating a service account alone does not grant that network access.
+Do not use a repository or organization Actions secret for this workflow. A
+missing key fails the scan with a setup error.
+
+The workflow on protected `main` selects and extracts the exact PR source before
+inference. Behavior tests receive no inference credentials; GitHub may separately
+require approval to run them for a first-time contributor. Adding required
+reviewers to the inference environment makes every scan wait for approval and
+disables unattended scanning.
For a manual baseline, select **Actions → Invoice Desk OpenAI scan → Run
workflow** on `main` and leave both inputs empty. To scan an open PR, provide its
@@ -97,12 +99,12 @@ avoid rescanning an unchanged revision.
If GitHub suppresses the target event and no behavior workflow completes,
automatic scanning cannot start. Use the manual PR dispatch above with the current
-head SHA; the same protected workflow and approval checks apply.
+head SHA; the same protected workflow and source checks apply.
The scan checks the PR's base and exact head through GitHub's API before queuing
-and again after environment approval, immediately before inference. Closed,
-retargeted, and superseded PR revisions are skipped. Repeated scans of the same PR
-revision cancel older runs of that revision. A scan that has already started
+and again immediately before inference. Closed, retargeted, and superseded PR
+revisions are skipped. Repeated scans of the same PR revision cancel older runs
+of that revision. A scan that has already started
inference may finish after the PR head changes; its reports identify the source SHA.
The workflow installs the CLI outside the checkout and copies committed `app/`
@@ -161,10 +163,10 @@ so cache availability is a performance signal, not a pass/fail condition.
### Establishing the first baseline
-After merging this setup, run a main baseline, approve the protected environment,
-and inspect the completed reports. Run the same revision again to verify a cache
-hit and compare elapsed time and token use. Then use an ordinary PR to verify the
-automatic dispatcher and the reported source SHA.
+After merging this setup, run a main baseline and inspect the completed reports.
+Run the same revision again to verify a cache hit and compare elapsed time and
+token use. Then use an ordinary PR to verify the automatic dispatcher and the
+reported source SHA.
Review actual findings against the ten root causes in the QA manifest. Record
matched cases, misses, uncertain cases, duplicates, and additional findings;