T05 · Unauthorized Access and Privilege Escalation
- Location
SKILL.md:517- Finding
Agents Are Executed with Approval and Sandbox Protections Disabled
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a powerful multi-agent automation skill that is mostly coherent, but it uses unsafe default privileges, automatic Git pushes, and persistent hooks that can affect future repository work.
Review before installing. Use only in an isolated repository or disposable environment without secrets, remove the dangerous bypass flags, avoid auto-push/force-commit defaults, inspect or back up any existing Git hooks, and uninstall the post-commit hook after the workflow ends.
SKILL.md:517Agents Are Executed with Approval and Sandbox Protections Disabled
scripts/install-hooks.sh:25Persistent Git Post-Commit Hook Is Installed Without Preserving Existing Hooks
scripts/dispatch.sh:238Force-Commit Logic Can Stage and Push Secrets or Unrelated User Changes
scripts/milestone-check.sh:22Unquoted Python Heredoc Enables Local Code Injection Through Persisted Values
scripts/generate-image.sh:143Image Generation Accepts Arbitrary Output Paths and Overwrites Files
scripts/install-hooks.sh:44Persistent Hook Executes Project-Controlled Dependencies Through npx
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill's declared purpose understates several powerful actions: installing git hooks, auto-pushing to remotes, emitting events, writing signal files, and sending external notifications. In an orchestration context, these hidden operational side effects materially increase risk because a user may invoke the skill expecting coordination only, not repository mutation and outbound communications.
The skill asserts that the orchestrator must never touch project files, but later instructs it to write requirements, design, plan, and swarm prompt files under project-repo docs paths. Contradictory safety boundaries are dangerous because operators and downstream agents cannot reliably determine what writes are allowed, enabling accidental repo mutation despite a supposedly strict non-touch policy.
This dispatch example explicitly invokes an external model with --permission-mode bypassPermissions, which weakens safety boundaries for downstream agent actions. In this skill's context, that agent can be tasked with repository changes and operational workflows, so bypassing permission checks materially increases the chance of unsafe code execution or unauthorized file modification.
# Step 3: dispatch(用 --prompt-file,不用手动转义)
$SKILL_DIR/scripts/dispatch.sh cc-frontend FIX-XXX --prompt-file /tmp/fix-xxx-prompt.txt \
claude --model claude-sonnet-4-6 --permission-mode bypassPermissions \
--no-session-persistence --print --output-format json
# DEPLOY-XXX 在 FIX-XXX 完成后自动解锁为 pending;orchestrator 被事件唤醒后 dispatch DEPLOY-XXX
The cc-plan dispatch example uses an external provider with bypassPermissions, normalizing high-trust execution for planning tasks. Even planning agents in this system can access project context and produce artifacts that steer later code or deployment actions, so the unsafe default broadens systemic risk.
# Use --output-format json so parse-tokens.sh can extract usage stats from the log.
# dispatch.sh wraps the command with `tee LOG_FILE`, so LOG_FILE contains the JSON blob.
$SKILL_DIR/scripts/dispatch.sh cc-plan T000 --prompt-file "$PROMPT_FILE" \
claude --model claude-opus-4-6 --permission-mode bypassPermissions \
--no-session-persistence --print --output-format json
# cc-review / cc-frontend — sonnet
The review agent example sends code/material to an external model while bypassing permissions. Since review output can approve or reject sensitive changes, compromising safeguards here can affect integrity of the whole workflow and expose repository content to an external service.
# cc-review / cc-frontend — sonnet
$SKILL_DIR/scripts/dispatch.sh cc-review T005 --prompt-file "$PROMPT_FILE" \
claude --model claude-sonnet-4-6 --permission-mode bypassPermissions \
--no-session-persistence --print --output-format json
$SKILL_DIR/scripts/dispatch.sh cc-frontend T010 --prompt-file "$PROMPT_FILE" \
claude --model claude-sonnet-4-6 --permission-mode bypassPermissions \
The frontend agent is launched against an external provider with bypassPermissions, again setting an insecure default. Because this skill encourages automated dispatch and parallel work, unsafe provider invocation can scale mistakes across multiple tasks quickly.
claude --model claude-sonnet-4-6 --permission-mode bypassPermissions \
--no-session-persistence --print --output-format json
$SKILL_DIR/scripts/dispatch.sh cc-frontend T010 --prompt-file "$PROMPT_FILE" \
claude --model claude-sonnet-4-6 --permission-mode bypassPermissions \
--no-session-persistence --print --output-format json
# Codex — standard task (high effort, default)
The Codex example uses --dangerously-bypass-approvals-and-sandbox, explicitly disabling both approval gates and sandbox protections. In a skill that can edit repositories, run git commands, install hooks, and participate in deploy chains, this creates a direct path to unrestricted execution and filesystem/repository impact.
# Codex — standard task (high effort, default)
$SKILL_DIR/scripts/dispatch.sh codex-1 T001 --prompt-file "$PROMPT_FILE" \
codex exec -c model_reasoning_effort=high --dangerously-bypass-approvals-and-sandbox
# Codex — retry / complex task (extra-high effort)
$SKILL_DIR/scripts/dispatch.sh codex-1 T001 --prompt-file "$PROMPT_FILE" \
This retry example preserves the same dangerous bypass flags while increasing reasoning effort, which can embolden a more capable agent under fewer controls. The combination raises the potential for broad unauthorized actions if prompts are malformed or adversarially influenced.
# Codex — retry / complex task (extra-high effort)
$SKILL_DIR/scripts/dispatch.sh codex-1 T001 --prompt-file "$PROMPT_FILE" \
codex exec -c model_reasoning_effort=extra-high --dangerously-bypass-approvals-and-sandbox
# Codex — simple/boilerplate task (medium effort, faster)
$SKILL_DIR/scripts/dispatch.sh codex-1 T001 --prompt-file "$PROMPT_FILE" \
Even for 'simple' tasks, the example uses --dangerously-bypass-approvals-and-sandbox, making unsafe execution the baseline rather than an exception. Low-complexity tasks are common, so this default greatly magnifies aggregate risk across routine operations.
$SKILL_DIR/scripts/dispatch.sh codex-1 T001 --prompt-file "$PROMPT_FILE"
codex exec -c model_reasoning_effort=medium --dangerously-bypass-approvals-and-sandbox
### Read agent output
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### H4 — dispatch.sh force-commit:git add -A 有安全风险
**问题:** agent 忘记 commit 时,runner script 执行 `git add -A`,
会把 `.env`、`config/secrets.json` 等未被 .gitignore 覆盖的敏感文件一起推送到远端 repo。
**期望:** 改为 `git add -u`(只 stage 已跟踪文件的修改,不添加新文件),
避免意外推送敏感文件。force-commit 的 commit message 里注明这是 fallback。
The document promotes highest-permission agent execution with no confirmation prompts and no strong user-facing safety warning. In the context of a workflow orchestrator that can edit code, run shell commands, push commits, and deploy services, disabling confirmations removes a critical containment layer and magnifies the blast radius of prompt injection, agent mistakes, or malicious task content.
The template hardcodes an external model invocation (claude) with bypassed permissions for a task that can read repository content and later write files and push commits. In a workflow-orchestrator skill, external provider selection becomes more dangerous because it can route sensitive workspace data through another model/provider and pair that with elevated execution privileges.
claude --permission-mode bypassPermissions --no-session-persistence --print 'PROMPT'
The prompt grants unconditional repository-wide mutation and remote push capability that is not necessary for producing an analysis memo. Combined with git add -A, this can sweep unrelated changes into a commit and publish them externally, increasing the blast radius from a single document task to full-repository impact.
The template hardcodes use of an external model CLI (claude) together with bypassPermissions, encouraging offloading repository context and task execution to an external agent under reduced safeguards. In this skill context, which orchestrates coding agents and writes to the repo, that combination materially raises risk of sensitive data exposure, unreviewed code changes, and execution of unsafe instructions inherited from adversarial project content.
claude --permission-mode bypassPermissions --no-session-persistence --print 'PROMPT'
The skill hardcodes use of an external model invocation with bypassed permissions, coupling provider/tool selection to an unsafe execution posture. This is more dangerous in this skill context because the agent is framed as a writing assistant, yet it is empowered to perform privileged local actions through an external CLI without clear review boundaries.
claude --permission-mode bypassPermissions --no-session-persistence --print 'PROMPT'
The prompt claims scope is limited to output_file, but also instructs creation of image files in a sibling images/ directory and later repository-wide git operations. This contradiction weakens operator expectations and increases the chance of unintended file modification or publication outside the stated scope.
No suspicious patterns detected.