Lp3
- Category
- MCP Least Privilege
- Confidence
- 70% confidence
- Finding
- Without declared permissions the skill's intent is opaque and cannot be validated.
Security audit
Security checks across malware telemetry and agentic risk
ClawDefender is a coherent defensive scanner/sanitizer, with disclosed but imperfect install, URL-checking, and logging behavior users should understand before relying on it.
Install only if you want a local heuristic security helper that scans workspace skills/scripts and can assist with skill installation. Do not treat --check-url or --install as a complete safety boundary: --install installs first and scans afterward, and the URL allowlist is simple pattern matching. Review findings manually before acting on them, and only add HEARTBEAT or cron usage if you want persistent future behavior.
./scripts/clawdefender.sh --audit # Sanitize external input before processing curl -s "https://api.example.com/..." | ./scripts/sanitize.sh --json # Validate a URL before fetching ./scripts/clawdefender.sh --check-url "https://example.com"
echo "some text" | ./scripts/sanitize.sh # Check JSON API responses curl -s "https://api.example.com/data" | ./scripts/sanitize.sh --json # Strict mode - exit 1 if injection detected (for automation) cat untrusted.txt | ./scripts/sanitize.sh --strict
- `rm -rf`, `mkfs`, `dd if=`
- Fork bombs `:(){ :|:& };:`
- Reverse shells, pipe to bash/sh
- `chmod 777`, `eval`, `exec`
### SSRF / Data Exfiltration### Path Traversal - `../../../` sequences - `/etc/passwd`, `/etc/shadow`, `/root/` - URL-encoded variants (`%2e%2e%2f`) ## Automation Examples
### Path Traversal - `../../../` sequences - `/etc/passwd`, `/etc/shadow`, `/root/` - URL-encoded variants (`%2e%2e%2f`) ## Automation Examples
COMMAND_INJECTION=(
'rm -rf /'
'rm -rf \*'
'chmod 777'
'mkfs\.'
'dd if=/dev'
':\(\)\{ :\|:& \};:''.ssh/id_'
'.gnupg'
'\.\./\.\./\.\.'
'/etc/passwd'
'/etc/shadow'
'/root/'
'~/.ssh/''.gnupg'
'\.\./\.\./\.\.'
'/etc/passwd'
'/etc/shadow'
'/root/'
'~/.ssh/'
'~/.aws/''cat.*[.]env'
'read.*[.]env'
'show.*[.]env'
'/.env'
'config.yaml'
'config.json'
'.ssh/id_'echo ""
echo -e "${BLUE}[3/3] System checks...${NC}"
# Check .env permissions
if [ -f "$WORKSPACE/.env" ]; then
local perms=$(stat -c %a "$WORKSPACE/.env" 2>/dev/null || echo "unknown")
if [ "$perms" != "600" ] && [ "$perms" != "unknown" ]; thenecho -e "${BLUE}[3/3] System checks...${NC}"
# Check .env permissions
if [ -f "$WORKSPACE/.env" ]; then
local perms=$(stat -c %a "$WORKSPACE/.env" 2>/dev/null || echo "unknown")
if [ "$perms" != "600" ] && [ "$perms" != "unknown" ]; then
echo -e " ${YELLOW}⚠${NC} .env has loose permissions ($perms, should be 600)"# Check .env permissions
if [ -f "$WORKSPACE/.env" ]; then
local perms=$(stat -c %a "$WORKSPACE/.env" 2>/dev/null || echo "unknown")
if [ "$perms" != "600" ] && [ "$perms" != "unknown" ]; then
echo -e " ${YELLOW}⚠${NC} .env has loose permissions ($perms, should be 600)"
elseif [ -f "$WORKSPACE/.env" ]; then
local perms=$(stat -c %a "$WORKSPACE/.env" 2>/dev/null || echo "unknown")
if [ "$perms" != "600" ] && [ "$perms" != "unknown" ]; then
echo -e " ${YELLOW}⚠${NC} .env has loose permissions ($perms, should be 600)"
else
echo -e " ${GREEN}✓${NC} .env permissions OK"
fiif [ "$perms" != "600" ] && [ "$perms" != "unknown" ]; then
echo -e " ${YELLOW}⚠${NC} .env has loose permissions ($perms, should be 600)"
else
echo -e " ${GREEN}✓${NC} .env permissions OK"
fi
fi### Prompt Injection (90+ patterns) **Critical** - Direct instruction override: - `ignore previous instructions`, `disregard.*instructions` - `forget everything`, `override your instructions` - `new system prompt`, `reset to default` - `you are no longer`, `you have no restrictions`
'contents.*[.]env'
'show.*[.]env'
'what.*in.*config'
'ignore previous instructions'
'ignore all previous'
'ignore your instructions'
'disregard above''disregard above'
'disregard.*instructions'
'disregard.*prompt'
'disregard previous'
'forget.*instructions'
'forget everything'
'forget your instructions''disregard previous'
'forget.*instructions'
'forget everything'
'forget your instructions'
'forget everything above'
'override your instructions'
'new system prompt'- `rm -rf`, `mkfs`, `dd if=`
- Fork bombs `:(){ :|:& };:`
- Reverse shells, pipe to bash/sh
- `chmod 777`, `eval`, `exec`
### SSRF / Data Exfiltration# Command injection patterns
COMMAND_INJECTION=(
'rm -rf /'
'rm -rf \*'
'chmod 777'
'mkfs\.'65/65 vendors flagged this skill as clean.
Detected: suspicious.prompt_injection_instructions