Back to skill

Security audit

Skill Releaser

Security checks for vulnerabilities and agentic risk

Overview

This release automation skill is mostly transparent about its purpose, but it has high-impact publishing powers with weak gating and flawed security checks.

Install only if you intend to give the agent real release authority over GitHub and ClawhHub. Before using it, narrow the triggers, require explicit confirmation before repo creation, first push, force push, visibility change, and publish, and fix the two validation scripts so security checks fail closed and match the documented hard gates.

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

Error
Location
scripts/opsec-scan.sh:34
Finding

External OPSEC Scanner Failures Are Incorrectly Treated as Clean Results

Content
View full analysis

Vulnerability Details

File Location: scripts/opsec-scan.sh:34-49
Vulnerability Type: Fail-open security validation caused by incorrect exit-status handling
Risk Level: High

Vulnerable Code

bash
SCANNER_OUTPUT=$(python3 "$PYTHON_SCANNER" "$SKILL_DIR" 2>&1 || true)
SCANNER_EXIT=$?

# Fall back if the scanner doesn't recognize the directory type
if echo "$SCANNER_OUTPUT" | grep -q "Unknown job type\|Valid types:"; then
  echo "  (refactory scanner does not support raw skill dirs — using fallback)"
  echo ""
elif [[ "$SCANNER_EXIT" -eq 0 ]]; then
  echo "$SCANNER_OUTPUT"
  echo ""
  echo "✅ CLEAN — refactory scanner found no violations"
  exit 0
else
  echo "$SCANNER_OUTPUT"
  echo ""
  echo "❌ BLOCKED — refactory scanner found violations (see above)"
  exit 1
fi

Technical Analysis

The command substitution appends || true to the Python scanner invocation. Therefore, the compound command's exit status is always zero, regardless of whether the scanner:

  • Detects a security violation and exits nonzero.
  • Crashes because of malformed input.
  • Encounters a runtime or dependency error.
  • Cannot read one or more files.
  • Terminates unexpectedly for any other reason.

SCANNER_EXIT=$? consequently records the status of true, not the original Python process. Unless the scanner's text output contains one of the two recognized unsupported-type strings, the subsequent SCANNER_EXIT == 0 branch declares the directory clean and exits successfully.

This is a fail-open defect in a mandatory pre-publication security control.

Attack Path

  1. An attacker or accidental release process places sensitive content in a skill release directory.
  2. The configured external Python scanner detects that content and exits with a nonzero status, or it fails while processing crafted input.
  3. The || true expression suppresses that nonzero status.
  4. SCANNER_EXIT is assigned 0.
  5. The script prints CLEAN and exits with status zero.
  6. The rele ...[truncated 781 chars]
Remediation
View remediation

Remediation Suggestions

Capture the scanner's real exit status without allowing set -e to terminate the wrapper:

bash
set +e
SCANNER_OUTPUT=$(python3 "$PYTHON_SCANNER" "$SKILL_DIR" 2>&1)
SCANNER_EXIT=$?
set -e

Then use explicit, fail-closed handling:

bash
if echo "$SCANNER_OUTPUT" | grep -qE 'Unknown job type|Valid types:'; then
  echo "Scanner does not support raw skill directories; using fallback."
elif [[ "$SCANNER_EXIT" -eq 0 ]]; then
  echo "$SCANNER_OUTPUT"
  echo "CLEAN"
  exit 0
else
  echo "$SCANNER_OUTPUT" >&2
  echo "BLOCKED — scanner reported violations or failed." >&2
  exit 1
fi

Additional hardening should include:

  1. Distinguish a documented “unsupported input” exit code from detected violations and internal scanner errors rather than relying only on output text.
  2. Treat unknown exit codes, empty output, timeouts, and unreadable files as blocking failures.
  3. Run the fallback scanner only when the primary scanner explicitly reports unsupported input—not after arbitrary failures.
  4. Add automated tests for:
    • Exit status zero with clean output.
    • Nonzero status for detected violations.
    • Nonzero status caused by runtime failure.
    • Unsupported-directory behavior.
    • Malformed or adversarial scanner output.
  5. Verify that the wrapper's final exit status is nonzero for every failure case.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/validate-release-content.sh:22
Finding

Documented Release-Content Security Gate Does Not Implement Its Required Blocking Checks

Content
View full analysis

Vulnerability Details

File Location: scripts/validate-release-content.sh:22-92
Vulnerability Type: Incomplete allow-list and release-boundary validation
Risk Level: High

Vulnerable Code

The validation script only performs placeholder, minimum-size, and README-length checks:

bash
# ── Check 1: No placeholder text ─────────────────────────────────────────────
PLACEHOLDER_PATTERNS=('\{\{' 'TODO' 'FIXME' 'YOUR_')
PLACEHOLDER_HITS=()

# Scan content files only (not shell scripts — they may reference these
# patterns as search strings in grep commands).
for pattern in "${PLACEHOLDER_PATTERNS[@]}"; do
  MATCHES=$(grep -r "$pattern" "$SKILL_DIR" \
    --include="*.md" --include="*.yml" --include="*.yaml" \
    --include="*.json" --include="*.txt" \
    --exclude-dir=scripts \
    -l 2>/dev/null || true)
  if [[ -n "$MATCHES" ]]; then
    while IFS= read -r file; do
      PLACEHOLDER_HITS+=("$file (pattern: $pattern)")
    done <<< "$MATCHES"
  fi
done

if [[ ${#PLACEHOLDER_HITS[@]} -eq 0 ]]; then
  pass "No placeholder text found ({{, TODO, FIXME, YOUR_)"
else
  fail "Placeholder text found in:"
  for hit in "${PLACEHOLDER_HITS[@]}"; do
    RESULTS+=("       • $hit")
  done
fi

# ── Check 2: No empty files (< 50 bytes) ─────────────────────────────────────
EMPTY_FILES=()
while IFS= read -r -d '' f; do
  SIZE=$(wc -c < "$f" | tr -d ' ')
  if [[ "$SIZE" -lt 50 ]]; then
    EMPTY_FILES+=("$f ($SIZE bytes)")
  fi
done < <(find "$SKILL_DIR" -type f \
  -not -path "*/.git/*" \
  -not -name ".git" \
  -not -name ".gitmodules" \
  -print0)

if [[ ${#EMPTY_FILES[@]} -eq 0 ]]; then
  pass "No empty files (all files ≥ 50 bytes)"
else
  fail "Files smaller than 50 bytes:"
  for f in "${EMPTY_FILES[@]}"; do
    RESULTS+=("       • $f")
  done
fi

# ── Check 3: README.md has at least 200 chars ─────────────────────────────────
README="$SKILL_DIR/README.md"
if [[ -f "$README" ]]; then
  CHAR_COUNT=$(wc -c < "$README" | tr -d ' ')
  if [[ "$CHAR_COUNT" -ge 2
...[truncated 3096 chars]
Remediation
View remediation

Remediation Suggestions

Implement every documented hard-gate requirement directly in the script.

  1. Reject prohibited files and directories using exact relative-path or basename checks, including at minimum:

    • USER.md
    • MEMORY.md
    • AGENTS.md
    • SOUL.md
    • .gitmodules
    • _meta.json
    • .clawhub/
    • audits/
    • shared/
    • memory/
    • slides/
    • projects/
  2. Enforce the documented maximum file count:

bash
FILE_COUNT=$(find "$SKILL_DIR" -type f -not -path '*/.git/*' -print0 |
  awk 'BEGIN { RS="\0" } END { print NR }')

if [[ "$FILE_COUNT" -gt 50 ]]; then
  fail "Release contains $FILE_COUNT files; maximum allowed is 50"
fi
  1. Reject prohibited extensions case-insensitively, including documented logs, images, and PDFs. Extend the list based on the actual package policy:
bash
find "$SKILL_DIR" -type f \
  \( -iname '*.log' -o -iname '*.pdf' -o -iname '*.png' \
     -o -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.gif' \)
  1. Prefer an explicit allow-list of expected top-level release entries, such as:

    • SKILL.md
    • skill.yml
    • README.md
    • CHANGELOG.md
    • LICENSE
    • .gitignore
    • tests/
    • references/
    • scripts/
  2. Use null-delimited path processing throughout so filenames containing spaces or newlines cannot evade checks.

  3. Fail closed if find, grep, wc, or any traversal operation fails.

  4. Detect symbolic links and either reject them or validate their resolved targets remain inside the release root.

  5. Add automated fixtures proving that every documented prohibited file, directory, extension, excessive file count, and unusual filename causes a nonzero exit.

  6. Keep SKILL.md, scripts/README.md, and script behavior synchronized so the documented hard gate accurately reflects its implementation.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The code chunk implements a narrow OPSEC scanning step, which is only one component of the much broader declared release pipeline. Nothing in the script scaffolds a release, interacts with ClawhHub, performs publication, manages reviews, or verifies a broader security pipeline. This is a material description-to-behavior mismatch because the declared primary purpose is end-to-end release/publication handling, while the actual code only scans files in a local directory for sensitive patterns.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description presents a comprehensive release and publication workflow for ClawhHub. The supplied code does not perform publishing, repository operations, reviews, security verification, or any interaction with ClawhHub. Its actual purpose is limited to local content hygiene checks for release readiness: scanning for placeholder strings, detecting files under 50 bytes, and ensuring README.md length. While this could be a small supporting piece of a release-readiness process, it is far narrower than the declared primary purpose and omits most of the advertised capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises an end-to-end publication/release pipeline with multiple substantive capabilities related to releasing a skill to ClawhHub. The supplied code does none of those things. It only validates local directory structure and file/content presence across 8 checks. While this could loosely support 'release readiness,' it is only a small structural check and does not implement the primary claimed behaviors such as publishing, scanning, reviewing, or force-pushing. Therefore the description materially overstates and misrepresents the code's actual function.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- A skill directory with at least a `SKILL.md` file

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- A skill directory with at least a `SKILL.md` file

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- A skill directory with at least a `SKILL.md` file

Memory Manipulation

High
Category
Memory Poisoning
Confidence
91% confidence
Finding

The workflow explicitly plans to erase history before making the repo public. In security-sensitive publishing, destroying intermediate history can remove auditability, hinder incident investigation, and conceal accidental inclusion of sensitive material or risky changes made during staging.

Content

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

↓ GATE: User reviews private repo, replies "approve" / "revise" / "reject" ↓ Phase 2 (AUTO): Steps 9-12 — erase history, flip public, publish, verify scan, deliver

text

### Batch Release (multiple skills)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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 · SKILL.md (reported line 186)May include surrounding context.

md
cp -r skills/{name}/* /tmp/skill-release-{name}/

# Remove internal-only files
rm -f /tmp/skill-release-{name}/WORKSPACE.md
rm -f /tmp/skill-release-{name}/.gitignore
rm -rf /tmp/skill-release-{name}/_meta.json
rm -rf /tmp/skill-release-{name}/.clawhub

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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 · SKILL.md (reported line 187)May include surrounding context.

Remove internal-only files

rm -f /tmp/skill-release-{name}/WORKSPACE.md rm -f /tmp/skill-release-{name}/.gitignore rm -rf /tmp/skill-release-{name}/_meta.json rm -rf /tmp/skill-release-{name}/.clawhub

text

Tool Parameter Abuse

High
Category
Tool Misuse
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).

Content

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

Remove internal-only files

rm -f /tmp/skill-release-{name}/WORKSPACE.md rm -f /tmp/skill-release-{name}/.gitignore rm -rf /tmp/skill-release-{name}/_meta.json rm -rf /tmp/skill-release-{name}/.clawhub

text

Tool Parameter Abuse

High
Category
Tool Misuse
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).

Content

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

Remove internal-only files

rm -f /tmp/skill-release-{name}/WORKSPACE.md rm -f /tmp/skill-release-{name}/.gitignore rm -rf /tmp/skill-release-{name}/_meta.json rm -rf /tmp/skill-release-{name}/.clawhub

text

Tool Parameter Abuse

High
Category
Tool Misuse
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).

Content

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

Remove internal-only files

rm -f /tmp/skill-release-{name}/WORKSPACE.md rm -f /tmp/skill-release-{name}/.gitignore rm -rf /tmp/skill-release-{name}/_meta.json rm -rf /tmp/skill-release-{name}/.clawhub

text

Tool Parameter Abuse

High
Category
Tool Misuse
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).

Content

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

rm -f /tmp/skill-release-{name}/WORKSPACE.md rm -f /tmp/skill-release-{name}/.gitignore rm -rf /tmp/skill-release-{name}/_meta.json rm -rf /tmp/skill-release-{name}/.clawhub

text

**CRITICAL VALIDATION — verify before proceeding:**

Memory Manipulation

High
Category
Memory Poisoning
Confidence
93% confidence
Finding

The explicit 'Erase History & Flip to Public' step combines destructive history rewriting with publication. This is dangerous because it weakens forensic traceability precisely at the point where external distribution occurs, making abuse or mistakes harder to detect and investigate.

Content

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

  • The repo IS the review artifact. User reviews actual files, not a summary.
  • Wait for user response. Do not proceed without explicit approval.

Step 10: Erase History & Flip to Public (after user approval)

Erase git history (may contain OPSEC fixes from earlier revisions) and make the repo public:

bash
cd /tmp/skill-release-{name}

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

The skill contemplates read/write access to skill directories and updating release artifacts such as versioning and metadata. Self-modifying or repository-modifying behavior is risky in an automated agent because it can alter source content, introduce malicious or incorrect changes, and make review harder if not tightly bounded.

Content

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

permissions: - exec: git, gh CLI (repo creation, visibility changes) - exec: clawhub CLI (publishing) - filesystem: read/write skill directories - browser: verify scan results on ClawhHub

text
Then bump version and re-publish. This declares intent and resolves the flag.

Self-Modification

High
Category
Rogue Agent
Confidence
94% confidence
Finding

Granting read/write access to skill directories enables modification of the skill being evaluated or released, which is a self-modification risk when combined with executable git and publishing permissions. In this context, the danger is elevated because the workflow also includes force-push and release actions, so a compromised or mis-triggered invocation could alter skill contents and immediately publish those changes.

Content

Scanner excerpt · skill.yml (reported line 16)May include surrounding context.

yaml
permissions:
  - exec: git, gh CLI (repo creation, visibility changes, force push)
  - exec: clawhub CLI (publishing to ClawhHub registry)
  - filesystem: read/write skill directories and /tmp staging areas
  - browser: open ClawhHub skill pages to verify security scan results
  - message: send release status and links to user via messaging channel

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 · tests/test-triggers.json (reported line 22)May include surrounding context.

json
"design a skill for calendar management",
    "run the refactory pipeline",
    "check skill scores",
    "update SKILL.md",
    "write a skill for twitter extraction"
  ]
}

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Line L06 states publish execution is gated on explicit approval from "My Lord," which imposes a specific form of address in natural language. This is a policy-relevant language constraint and there is no indication that users can choose or opt into this wording.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README explicitly documents destructive release behavior such as erasing git history, force-pushing, and making a repository public, but it does not present a clear, prominent warning about the irreversible consequences of those actions. In a release automation skill, this omission is dangerous because users may trigger publication assuming routine automation, leading to accidental loss of audit history or unintended public exposure of code and metadata.

Content

No source excerpt is available for this finding.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
86% confidence
Finding

Using triggers like 'release skill' in a system that already has a built-in 'release' command can cause shadowing or ambiguous routing. In this skill's context, ambiguity is risky because the selected path may perform repository and publication operations the user did not intend.

Content

No source excerpt is available for this finding.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
84% confidence
Finding

The trigger 'release readiness' is broad and semantically close to built-in release actions, increasing the risk of misrouting. Since this skill governs high-impact external operations, even partial accidental invocation could lead to unintended staging or publication steps.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad enough that normal user language like 'release skill' or 'release readiness' could invoke this high-impact workflow unintentionally. In this skill's context, accidental invocation is more dangerous because the documented workflow includes repository creation, pushing content, visibility changes, and publication steps.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instructions explicitly say to automatically create repos and proceed with impactful operations without asking the user at the moment of action. In a release skill with GitHub and publishing access, that creates a real risk of unauthorized or accidental external changes before a human notices.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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 · SKILL.md (reported line 432)May include surrounding context.

md
| Verdict | Meaning | Action |
|---------|---------|--------|
| Benign (both) | Clean, auto-approved | Proceed to Step 13 |
| Pending | Still processing | Wait 2 minutes, re-snapshot |
| Suspicious (undeclared permissions) | Skill needs privileged access not in metadata | Add `permissions` to skill.yml, bump version, re-publish |
| Suspicious (other) | Flagged behavior | Review detail text. If false positive, contact OpenClaw security team. If real, fix and re-publish |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger phrases at these lines are broad enough to activate on generic publishing or release-related requests that may not specifically target ClawhHub skill release. This can cause the agent to invoke a high-privilege workflow in the wrong context, increasing the risk of unintended repository changes, publication actions, or other side effects.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.