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(windows): keep quoted PATH fixtures independent of profile spelling (#2392)
Michael D'Angelo763b90c31b75
diff --git a/plugins/codex-security/native/proof-process-windows.mts b/plugins/codex-security/native/proof-process-windows.mtsindex 4c1e5ac15..815fc73a6 100644--- a/plugins/codex-security/native/proof-process-windows.mts+++ b/plugins/codex-security/native/proof-process-windows.mts@@ -200,7 +200,7 @@ export async function processProof(],["process-probe",- `'${quotedTools}'`,+ "'quoted;tools'",join(quotedTools, "process-probe.com"),],[diff --git a/sdk/typescript/tests-ts/inventory-input.test.ts b/sdk/typescript/tests-ts/inventory-input.test.tsindex 89fb8b80c..c5612cc9e 100644--- a/sdk/typescript/tests-ts/inventory-input.test.ts+++ b/sdk/typescript/tests-ts/inventory-input.test.ts@@ -514,7 +514,11 @@ for (const command of ["generate-in-scope-files", "make-repo-scope-input"]) {const executable = Bun.which("rg", { PATH: env[pathKey] });expect(executable).not.toBeNull();const quoted = lookup !== "extension precedence";- const tools = join(f.root, quoted ? "tools;version" : "tools");+ const quotedName =+ lookup === "double-quoted semicolon"+ ? "worker's tools;version"+ : "tools;version";+ const tools = join(f.root, quoted ? quotedName : "tools");mkdirSync(tools);// Ordinary Node lookup prefers COM; the existing raw bridge prefers EXE.const extension = !quoted && !bridge ? "com" : "exe";@@ -525,7 +529,12 @@ for (const command of ["generate-in-scope-files", "make-repo-scope-input"]) {join(tools, `rg.${extension === "com" ? "exe" : "com"}`),);const quote = lookup === "single-quoted semicolon" ? "'" : '"';- env[pathKey] = quoted ? `${quote}${tools}${quote}` : tools;+ // A single-quoted absolute path can contain a quote from the host profile.+ const entry =+ lookup === "single-quoted semicolon"+ ? relative(f.repo, tools)+ : tools;+ env[pathKey] = quoted ? `${quote}${entry}${quote}` : entry;if (bridge) {env["HOME"] = `${f.root}${sep}home-\ud800`;expect(env["HOME"].isWellFormed()).toBe(false);