Back to skill

Security audit

Preqstation

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real coding-task delegator, but it defaults to broad triggering and sandbox-disabled local command execution that users should review carefully before installing.

Install only if you intentionally want this skill to start local coding-agent CLIs that can modify mapped repositories and run in the background. Before use, require an explicit invocation, confirm the resolved project path, branch, worktree, engine, and execution mode, and avoid sandbox-disabled execution unless the workspace and agent inputs are trusted.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:178
Finding
Shell Command Injection Through Unescaped Prompt and Branch Interpolation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 178-215 **Vulnerability Type**: Shell command injection **Risk Level**: Critical ### Vulnerable Code ```text Task ID: <task or N/A> Project Key: <project key or N/A> Branch Name: <branch_name or N/A> User Objective: <objective> Execution Requirements: 1) Work only inside <cwd>. 2) Complete the requested work. 3) Use branch <branch_name> for commits/pushes when provided. 4) After completion, return a short completion summary. ``` ```bash bash pty:true workdir:<cwd> command:"claude --dangerously-skip-permissions '<rendered_prompt>'" ``` ```bash bash pty:true workdir:<cwd> command:"codex exec --dangerously-bypass-approvals-and-sandbox '<rendered_prompt>'" ``` ```bash bash pty:true workdir:<cwd> command:"GEMINI_SANDBOX=false gemini -p '<rendered_prompt>'" ``` ### Technical Analysis The skill inserts the user-controlled objective and partially user-controlled branch name into `<rendered_prompt>`, then embeds that prompt inside a single-quoted shell argument. It does not specify any escaping or argument-safe process execution. A single quote in the objective can terminate the shell argument. Subsequent text is then interpreted by the shell rather than passed to the coding agent. The same general risk affects other interpolated values, including branch names and paths, where placeholders are inserted into shell command strings without robust quoting. The branch-name checks only reject `..`, a leading slash, and an empty value. They do not constitute shell metacharacter validation and are not a substitute for avoiding shell interpolation. This issue is especially severe because all documented engine invocations disable their respective permission or sandbox controls. ### Attack Path 1. An attacker supplies a PREQSTATION task whose objective contains a quote followed by shell syntax, for example: ```text preq: update documentation'; id > /tmp/preqstation-proof; # ``` 2. The ski ...[truncated 1288 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not construct commands by concatenating user-controlled values into a shell string. 2. Invoke each engine through an argument-vector API, for example by passing the executable and each argument as separate values without `bash -c`. 3. If the platform only supports shell command strings, apply a proven POSIX shell-escaping routine independently to every dynamic argument. Do not implement escaping through simple quote replacement. 4. Pass long prompts through standard input or a securely created prompt file rather than embedding them in command text. 5. Validate branch names with `git check-ref-format --branch` and restrict them to a conservative allowlist such as letters, digits, `/`, `_`, `.`, and `-`. 6. Canonicalize and validate every filesystem path before use. Ensure the resulting worktree remains beneath the configured worktree root. 7. Add regression tests covering single quotes, command substitutions, backticks, semicolons, newlines, redirections, and shell operators in objectives, branch names, project keys, and paths. 8. Restore sandboxing and approval controls so a quoting defect cannot immediately become unrestricted host command execution. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:193
Finding
Mandatory Disabling of Coding-Agent Permission and Sandbox Controls<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 193-215 **Vulnerability Type**: Least-privilege violation and sandbox bypass **Risk Level**: High ### Vulnerable Code ```markdown Why `dangerously-*` flags are retained: - This skill targets non-interactive PTY/background execution. - Permission prompts can block unattended runs; these flags avoid that blocking behavior. - These flags are allowed only after passing the required safety gates above and only in resolved task worktrees. - If your environment does not allow these flags, fail fast with a short reason instead of silently falling back. ``` ```bash bash pty:true workdir:<cwd> command:"claude --dangerously-skip-permissions '<rendered_prompt>'" ``` ```bash bash pty:true workdir:<cwd> command:"codex exec --dangerously-bypass-approvals-and-sandbox '<rendered_prompt>'" ``` ```bash bash pty:true workdir:<cwd> command:"GEMINI_SANDBOX=false gemini -p '<rendered_prompt>'" ``` ### Technical Analysis The skill deliberately and systematically disables the security boundaries of every supported coding engine: - Claude permission checks are skipped. - Codex approvals and sandboxing are bypassed. - Gemini sandboxing is disabled. The documented safeguards—using a worktree, setting a working directory, and telling the agent to work only inside that directory—are procedural instructions, not operating-system enforcement. A process started in a worktree can still access other files, environment variables, credentials, network resources, and executables available to the parent user. The user objective is supplied to a general-purpose coding agent and may contain adversarial instructions. Repository content in the worktree can also contain prompt-injection material that the coding agent may follow. With permission controls disabled, either input source can cause effects outside the legitimate task scope without an approval checkpoint. ### Attack Path 1. A user requests a coding task, or an a ...[truncated 1406 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `--dangerously-skip-permissions`, `--dangerously-bypass-approvals-and-sandbox`, and `GEMINI_SANDBOX=false` from the default commands. 2. Run engines with their standard sandbox and approval mechanisms enabled. 3. If unattended execution is required, use a narrowly scoped allowlist for necessary operations rather than globally bypassing controls. 4. Execute coding agents in an operating-system-enforced container, namespace, VM, or restricted service account. 5. Mount only the task worktree into the execution environment and make unrelated host directories inaccessible. 6. Exclude SSH agents, cloud credentials, API tokens, and unrelated environment variables from the agent process. 7. Restrict outbound networking by default and explicitly allow only task-required destinations. 8. Require explicit, informed user confirmation for exceptional sandbox-disabled operation, with a clear statement of the resulting host-access risk. 9. Apply resource limits and preserve auditable logs of commands, file accesses, and approval decisions. ]]>

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:11
Finding
Overbroad Highest-Priority Trigger Can Hijack Unrelated Request Routing<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 11-21 **Vulnerability Type**: Skill instruction and routing hijacking **Risk Level**: Medium ### Vulnerable Code ```markdown ## Trigger / NOT for Trigger this skill with highest priority when the message contains any of: - `/skill preqstation` - `preqstation` - `preq` Do NOT use this skill for: - simple one-line manual edits that can be handled directly - read-only file inspection or explanation without execution - any coding-agent launch inside `~/clawd/` or `~/.openclaw/` ``` ### Technical Analysis The skill claims the highest routing priority whenever a message contains the short substring `preq`. The trigger is not defined as an exact command, isolated token, or verified task intent. Consequently, incidental occurrences in unrelated text can activate this skill and displace the agent's normal routing or safety-oriented workflow. This is particularly risky because the selected skill is designed to create Git worktrees and launch local coding agents. Its output policy also directs the agent to return only a short completion summary, potentially suppressing contextual warnings or normal response behavior. The exclusions reduce some accidental activation but do not resolve the fundamental ambiguity between the broad highest-priority trigger and actual PREQSTATION execution intent. ### Attack Path 1. A message contains `preq` incidentally, within quoted text, repository content, or an unrelated discussion. 2. The highest-priority trigger causes this skill to be selected over a more appropriate skill or ordinary response path. 3. If the request is interpreted as coding work, the skill resolves a workspace, creates a worktree, and launches a local coding agent. 4. The launched engine follows the PREQSTATION execution template rather than the user's intended workflow. 5. Combined with the sandbox-disabled commands, incorrect routing may result in unintended host-side actions. An att ...[truncated 815 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Reserve highest-priority activation for an exact command such as `/skill preqstation`. 2. Treat `preqstation` and `preq` as standalone, case-normalized tokens rather than arbitrary substrings. 3. Require clear execution intent in addition to the project keyword, such as an explicit request to implement, modify, test, or run code. 4. Do not activate for quoted material, repository excerpts, read-only questions, or discussions about the skill itself. 5. Before creating a worktree or starting an engine, present the resolved engine, repository, branch, and objective and require confirmation when activation was implicit. 6. Remove the instruction that the skill always receives highest priority; allow platform-level routing and safety policies to take precedence. 7. Add negative trigger tests covering incidental substring matches and unrelated requests. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Vague Triggers

Medium
Confidence
94% confidence
Finding
The README directs activation through broad natural-language cues such as 'just talk to OpenClaw' and prioritizing the skill whenever a message includes 'preq' or 'preqstation'. Because this skill launches coding-agent CLIs, creates worktrees, and defaults to background execution, loose matching can cause unintended invocation from ambiguous user text and trigger code-running workflows without sufficiently explicit user consent.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill defaults to creating per-task git worktrees and launching engine commands with pty/background execution, but the description does not clearly warn users that code may begin running asynchronously in a derived workspace. This creates a transparency and consent problem: users may believe they are requesting ordinary assistance while the skill initiates longer-lived execution sessions that can modify code or consume resources outside the immediate conversational turn.

Session Persistence

Medium
Category
Rogue Agent
Content
2. Respect the engine the user requested. If unspecified, default to `claude`.
3. Do not kill sessions only because they are slow; poll/log first.
4. Never launch coding agents in `~/clawd/` or `~/.openclaw/`.
5. Treat resolved project path as a primary checkout source only; create a git worktree before launching any coding agent.
6. Never run coding-agent commands in the primary checkout path.
7. PR review must run in a temp clone or git worktree, never in a live primary checkout.
8. Keep execution scoped to resolved worktree `<cwd>` only.
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill directs updates to `MEMORY.md` with absolute local workspace paths, which can store sensitive filesystem layout information and persist it beyond the immediate task. This is especially risky because the skill also says to update mappings automatically during missing-project resolution, potentially modifying local state and recording path data without a clear warning or separate consent step.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
### Gemini CLI

```bash
bash pty:true workdir:<cwd> command:"GEMINI_SANDBOX=false gemini -p '<rendered_prompt>'"
```

## Bash execution interface (required)
Confidence
95% confidence
Finding
The Gemini command explicitly disables sandboxing with `GEMINI_SANDBOX=false`, making unsafe execution the default for that engine. In the context of a skill designed to run delegated coding tasks from natural-language requests, this materially increases the blast radius of prompt injection, unsafe tool use, or unintended file/system modification.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
The skill instructs the delegated coding agent to execute `openclaw system event`, which extends the agent’s authority from code delegation into host-level notification/event emission. Even though the command appears limited to completion signaling, it creates an additional side-effecting capability on the host and establishes a pattern where spawned agents are told to run local control-plane commands.

Static analysis

No suspicious patterns detected.