diff --git a/.github/release-notes.md b/.github/release-notes.md index 3dea8f1e79..668e3f4a9e 100644 --- a/.github/release-notes.md +++ b/.github/release-notes.md @@ -1,42 +1,90 @@ - + ## Highlights -Codex Security 0.4.0 adds hosted Standard scan execution and improves token -accounting, bulk-scan recovery, and report formatting. The minor version marks -the removal of obsolete ranking helpers; direct helper users should follow the -migration guidance below. - -- Hosts can run Standard repository or path scans through the TypeScript - `runHostedScan(input, { executor, signal, onEvent })` API or the - `codex-security scan --host` JSON-RPC adapter. Hosted execution is opt-in and - requires a host-provided executor, frozen checkout, and explicit model and - storage settings. Hosts own authorization, cancellation, and durable execution - state. See the [hosted scan guide](https://github.com/openai/codex-security/blob/npm-v0.4.0/sdk/typescript/docs/hosted-scans.md). - ([#1559](https://github.com/openai/codex-security/pull/1559)) -- Scan token totals include recorded usage from earlier Deep Scan worker - attempts and context compaction without counting resumed history twice. - The SDK and compatible hosts can finish accounting for the final response - after report generation. Missing records remain marked incomplete or - unavailable rather than being presented as an exact total. - ([#1657](https://github.com/openai/codex-security/pull/1657)) -- Bulk scans preserve successful results and original scan failures when - temporary-checkout cleanup fails. Cleanup errors are reported separately, and - reusing a completed scan can retry its recorded cleanup without another scan. - ([#1433](https://github.com/openai/codex-security/pull/1433)) -- Reports render malformed evidence ranges as a valid single line or just the - path. Finding text beginning with tilde fences or parenthesized list markers - no longer changes the formatting of surrounding report sections. These fixes - preserve the underlying findings. - ([#1656](https://github.com/openai/codex-security/pull/1656), - [#1604](https://github.com/openai/codex-security/pull/1604)) -- The package includes Codex CLI/SDK 0.163.0 and restores the **Codex Security** - display name in plugin listings, prompts, and tool labels. The npm package - remains `@openai/codex-security`, with the `cs` and `codex-security` commands. - ([#1670](https://github.com/openai/codex-security/pull/1670), - [#1681](https://github.com/openai/codex-security/pull/1681)) +Codex Security 0.5.0 adds investigation time budgets, host-provided finding +reviews, and more inference provider options. It also improves saved finding +evidence, usage reporting, and recovery after interrupted scans and publication. +The minor version marks the retirement of advisory capability preflight; +custom integrations should follow the migration guidance below. + +- Set an investigation allowance with `codex-security scan . --max-time 15`, + SDK `maxTimeMinutes`, or project setting `scan.max_time_minutes`. Values are + positive minutes, including fractions. Standard and diff scans treat the + allowance as advisory; Deep Scan enforces it for discovery, then combines + completed findings. Reporting can continue beyond the deadline. See the + [time-budget guide](https://github.com/openai/codex-security/blob/npm-v0.5.0/sdk/typescript/docs/cli.md#set-investigation-time). + ([#1674](https://github.com/openai/codex-security/pull/1674)) +- Hosts can validate findings against source with `codex-security validate --records` + and `validateRecords()`, or classify canonical reports against a supplied + severity rubric with `codex-security classify-severity --records` and + `classifySeverityRecords()`. Both use host-provided model execution; + classification requires no repository or saved scan. See the + [validation guide](https://github.com/openai/codex-security/blob/npm-v0.5.0/sdk/typescript/docs/validate-records.md) + and [classification guide](https://github.com/openai/codex-security/blob/npm-v0.5.0/sdk/typescript/docs/classify-severity-records.md) + for input contracts and host responsibilities. + ([#1682](https://github.com/openai/codex-security/pull/1682), + [#1662](https://github.com/openai/codex-security/pull/1662)) +- Scans support Cheaper Inference through `--provider cheaperinference`, an + explicit model, and `CHEAPER_INFERENCE_API_KEY`. The GitHub Action adds a + `provider` input for Amazon Bedrock, OpenRouter, and Fireworks alongside the + default OpenAI provider; non-OpenAI providers require an explicit model and + the selected provider's credentials. See the + [CLI provider documentation](https://github.com/openai/codex-security/blob/npm-v0.5.0/sdk/typescript/docs/cli.md) + and [Action setup guide](https://github.com/openai/codex-security/blob/npm-v0.5.0/github-action/README.md#inference-providers). + ([#1623](https://github.com/openai/codex-security/pull/1623), + [#1677](https://github.com/openai/codex-security/pull/1677)) +- Hosted scans pass `reasoningEffort` strings through to the executor, including + `max` and future values supported by the selected model or provider. The + GitHub Action's `effort` input also accepts provider-supported strings and + retains its `xhigh` default. Deep Scan forwards resolved native settings to + fresh and resumed workers while retaining worker-specific permissions. + ([#1712](https://github.com/openai/codex-security/pull/1712), + [#1717](https://github.com/openai/codex-security/pull/1717)) +- Standard and diff scans use available workers and continue review in the + parent when delegation is unavailable. Optional worker or goal-tool + availability no longer depends on the removed capability registry. + ([#1609](https://github.com/openai/codex-security/pull/1609)) +- Patching and fix verification use complete sealed findings from saved scans, + preserving current triage and remediation state. Workbench excerpts stay + tied to the source and scope of the saved scan, and publishing older findings + preserves their historical root-cause details and code evidence. + ([#1608](https://github.com/openai/codex-security/pull/1608), + [#488](https://github.com/openai/codex-security/pull/488), + [#1756](https://github.com/openai/codex-security/pull/1756)) +- Usage reporting distinguishes recorded tokens from missing worker receipts + or unfinished turns. Partial totals display as "at least X tokens; some usage + unavailable." Saved scan history includes parent/worker totals and + measurement times alongside cost estimates; historical account-limit readings + are not a live allowance check. See + [progress and cost](https://github.com/openai/codex-security/blob/npm-v0.5.0/sdk/typescript/docs/cli.md#progress-and-cost). + ([#1640](https://github.com/openai/codex-security/pull/1640)) +- Bulk-scan recovery validates completed artifacts before reusing them and + preserves interrupted receipt bytes. Parallel workers serialize receipt + writes, and publication replaces its latest receipt atomically. Completed + Linear publication results remain available after late cancellation during + a failed final receipt write. + ([#1720](https://github.com/openai/codex-security/pull/1720), + [#1748](https://github.com/openai/codex-security/pull/1748), + [#1735](https://github.com/openai/codex-security/pull/1735), + [#1738](https://github.com/openai/codex-security/pull/1738), + [#1725](https://github.com/openai/codex-security/pull/1725)) +- Matching GitHub Action distributions publish their manifest, SBOM, and full + distribution commit SHA in a companion `action-vX.Y.Z` release. Artifact + upload failures propagate the original stream error and cancel active streams. + ([#1711](https://github.com/openai/codex-security/pull/1711), + [#1671](https://github.com/openai/codex-security/pull/1671)) +- Failed or canceled `dedupe --json --full-output` commands no longer print a + false success envelope. Diff scans handle root commits in SHA-256 + repositories and read blobs with Git versions older than 2.38. + ([#1071](https://github.com/openai/codex-security/pull/1071), + [#1716](https://github.com/openai/codex-security/pull/1716), + [#1715](https://github.com/openai/codex-security/pull/1715)) +- DOCX knowledge-base extraction excludes deleted revisions and field + instructions while preserving visible field results. + ([#1714](https://github.com/openai/codex-security/pull/1714)) @@ -44,41 +92,90 @@ migration guidance below. ## Upgrade notes -### Scripts and custom workflows that invoke ranking helpers - -The following plugin helper commands are removed: - -- `make-repo-rank-input` and `select-deep-review-input` -- `make-rank-shards`, `validate-rank-shard`, and `merge-rank-outputs` -- `make-rank-pool-plan`, `validate-rank-worker`, and `validate-rank-pool` - -Remove the ranking, shard/pool scheduling, and ranked-selection stages from -custom workflows. Generate the scoped inventory and review every selected file: - -1. For explicit repository scopes, use - `scripts/generate_rank_input.py make-repo-scope-input --repo --scopes-file --out ` - with your Python interpreter and the script from the installed plugin. - The scopes file is a JSON array, such as `["src", "tests"]`; use `["."]` - for the whole repository instead of the old default `--scope .`. - Output rows contain only `path`, for example `{"path":"src/example.ts"}`. - Update your consumer to resolve each path against the repository root and - read that file directly. If it requires a `path`/`area` review worklist, - convert every row to `{"path":"src/example.ts","area":"repository"}`. - This inventory contains no `area` or `preview` fields and cannot be passed - directly to `copy-deep-review-input`. -2. For Git diffs, retain `make-diff-rank-input` with its existing revision or - local-patch arguments. Copy all candidate rows into the review worklist with - `scripts/launch_codex_security_mcp --helper copy-deep-review-input --rank-input --out `. - On Windows, use the `.cmd` launcher. -3. Review the entire resulting worklist instead of selecting a ranked subset. - `bind-repo-scopes` and the retained diff helpers keep their existing - arguments and worklist formats. - -See the [scoped review reference](https://github.com/openai/codex-security/blob/npm-v0.4.0/plugins/codex-security/skills/security-scan/references/scan-artifacts-and-ledger.md#scoped-deep-review) -for commands, scope inputs, and Windows invocation details. -([#1607](https://github.com/openai/codex-security/pull/1607)) - -Normal CLI and SDK scans do not need this helper migration. Hosted execution is -opt-in; existing local scans continue to use their current execution path. +### Investigation time settings + +Prefer the new minute-based settings for Standard, diff, and Deep scans. For +existing Deep Scan configurations, convert hours to minutes: + +| Previous setting | Preferred setting | +| ------------------------------------- | ------------------------------------ | +| `--max-time-hours 2` | `--max-time 120` | +| SDK `maxTimeHours: 2` | SDK `maxTimeMinutes: 120` | +| Project `scan.deep.max_time_hours: 2` | Project `scan.max_time_minutes: 120` | + +The hour-based settings, including legacy TOML `deep_scan.max_time_hours`, remain +accepted as deprecated Deep-only aliases. Explicit settings override +lower-priority configuration across units. At the winning configuration source, +equivalent durations are accepted; conflicting minute/hour values are errors. + +Standard scans still have no time allowance by default. An allowance is neither +a hard timeout nor a minimum runtime. Deep Scan's default and maximum discovery +duration remain 5760 minutes (96 hours). Resuming Deep Scan retains its original +deadline; rerunning starts a new allowance. For batch and component scans, +project time settings apply separately to each scan attempt, not the campaign +as a whole. See the +[time-budget guide](https://github.com/openai/codex-security/blob/npm-v0.5.0/sdk/typescript/docs/cli.md#set-investigation-time). +([#1674](https://github.com/openai/codex-security/pull/1674)) + +### Saved scan evidence and recovery + +Keep the complete sealed artifacts with saved scans used for patching or fix +verification. Missing or mismatched evidence now stops those tasks instead of +passing a shortened preview to the model. Bulk-scan resume validates saved +contracts and seals before reusing a completed result; invalid or unsuccessful +results start a new attempt while preserving the old artifacts. +([#1608](https://github.com/openai/codex-security/pull/1608), +[#1720](https://github.com/openai/codex-security/pull/1720)) + +### GitHub Action release assets + +If automation downloads the Action manifest or SBOM from an `npm-vX.Y.Z` +release, switch those downloads to the matching `action-vX.Y.Z` release. The npm +release remains the canonical changelog and Latest release; Action version tags +and workflow usage syntax are unchanged. See the +[Action release documentation](https://github.com/openai/codex-security/blob/npm-v0.5.0/github-action/README.md#development). +([#1711](https://github.com/openai/codex-security/pull/1711)) + +### Custom capability-preflight integrations + +The plugin's `scripts/config_preflight.py` helper and +`preflight/capability-profiles.toml` registry are removed. Custom capability +registries and helper-derived progress inputs and events are no longer supported. +Update integrations as follows: + +1. Remove helper invocations, custom-registry arguments, and gates that wait for + a helper `ready` result. Replace references to `config-preflight.md` and + `desktop-config-preflight.md` with the + [scan runtime guidance](https://github.com/openai/codex-security/blob/npm-v0.5.0/plugins/codex-security/references/scan-runtime.md). + Use available delegation tools and successful spawn results; continue in the + parent when workers cannot start. Do not edit persistent configuration to + enable optional workers or goal tools. +2. Remove `kind: "preflight"` handling from `onWorkerStatus` consumers, + including reads of `delegation` and `configuredSlots`, and stop waiting for + the CLI's `worker.preflight` diagnostic. `onWorkerStatus` still emits + `kind: "dispatch"` with `phase`, `planned`, and `started`. These counts are + best-effort model reports; a missing event does not prove no worker ran. +3. Stop sending `preflightChecks` to + `update_codex_security_scan_progress` and remove the workbench arguments + `--preflight-issues-json` and `--preflight-issues-json-stdin`. For host-backed + Standard and diff scans, use the authoritative scan context and advance to + `threat_model` before architecture mapping. Deep Scan's coordinator continues + to own its setup and progress. + +Saved preflight history remains readable, and the scan lifecycle still includes +a `preflight` phase. Local SDK `preflight()` input checks, authentication, +sandbox enforcement, and Deep worker configuration remain in effect. Normal +CLI and SDK scans need no capability-preflight configuration migration. +([#1609](https://github.com/openai/codex-security/pull/1609)) + +### Selected-profile approval policy + +An explicitly selected Codex profile's `approval_policy` now takes precedence +over the root policy. If you previously relied on a root `never` policy despite +a selected profile specifying `on-request`, set the selected profile's policy +to `never` to continue denying permission requests. An absent or null profile +policy still inherits the root value; Deep Scan workers retain their explicit +`never` policy. +([#530](https://github.com/openai/codex-security/pull/530)) diff --git a/.github/release-pr-state.json b/.github/release-pr-state.json index b7a1ea80c1..1d57b2fed5 100644 --- a/.github/release-pr-state.json +++ b/.github/release-pr-state.json @@ -1,13 +1,13 @@ { - "baseVersion": "0.3.0", - "baseCommit": "5c5239dd8062a7d00916c4bc0d5aeaa3ed0c5477", + "baseVersion": "0.4.0", + "baseCommit": "559b492b22bb457aea8ff88c1bd41aacc2cec8bf", "sections": { "highlights": { - "generatedHash": "ed7fb1027c60901424f054c5b4b1e7ee19485193f00d37e2ae74f3fb4ba6f2bb", + "generatedHash": "07952b04e16a367470314af7e5b21770c4eba8b5b18088876541aaca543f61ec", "humanOwned": true }, "upgrades": { - "generatedHash": "1b370c365d6e8307d660a71b96785ce8cd8d046a893dc4c3dacc37da4d85e27e", + "generatedHash": "afb441fc0f198f1c8bca468973660604d67d352a9a95c307afe16367cbb9279a", "humanOwned": true } } diff --git a/examples/github-actions/codex-security.yml b/examples/github-actions/codex-security.yml index 46a20a5675..728d6e1aea 100644 --- a/examples/github-actions/codex-security.yml +++ b/examples/github-actions/codex-security.yml @@ -32,7 +32,7 @@ jobs: security-events: write actions: read env: - CODEX_SECURITY_VERSION: "0.3.0" + CODEX_SECURITY_VERSION: "0.5.0" BEDROCK_MODEL_ID: ${{ vars.BEDROCK_MODEL_ID }} # Report-only by default. Set to "high" to fail on high/critical findings. FAIL_ON_SEVERITY: "" diff --git a/github-action/package-lock.json b/github-action/package-lock.json index 56eb19d4c3..2dcdceccd5 100644 --- a/github-action/package-lock.json +++ b/github-action/package-lock.json @@ -1,12 +1,12 @@ { "name": "codex-security-action", - "version": "0.4.0", + "version": "0.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "codex-security-action", - "version": "0.4.0", + "version": "0.5.0", "dependencies": { "@actions/artifact": "6.3.1", "@actions/core": "3.0.1", diff --git a/github-action/package.json b/github-action/package.json index 6bc609f7d7..ea88a0c842 100644 --- a/github-action/package.json +++ b/github-action/package.json @@ -1,6 +1,6 @@ { "name": "codex-security-action", - "version": "0.4.0", + "version": "0.5.0", "private": true, "type": "module", "description": "Run Codex Security in GitHub Actions with explicit scope, budgets, and scan health reporting", diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json index 2a45bcc74b..a9b26edda2 100644 --- a/sdk/typescript/package.json +++ b/sdk/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@openai/codex-security", - "version": "0.4.0", + "version": "0.5.0", "description": "TypeScript SDK and CLI for Codex Security", "license": "Apache-2.0", "author": "OpenAI",