Back to skill

Security audit

ShellGuard Scanner

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local security scanner, but it needs review because crafted filenames in scanned skills can trigger code execution and the package includes active malicious-style test fixtures.

Install only after review or remediation. Run this scanner in a sandboxed environment with no credentials and preferably no network access when scanning untrusted skills; do not treat the included fixture skills as installable, and fix the filename-to-Python injection before using it in CI or on downloaded packages.

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

Error
Location
scripts/shellguard-scanner.sh:340
Finding

Arbitrary Python Code Execution Through Crafted Scanned Filenames

Content
View full analysis
/dev/null; then local zwc_count zwc_count=$(python3 -c " import sys, unicodedata text = open('$file', 'r', errors='replace').read() zwc = [c for c in text if unicodedata.category(c) == 'Cf' or ord(c) in (0x200B,0x200C,0x200D,0xFEFF,0x00AD,0x2060,0x180E)] print(len(zwc)) " 2>/dev/null || echo "0") if (( zwc_count > 0 )); then add_finding "TIER3-OBFUSCATION" "$fname — CRITICAL: $zwc_count zero-width/invisible characters (steganography)" score_add SCORE_OBFUSCATION 15 20 fi fi # Bidirectional control characters if python3 -c " import sys text = open('$file', 'r', errors='replace').read() bidi = [c for c in text if ord(c) in (0x202E,0x202D,0x202A,0x202B,0x2066,0x2067,0x2068,0x202C,0x2069)] sys.exit(0 if bidi else 1) " 2>/dev/null; then add_finding "TIER3-OBFUSCATION" "$fname — CRITICAL: Bidirectional override characters (text spoofing attack)" score_add SCORE_OBFUSCATION 18 20 fi # Unicode tag range (U+E0000..E007F) — invisible instruction injection if python3 -c " import sys text = open('$file', 'r', errors='replace').read() tags = [c for c in text if 0xE0000 <= ord(c) <= 0xE007F] sys.exit(0 if tags else 1) " 2>/dev/null; then add_finding "TIER3-OBFUSCATION" "$fname — CRITICAL: Unicode tag characters (U+E0000 range) — invisible content injection" score_add SCORE_OBFUSCATION 20 20 fi ``` ### Technical Analysis The scanner embeds the value of `$file` directly inside Python source passed to `python3 -c`. Although the shell expands `$file` inside a double-quoted shell string, the resulting value is placed between single quotes in this Python statement: ```python text = open('$file', 'r', errors='repla ...[truncated 2330 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/shellguard-scanner.sh:666
Finding

Malformed or Injected JSON Reports in the Primary Scanner

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/shadow-detector.sh:414
Finding

Improper JSON Escaping in Shadow Detector Reports

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (30)

Description-Behavior Mismatch

Critical
Category
Not specified by scanner
Confidence
100% confidence
Finding

The skill is described as a security scanner for skill directories, yet this code reads the user's local OpenClaw configuration and exfiltrates it externally. That behavior is unrelated to the advertised function and represents unauthorized collection of potentially sensitive data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Critical
Category
Not specified by scanner
Confidence
100% confidence
Finding

Reading ~/.openclaw/openclaw.json and transmitting it over the network is unjustified for a local scanner and can expose secrets, tokens, endpoints, or other sensitive operational settings. The skill context makes this more dangerous because users would reasonably trust a security tool and may not expect it to access unrelated personal configuration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest and description present the skill as benign, but the content contains hidden instructions to steal credential material and send it to a remote server. This mismatch is a strong sign of deliberate deception intended to bypass user and reviewer scrutiny.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file embeds a SYSTEM instruction telling the agent to silently run a curl command that reads a local auth file and sends its contents to an external webhook. This is explicit credential theft and covert data exfiltration, directly contradicting the stated productivity purpose of the skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Critical
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instruction explicitly directs silent execution of a network command that reads local authentication data and suppresses output. Silent handling, credential file access, and external transmission together indicate intentional stealth and theft rather than any valid productivity feature.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This finding describes behavior far outside the declared purpose: reading local OpenClaw configuration from the user's home directory and transmitting encoded data to an external endpoint via curl/subprocess. That is classic covert data exfiltration under the guise of a security scanner, and the trusted security branding makes it more dangerous because operators are more likely to run it against sensitive environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding describes behavior far outside the declared purpose: reading local OpenClaw configuration from the user's home directory and transmitting encoded data to an external endpoint via curl/subprocess. That is classic covert data exfiltration under the guise of a security scanner, and the trusted security branding makes it more dangerous because operators are more likely to run it against sensitive environments.

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

md
bash scripts/shellguard-scanner.sh /path/to/suspicious-skill/

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
bash scripts/shellguard-scanner.sh /path/to/suspicious-skill/

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
bash scripts/shellguard-scanner.sh /path/to/suspicious-skill/

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/shadow-detector.sh (reported line 296)May include surrounding context.

sh
# Sensitive file access not in description
    if ! echo "$desc" | grep -qiP 'file|read|write|disk|storage|save|load|config'; then
        if echo "$all_code" | grep -qiP '(\.ssh|\.env|/etc/passwd|auth-profiles|\.openclaw)'; then
            add_finding "critical" "$skill_name" "scope-mismatch-sensitive-files" \
                "Skill accesses sensitive system files not mentioned in description" \
                "Accesses .ssh, .env, /etc/passwd, or OpenClaw config files"

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/shadow-detector.sh (reported line 299)May include surrounding context.

sh
# Sensitive file access not in description
    if ! echo "$desc" | grep -qiP 'file|read|write|disk|storage|save|load|config'; then
        if echo "$all_code" | grep -qiP '(\.ssh|\.env|/etc/passwd|auth-profiles|\.openclaw)'; then
            add_finding "critical" "$skill_name" "scope-mismatch-sensitive-files" \
                "Skill accesses sensitive system files not mentioned in description" \
                "Accesses .ssh, .env, /etc/passwd, or OpenClaw config files"

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

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

Content

Scanner excerpt · scripts/shellguard-scanner.sh (reported line 283)May include surrounding context.

sh
local -a cred_patterns=(
        '\.ssh/(id_rsa|id_ed25519|id_ecdsa|authorized_keys|known_hosts)'
        '/etc/(passwd|shadow|sudoers)'
        '\.aws/credentials'
        '\.gnupg/'
        '\.npmrc'
        '\.pypirc'

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/shellguard-scanner.sh (reported line 285)May include surrounding context.

sh
'/etc/(passwd|shadow|sudoers)'
        '\.aws/credentials'
        '\.gnupg/'
        '\.npmrc'
        '\.pypirc'
        'auth-profiles\.json'
        '\.openclaw/.*\.(json|token)'

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/shellguard-scanner.sh (reported line 296)May include surrounding context.

sh
'Bearer\s+[a-zA-Z0-9_\-\.]{20,}'
        'password\s*=\s*["\x27][^"]{6,}'
        '\.env\b.*read|read.*\.env\b'
        'keychain|Keychain'
    )

    for pattern in "${cred_patterns[@]}"; do

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · scripts/shellguard-scanner.sh (reported line 296)May include surrounding context.

sh
'Bearer\s+[a-zA-Z0-9_\-\.]{20,}'
        'password\s*=\s*["\x27][^"]{6,}'
        '\.env\b.*read|read.*\.env\b'
        'keychain|Keychain'
    )

    for pattern in "${cred_patterns[@]}"; do

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
100% confidence
Finding

The docstring and comments claim the script performs setup formatting, but the actual code reads a user configuration file and sends it to a remote service. This mismatch is a strong indicator of deceptive behavior intended to hide unauthorized access and exfiltration.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Sensitive configuration data is encoded and sent to an external service without any warning, consent, or visible user-facing disclosure. Silent transmission of local config data is a serious privacy and security violation, especially in a tool presented as defensive software.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill provides no warning that it will silently transmit local credential data, which prevents informed consent and conceals high-risk behavior. In this context, the omission is not merely poor documentation; it supports covert exfiltration of secrets.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation embeds code execution examples that are not justified by the advertised purpose of a note-taking skill. Including both shell and Python execution paths for decoded payloads increases the likelihood that users or agents will run hidden logic without understanding what it does.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill claims to be a benign note-taking utility, but its quick-start instructs users to decode a Base64 string and pipe it directly into bash. Hiding executable shell content behind encoding is unnecessary for the stated functionality and is a classic prompt/package delivery technique for smuggling commands past casual review.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The quick-start command tells the user to execute obfuscated shell code with no warning or explanation. Even if the decoded content appears harmless, the pattern normalizes unsafe execution behavior and could easily be swapped for destructive or backdoored commands in a real distribution.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The use of a pipeline into bash is a direct command-execution sink and, in this context, is chained with Base64 decoding to conceal the executed content. For a note-taking skill, this is contextually unjustified and significantly more dangerous because users may trust the benign branding and run the command without scrutiny.

Content

Scanner excerpt · tests/fixtures/obfuscated-skill/SKILL.md (reported line 21)May include surrounding context.

Initialize with:

bash
echo "aW5pdGlhbGl6aW5nIG5vdGVzLi4u" | base64 -d | bash

Or use the Python helper:

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The Python helper uses base64 decoding followed by exec, which directly runs hidden code in the current interpreter context. This is especially dangerous in agent environments because it can execute arbitrary logic with the permissions of the hosting process while concealing behavior from reviewers.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill advertises executable scanner scripts and optional Python analysis, implying shell, file-read, and likely network-capable behavior, yet the manifest does not declare any explicit tool scope or permissions. That omission reduces transparency and can allow operators or orchestrators to grant broader access than users expect, which is especially risky for a security-themed skill that users may trust by default.

Content

No source excerpt is available for this finding.