Mitigate Windows GH CLI command injection

This commit is contained in:
Julius Marminge committed 2026-04-10 00:58:49 -07:00
1 parent b547fee77e
commit cc5871a8ba
2 files changed
+3 -1

No files matched your search

+1
View File
@@ -168,6 +168,7 @@ const makeGitHubCli = Effect.sync(() => {
runProcess("gh", input.args, {
cwd: input.cwd,
timeoutMs: input.timeoutMs ?? DEFAULT_TIMEOUT_MS,
shell: false,
}),
catch: (error) => normalizeGitHubCliError("execute", error),
});
+2 -1
View File
@@ -8,6 +8,7 @@ export interface ProcessRunOptions {
allowNonZeroExit?: boolean | undefined;
maxBufferBytes?: number | undefined;
outputMode?: "error" | "truncate" | undefined;
shell?: boolean | undefined;
}
export interface ProcessRunResult {
@@ -139,7 +140,7 @@ export async function runProcess(
cwd: options.cwd,
env: options.env,
stdio: "pipe",
shell: process.platform === "win32",
shell: options.shell ?? (process.platform === "win32"),
});
let stdout = "";