/ai-ide-vuln-skills:ai-ide-source-auditfrom ai-ide-vuln-skills
Guides source code auditing of open-source AI IDEs for security vulnerabilities, focusing on command filtering, MCP integration, and permission models.
Ships in ai-ide-vuln-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill provides AI-IDE-specific guidance for source code security auditing. It directs your attention to the code areas most likely to contain vulnerabilities based on the vulnerability taxonomy -- instead of reading the entire codebase, you focus on six priority targets ordered by the interaction tier most likely to yield findings. Tier 1 (zero-interaction) bugs are the highest severity and hardest to dismiss; start there and work down.
This skill is for open-source targets only. For closed-source targets, use ai-ide-recon (documentation analysis and black-box enumeration).
Without both preconditions met, the audit targets below will produce incomplete or misleading results.
Every audit finding maps to one of four interaction tiers. The tier determines how reportable the finding is and how vendors will respond.
| Tier | Trigger | Reportability |
|---|---|---|
| Tier 1 -- Zero-Interaction | Victim clones repo and opens it. No trust granted, no message sent. | Highest -- vendors cannot argue "user chose to trust." |
| Tier 2 -- Agent-Mediated | User sends a message or interacts normally. PI in workspace files drives agent action. No explicit approval of the malicious action. | Strong -- no conscious approval of the specific attack. |
| Tier 3 -- Requires Approval Click | User must click "Trust," "Allow," or approve a specific action. | Weak unless approval is misleading or UI is confusing. |
| Tier 4 -- TOCTOU / Post-Trust | User already trusted project; config is modified after approval (e.g., via git pull). | Weak standalone. Interesting only with TOCTOU, scope escape, or routine-action triggers. |
When reading source code, use these patterns to classify what you find:
If you have access to the Trail of Bits audit-context-building skill, use it before this skill to build architectural context. Apply it with AI-IDE-specific focus:
Phase 1 (Orientation): Prioritize these entrypoints:
Phase 2 (Ultra-granular): Apply 5 Whys specifically to:
Without audit-context-building: Follow the same priority order manually. Start with the entrypoints listed below and trace call chains from each.
Ordered by interaction tier yield -- targets most likely to produce Tier 1 (zero-interaction) findings are first. Start at #1 and work down.
What to find: The code path from "workspace is opened" to "config files are read and applied."
What to look for:
Vulnerability indicators:
Tier classification at code level:
What to find: The code path from "user or LLM requests a terminal command" to "command is executed in a shell."
What to look for:
exec (string to shell) or execFile (argument array, no shell)?Vulnerability indicators:
child_process.exec(command) with user-influenced command --> shell injectioncommand.startsWith(allowed) --> newline bypassTier classification at code level:
Reference: references/audit-focus-areas.md for specific function names and code patterns.
What to find: The code path from "MCP config file exists in workspace" to "MCP server process is spawned."
What to look for:
command field passed directly to exec?Vulnerability indicators:
JSON.parse(readFileSync(configPath)) and no approval gatespawn(config.command, config.args) where config comes from workspace fileTier classification at code level:
What to find: The code path from "agent wants to write a file" to "file is written or rejected."
What to look for:
Vulnerability indicators:
.vscode/, .cursor/, or other config directoriesTier classification at code level:
Source: Cline TOCTOU Script Invocation
What to find: The code path from "workspace contains a rules file" to "rules content is applied to the agent's system prompt."
What to look for:
Vulnerability indicators:
Tier classification at code level:
What to find: The code path from "agent produces text output" to "output is displayed to the user."
What to look for:
Vulnerability indicators:
<img src=...> tags in rendered output make HTTP requestsallowScripts: true and no CSP or permissive CSPTier classification at code level:
Not every code path you find is a security bug. These patterns are working-as-designed:
When in doubt, ask: "Did the user consciously approve this specific action with accurate information about what it does?" If yes, it is not a vulnerability. If the approval was absent, misleading, or stale (TOCTOU), it is.
See references/semgrep-queries.md for rule templates. Key queries:
child_process.exec($CMD) where $CMD is influenced by workspace contentreadFileSync, readFile) of known IDE config pathsspawn, exec, execFile) with config-derived argumentsSee references/codeql-queries.md for query templates. Key queries:
Use grep/ripgrep with patterns from references/audit-focus-areas.md:
rg -n "child_process|exec\(|spawn\(|execFile\(" --type ts --type js
rg -n "readFileSync|readFile.*mcp|readFile.*config" --type ts --type js
rg -n "allowlist|blocklist|allowedCommands|blockedCommands" --type ts --type js
references/semgrep-queries.md.references/codeql-queries.md.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mindgard/ai-ide-skills --plugin ai-ide-vuln-skills8 skills in this plugin
/ai-ide-attack-chainsPlans and constructs multi-stage attack chains against AI IDEs. Use when combining vulnerability primitives into end-to-end exploits, assessing overall IDE security posture, or mapping how individual vulnerabilities chain together through the file-write pivot point. Each chain is classified by interaction tier to prioritize reportable findings.
/ai-ide-code-execTests AI IDEs for code execution vulnerabilities beyond MCP and terminal filters. Use when assessing hooks abuse, binary planting, IDE settings exploitation, tools definition auto-loading, or environment variable prefixing attack vectors. Patterns are ordered by interaction tier: Tier 1 (zero-interaction) through Tier 4 (trusted workspace + specific action).
/ai-ide-data-exfilTests AI IDEs for data exfiltration vulnerabilities. Use when assessing markdown image rendering, Mermaid diagram abuse, pre-configured URL fetching, model provider redirect, webview rendering, or other outbound data channels in AI coding assistants.
/ai-ide-reconMaps attack surface of AI-assisted IDEs before vulnerability testing. Use when starting a security assessment of an AI IDE, analyzing IDE documentation for security blind spots, or enumerating config files and auto-load paths. Works for both open-source and closed-source targets. Annotates every discovered feature with an interaction tier so testing prioritizes zero-click and agent-mediated vectors first.
/mcp-config-poisoningTests AI IDEs for MCP configuration poisoning vulnerabilities. Use when auditing MCP integration security, testing whether an IDE auto-loads untrusted MCP server definitions from workspace config files, or assessing MCP tool approval and invocation controls. Assessment is structured around four interaction tiers, tested in priority order from zero-click auto-load to TOCTOU on trusted workspaces.
/prompt-injection-chainsTests AI IDEs for prompt injection vulnerabilities that enable config modification and privilege escalation. Use when assessing adversarial directory attacks, prompt template auto-loading, rules override, or file-write-to-config-modification attack chains. Patterns are organized by interaction tier from highest to lowest severity.
Other plugins' skills for the same job