Skip to content
FaradAiLab Logo FaradAiLab
• FaradAiLab Security Research

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.

#Skill Security #Supply Chain #MCP #CLI

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:

Terminal window
# Scan a local skill directory
faradaiwire audit ./skills/git-helper
# Scan a remote repository safely without executing git hooks
faradaiwire audit https://github.com/org/untrusted-skill --json

When 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 CategoryExample Indicators
Reverse Shells & Exfiltrationnc -e, /dev/tcp/, curl -d @~/.ssh/id_rsa
Destructive Commandsrm -rf /, mkfs, dd if=/dev/zero
Privilege Escalationsudo, doas, chmod +s, sudoers edits
Credential HarvestingPatterns targeting .aws/credentials, .env, API tokens
Obfuscated Evaleval(atob(...)), exec(base64.b64decode(...))
Opaque BinariesUnexpected .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

Protect your agent workflows today

Test this vulnerability against FaradAiWire locally with our CLI or apply for FaradAiLab Enterprise Edition private beta.