T09 · Insecure Skill Coding Practices
- Location
scripts/agent.py:14- Finding
Unrestricted server override can disclose API credentials and synchronized data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill mostly matches its security-dashboard purpose, but it sends credentials and machine metadata to a configurable remote server with under-disclosed privacy and scoping details.
Review before installing. Use only the official HTTPS Clawned server unless you fully trust a self-hosted endpoint, treat the CLAWNED_API_KEY as sensitive and revocable, and be aware that first sync can disclose your machine hostname, OS family, installed-skill inventory, and local agent state to the configured server.
scripts/agent.py:14Unrestricted server override can disclose API credentials and synchronized data
scripts/agent.py:174Initial synchronization transmits undisclosed host-identifying information
scripts/agent.py:45Credential-bearing OpenClaw configuration is fully parsed beyond the stated access scope
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req = urllib.request.Request(f"{CLAWNED_SERVER}{endpoint}", data=body, method=method,
headers={"Authorization": f"Bearer {CLAWNED_API_KEY}", "Content-Type": "application/json"})
try:
with urllib.request.urlopen(req, timeout=60) as resp:
return json.loads(resp.read().decode())
except urllib.error.HTTPError as e:
print(f"[!] API error {e.code}: {e.read().decode() if e.fp else ''}"); sys.exit(1)
The high-level description understates or omits important behaviors, including monitoring local skill directories, syncing changes automatically, and the possibility of sending local skill file contents to a remote server during scan mode. Users may consent to a metadata inventory tool without realizing it can observe filesystem changes or upload source contents, creating a significant transparency and data exfiltration risk.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- FP Context: Documentation references vs actual file reads
### CRED-002: SSH key access
- Pattern: `\.ssh/id_`, `\.ssh/authorized_keys`, `\.ssh/config`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- FP Context: Documentation references vs actual file reads
### CRED-002: SSH key access
- Pattern: `\.ssh/id_`, `\.ssh/authorized_keys`, `\.ssh/config`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Confidence: CONFIRMED
### CRED-003: Cloud credential access
- Pattern: `\.aws/credentials`, `\.aws/config`, `\.gcloud/`, `\.azure/`
- Pattern: `\.kube/config`, `\.docker/config\.json`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Confidence: CONFIRMED
### CRED-003: Cloud credential access
- Pattern: `\.aws/credentials`, `\.aws/config`, `\.gcloud/`, `\.azure/`
- Pattern: `\.kube/config`, `\.docker/config\.json`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Confidence: CONFIRMED
### CRED-003: Cloud credential access
- Pattern: `\.aws/credentials`, `\.aws/config`, `\.gcloud/`, `\.azure/`
- Pattern: `\.kube/config`, `\.docker/config\.json`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Confidence: CONFIRMED
### CRED-003: Cloud credential access
- Pattern: `\.aws/credentials`, `\.aws/config`, `\.gcloud/`, `\.azure/`
- Pattern: `\.kube/config`, `\.docker/config\.json`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Confidence: CONFIRMED
### CRED-003: Cloud credential access
- Pattern: `\.aws/credentials`, `\.aws/config`, `\.gcloud/`, `\.azure/`
- Pattern: `\.kube/config`, `\.docker/config\.json`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Confidence: CONFIRMED
### CRED-003: Cloud credential access
- Pattern: `\.aws/credentials`, `\.aws/config`, `\.gcloud/`, `\.azure/`
- Pattern: `\.kube/config`, `\.docker/config\.json`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### CRED-003: Cloud credential access
- Pattern: `\.aws/credentials`, `\.aws/config`, `\.gcloud/`, `\.azure/`
- Pattern: `\.kube/config`, `\.docker/config\.json`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### CRED-003: Cloud credential access
- Pattern: `\.aws/credentials`, `\.aws/config`, `\.gcloud/`, `\.azure/`
- Pattern: `\.kube/config`, `\.docker/config\.json`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- FP Context: Skills legitimately read specific env vars — flag bulk access
### CRED-005: Browser credential access
- Pattern: `Chrome/Default/Login`, `Firefox/Profiles`, `Cookies`, `\.mozilla`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- FP Context: Skills legitimately read specific env vars — flag bulk access
### CRED-005: Browser credential access
- Pattern: `Chrome/Default/Login`, `Firefox/Profiles`, `Cookies`, `\.mozilla`
- Severity: CRITICAL
- Confidence: CONFIRMED
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Severity: CRITICAL
- Confidence: CONFIRMED
### CRED-006: Keychain access
- Pattern: `security\s+find-.*-password`, `keyring`, `keychain`
- Severity: CRITICAL
- Confidence: LIKELY
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- Severity: CRITICAL
- Confidence: CONFIRMED
### CRED-006: Keychain access
- Pattern: `security\s+find-.*-password`, `keyring`, `keychain`
- Severity: CRITICAL
- Confidence: LIKELY
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
SCANNABLE_EXTS = {".md", ".py", ".js", ".ts", ".sh", ".mjs", ".cjs", ".jsx", ".tsx",
".mts", ".bash", ".zsh", ".rb", ".pl", ".yaml", ".yml", ".json", ".toml",
".cfg", ".conf", ".lua", ".go", ".rs", ".r", ".ps1", ".bat", ".cmd", ".txt", ".ini"}
# NOTE: .env is intentionally excluded to avoid leaking secrets
MAX_FILE_SIZE = 512 * 1024 # 512KB per file
MAX_FILES = 30
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
# Threat Model — OpenClaw Skill Security
## Attack Surface Overview
OpenClaw skills execute with the **host user's permissions**. A malicious skill has access to:
- The full filesystem (read/write as the running user)
- Network (outbound connections)
- Environment variables (including injected API keys and secrets)
- The OpenClaw agent's context (prompt injection to control agent behavior)
- Other skills' configuration via `~/.openclaw/openclaw.json`
- Messaging platform tokens (Telegram, WhatsApp, Discord bots)
## Threat Categories
### T1: Remote Code Execution (CRITICAL)
**Vector**: Scripts tha
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
# Threat Model — OpenClaw Skill Security
## Attack Surface Overview
OpenClaw skills execute with the **host user's permissions**. A malicious skill has access to:
- The full filesystem (read/write as the running user)
- Network (outbound connections)
- Environment variables (including injected API keys and secrets)
- The OpenClaw agent's context (prompt injection to control agent behavior)
- Other skills' configuration via `~/.openclaw/openclaw.json`
- Messaging platform tokens (Telegram, WhatsApp, Discord bots)
## Threat Categories
### T1: Remote Code Execution (CRITICAL)
**Vector**: Scripts tha
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
**Vector**: Scripts that download and execute code from remote sources at runtime.
**Patterns**:
- `curl|bash`, `wget|sh`, `curl|python`
- `eval(fetch(...))`, dynamic `require()` or `import()` with remote URLs
- `subprocess.run()` with user-controlled or remote-fetched input
- `child_process.exec()` with template literals containing external data
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
**Vector**: Scripts that download and execute code from remote sources at runtime.
**Patterns**:
- `curl|bash`, `wget|sh`, `curl|python`
- `eval(fetch(...))`, dynamic `require()` or `import()` with remote URLs
- `subprocess.run()` with user-controlled or remote-fetched input
- `child_process.exec()` with template literals containing external data
Potential security issue detected. Manual review is recommended.
- Writing to `/etc/`, `/usr/`, system directories
- Modifying shell profiles (`.bashrc`, `.zshrc`, `.profile`)
- Creating cron jobs outside OpenClaw's cron system
- Docker socket access (`/var/run/docker.sock`)
- Modifying PAM configuration
### T8: Filesystem Abuse (MEDIUM)
Potential security issue detected. Manual review is recommended.
- Writing to `/etc/`, `/usr/`, system directories
- Modifying shell profiles (`.bashrc`, `.zshrc`, `.profile`)
- Creating cron jobs outside OpenClaw's cron system
- Docker socket access (`/var/run/docker.sock`)
- Modifying PAM configuration
### T8: Filesystem Abuse (MEDIUM)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### T8: Filesystem Abuse (MEDIUM)
**Vector**: Accessing or modifying files outside the skill's legitimate scope.
**Patterns**:
- Path traversal (`../../../etc/passwd`)
- Symlink attacks (creating symlinks to sensitive files)
- Reading/writing outside `<workspace>/skills/<skill-name>/`
- Accessing other users' home directories
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
### T8: Filesystem Abuse (MEDIUM)
**Vector**: Accessing or modifying files outside the skill's legitimate scope.
**Patterns**:
- Path traversal (`../../../etc/passwd`)
- Symlink attacks (creating symlinks to sensitive files)
- Reading/writing outside `<workspace>/skills/<skill-name>/`
- Accessing other users' home directories
No suspicious patterns detected.