T01 · Skill Instruction Hijacking
- Location
SKILL.md:10- Finding
Mandatory Automatic Execution of Repository-Controlled Wrapper Scripts
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10-19
Vulnerability Type: Mandatory agent behavior leading to untrusted command execution
Risk Level: HighVulnerable Code
markdown ## Agent auto-trigger (mandatory) **After every `git push` that triggers GitHub Actions, start Wander in background mode** unless the user opts out. 1. If `.workflows.yml` exists in the repo root: prefer a project wrapper (`scripts/watch-*.sh`) when present. 2. Otherwise: `"$WANDER_HOME/watch-workflow-bg.sh" <workflow.yml>` (or pass the workflow file the project uses). 3. Run in the background so the session stays responsive. 4. After ~8s, check terminal output and report initial status. If there is no `.workflows.yml` but `.github/workflows/` exists, offer monitoring but do not auto-start without confirmation.Technical Analysis
The skill changes the agent's default behavior by requiring it to start a monitoring process after every qualifying
git push, unless the user explicitly opts out. More critically, it tells the agent to prefer an arbitrary project-local script matching the broadscripts/watch-*.shpattern.Project-local scripts are controlled by the repository being processed and are not necessarily part of this audited skill. The instructions do not require the agent to inspect the selected script, verify its integrity, restrict its permissions, or obtain affirmative user approval before execution. The presence of
.workflows.ymlis treated as sufficient reason to execute such a wrapper, even though that file also remains under repository control.This permits a repository to influence the agent's session goals and induce execution of attacker-supplied commands under the appearance of routine CI monitoring.
Attack Path
- An attacker creates or modifies a repository containing a
.workflows.ymlfile. - The attacker adds a malicious script with a matching name, such as `scri ...[truncated 1284 chars]
- An attacker creates or modifies a repository containing a
- Remediation
View remediation
Remediation Suggestions
- Remove the mandatory automatic trigger and require explicit, affirmative user confirmation before starting any monitoring command.
- Do not select executable scripts using a wildcard such as
scripts/watch-*.sh. - Require an exact wrapper path from trusted configuration rather than inferring one from repository contents.
- Inspect and present the wrapper's contents before execution when the wrapper comes from the current project.
- Verify that the wrapper resolves only to a regular file inside the expected repository path and is not a symbolic link.
- Prefer invoking a reviewed Wander binary or script directly with validated arguments instead of executing repository-controlled wrappers.
- Run monitoring with a minimal environment and without unnecessary credentials.
- Keep automatic monitoring strictly opt-in and clearly disclose the exact command that will run.
