Skip to content

Commit ffca62a

Browse files
Potential fix for code scanning alert no. 237: Uncontrolled command line
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 285abe4 commit ffca62a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/web-evals/src/actions/runs.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,14 @@ export async function killRun(runId: number): Promise<KillRunResult> {
158158
await sleep(10000)
159159

160160
// Step 3: Find and kill all task runner containers for THIS run only
161-
const listCommand = `docker ps --format "{{.Names}}" --filter "name=${taskPattern}"`
162161
let taskContainerNames: string[] = []
163162

164163
try {
165-
const output = execSync(listCommand, { encoding: "utf-8", timeout: 10000 })
164+
const output = execFileSync(
165+
"docker",
166+
["ps", "--format", "{{.Names}}", "--filter", `name=${taskPattern}`],
167+
{ encoding: "utf-8", timeout: 10000 }
168+
)
166169
taskContainerNames = output
167170
.split("\n")
168171
.map((name) => name.trim())

0 commit comments

Comments
 (0)