Back to skill

Security audit

Skill Vetter

Security checks for vulnerabilities and agentic risk

Overview

This skill is a security checker, but its own automated verdict can overstate safety and recommend installation after incomplete checks.

Use this skill only as a rough checklist, not as a final safety decision. Its helper script may say a third-party skill is safe even when important files, alternate execution paths, or disguised credentials were not checked. Review the target package manually and rely on official ClawHub security status where available.

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 (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/vet.sh:51
Finding
Incomplete scanning and unsafe scoring can approve malicious skills## Vulnerability Details **File Location**: `scripts/vet.sh:51-144` **Vulnerability Type**: Incomplete security coverage and fail-open trust decision **Risk Level**: High ### Vulnerable Code ```bash FILES=$(clawhub inspect "$SLUG" --files 2>/dev/null | grep -E "^scripts/|^hooks/" | awk '{print $1}') CRED_FLAG=0 NET_FLAG=0 DESTRUCT_FLAG=0 for file in $FILES; do CONTENT=$(clawhub inspect "$SLUG" --file "$file" 2>/dev/null) # Only flag actual hardcoded credential VALUES (not env var references) # Look for: API_KEY="sk_live..." or api_key = "sk_live..." or similar if echo "$CONTENT" | grep -E 'API_KEY\s*=\s*"sk_[a-zA-Z0-9]{20,}' > /dev/null 2>&1; then CRED_FLAG=1 fi if echo "$CONTENT" | grep -E 'PASSWORD\s*=\s*"[^"]+' > /dev/null 2>&1; then CRED_FLAG=1 fi if echo "$CONTENT" | grep -E 'TOKEN\s*=\s*"[^"]{20,}' > /dev/null 2>&1; then CRED_FLAG=1 fi # Network check if echo "$CONTENT" | grep -E "curl |wget |fetch\(|requests\.post|requests\.get" > /dev/null 2>&1; then NET_FLAG=1 fi # Destructive ops check if echo "$CONTENT" | grep -E "rm -rf|chmod 777|sudo |eval |exec " > /dev/null 2>&1; then DESTRUCT_FLAG=1 fi done ``` ```bash if echo "$SKILL_MD" | grep -qi "requires\|permission\|tool\|node\|bin"; then echo " Permission docs: CLEAR (+1)" SCORE=$((SCORE+1)) else echo " Permission docs: VAGUE" fi if [ "$DESC_LEN" -lt 500 ]; then echo " Documentation: MINIMAL (${DESC_LEN} bytes)" SCORE=$((SCORE+1)) elif [ "$DESC_LEN" -gt 3000 ]; then echo " Documentation: DETAILED (+1)" SCORE=$((SCORE+1)) fi # Verdict echo "" echo "==============================" echo "FINAL SCORE: $SCORE / 7" echo "==============================" if [ $SCORE -ge 5 ]; then echo "" echo "VERDICT: Install ✅" echo "Reason: Security checks passed — safe to install" elif [ $SCORE -ge 3 ]; ...[truncated 2740 chars]
Remediation
## Remediation Suggestions 1. Enumerate and inspect every file in the package rather than restricting analysis to `scripts/` and `hooks/`. 2. Treat unknown file types, binaries, symlinks, generated code, and executable content in unexpected locations as requiring manual review. 3. Analyze `SKILL.md` and related documentation for instruction hijacking, requests for excessive access, remote execution instructions, and unsafe installation commands. 4. Replace simple substring matching with syntax-aware analysis for supported languages and established secret-scanning tools. 5. Detect indirect command execution, encoded commands, alternate network clients, dynamic imports, subprocess APIs, and configuration-driven execution. 6. Do not award security points for documentation length or generic keyword presence. Score only independently verified security properties. 7. Fail closed when the official scan status is missing, parsing fails, a file cannot be retrieved, or complete package coverage cannot be established. 8. Require manual review before recommending installation whenever a skill contains executable behavior, outbound network access, credential handling, or unsupported content. 9. Clearly distinguish automated heuristic results from a verified safety determination and avoid presenting a heuristic pass as “safe to install.” 10. Add adversarial regression tests covering payloads outside expected directories, case variations, single-quoted secrets, command construction, alternate network tools, and unavailable security metadata.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (16)

Chaining Abuse

High
Category
Tool Misuse
Content
### 4. File System Operations
Check scripts for destructive operations:
```bash
clawhub inspect <slug> --file scripts/<name.sh> | grep -E "rm -rf|sudo |eval |exec "
```
**Red flags:** Recursive delete, shell evaluation, world-writable permissions.
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Chaining Abuse

High
Category
Tool Misuse
Content
### 4. File System Operations
Check scripts for destructive operations:
```bash
clawhub inspect <slug> --file scripts/<name.sh> | grep -E "rm -rf|sudo |eval |exec "
```
**Red flags:** Recursive delete, shell evaluation, world-writable permissions.
Confidence
75% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

External Script Fetching

High
Category
Supply Chain
Content
- `npm install` without `--save-dev` in scripts is fine
- Community packages with 0 downloads = suspicious
- Check npm package names against typosquatting (e.g., `request` vs `reqest`)
- Avoid `curl | bash` patterns for installing from URLs you don't trust
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
fi
  
  # Destructive ops check
  if echo "$CONTENT" | grep -E "rm -rf|chmod 777|sudo |eval |exec " > /dev/null 2>&1; then
    DESTRUCT_FLAG=1
  fi
done
Confidence
90% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
fi
  
  # Destructive ops check
  if echo "$CONTENT" | grep -E "rm -rf|chmod 777|sudo |eval |exec " > /dev/null 2>&1; then
    DESTRUCT_FLAG=1
  fi
done
Confidence
90% 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).

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger list contains broad phrases like 'check this skill' and 'review skill' that can plausibly match ordinary conversation, causing the skill to activate outside a clearly intentional security-vetting context. Over-broad auto-triggering can lead to prompt/tool hijacking of the agent workflow, unexpected command suggestions, or interception of unrelated user tasks.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
### 4. File System Operations
Check scripts for destructive operations:
```bash
clawhub inspect <slug> --file scripts/<name.sh> | grep -E "rm -rf|sudo |eval |exec "
```
**Red flags:** Recursive delete, shell evaluation, world-writable permissions.
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
```bash
clawhub inspect <slug> --file scripts/<name.sh> | grep -E "rm -rf|sudo |eval |exec "
```
**Red flags:** Recursive delete, shell evaluation, world-writable permissions.

### 5. Permission Documentation
Review SKILL.md metadata:
Confidence
70% confidence
Finding
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
```bash
clawhub inspect <slug> --file scripts/<name.sh> | grep -E "rm -rf|sudo |eval |exec "
```
**Red flags:** Recursive delete, shell evaluation, world-writable permissions.

### 5. Permission Documentation
Review SKILL.md metadata:
Confidence
70% confidence
Finding
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

External Transmission

Medium
Category
Data Exfiltration
Content
# Safe requests pattern
import requests
response = requests.get(
    "https://api.example.com/data",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30
)
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
# Safe requests pattern
import requests
response = requests.get(
    "https://api.example.com/data",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30
)
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
fi
  
  # Destructive ops check
  if echo "$CONTENT" | grep -E "rm -rf|chmod 777|sudo |eval |exec " > /dev/null 2>&1; then
    DESTRUCT_FLAG=1
  fi
done
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
fi
  
  # Destructive ops check
  if echo "$CONTENT" | grep -E "rm -rf|chmod 777|sudo |eval |exec " > /dev/null 2>&1; then
    DESTRUCT_FLAG=1
  fi
done
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
fi
  
  # Destructive ops check
  if echo "$CONTENT" | grep -E "rm -rf|chmod 777|sudo |eval |exec " > /dev/null 2>&1; then
    DESTRUCT_FLAG=1
  fi
done
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Missing User Warnings

Low
Confidence
86% confidence
Finding
At L060, the script retrieves each matching file's complete contents via `clawhub inspect "$SLUG" --file "$file"` and then scans that content for credentials and network/destructive patterns. While this is part of vetting, the script does not disclose to the user that it will read and analyze all files under `scripts/` and `hooks/`, which could include sensitive material.

Missing User Warnings

Low
Confidence
80% confidence
Finding
At L118, the script fetches `SKILL.md` from the target skill and evaluates its contents for quality signals. There is no explicit warning that remote documentation will be retrieved and analyzed, which is a form of data access that may surprise users.

Static analysis

Detected: suspicious.exposed_secret_literal, suspicious.generated_source_template_injection

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/credential-patterns.md:7

User-controlled placeholder is embedded directly into generated source code.

Critical
Code
suspicious.generated_source_template_injection
Location
references/credential-patterns.md:19