Back to skill

Security audit

Skill Guard

Security checks for vulnerabilities and agentic risk

Overview

The skill is a mostly transparent skill scanner, but its zero-exec and read-only framing conflicts with browser use, a local CLI fallback, and baseline-writing instructions.

Install only if you are comfortable with a scanner that may browse ClawHub, read installed skill files, and save user-requested baseline records. Treat the CLI fallback as the main review issue: avoid using it unless the slug is clearly validated and the command is run safely without shell interpolation. Do not rely on its baseline fingerprint as strong tamper detection.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:64
Finding

Integrity Verification Uses a Collision-Prone Content Fingerprint

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:64-75
Vulnerability Type: Weak integrity verification
Risk Level: Medium

Vulnerable Code Snippet:

markdown
## Integrity Check

Compare files by reading them and noting their content fingerprint (first/last lines + file size). No hashing exec needed — the `read` tool is sufficient for detecting file changes.

**Baseline** (user-initiated only):
- User says "baseline {skill}"
- Agent reads all files in `./skills/{name}/`
- Saves file list + sizes + first/last lines to `memory/skill-guard/{name}-baseline.txt`
- Shows the baseline to user for review

**Verify** (user-initiated only):
- User says "integrity check {skill}"
- Agent reads current files and compares against saved baseline
- Reports any differences

Technical Analysis

The proposed fingerprint consists only of each file's first line, last line, and byte size. These attributes do not cryptographically bind the baseline to the complete file contents. An attacker can change content between the retained boundary lines and preserve the original file size by replacing text with an equal-length payload or adding compensating padding.

Consequently, two materially different files can produce the same recorded fingerprint. The statement that the read tool is sufficient for detecting file changes is therefore inaccurate under the documented comparison method.

Attack Path

  1. A legitimate skill is installed and the user explicitly creates a baseline.
  2. The baseline records only the file list, file sizes, and first and last lines.
  3. An attacker with an existing ability to modify a skill file replaces content between its first and last lines.
  4. The attacker preserves the original byte count, using equal-length replacement content or padding.
  5. The user invokes the integrity check.
  6. The recorded boundary lines and size still match, so the modified file may be reported as unc ...[truncated 427 chars]
Remediation
View remediation

Remediation Suggestions

  • Compute and retain a cryptographic digest, such as SHA-256, over the complete byte content of every monitored file.
  • Use an available structured hashing API rather than a shell command where possible, preserving the intended no-shell security boundary.
  • Record normalized relative paths, file types, permissions where relevant, and cryptographic digests in the baseline.
  • Protect baseline files against unauthorized modification. If the threat model includes writable local storage, authenticate the baseline with a keyed MAC or digital signature stored outside the scanned directory.
  • During verification, report added, removed, renamed, type-changed, and digest-mismatched files.
  • Do not describe sizes and boundary lines as an integrity fingerprint; they may remain as diagnostic metadata but must not determine trust.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:34
Finding

Unvalidated Skill Slug May Reach a Command-Execution Fallback

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:34
Vulnerability Type: Potential command or argument injection
Risk Level: Medium

Vulnerable Code Snippet:

markdown
If browser unavailable: `clawhub inspect {slug}` for basic metadata.

Technical Analysis

The fallback instructs the agent to invoke an external command with a substituted {slug} value. The document separately requires skill-name validation, but it does not define an allowlist, canonicalization procedure, argument separation requirement, or prohibition against passing the command through a shell.

If an implementation constructs a command string and invokes it through a shell, shell metacharacters in an attacker-controlled slug could be interpreted as additional commands. Even without a shell, values beginning with option prefixes could cause argument injection unless the CLI supports and uses an end-of-options delimiter.

This behavior also conflicts with the Skill's repeated claims that it uses only the read tool, performs “zero exec,” and does not require external tools. The fallback therefore exceeds the declared read-only privilege boundary.

Attack Path

  1. An attacker supplies a crafted skill slug as part of a request to inspect a skill.
  2. Browser access is unavailable, causing the documented CLI fallback to be selected.
  3. The agent substitutes the untrusted slug into clawhub inspect {slug}.
  4. If the resulting text is passed to a shell, embedded metacharacters may execute additional commands. If it is passed directly but not validated, option-like input may alter CLI behavior.
  5. Any injected command executes with the operating-system permissions and accessible environment of the agent process.

This exploitation path is conditional: the project contains no executable implementation demonstrating that shell interpolation actually occurs. The risk arises from the unsafe and underspecified instruction.

Impact

...[truncated 634 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the CLI fallback to preserve the declared read-only, zero-execution security model.
  • If the fallback is essential, invoke the CLI through a structured process API using a fixed executable and a separate argument array; never concatenate input into a shell command.
  • Validate slugs before use with a strict allowlist such as ^[a-z0-9][a-z0-9-]*$, together with an appropriate maximum length.
  • Reject slugs beginning with a hyphen and use an end-of-options marker where supported.
  • Require explicit user approval before crossing from browser/read-only behavior into local process execution.
  • Update the capability declaration and documentation to state accurately that local command execution may occur.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Scope Creep

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest declares no capabilities, yet the skill directs the agent to use browser/network access and to write baseline data under memory/skill-guard/. Undeclared capabilities are dangerous because users, tooling, or policy engines may rely on the manifest to constrain execution, causing this skill to be treated as less privileged than its instructions require.

Content

No source excerpt is available for this finding.

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · SKILL.md (reported line 102)May include surrounding context.

md
- Does NOT use exec, shell, or any subprocess execution
- Does NOT auto-baseline newly installed skills
- Does NOT block installations automatically
- Does NOT modify skill files
- Does NOT require Node, bash, curl, or any external tool
- Does NOT access credentials or private data
- Does NOT write files outside `memory/skill-guard/` (explicit user request only)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 104)May include surrounding context.

md
- Does NOT block installations automatically
- Does NOT modify skill files
- Does NOT require Node, bash, curl, or any external tool
- Does NOT access credentials or private data
- Does NOT write files outside `memory/skill-guard/` (explicit user request only)

## More by TommoT2

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/security-patterns.md (reported line 43)May include surrounding context.

md
| `/etc/` | System config access |
| `/var/` | System data access |
| `/tmp/` | Temp directory (common attack staging) |
| `chmod 777` | Remove all permissions restrictions |
| `chown` | Change file ownership |

### 4. Hardcoded Secrets (`secrets`)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/security-patterns.md (reported line 52)May include surrounding context.

md
| Pattern | Service |
|---------|---------|
| `AKIA[0-9A-Z]{16}` | AWS Access Key ID |
| `ghp_[0-9a-zA-Z]{36}` | GitHub Personal Access Token |
| `sk_live_[0-9a-zA-Z]{24}` | Stripe Live Secret Key |
| `xox[bposa]-[0-9-]+` | Slack Bot/User Token |
| `eyJ...eyJ` | JWT Token |

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill markets itself as a zero-exec, local read-only scanner with empty capabilities, but its documented workflow depends on browser access to a remote site and suggests use of an external CLI command. This creates a trust-boundary mismatch: operators and enforcement systems may approve it as a passive local scanner while the instructions actually induce network access and non-local behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation claims 'Use read only' and 'Does NOT require ... any external tool,' but the pre-install workflow requires browser navigation and mentions clawhub inspect. This inconsistency can mislead users into trusting the skill as non-interactive and offline when it can drive remote lookups, which changes the privacy and attack surface assumptions.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

Scanner excerpt · references/security-patterns.md (reported line 17)May include surrounding context.

md
| `os.system()` | Python | Run shell commands |
| `subprocess` | Python | Process execution |
| `spawn` | Node.js/Python | Create new processes |
| `eval()` | JS/Python | Execute arbitrary code strings |
| `Function()` | JS | Dynamic function creation |

### 2. Network Calls (`network`)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/security-patterns.md (reported line 43)May include surrounding context.

md
| `/etc/` | System config access |
| `/var/` | System data access |
| `/tmp/` | Temp directory (common attack staging) |
| `chmod 777` | Remove all permissions restrictions |
| `chown` | Change file ownership |

### 4. Hardcoded Secrets (`secrets`)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/security-patterns.md (reported line 107)May include surrounding context.

md
- A coding-agent skill mentioning `child_process` in documentation is informational
- An email skill using `requests.post` to send emails is expected behavior
- A setup guide mentioning `sudo apt install` is instructional, not execution

The scanner reports raw pattern matches. Use judgment to interpret results.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

While writing to memory/skill-guard/ does not modify scanned skill files, it does contradict the broader 'read-only scanning' framing if interpreted literally, because the workflow includes persistence of generated baseline records. The later carve-out for writes outside memory/skill-guard/ helps, but the overall documentation still mixes 'read-only' claims with a write-capable feature.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.