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: use one package install for SDK test-only changes (#2035)
Michael D'Angelodab30063fdb7
diff --git a/.github/scripts/select-ci-checks.mjs b/.github/scripts/select-ci-checks.mjsindex ccbe2b34e..25597c29f 100644--- a/.github/scripts/select-ci-checks.mjs+++ b/.github/scripts/select-ci-checks.mjs@@ -48,8 +48,9 @@ export function selectChecks(paths, options) {const scope = scopeFor(paths, options);const full = scope === "full" || scope === "python-tests";const source = full || scope === "source";- const sourceBeyondSdkTests =- full || (scope === "source" && !paths.every((path) => sdkTest.test(path)));+ const sdkTestsOnly =+ scope === "source" && paths.every((path) => sdkTest.test(path));+ const sourceBeyondSdkTests = source && !sdkTestsOnly;const action =full ||paths.some(@@ -96,7 +97,7 @@ export function selectChecks(paths, options) {"workflow-quality": String(full),"compatibility-matrix": JSON.stringify({include:- scope === "action"+ scope === "action" || sdkTestsOnly? [{ os: "ubuntu-latest", node: "24" }]: compatibility,}),diff --git a/.github/scripts/test-ci-selection.mjs b/.github/scripts/test-ci-selection.mjsindex 14d60f78b..b57aa521d 100644--- a/.github/scripts/test-ci-selection.mjs+++ b/.github/scripts/test-ci-selection.mjs@@ -10,6 +10,10 @@ import { failedChecks } from "./check-ci-results.mjs";const select = (paths, options = {}) =>selectChecks(paths, { event: "pull_request", ...options });+const ubuntuNode24Install = JSON.stringify({+ include: [{ os: "ubuntu-latest", node: "24" }],+});+const regularSource = {"source-required": "true","plugin-tests-required": "true",@@ -190,9 +194,7 @@ test("Action-only changes require Action CI and integration against the built pa...docs,"package-required": "true","action-ci": "true",- "compatibility-matrix": JSON.stringify({- include: [{ os: "ubuntu-latest", node: "24" }],- }),+ "compatibility-matrix": ubuntuNode24Install,};for (const paths of [["action.yml", "github-action/README.md"],@@ -272,9 +274,7 @@ test("packaged guides keep the archive and installed-package gates", () => {const expected = {...docs,"package-required": "true",- "compatibility-matrix": JSON.stringify({- include: [{ os: "ubuntu-latest", node: "24" }],- }),+ "compatibility-matrix": ubuntuNode24Install,};for (const paths of [["sdk/typescript/README.md"],@@ -326,7 +326,11 @@ test("SDK test-only PRs skip independent suites and retain any changed eval inpu"sdk/typescript/tests-ts/skeleton.test.ts","sdk/typescript/tests-ts/windows-machine-policy.test.ts",];- const sdk = { ...regularSource, "plugin-tests-required": "false" };+ const sdk = {+ ...regularSource,+ "plugin-tests-required": "false",+ "compatibility-matrix": ubuntuNode24Install,+ };assert.deepEqual(select(paths), { ...sdk, "eval-contracts": "false" });assert.deepEqual(select([...paths, "sdk/typescript/tests-ts/codex-dependency-pins.test.ts"]),diff --git a/docs/ci.md b/docs/ci.mdindex c492d9067..c8d8389ba 100644--- a/docs/ci.md+++ b/docs/ci.md@@ -39,10 +39,11 @@ installation. When selected, Python runs the full suite on 3.12 and the nativesubsets on macOS and Windows. All source changes still select containervalidation.-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 top-level `sdk/typescript/tests-ts/*.test.ts` keep all SDK shards,+static checks, native builds, packaging, and containers. These files are outside+the npm package, so one Ubuntu Node 24 install checks it and the Action adapter.+These PRs skip the plugin suites and run evals only for `codex-dependency-pins.test.ts`.+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