Pre-Run Agent Skill Auditing: Catching Backdoors Before Execution
How to scan third-party AI agent skills and MCP packages for reverse shells, credential harvesting, and obfuscated evals using faradaiwire audit.
Runtime MCP proxies protect tool calls once an agent is running, but many compromises happen earlier—when a developer installs an untrusted community skill, helper script, or MCP server repository onto their workstation.
Why Runtime-Only Filtering Is Not Enough
Agent skill directories routinely bundle Markdown instructions alongside Python, Bash, TypeScript, or Go helper scripts. A single hidden setup script can spawn a reverse shell or exfiltrate ~/.ssh/id_rsa before a single MCP JSON-RPC frame ever reaches a gateway.
Scanning Local Skills and Remote Repos Safely
The faradaiwire audit command performs static security analysis across source files, configuration manifests, environment templates, and Markdown prompts:
# Scan a local skill directoryfaradaiwire audit ./skills/git-helper
# Scan a remote repository safely without executing git hooksfaradaiwire audit https://github.com/org/untrusted-skill --jsonWhen auditing a remote Git URL, FaradAiWire isolates the clone inside an ephemeral /tmp/faradai-audit-<uuid>/ directory with Git hooks disabled (--config core.hooksPath=/dev/null) and a 25 MB archive limit, then purges the temporary directory on exit.
What faradaiwire audit Flags
| Threat Category | Example Indicators |
|---|---|
| Reverse Shells & Exfiltration | nc -e, /dev/tcp/, curl -d @~/.ssh/id_rsa |
| Destructive Commands | rm -rf /, mkfs, dd if=/dev/zero |
| Privilege Escalation | sudo, doas, chmod +s, sudoers edits |
| Credential Harvesting | Patterns targeting .aws/credentials, .env, API tokens |
| Obfuscated Eval | eval(atob(...)), exec(base64.b64decode(...)) |
| Opaque Binaries | Unexpected .exe, ELF, .dylib, or .so executables |
CI/CD Gate Integration
Pass --json in CI workflows to enforce supply-chain checks automatically:
- Exit code
0: No threat signatures detected. - Exit code
1: Fatal parse or clone error. - Exit code
2: High-risk security violation detected.
Next Steps
- Review full flags and JSON output examples in the
faradaiwire auditCLI Reference. - Wrap local MCP clients safely with
faradaiwire adoptin the 5-Minute Quickstart.
Protect your agent workflows today
Test this vulnerability against FaradAiWire locally with our CLI or apply for FaradAiLab Enterprise Edition private beta.