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: invoke trusted git absolute path during multiscan checkout (#59)

Shubham Yadav44bbc23129db
diff --git a/sdk/typescript/src/multiscan.ts b/sdk/typescript/src/multiscan.ts
index 8f68095e0..b4a0fa7a6 100644
--- a/sdk/typescript/src/multiscan.ts
+++ b/sdk/typescript/src/multiscan.ts
@@ -470,8 +470,10 @@ async function checkoutRevision(
throw new Error("Git is not available on a trusted PATH.");
}
const git = async (...args: string[]): Promise<string> => {
+ // Use the resolved absolute path so Windows PATHEXT cannot prefer a
+ // .bat/.cmd shim over the trusted executable selected above.
const result = await execFile(
- "git",
+ command.executable,
[
"-c",
"core.hooksPath=/dev/null",