Back to skill

Security audit

skill-audit

Security checks for vulnerabilities and agentic risk

Overview

This is a plausible OpenClaw skill security scanner, but its archive handling and deletion guidance create review-worthy local safety risks.

Install only if you are comfortable running it in a sandbox or low-privilege account. Avoid scanning untrusted .skill archives on a sensitive machine, and do not let an agent run the documented rm -rf removal step unless the target path has been resolved and confirmed to be inside an approved skills directory.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scan_skill.py:640
Finding

Scanner Follows Symbolic Links Outside the Target Skill Directory

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scan_skill.py:616
Finding

Unbounded Archive Extraction and File Reading Allow Resource Exhaustion

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:38
Finding

Recursive Skill Deletion Guidance Does Not Require Target-Path Validation

Content
View full analysis
` ``` ### Technical Analysis The Skill instructs the Agent to substitute a path into a recursive deletion command after user confirmation. It does not require the Agent to canonicalize the target, verify that it is a direct child of an approved Skill installation root, reject symbolic links, protect option-like path values, or refuse dangerous targets such as the filesystem root or user home directory. User confirmation is a useful control, but the user may reasonably assume that the displayed path has already been validated. A mistaken, malformed, or attacker-influenced path could therefore cause deletion outside the intended Skill directory. The broad deletion capability is not necessary as written. Removing a detected Skill only requires deletion of one validated directory beneath a known installation root. ### Attack Path 1. A scan produces a critical result and the Agent offers to remove the target as directed. 2. The path supplied to the workflow is incorrect, malformed, points through a symbolic link, or otherwise resolves outside an approved Skill root. 3. The user confirms deletion while believing only the scanned Skill will be removed. 4. The Agent executes the documented recursive deletion command. 5. Files reachable through the unintended target are recursively deleted with the Agent process's filesystem privileges. ### Impact Assessment Successful exploitation or operator error can cause destructive deletion of files accessible to the account running the Agent. The maximum scope depends on that account's permissions. Under a privileged account, system-wide files could be affected; under a normal account, user-owned data and configuration remain ...[truncated 192 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

YARA rule 'agent_skill_credential_exfiltration_webhook': AI agent skill credential harvesting followed by webhook or external exfiltration [agent_skills]

Critical
Category
YARA Match
Confidence
85% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · scripts/scan_skill.py (reported line 214)May include surrounding context.

python
",
    "api.telegram.org": "Telegram Bot API",
    "slack.com/api": "Slack API",
    "discord.com/api": "Discord API",
    "api.github.com": "GitHub API",
    "graph.microsoft.com": "Microsoft Graph API",
    "googleapis.com": "Google APIs",
    "api.twilio.com": "Twilio API",
    "api.sendgrid.com": "SendGrid API",
    "api.stripe.com": "Stripe API",
    "hooks.slack.com": "Slack Webhooks",
    "webhook.site": "Webhook.site (data capture)",
    "ngrok.io": "Ngrok Tunnel",
    "requestbin": "RequestBin (data capture)",
    "pipedream.net": "Pipedream (data capture)",
    "burpcollaborator": "Burp Collaborator (security testing)",
    "interact.sh": "Interactsh (data capture)",
    "oast.fun": "OAST (data exfiltration)",
    "dnslog.cn": "DNSLog (data exfiltration)",
    "canarytokens.com": "Canary Tokens",
    "pastebin.com": "Pastebin",
}

SAFE_URL_PREFIXES = [
    "https://docs.", "https://github.com/", "https://stackoverflow.com/",
    "https://en.wikipedia.org/", "https://www.pytho

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
Accepts skill folders (containing `SKILL.md`) and packaged `.skill` files.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · scripts/scan_skill.py (reported line 59)May include surrounding context.

python
isk: str
    title: str
    detail: str
    file: str = ""
    line: int = 0

    def to_dict(self):
        d = {"category": self.category, "risk": self.risk, "title": self.title, "detail": self.detail}
        if self.file:
            d["file"] = self.file
        if self.line:
            d["line"] = self.line
        return d


@dataclass
class AuditReport:
    skill_name: str = ""
    skill_description: str = ""
    overall_risk: str = Risk.LOW
    findings: list = field(default_factory=list)
    required_env: list = field(default_factory=list)
    required_bins: list = field(default_factory=list)
    referenced_urls: list = field(default_factory=list)
    referenced_apis: list = field(default_factory=list)
    file_count: int = 0
    script_count: int = 0

    def add(self, finding: Finding):
        self.findings.append(finding)
        if RISK_ORDER.get(finding.risk, 0) > RISK_ORDER.get(self.overall_risk, 0):
            self.overall_risk = finding.risk

    def to_dict(self):

YARA rule 'offensive_tool_references': References to well-known offensive security tools [hacktools]

High
Category
YARA Match
Confidence
70% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · scripts/scan_skill.py (reported line 218)May include surrounding context.

python
": "Microsoft Graph API",
    "googleapis.com": "Google APIs",
    "api.twilio.com": "Twilio API",
    "api.sendgrid.com": "SendGrid API",
    "api.stripe.com": "Stripe API",
    "hooks.slack.com": "Slack Webhooks",
    "webhook.site": "Webhook.site (data capture)",
    "ngrok.io": "Ngrok Tunnel",
    "requestbin": "RequestBin (data capture)",
    "pipedream.net": "Pipedream (data capture)",
    "burpcollaborator": "Burp Collaborator (security testing)",
    "interact.sh": "Interactsh (data capture)",
    "oast.fun": "OAST (data exfiltration)",
    "dnslog.cn": "DNSLog (data exfiltration)",
    "canarytokens.com": "Canary Tokens",
    "pastebin.com": "Pastebin",
}

SAFE_URL_PREFIXES = [
    "https://docs.", "https://github.com/", "https://stackoverflow.com/",
    "https://en.wikipedia.org/", "https://www.python.org/",
    "https://nodejs.org/", "https://example.com", "https://example.invalid",
    "http://localhost", "http://127.0.0.1",
]


# ── Suspicious patterns ─────�

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 · scripts/scan_skill.py (reported line 263)May include surrounding context.

python
(r'rm\s+-rf?\s+/', "Recursive delete from root", Risk.CRITICAL),
    (r'chmod\s+777|chmod\s+\+s', "Dangerous permission change", Risk.HIGH),
    (r'sudo\s+', "Sudo usage", Risk.HIGH),
    (r'/etc/passwd|/etc/shadow', "System file access", Risk.HIGH),
    (r'~/.ssh|id_rsa|authorized_keys', "SSH key access", Risk.CRITICAL),
    (r'~/.openclaw/openclaw\.json', "OpenClaw config access (may contain secrets)", Risk.HIGH),
    (r'OPENAI_API_KEY|ANTHROPIC_API_KEY|API_KEY|SECRET|TOKEN', "Secret/key reference in code", Risk.MEDIUM),

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

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

Content

Scanner excerpt · scripts/scan_skill.py (reported line 263)May include surrounding context.

python
(r'rm\s+-rf?\s+/', "Recursive delete from root", Risk.CRITICAL),
    (r'chmod\s+777|chmod\s+\+s', "Dangerous permission change", Risk.HIGH),
    (r'sudo\s+', "Sudo usage", Risk.HIGH),
    (r'/etc/passwd|/etc/shadow', "System file access", Risk.HIGH),
    (r'~/.ssh|id_rsa|authorized_keys', "SSH key access", Risk.CRITICAL),
    (r'~/.openclaw/openclaw\.json', "OpenClaw config access (may contain secrets)", Risk.HIGH),
    (r'OPENAI_API_KEY|ANTHROPIC_API_KEY|API_KEY|SECRET|TOKEN', "Secret/key reference in code", Risk.MEDIUM),

Instruction Override

High
Category
Prompt Injection
Confidence
80% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · scripts/scan_skill.py (reported line 288)May include surrounding context.

python
# ── Prompt injection patterns ────────────────────────────────────────────────

PROMPT_INJECTION_PATTERNS = [
    (r'ignore\s+(all\s+)?previous\s+instructions', "Prompt injection: ignore previous instructions", Risk.CRITICAL),
    (r'you\s+are\s+now\s+', "Prompt injection: identity override", Risk.HIGH),
    (r'system\s*:\s*you\s+are', "Prompt injection: fake system message", Risk.CRITICAL),
    (r'<\|?system\|?>', "Prompt injection: system token injection", Risk.CRITICAL),

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 · scripts/scan_skill.py (reported line 554)May include surrounding context.

python
(r'require\s*\(\s*[\'"]http', "HTTP module usage", Risk.LOW),
        (r'fetch\s*\(', "fetch() network request", Risk.LOW),
        (r'XMLHttpRequest', "XMLHttpRequest", Risk.LOW),
        (r'process\.env', "Environment variable access", Risk.MEDIUM),
        (r'Buffer\.from\(.*base64', "Base64 buffer operation", Risk.MEDIUM),
        (r'WebSocket', "WebSocket connection", Risk.MEDIUM),
    ]

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises and instructs use of file reads, shell execution, and network-relevant scanning behavior, but it does not declare an explicit tool/permission scope. That creates a trust and review gap: an installer or operator cannot easily verify what capabilities the skill expects, which increases the chance of overbroad execution in sensitive environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The prescribed user responses for all risk levels are written in German, while the rest of the skill documentation is in English. This imposes a specific language on users without any stated opt-in or locale justification, which is a natural-language policy violation.

Content

No source excerpt is available for this finding.

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 · scripts/scan_skill.py (reported line 262)May include surrounding context.

python
(r'shutil\.rmtree|os\.remove|os\.unlink', "File deletion", Risk.MEDIUM),
    (r'rm\s+-rf?\s+/', "Recursive delete from root", Risk.CRITICAL),
    (r'chmod\s+777|chmod\s+\+s', "Dangerous permission change", Risk.HIGH),
    (r'sudo\s+', "Sudo usage", Risk.HIGH),
    (r'/etc/passwd|/etc/shadow', "System file access", Risk.HIGH),
    (r'~/.ssh|id_rsa|authorized_keys', "SSH key access", Risk.CRITICAL),
    (r'~/.openclaw/openclaw\.json', "OpenClaw config access (may contain secrets)", Risk.HIGH),

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The scanner extracts untrusted .skill archives to disk before analysis using ZipFile.extractall(). Even though extraction occurs in a temporary directory, this expands the tool's capabilities beyond passive static inspection and can expose the host to archive-based issues such as zip slip/path traversal or resource exhaustion if crafted archives are supplied.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The tool writes attacker-controlled archive contents to disk automatically with no warning or confirmation. In a security scanner context, users may reasonably expect read-only behavior, so silent extraction increases risk from malformed archives and weakens trust boundaries.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

The module docstring presents the tool as performing static analysis of skill folders, which implies inspection behavior. However, the implementation for .skill files actively extracts archive contents to a temporary directory, introducing a filesystem-writing side effect not reflected in the documentation.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.dynamic_code_execution

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/scan_skill.py:250

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/scan_skill.py:249