Back to skill

Security audit

skill-author

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed workflow helper for authoring, checking, and publishing ClawHub skills, with broad but purpose-aligned file and command access.

Before installing, be comfortable with an agent editing skill folders and running ClawHub CLI commands on your behalf. Confirm the target skill directory, review any audit-remediation edits, and approve publishing actions explicitly; use extra care around the /tmp cleanup example if adapting it into automation.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (10)

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 3)May include surrounding context.

md
---
name: skill-author
description: 'Author, harden, and publish agent skills for ClawHub — write skills that conform to ClawHub conventions (frontmatter, structure, naming, versioning, licensing), run pre-publish hardening, and remediate clawhub.ai security-audit findings. Use when creating a skill for ClawHub, preparing a new version to publish, or when given a clawhub.ai/<owner>/<slug>/security-audit page.'
version: 1.1.0
license: BSD-3-Clause
description_zh: "撰写、加固并发布符合 ClawHub 规范与惯例的 agent skill:按 frontmatter/结构/命名/版本/许可约定写作 skill,发布前加固,整改 clawhub.ai 安全审计发现。制作要发布的 skill、准备新版本、或拿到 security-audit 页面时使用。"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
2. **Scaffold the layout** — `SKILL.md`, `README.md`, `LICENSE`, `VERSION`, `references/` (see guide §Structure).

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

md
| Flagged content | Why it's a false positive | Handling |
|---|---|---|
| `sanitize_filename` docstring mentioning `../../../etc/passwd` | Documents **defense against** path traversal; read as "credential file access" | Keep it; note in the report that it is protective code |
| Reading the skill's own workflow JSON | Read as "memory poisoning / context stuffing" | Keep it; normal file loading |
| Docs describing error categories | Read as "abnormal behavior" | Keep it |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Even though the path is under /tmp, rm -rf on a derived path can be dangerous in documentation because readers may copy it into automation without adding input validation. In a multi-user or adversarial environment, predictable temporary paths can also increase risk of accidental deletion of the wrong target or interaction with attacker-controlled filesystem state.

Content

Scanner excerpt · references/publish-checklist.md (reported line 12)May include surrounding context.

md
clawhub inspect <slug> --files

# 2. Pull them to /tmp for comparison (skill-card.md is registry-generated — skip it)
rm -rf /tmp/<slug>-old && mkdir -p /tmp/<slug>-old
for f in $(clawhub inspect <slug> --files 2>/dev/null | awk 'NR>1{print $1}' | grep -v skill-card.md); do
  mkdir -p "/tmp/<slug>-old/$(dirname $f)"
  clawhub inspect <slug> --file "$f" > "/tmp/<slug>-old/$f" 2>/dev/null

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Even though the path is under /tmp, rm -rf on a derived path can be dangerous in documentation because readers may copy it into automation without adding input validation. In a multi-user or adversarial environment, predictable temporary paths can also increase risk of accidental deletion of the wrong target or interaction with attacker-controlled filesystem state.

Content

Scanner excerpt · references/publish-checklist.md (reported line 12)May include surrounding context.

md
clawhub inspect <slug> --files

# 2. Pull them to /tmp for comparison (skill-card.md is registry-generated — skip it)
rm -rf /tmp/<slug>-old && mkdir -p /tmp/<slug>-old
for f in $(clawhub inspect <slug> --files 2>/dev/null | awk 'NR>1{print $1}' | grep -v skill-card.md); do
  mkdir -p "/tmp/<slug>-old/$(dirname $f)"
  clawhub inspect <slug> --file "$f" > "/tmp/<slug>-old/$f" 2>/dev/null

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Even though the path is under /tmp, rm -rf on a derived path can be dangerous in documentation because readers may copy it into automation without adding input validation. In a multi-user or adversarial environment, predictable temporary paths can also increase risk of accidental deletion of the wrong target or interaction with attacker-controlled filesystem state.

Content

Scanner excerpt · references/publish-checklist.md (reported line 12)May include surrounding context.

md
clawhub inspect <slug> --files

# 2. Pull them to /tmp for comparison (skill-card.md is registry-generated — skip it)
rm -rf /tmp/<slug>-old && mkdir -p /tmp/<slug>-old
for f in $(clawhub inspect <slug> --files 2>/dev/null | awk 'NR>1{print $1}' | grep -v skill-card.md); do
  mkdir -p "/tmp/<slug>-old/$(dirname $f)"
  clawhub inspect <slug> --file "$f" > "/tmp/<slug>-old/$f" 2>/dev/null

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

  1. Pin reviewed commits, use git checkout --detach <full-sha>
  2. Verify repos still exist before publishing — git ls-remote fails on auth issues; the GitHub API is more reliable:
    bash
    curl -s "https://api.github.com/repos/<owner>/<repo>/commits?per_page=1" \
      | python3 -c "import json,sys; d=json.load(sys.stdin); print(d[0]['sha'] if isinstance(d,list) and d else d.get('message'))"
    
    Not Found → the repo was renamed/deleted. Search users/<owner>/repos for the new address and note "renamed from X" in the docs.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
## 7. Excessive agency / consent

**Pattern**: the skill makes the agent auto-reuse the user's prior data, auto-run batch file operations, or maintain persistent staging directories — with no consent checks.
**Fix**:
- Auto-reusing user data → **scope limit**: same user, same session, time window only; never across users or sessions
- Batch file operations → confirm scope with the user before executing

External Script Fetching

Low
Category
Supply Chain
Confidence
15% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

  1. Pin reviewed commits, use git checkout --detach <full-sha>
  2. Verify repos still exist before publishing — git ls-remote fails on auth issues; the GitHub API is more reliable:
    bash
    curl -s "https://api.github.com/repos/<owner>/<repo>/commits?per_page=1" \
      | python3 -c "import json,sys; d=json.load(sys.stdin); print(d[0]['sha'] if isinstance(d,list) and d else d.get('message'))"
    
    Not Found → the repo was renamed/deleted. Search users/<owner>/repos for the new address and note "renamed from X" in the docs.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The document recommends that docs may be in a specific language and says that a given language 'usually works better,' which can steer skill behavior toward a locale preference. While it softens a hard requirement, it still does not explicitly require user opt-in before preferring that language.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.