OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security
TypeScript ai-securityapplication-securityclicode-scanningcodexcodex-securitycybersecuritydevsecopsnodejsnpmopenaisdksecuritytypescriptvulnerability-scanning
docs: share scanner Cloud publication and recovery guidance (#2199)
Michael D'Angeloa6a25475f1a1
diff --git a/plugins/codex-security/skills/publish-findings/SKILL.md b/plugins/codex-security/skills/publish-findings/SKILL.mdindex 88762ac1d..0b1752c60 100644--- a/plugins/codex-security/skills/publish-findings/SKILL.md+++ b/plugins/codex-security/skills/publish-findings/SKILL.md@@ -146,7 +146,7 @@ Use a separate stable source key for each GitHub finding family. Code-scanning iResolve the user's destination to a connected GitHub or GitHub Enterprise repository URL or Cloud repository ID, including custom Enterprise hosts. Confirm the intended Cloud account and an authorized repository environment. Use the existing file-backed ChatGPT login; explain a missing or incompatible login rather than changing credential storage automatically.-For another Cloud deployment, read [Deployment settings](references/wiz-import.md#deployment-settings) before previewing. Keep the selected deployment and login throughout the upload.+For staging or another Cloud deployment, configure the [deployment settings](#deployment-settings) before previewing. Keep the selected deployment and login throughout the upload.### Preview and approve@@ -162,6 +162,25 @@ Obtain explicit confirmation for this concrete upload, including skipped records### Upload and report-Read [Results and recovery](references/wiz-import.md#results-and-recovery), including when the process exits nonzero. After a lost response or retryable failure, repeat the command with unchanged input and destination so the publisher resumes saved requests. A lost response does not mean nothing reached Cloud. A repository reset requires fresh discovery and confirmation before a new publication.+Read the structured result even when the process exits nonzero. Progress appears on stderr.-Report verified, unacknowledged, excluded, and failed records distinctly, retaining source IDs and recovery details. Receipts and source-record readback confirm stored vendor evidence; they do not establish a Codex assessment or visibility in the shared Cloud Findings view. Include the returned `cloudUrl` as a clickable repository link when available; do not invent a UI link from the API endpoint.+| Status | Exit code | Meaning |+| ------------- | --------- | ------------------------------------------------------- |+| `complete` | 0 | All selected records were acknowledged and read back. |+| `partial` | 1 | Some records were excluded or have final item failures. |+| `interrupted` | 2 | Upload, verification, or receipt persistence stopped. |+| `failed` | 2 | Preparation failed before upload. |++Cancellation uses the normal signal exit code. Report verified, unacknowledged, excluded, and failed records separately. Include source IDs from `failures`, any `savedSubmission` path, and recovery errors. Receipts and readback confirm stored vendor evidence. Assessment and visibility in the shared Cloud Findings view require separate verification. Link to the returned `cloudUrl` when available.++### Resume an interrupted upload++After a lost response or retryable failure, repeat the command with the same input and destination. Cloud may already have accepted some records. The publisher reuses saved request IDs and bodies, resends only requests without a saved receipt, and verifies the acknowledged records. Existing findings keep their original Cloud environment when the repository default changes.++If the repository was reset, stop and report the error. Rediscover the repository and get fresh confirmation before starting a new publication.++### Deployment settings++Set `CODEX_SECURITY_CLOUD_BASE_URL` to the deployment's API root for preview and upload. Use its login and an isolated state directory for tests. If the user or Cloud page supplies an app URL, set `CODEX_SECURITY_CLOUD_WEB_URL` to that full URL. This setting controls the returned UI link. The API root and login still determine routing and authentication.++Check the preview's `cloudApiUrl` and any `cloudUrl` against the intended API endpoint and app. Saved retries are scoped to the deployment. `CODEX_SECURITY_CLOUD_PUBLISH_URL` applies only to native scan publication. If staging is unavailable, stop before uploading.diff --git a/plugins/codex-security/skills/publish-findings/references/wiz-import.md b/plugins/codex-security/skills/publish-findings/references/wiz-import.mdindex 8da7a633b..736d7fc38 100644--- a/plugins/codex-security/skills/publish-findings/references/wiz-import.md+++ b/plugins/codex-security/skills/publish-findings/references/wiz-import.md@@ -6,6 +6,8 @@ The importer reads JSON, normalized JSONL, and the repository package-vulnerabilKeep raw source records unchanged in `source_data`. Use the vendor occurrence ID, not a rule, CVE, title, or location. Missing IDs, severity, revisions, and locations must not be invented.+For Cloud preview, approval, upload, and recovery, follow the [Cloud publication workflow](../SKILL.md#publish-to-cloud).+### Package vulnerabilitiesSupported inputs include a vulnerability finding, an array, `data.vulnerabilityFindings.nodes`, a downloaded vulnerability report, and JSONL package records. Keep `id`, `name`, `detailedName`, `vendorSeverity` (or `severity`), and `vulnerableAsset.id`, with available package and source metadata. Existing package occurrence IDs are unchanged.@@ -41,24 +43,3 @@ SAST, repository-secret, and IaC CSV reports still require a reviewed mapping of| IaC | Rule IDs/name, source range and matched content, platform, expected/actual content, file link, remediation instructions |Select source paths and line numbers explicitly for secret reports; the standard metadata query lacks them. Preserve empty IaC comparison strings. Vendor status, AI verdicts, and secret validation remain vendor evidence, not Codex assessments. An introduced commit is not a scanned revision, and a logical IaC resource does not prove runtime deployment.--## Deployment settings--For staging or another Cloud deployment, set `CODEX_SECURITY_CLOUD_BASE_URL` to its API root before preview and upload. Use that deployment's login and an isolated state directory for tests. If the user or Cloud page supplies an app URL, also set `CODEX_SECURITY_CLOUD_WEB_URL` to that full URL. This setting controls the returned UI link, not API routing or authentication.--Verify preview `cloudApiUrl` and any `cloudUrl` against the intended deployment: the former is the API endpoint, the latter the UI link. Saved retries are separated by deployment. `CODEX_SECURITY_CLOUD_PUBLISH_URL` routes native scan publication only, not vendor imports. Never fall back to production when staging is unavailable.--## Results and recovery--For Cloud publication, read the structured result even when the process exits nonzero; stderr progress does not replace it.--| Status | Exit code | Meaning |-| ------------- | --------- | ------------------------------------------------------------------------------------ |-| `complete` | 0 | All selected records were acknowledged and read back. |-| `partial` | 1 | Local exclusions or final item failures remain. |-| `interrupted` | 2 | Upload, verification, or receipt persistence stopped; acknowledged work is retained. |-| `failed` | 2 | Preparation failed before upload. |--Cancellation retains the normal signal exit code. Report `failures` by vendor source ID, distinguish `verified` from `unacknowledged`, and retain `savedSubmission` and recovery errors.--Retry with unchanged input and destination. The publisher resends only unacknowledged requests using saved IDs and bodies. Existing findings retain their original Cloud environment even if the repository default changes. After a repository reset, stop and show the error; fresh discovery and confirmation are required before a new publication.