Back to skill

Security audit

Claude Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a legitimate Claude Code automation guide, but it promotes unattended high-impact repository actions with weak scoping and unsafe command patterns.

Review carefully before installing. Use only in an isolated, disposable workspace with least-privilege credentials, avoid --dangerously-skip-permissions unless containment is verified, do not feed sensitive diffs or logs to unapproved providers, and require human review before pushes, PRs, production access, or broad Bash commands.

Vulnerability Patterns
  • 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
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:434
Finding
Shell Command Injection Through Unescaped Prompt and Failure-Log Interpolation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:434-461` (additional affected pattern at `SKILL.md:487-507`) **Vulnerability Type**: Shell command injection caused by constructing interactive shell commands from untrusted text **Risk Level**: High ### Vulnerable Code ```bash FAILURE_LOG=$(tail -500 "$LOG_FILE") ERROR_LINES=$(grep -n -i "error\|fail\|panic\|exception\|traceback" "$LOG_FILE" | tail -50) if [ -n "$ERROR_LINES" ]; then FAILURE_LOG="=== Error lines === $ERROR_LINES === Last 500 lines === $FAILURE_LOG" fi ``` The captured output is subsequently inserted directly into a command sent to an interactive shell: ```bash tmux send-keys -t "$TASK_ID" "claude --dangerously-skip-permissions \ 'Previous attempt failed. Error output: $FAILURE_LOG CI status: $CI_LOG Fix the issues above and complete the original task. [...your enriched instructions here...] When done: commit, push, gh pr create --fill, then run: openclaw system event --text \"Done: $TASK_ID (retry $RETRY)\" --mode now'" Enter ``` A similar unsafe command-construction pattern is used by the parallel-execution helper: ```bash launch_agent() { local TASK_ID="$1" WORKTREE="$2" PROMPT="$3" local LOG_FILE="$WORKTREE/claude-output.log" tmux new-session -d -s "$TASK_ID" -c "$WORKTREE" tmux pipe-pane -t "$TASK_ID" -o "sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' >> $LOG_FILE" tmux send-keys -t "$TASK_ID" "$PROMPT" Enter } ``` ### Technical Analysis `tmux send-keys` does not pass an argument array directly to a process. It types the supplied text into the shell running in the target pane. Consequently, the shell parses all quotes, newlines, substitutions, redirections, separators, and other metacharacters contained in that text. The retry workflow places `FAILURE_LOG` and `CI_LOG` inside a single-quoted Claude prompt embedded in a larger shell command. These values can contain repository-controlled build output, test failures, filenames, exception messages, or other attacker- ...[truncated 2382 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not construct shell commands by interpolating prompts, logs, CI output, task identifiers, or paths into text sent through `tmux send-keys`. 2. Pass prompt data through a securely created file or standard input. For example: - Create a temporary file with `mktemp`. - Set permissions to `0600`. - Write prompt content with `printf '%s'`. - Invoke a fixed wrapper script that reads the file as data. - Delete the file after execution. 3. Prefer direct process execution with an argument array instead of passing a command through an interactive shell. 4. If shell construction is unavoidable, escape every dynamic argument using a robust mechanism such as Bash `printf '%q'`. Do not attempt ad hoc quote replacement. 5. Validate identifiers such as `TASK_ID` and branch names against strict allowlists, for example `^[A-Za-z0-9._-]+$`. 6. Treat repository output, test output, CI output, filenames, and previous model responses as untrusted input. 7. Remove `--dangerously-skip-permissions` from retry commands so a second security boundary remains if malicious content reaches the agent. 8. Add adversarial tests containing single quotes, double quotes, newlines, command substitutions, semicolons, pipes, and redirections in prompts and captured logs. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:193
Finding
Systematic Permission Bypass Without Enforced Sandbox Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:193-216` (also present at lines 23, 57, 455, 502, 507, and 539-543) **Vulnerability Type**: Excessive privilege and removal of execution approval controls **Risk Level**: Medium ### Vulnerable Code ```bash tmux send-keys -t "$TASK_ID" "claude --dangerously-skip-permissions \ 'Your detailed prompt here. When completely finished: 1. Commit all changes with descriptive messages 2. Push the branch: git push -u origin $BRANCH 3. Create PR: gh pr create --fill 4. Notify: openclaw system event --text \"Done: $TASK_ID\" --mode now'" Enter ``` The accompanying guidance explicitly normalizes the bypass: ```markdown **Why interactive mode (no `-p`)?** - Allows mid-task steering via `tmux send-keys` - Agent can be redirected without killing and restarting - `--dangerously-skip-permissions` is safe in container/sandbox environments ``` The quick workflow uses the same option: ```bash exec(command="claude -p 'fix the typo in README.md' --dangerously-skip-permissions --output-format stream-json 2>&1 | tee -a $LOG_FILE", workdir="/path/to/project", background=true, pty=true) ``` ### Technical Analysis The primary workflows routinely invoke Claude Code with `--dangerously-skip-permissions`. This disables approval prompts for agent-initiated actions while the surrounding workflow expects the agent to edit files, execute shell commands, install dependencies, run tests, push branches, create pull requests, and send system notifications. The documentation states that this is safe in containers or virtual machines, but it does not enforce or verify any of the security properties required for that assumption. It does not confirm that: - The process is actually inside an ephemeral sandbox. - The container is unprivileged. - Sensitive host paths are not mounted. - Git, cloud, package-registry, or SSH credentials are absent. - Network access is appropriately restricted. - The agent cannot access host contro ...[truncated 2139 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `--dangerously-skip-permissions` from the default quick, full, retry, parallel, and multi-turn workflows. 2. Default to `--permission-mode acceptEdits` and use a narrowly scoped `--allowedTools` list appropriate to each task. 3. Require explicit approval for: - Arbitrary shell commands. - Dependency installation. - Network access. - Git pushes and pull-request creation. - Access to credentials or files outside the worktree. - System notifications or external API actions. 4. If permission bypass is retained as an exceptional mode, verify containment programmatically before launch: - Use an ephemeral, unprivileged container. - Drop unnecessary Linux capabilities. - Enable `no-new-privileges`. - Avoid host control sockets and writable host mounts. - Mount only the intended worktree. - Remove unrelated credentials and environment secrets. - Restrict outbound network access. - Apply CPU, memory, process, and execution-time limits. 5. Separate code modification from publication. Let the agent prepare changes, but require a human or separately constrained process to push branches and create pull requests. 6. Use read-only or plan mode for analysis and code-review tasks. 7. Document that containers and virtual machines are not automatically safe; safety depends on mounts, credentials, capabilities, identity, and network policy. 8. Treat all repository content and generated output as potentially hostile instructions when configuring autonomous agent permissions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (20)

Vague Triggers

High
Confidence
96% confidence
Finding
The trigger text is extremely broad: 'use when user asks to leverage claude or claude code to do something,' which can match ordinary coding conversations. Because this skill enables powerful autonomous execution, overbroad invocation materially raises the risk of accidental activation and unintended file, shell, git, and network actions.

Missing User Warnings

High
Confidence
96% confidence
Finding
The description explicitly advertises 'hands-off task execution without approval prompts,' while the skill later recommends permission skipping and autonomous code changes. This combination is dangerous because it normalizes bypassing checkpoints for write, shell, and remote actions without a front-loaded warning to the user about the breadth of side effects.

External Model or Provider Selection

High
Category
Excessive Agency
Content
--output-format json | jq -r '.session_id')

# Continue with context from previous turn
claude -r "$session_id" -p "now implement the changes we discussed" \
  --dangerously-skip-permissions

# Resume in non-interactive mode
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
--dangerously-skip-permissions

# Resume in non-interactive mode
claude -r "$session_id" -p "fix the remaining test failures" \
  --dangerously-skip-permissions
```
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
**Command**:

```bash
claude -p "count the total number of lines of code in this project, broken down by language" \
  --allowedTools "Read,Bash(find),Bash(wc)"
```
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
**Command**:

```bash
claude -p "fix the authentication bug in the login flow" \
  --permission-mode acceptEdits \
  --allowedTools "Bash,Read,Write,Edit"
```
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
**Command**:

```bash
claude -p "add dark mode support to the UI with theme context and style updates" \
  --permission-mode acceptEdits \
  --allowedTools "Bash,Read,Write,Edit"
```
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
**Command**:

```bash
claude -p "update all imports from old-lib to new-lib across the entire codebase" \
  --permission-mode acceptEdits \
  --allowedTools "Read,Write,Edit,Bash(npm test)"
```
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
**Command**:

```bash
claude -p "analyze the codebase for security vulnerabilities and provide a detailed report" \
  --allowedTools "Read,Grep" \
  --output-format json
```
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
**Command**:

```bash
claude -p "Incident: Payment API returning 500 errors (Severity: high)" \
  --append-system-prompt "You are an SRE expert. Diagnose the issue, assess impact, and provide immediate action items." \
  --output-format json \
  --allowedTools "Bash,Read,mcp__datadog" \
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
session_id=$(claude -p "start legal review session" --output-format json | jq -r '.session_id')

# Review in multiple steps
claude -r "$session_id" -p "review contract.pdf for liability clauses" \
  --permission-mode acceptEdits
claude -r "$session_id" -p "check compliance with GDPR requirements" \
  --permission-mode acceptEdits
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
# Review in multiple steps
claude -r "$session_id" -p "review contract.pdf for liability clauses" \
  --permission-mode acceptEdits
claude -r "$session_id" -p "check compliance with GDPR requirements" \
  --permission-mode acceptEdits
claude -r "$session_id" -p "generate executive summary of risks" \
  --permission-mode acceptEdits
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

External Model or Provider Selection

High
Category
Excessive Agency
Content
--permission-mode acceptEdits
claude -r "$session_id" -p "check compliance with GDPR requirements" \
  --permission-mode acceptEdits
claude -r "$session_id" -p "generate executive summary of risks" \
  --permission-mode acceptEdits
```
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
---
name: claude-skill
description: 'Use when user asks to leverage claude or claude code to do something (e.g. implement a feature design or review codes, etc). Provides non-interactive automation mode for hands-off task execution without approval prompts.'
---

# Claude Code Agent Skill
Confidence
90% confidence
Finding
The skill is expressly designed for autonomous operation 'without approval prompts,' which delegates consequential decisions to the agent. In context, that autonomy is paired with code changes, shell execution, and repository operations, making mistakes or prompt-induced misuse more impactful than a read-only or advisory skill.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The skill’s stated purpose is to use Claude/Claude Code for coding help, but the body expands into end-to-end repository operations including branch creation, commits, pushes, PR creation, and merge-adjacent workflow. This scope expansion increases the chance a user invokes the skill expecting analysis or implementation assistance but instead authorizes autonomous remote side effects on source control infrastructure.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
These instructions direct the agent to autonomously commit, push a branch, create a PR, and emit a completion event, which are external side effects beyond simple code generation. If triggered unexpectedly or with an unsafe prompt, this can publish unreviewed code, leak sensitive diffs to remote services, and create workflow noise or policy violations without human approval.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
These examples encourage edit-capable, repository-wide modification workflows using Write/Edit and broad Bash access, but they do not warn that the model may change many files at once or that outputs should be reviewed before applying. In a hands-off automation skill, that omission increases the chance of unintended bulk changes, destructive edits, or unsafe automated refactors being run by users without adequate caution.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The incident-response example grants broad Bash access plus external monitoring access to Datadog without warning about exposure of logs, credentials, customer data, or the possibility of making impactful production-facing commands. In the context of a non-interactive automation skill, users may over-trust the example and provide broad operational access without considering privacy and system safety constraints.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
Piping a PR diff directly into the external model can transmit proprietary code, secrets, or sensitive security fixes, yet the example gives no warning about data disclosure. Because this skill is specifically for using an external provider in automation mode, the lack of disclosure guidance materially increases the risk of unintended code exfiltration.

Context-Inappropriate Capability

Low
Confidence
89% confidence
Finding
The skill introduces a second external model/tool, codex, for code review even though the manifest frames the skill as Claude-focused. This broadens data exposure by sending PR diffs to another provider and may violate user expectations, data handling policies, or confidentiality requirements.

Static analysis

No suspicious patterns detected.