Mitigate Windows GH CLI command injection
This commit is contained in:
1 parent
b547fee77e
commit
cc5871a8ba
2 files changed
+3
-1
No files matched your search
@@ -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),
|
||||
});
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
Reference in new issue
Block a user