-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Labels
in-progressIssue is being actively worked onIssue is being actively worked onsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processing
Description
Security Issue
Severity: HIGH
File: .claude/skills/setup-agent-team/security.sh:296
Reporter: security/shell-scanner
Vulnerability
Unquoted variable expansion of CLAUDE_MODEL_FLAG on line 296:
claude -p "$(cat "${PROMPT_FILE}")" ${CLAUDE_MODEL_FLAG} >> "${LOG_FILE}" 2>&1 &When RUN_MODE="triage", this sets:
CLAUDE_MODEL_FLAG="--model google/gemini-3-flash-preview"Attack Vector
The unquoted expansion is vulnerable to word-splitting. While the current value doesn't exploit this, the pattern is unsafe:
- If
CLAUDE_MODEL_FLAGis empty, the unquoted expansion passes nothing (correct behavior) - If
CLAUDE_MODEL_FLAGcontains spaces, each word becomes a separate argument - A malicious model name could inject additional claude arguments
Recommended Fix
Option 1: Use conditional expansion with quoting (safe for empty values):
claude -p "$(cat "${PROMPT_FILE}")" ${CLAUDE_MODEL_FLAG:+"${CLAUDE_MODEL_FLAG}"} >> "${LOG_FILE}" 2>&1 &Option 2 (preferred): Use an array for args:
CLAUDE_MODEL_ARGS=()
if [[ "${RUN_MODE}" == "triage" ]]; then
CLAUDE_MODEL_ARGS=(--model google/gemini-3-flash-preview)
fi
claude -p "$(cat "${PROMPT_FILE}")" "${CLAUDE_MODEL_ARGS[@]}" >> "${LOG_FILE}" 2>&1 &Related Issues
- security: Unquoted variable expansion in qa.sh and security.sh CLAUDE_MODEL_FLAG #2698 (closed) - Similar issue in qa.sh and security.sh, but fix was not applied to current line 296
Note
This file is in .claude/skills/setup-agent-team/ (bot infrastructure), which is off-limits for automated refactoring per CLAUDE.md. Manual maintainer fix required.
Filed automatically by security/shell-scanner team
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in-progressIssue is being actively worked onIssue is being actively worked onsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processing