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
ci: skip unrelated evals for SDK test changes (#1986)
Michael D'Angelo1b6edf84d7f8
diff --git a/.github/scripts/select-ci-checks.mjs b/.github/scripts/select-ci-checks.mjsindex 89488076f..d503bcf4f 100644--- a/.github/scripts/select-ci-checks.mjs+++ b/.github/scripts/select-ci-checks.mjs@@ -51,6 +51,8 @@ export function selectChecks(paths, { event, baseChanged = false }) {const scope = scopeFor(paths, event, baseChanged);const full = scope === "full";const source = full || scope === "source";+ const sourceBeyondSdkTests =+ full || (scope === "source" && !paths.every((path) => sdkTest.test(path)));const action =full ||paths.some(@@ -82,13 +84,14 @@ export function selectChecks(paths, { event, baseChanged = false }) {];return {"source-required": String(source),- "plugin-tests-required": String(- full ||- (scope === "source" && !paths.every((path) => sdkTest.test(path))),- ),+ "plugin-tests-required": String(sourceBeyondSdkTests),"package-required": String(source || scope === "action"),"action-ci": String(action),- "eval-contracts": String(source || scope === "evals"),+ "eval-contracts": String(+ sourceBeyondSdkTests ||+ scope === "evals" ||+ paths.includes("sdk/typescript/tests-ts/codex-dependency-pins.test.ts"),+ ),"workflow-quality": String(full),"container-validate": String(source),"compatibility-matrix": JSON.stringify({diff --git a/.github/scripts/test-ci-selection.mjs b/.github/scripts/test-ci-selection.mjsindex ac4d33e65..5ab3d7cfd 100644--- a/.github/scripts/test-ci-selection.mjs+++ b/.github/scripts/test-ci-selection.mjs@@ -255,15 +255,17 @@ test("ordinary TypeScript source and tests retain the reduced version matrices",}});-test("SDK test-only PRs keep the SDK jobs and skip independent plugin suites", () => {+test("SDK test-only PRs skip independent suites and retain any changed eval input", () => {const paths = ["sdk/typescript/tests-ts/skeleton.test.ts","sdk/typescript/tests-ts/windows-machine-policy.test.ts",];- assert.deepEqual(select(paths), {- ...regularSource,- "plugin-tests-required": "false",- });+ const sdk = { ...regularSource, "plugin-tests-required": "false" };+ assert.deepEqual(select(paths), { ...sdk, "eval-contracts": "false" });+ assert.deepEqual(+ select([...paths, "sdk/typescript/tests-ts/codex-dependency-pins.test.ts"]),+ sdk,+ );for (const other of ["README.md","sdk/typescript/tests-ts/support/test-subprocess.ts",diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.ymlindex 5c56a3c75..73ba786e3 100644--- a/.github/workflows/node-ci.yml+++ b/.github/workflows/node-ci.yml@@ -203,8 +203,7 @@ jobs:TMP: ${{ runner.temp }}TMPDIR: ${{ runner.temp }}CODEX_SECURITY_ALLOW_MACHINE_POLICY_TEST: "false"- # The separate MCP job covers Linux worker tests only when it is scheduled.- CODEX_SECURITY_TEST_MCP_WORKERS_SEPARATE: ${{ needs.classify-changes.outputs.plugin-tests-required || needs.classify-changes.outputs.source-required }}+ CODEX_SECURITY_TEST_MCP_WORKERS_SEPARATE: ${{ needs.classify-changes.outputs.plugin-tests-required }}run: node --experimental-strip-types scripts/run-ci-tests.mts ${{ matrix.shard }}/6 --seed=${{ github.run_number }} ${{ matrix.os == 'ubuntu-latest' && '--coverage --coverage-reporter=text --coverage-reporter=lcov' || '' }}- name: Upload test reportsif: always()diff --git a/docs/ci.md b/docs/ci.mdindex 52ecb8f91..85b2e8766 100644--- a/docs/ci.md+++ b/docs/ci.md@@ -34,12 +34,10 @@ installation. When selected, Python runs the full suite on 3.12 and the nativesubsets on macOS and Windows. All source changes still select containervalidation.-A PR that changes only top-level `sdk/typescript/tests-ts/*.test.ts` files runs-the same SDK shards on all three platforms and the same static, native, package,-container, and eval checks as an ordinary source PR. It skips the independent-MCP, standalone-plugin, and Python suites. Changes to a test helper, nested-fixture, or any other path alongside an SDK test use the usual source or full-route.+PRs limited to top-level `sdk/typescript/tests-ts/*.test.ts` keep all SDK+shards, static checks, native builds, packages, and containers. They skip the+plugin suites and run evals only when their `codex-dependency-pins.test.ts`+input changes. Mixed changes follow the usual source or full route.PRs limited to Action metadata, wrapper implementation, tests, npm manifests,locks, or checked-in bundles run Action CI. It verifies a clean rebuild, runs@@ -56,8 +54,7 @@ README, or to the triage eval's scripts, assertions, README, manifest or lock,run the deterministic eval job and static checks. The eval job builds the SDKand host plugin, checks the Codex version across the SDK, MCP and triagelockfiles, and runs the triage, secret-discovery, Standard time-budget and-workflow-routing suites. This job also runs on source changes, independently-of the Python matrix.+workflow-routing suites.Inputs outside these routes select full qualification, including workflow checks,containers, current Node 26, Windows Node 24 installation, and Python 3.10 and