T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/config.sh:147- Finding
AI coding and review agents execute with sandbox and approval protections disabled
- Content
View full analysis
&1 | tee -a "$log_file" ;; codex) echo "$prompt" | codex exec --dangerously-bypass-approvals-and-sandbox - 2>&1 | tee -a "$log_file" ;; aider) aider --yes --message "$prompt" 2>&1 | tee -a "$log_file" ;; esac } swarm_run_review() { local prompt_file="$1" case "$SWARM_REVIEW_AGENT" in codex) cat "$prompt_file" | codex exec review \ --dangerously-bypass-approvals-and-sandbox \ -c "model_reasoning_effort=high" - 2>&1 ;; claude) claude --dangerously-skip-permissions -p "$(cat "$prompt_file")" 2>&1 ;; none) echo "REVIEW_RESULT: PASS" echo "(review skipped)" ;; esac } ``` The unrestricted agent receives task and repository context assembled in `scripts/spawn-agent.sh:127-151`: ```bash { echo "You are working on project: ${PROJECT_NAME}" echo "Task: ${TASK_DESCRIPTION}" echo "Priority: ${PRIORITY}" echo "Working directory: ${WORKTREE}" echo "Branch: ${BRANCH_NAME}" echo "" echo "--- PROJECT CONTEXT ---" echo "${CONTEXT_SECTION}" echo "--- END CONTEXT ---" echo "" echo "Instructions:" echo "1. Read existing code carefully before making changes" echo "2. Follow existing code style and architecture" echo "3. Make clean atomic commits with clear messages" echo "4. When done: push branch to origin" echo "5. Do NOT create MR/PR — that will be handled automatically after review" ech ...[truncated 3160 chars]- Remediation
View remediation
