Back to skill

Security audit

skill-security-scanner-clean

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent security-scanner skill, but it needs review because its install guard handles untrusted archives unsafely and its scan results can overstate how complete the review was.

Review before installing. Run it only on skill copies in a disposable directory, avoid elevated privileges, do not treat a PASS result as proof a skill is safe, manually inspect unsupported files, and be careful scanning .skill archives until archive limits and temporary-directory cleanup are added.

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/security_scanner.py:190
Finding

Security scanner omits instruction-bearing and unsupported file types from dangerous-pattern analysis

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/install_guard.py:55
Finding

Unbounded extraction of untrusted Skill archives permits resource exhaustion

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (8)

Self-Modification

High
Category
Rogue Agent
Confidence
90% 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 · references/rules-reference.md (reported line 299)May include surrounding context.

md
- **Zero-day vulnerabilities**: Unknown attack patterns
- **Logic bombs**: Time/delayed triggers
- **Polymorphic code**: Self-modifying malware
- **External payloads**: Code downloaded at runtime
- **Social engineering**: Tricking users into actions

YARA rule 'keylogger_indicators': Keylogger functionality in scripts or source code [malware]

High
Category
YARA Match
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · references/rules-reference.md (reported line 140)May include surrounding context.

md
u[0-9a-fA-F]{4}){10,}|base64\.(b64decode|decodestring)',
            "description": "检测到可能的代码混淆,隐藏真实意图",
            "risk": RiskLevel.HIGH,
            "recommendation": "避免使用混淆代码,保持代码可读性和可审计性"
        },
        "SUSPICIOUS001": {
            "name": "键盘记录特征",
            "pattern": r'\b(keyboard|pynput|hook|GetAsyncKeyState|keylogger)',
            "description": "可能包含键盘记录功能",
            "risk": RiskLevel.CRITICAL,
            "recommendation": "OpenClaw技能不应包含键盘记录功能,这是明确禁止的行为"
        },
        "SUSPICIOUS002": {
            "name": "屏幕捕获特征",
            "pattern": r'\b(pyautogui\.screenshot|PIL\.ImageGrab|mss|screenshot|grab\s*\()',
            "description": "可能包含屏幕截图/录制功能",
            "risk": RiskLevel.HIGH,
            "recommendation": "屏幕捕获涉及隐私,必须在SKILL.md中明确�

YARA rule 'keylogger_indicators': Keylogger functionality in scripts or source code [malware]

High
Category
YARA Match
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/security_scanner.py (reported line 125)May include surrounding context.

python
u[0-9a-fA-F]{4}){10,}|base64\.(b64decode|decodestring)',
            "description": "检测到可能的代码混淆,隐藏真实意图",
            "risk": RiskLevel.HIGH,
            "recommendation": "避免使用混淆代码,保持代码可读性和可审计性"
        },
        "SUSPICIOUS001": {
            "name": "键盘记录特征",
            "pattern": r'\b(keyboard|pynput|hook|GetAsyncKeyState|keylogger)',
            "description": "可能包含键盘记录功能",
            "risk": RiskLevel.CRITICAL,
            "recommendation": "OpenClaw技能不应包含键盘记录功能,这是明确禁止的行为"
        },
        "SUSPICIOUS002": {
            "name": "屏幕捕获特征",
            "pattern": r'\b(pyautogui\.screenshot|PIL\.ImageGrab|mss|screenshot|grab\s*\()',
            "description": "可能包含屏幕截图/录制功能",
            "risk": RiskLevel.HIGH,
            "recommendation": "屏幕捕获涉及隐私,必须在SKILL.md中明确�

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documentation demonstrates and encourages capabilities that invoke shell execution, read/write files, and process JSON output from a subprocess, but the manifest declares no explicit tool scope such as permissions or allowed-tools. This creates a trust and containment gap: consumers may install or run the skill without clear authorization boundaries, increasing the chance that powerful operations are available implicitly or reviewed inadequately.

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/rules-reference.md (reported line 16)May include surrounding context.

md
| EXEC001 | Code Execution Functions | `\b(eval\|exec\|compile\|__import__\|execfile)\s*\(` | Critical |
| EXEC002 | System Command Execution | `\b(os\.system\|subprocess\.(call\|run\|Popen\|check_output)\|popen\|spawn\|shell=True)\s*\(` | High |

**Why it matters**: These functions can execute arbitrary code, bypassing normal security controls.

**Common legitimate uses**:
- Running external tools (ffmpeg, git, etc.)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/rules-reference.md (reported line 62)May include surrounding context.

md
| FILE001 | File Deletion | `\b(os\.remove\|os\.rmdir\|shutil\.rmtree\|os\.unlink)` | Medium |
| FILE002 | File Writing | `\b(open\s*\(\s*[^,\)]*,\s*['"]w\|fs\.writeFile)` | Low |

**Why it matters**: File operations can destroy data, plant malware, or modify system files.

**Common legitimate uses**:
- Creating output files

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/install_guard.py (reported line 20)May include surrounding context.

python
if strict:
        cmd.append("--strict")
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    
    try:
        return json.loads(result.stdout)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code embeds user-facing and maintenance-relevant comments in Chinese (for example the RiskLevel descriptions) within an otherwise English-language file. That imposes a locale choice on readers and maintainers without offering an alternative or documenting that the tool is intended for a Chinese-only audience.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.