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.
| Agent | Settings | Instructions |
|---|---|---|
| Claude Code | .claude/settings.json, .claude/settings.local.json, .mcp.json | CLAUDE.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.toml | AGENTS.md |
| Gemini CLI | .gemini/settings.json | GEMINI.md |
| Windsurf, Cline, Roo | .roo/mcp.json | .windsurfrules, .clinerules |
"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."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:*)".curl ... | sh in a hook means whoever controls that URL runs code on every developer's machine."enableAllProjectMcpServers": true starts any server added to .mcp.json later, including one added in a pull request."chat.tools.autoApprove": true, or a terminal allow pattern of /.*/, lets Copilot's agent run commands unprompted.approval_policy = "never" or sandbox_mode = "danger-full-access" at the top of .codex/config.toml.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.
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.
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.
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.
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.
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.
Vybscan reads agent settings and instruction files on every pull request, with the code, dependencies and secrets.
Try Vybscan →