Skip to content

OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security

fix: allow bundled helpers to start on Windows UNC shares (#2376)

Michael D'Angeloe8d6251cbd84
diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml
index ddb1e4fba..598e7fbb1 100644
--- a/.github/workflows/node-ci.yml
+++ b/.github/workflows/node-ci.yml
@@ -577,3 +577,18 @@ jobs:
TMPDIR: ${{ steps.windows-temp.outputs.path }}
CODEX_SECURITY_ALLOW_MACHINE_POLICY_TEST: "true"
run: bun test --timeout 360000 ./tests-ts/windows-machine-policy.test.ts
+ - name: Set up Node 26 for the Windows UNC helper test
+ if: matrix.shard == 3
+ uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
+ with:
+ node-version: "26"
+ package-manager-cache: false
+ - name: Run the PowerShell scope helper over UNC on Node 26
+ if: matrix.shard == 3
+ working-directory: sdk/typescript
+ env: *windows-shard-env
+ shell: pwsh
+ run: |
+ bun -e "import { hasWindowsLoopbackShare } from './tests-ts/windows-helper-location.ts'; if (!hasWindowsLoopbackShare) throw new Error('The UNC fixture requires the loopback share')"
+ if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
+ bun test tests-ts/bind-repo-scopes.test.ts -t 'preserve unc literal paths'
diff --git a/plugins/codex-security/mcp-app/scripts/build_mcp_app.mjs b/plugins/codex-security/mcp-app/scripts/build_mcp_app.mjs
index 6b9ace9b1..82b2e33ff 100644
--- a/plugins/codex-security/mcp-app/scripts/build_mcp_app.mjs
+++ b/plugins/codex-security/mcp-app/scripts/build_mcp_app.mjs
@@ -47,6 +47,9 @@ export async function buildMcpApp({ output, native = "universal" }) {
});
await rm(mcpDir, { recursive: true, force: true });
await mkdir(mcpDir, { recursive: true });
+ // A standalone plugin can live on a UNC share. End Node's package lookup
+ // here before it probes for package.json above the share root.
+ await writeFile(join(mcpDir, "package.json"), '{"private":true}\n');
await writeRuntime("server", "main.ts");
for (const file of nativeFiles) {
diff --git a/plugins/codex-security/plugin-files.json b/plugins/codex-security/plugin-files.json
index 1329685ef..bfb747119 100644
--- a/plugins/codex-security/plugin-files.json
+++ b/plugins/codex-security/plugin-files.json
@@ -29,6 +29,7 @@
"mcp/native/linux-x64-musl/unix.node",
"mcp/native/win32-arm64/windows.node",
"mcp/native/win32-x64/windows.node",
+ "mcp/package.json",
"mcp/permission-profile-preflight.mjs",
"mcp/server.mjs",
"mcp/server.mjs.br.part-000",