Home Products
VivaGuard TamperCheck Vybscan
About Blog Book a Demo

How do I check Claude Code and Cursor config files for security risks?

Manjula Sridhar Nov 19, 2026 5 min read
← Back to Blog

Coding agents read their settings from the repository. A committed .claude/settings.json, .mcp.json, .vscode/settings.json or .codex/config.toml applies to everyone who opens the project. If it turns off permission prompts, allows any command, or starts an unknown MCP server, every developer who clones the repository gets that setting. So does every CI job that runs an agent on it.

Instruction files such as CLAUDE.md, AGENTS.md and .cursorrules are a second route. The agent treats their text as instructions. Text hidden with invisible Unicode characters is read by the agent, and not by the person reviewing the pull request.

Which files matter

AgentSettingsInstructions
Claude Code.claude/settings.json, .claude/settings.local.json, .mcp.jsonCLAUDE.md, .claude/commands/, .claude/agents/, .claude/skills/*/SKILL.md
Cursor.cursor/mcp.json.cursorrules, .cursor/rules/*.mdc
GitHub Copilot in VS Code.vscode/settings.json, .vscode/mcp.json.github/copilot-instructions.md, .github/instructions/
OpenAI Codex.codex/config.tomlAGENTS.md
Gemini CLI.gemini/settings.jsonGEMINI.md
Windsurf, Cline, Roo.roo/mcp.json.windsurfrules, .clinerules

What to look for

  • Permission prompts turned off. "defaultMode": "bypassPermissions" in Claude Code settings lets the agent run commands, edit files and reach the network without asking. A prompt injection in a web page or issue the agent reads then runs with nobody asked.
  • An allow rule that matches every command. "Bash", "Bash(*)", or a prefix such as "Bash(sh:*)" or "Bash(sudo:*)" allows anything. Allow the commands the project needs, such as "Bash(npm test:*)".
  • A hook that downloads a script and runs it. Hooks run automatically for everyone. curl ... | sh in a hook means whoever controls that URL runs code on every developer's machine.
  • Every MCP server approved. "enableAllProjectMcpServers": true starts any server added to .mcp.json later, including one added in a pull request.
  • Tools approved without asking in VS Code. "chat.tools.autoApprove": true, or a terminal allow pattern of /.*/, lets Copilot's agent run commands unprompted.
  • Codex with no approval or no sandbox. approval_policy = "never" or sandbox_mode = "danger-full-access" at the top of .codex/config.toml.
  • An MCP server over plain HTTP to another host. Tool calls and their results, often carrying tokens, travel unencrypted.
  • Hidden text in an instruction file. Unicode tag characters, text direction overrides, or runs of zero-width characters in CLAUDE.md or .cursorrules.

Three weaker signals are worth a look too. A committed settings.local.json is meant to stay on one machine, and it often holds commands with passwords typed into them. We wrote about that in why scanning for passwords is important. A base URL override such as ANTHROPIC_BASE_URL sends every prompt and key to another server. And an MCP server started with npx and no version runs whatever was published last.

How Vybscan checks this

Vybscan reads all of these files on every pull request and push, together with the code, the dependencies and leaked keys. We tested the checks on 922 real configuration files from 428 public repositories before turning them on. A setting inside a named Codex profile is not reported, because it applies only when someone picks that profile.

Scanners such as Invariant Labs' MCP-Scan check the tool descriptions of the MCP servers you connect to, for poisoning and rug pulls. That is a different question from what your repository's settings allow, and the two work well together.

Frequently asked questions

Is it safe to commit .claude/settings.json?

Yes. That file is meant for shared project settings. Keep it to what the project needs. Personal settings belong in .claude/settings.local.json, which Claude Code sets git to ignore when it creates the file.

Can a prompt injection really run commands on my machine?

Only if the agent may run them without asking. With prompts on, the developer sees each command first. The settings above are the ones that remove that step.

Why check instruction files like CLAUDE.md?

Because the agent follows them. A pull request that adds a line to CLAUDE.md changes what the agent does for everyone. Hidden characters make that line invisible in review while the agent still reads it.

What does Vybscan check?

Agent settings and MCP configuration for Claude Code, Cursor, Copilot in VS Code, Codex, Gemini CLI and others, plus agent instruction files, on every pull request and push. It also scans the code, dependencies and secrets. It installs as a GitHub App or connects to GitLab.

Check your repository's agent settings

Vybscan reads agent settings and instruction files on every pull request, with the code, dependencies and secrets.

Try Vybscan →
← Back to Blog