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
test(ci): shard MCP tests with the native Node runner (#1909)
Michael D'Angelo6696705319ef
diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.ymlindex d9b2fc727..3b6907883 100644--- a/.github/workflows/node-ci.yml+++ b/.github/workflows/node-ci.yml@@ -239,10 +239,14 @@ jobs:mcp:if: needs.classify-changes.outputs.source-required == 'true'- name: MCP app tests+ name: MCP app tests (${{ matrix.shard }}/${{ strategy.job-total }})needs: [classify-changes, package]runs-on: ubuntu-latesttimeout-minutes: 20+ strategy:+ fail-fast: false+ matrix:+ shard: [1, 2, 3]steps:- *checkout-repository- &set-up-mcp-tools@@ -260,13 +264,18 @@ jobs:- name: Restore bundled pluginrun: tar -xzf dist/*.tgz --strip-components=1 -C sdk/typescript package/_bundled_plugin- name: Test MCP app- run: pnpm --dir plugins/codex-security/mcp-app run test:mcp+ working-directory: plugins/codex-security/mcp-app+ # Keep Node options before the glob; trailing shard flags run every file.+ run: >-+ node --experimental-strip-types --test --test-concurrency=2+ --test-shard=${{ matrix.shard }}/${{ strategy.job-total }}+ --test-reporter=./scripts/test_reporter.mts "tests/test_*.ts"- name: Upload MCP test reportsif: always()continue-on-error: trueuses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2with:- name: mcp-test-reports+ name: mcp-test-reports-${{ matrix.shard }}overwrite: truepath: plugins/codex-security/mcp-app/reports/junit.xmlif-no-files-found: warndiff --git a/sdk/typescript/TESTING.md b/sdk/typescript/TESTING.mdindex 0a50f9c03..491f7811b 100644--- a/sdk/typescript/TESTING.md+++ b/sdk/typescript/TESTING.md@@ -151,7 +151,9 @@ Source qualification runs the full Bun suite once per OS under Node 22: sixfile shards on Linux and macOS, and fourteen on Windows. GitHub runs the shardsas separate jobs; each job uses Bun's default serial runner. The other selectedNode versions run the installed-package checks instead of repeating the same-Bun suite. MCP and Python tests run in separate required jobs. Python uses four+Bun suite. MCP tests run in three required jobs using Node's native file sharding,+with two isolated test file processes per job. Local and release `test:mcp`+commands still run the full suite. Python tests run separately and use fourisolated pytest-xdist workers with work stealing; worker crashes fail the runwithout automatic restarts.