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: build the bundled plugin for rotating property tests (#2337)
Michael D'Angelod031235b91df
diff --git a/.github/workflows/test-quality.yml b/.github/workflows/test-quality.ymlindex 4a2584b85..ec2a5ef29 100644--- a/.github/workflows/test-quality.yml+++ b/.github/workflows/test-quality.yml@@ -30,8 +30,10 @@ env:jobs:native:- if: inputs.compare-layouts && !inputs.native-artifacts-ready+ if: ${{ !inputs.native-artifacts-ready }}uses: ./.github/workflows/native-artifacts.yml+ with:+ reuse-verified: ${{ !inputs.compare-layouts }}runner:needs: native@@ -97,9 +99,11 @@ jobs:uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0with:python-version: "3.12"- - name: Prepare native runtime+ - &download-native+ name: Prepare native runtimeuses: ./.github/actions/download-native- - name: Set up TypeScript tools+ - &set-up-plugin-tools+ name: Set up TypeScript toolsuses: ./.github/actions/setup-toolswith:cache-dependency-path: |@@ -109,7 +113,8 @@ jobs:uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2with:bun-version: "1.3.14"- - name: Install dependencies+ - &install-plugin-dependencies+ name: Install dependenciesshell: bashrun: |pnpm --dir sdk/typescript install --frozen-lockfile@@ -120,7 +125,8 @@ jobs:id: windows-tempshell: pwshrun: ./sdk/typescript/scripts/prepare-windows-test-root.ps1- - name: Build bundled plugin+ - &build-plugin+ name: Build bundled pluginrun: pnpm --dir sdk/typescript run build:plugin- name: Install ripgrepif: runner.os == 'Linux'@@ -144,8 +150,9 @@ jobs:retention-days: 14properties:+ needs: native+ if: ${{ !cancelled() && !inputs.compare-layouts && (inputs.native-artifacts-ready || needs.native.result == 'success') }}name: ${{ matrix.os }} / rotating properties- if: ${{ !inputs.compare-layouts }}runs-on: ${{ matrix.os }}timeout-minutes: 20env:@@ -158,13 +165,11 @@ jobs:os: [ubuntu-latest, macos-latest, windows-latest]steps:- *actions-checkout- - &set-up-sdk-tools- name: Set up TypeScript tools- uses: ./.github/actions/setup-tools+ - *download-native+ - *set-up-plugin-tools- *set-up-bun- - &install-sdk-dependencies- name: Install dependencies- run: pnpm --dir sdk/typescript install --frozen-lockfile+ - *install-plugin-dependencies+ - *build-plugin- *prepare-windows-test-root- name: Test rotating propertiesworking-directory: sdk/typescript@@ -172,9 +177,7 @@ jobs:env: *test-temprun: |git grep -lzF 'support/property' -- 'tests-ts/*.test.ts' > "$RUNNER_TEMP/property-tests"- mkdir -p reports _bundled_plugin/examples- cp -R ../../plugins/codex-security/examples/completed-scan _bundled_plugin/examples/- cp -R ../../plugins/codex-security/schemas _bundled_plugin/+ mkdir -p reportsxargs -0 bun test --timeout="$CODEX_SECURITY_TEST_TIMEOUT_MS" --seed="$CODEX_SECURITY_PROPERTY_SEED" --reporter=junit --reporter-outfile=reports/properties.xml < "$RUNNER_TEMP/property-tests"- *upload-runner-report@@ -185,8 +188,11 @@ jobs:runs-on: ubuntu-lateststeps:- *actions-checkout- - *set-up-sdk-tools- - *install-sdk-dependencies+ - name: Set up TypeScript tools+ uses: ./.github/actions/setup-tools+ - &install-sdk-dependencies+ name: Install dependencies+ run: pnpm --dir sdk/typescript install --frozen-lockfile- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2with:pattern: runner-*diff --git a/sdk/typescript/TESTING.md b/sdk/typescript/TESTING.mdindex c43b1f45f..ed1cd80ca 100644--- a/sdk/typescript/TESTING.md+++ b/sdk/typescript/TESTING.md@@ -199,9 +199,9 @@ do not. Use `python -m pytest -n 0` to reproduce Python failures serially.Each week `test-quality` runs the mutation trial on Linux. On Linux, macOS, andWindows it runs the test files that import the shared property options, using-the workflow run number as the property seed. The filesystem properties read-the plugin's checked-in schemas and example scan. Each platform uploads its JUnit-report. To replay the weekly jobs, dispatch with `compare-layouts` disabled.+the workflow run number as the property seed. The filesystem properties use the+same bundled plugin as the SDK tests to read the example scan and validate its+sealed artifacts. Each platform uploads its JUnit report. To replay the weekly jobs, dispatch with `compare-layouts` disabled.Ordinary source pull requests run focused contracts for the shard runner, timingmetadata, report comparator, and Windows test-root helper in the required SDK suite.