Originally published on agents.paxtechnologyservices.com. I'm PTS, an IT and security consulting shop. Corrections welcome in the comments.
Once you have mapped what your coding agent can reach, spend ten minutes on the settings that are supposed to hold it back. This audit is a pass over Claude Code, Codex and Cursor, using only checks you can do on your machine and confirm in official docs.
Setting names were checked on December 3, 2026. Tools change fast. If a key does not match your version, trust the vendor docs over this page.
You will need the folder where you start the agent, and the settings files for each tool you actually use. Skip any tool you do not have. For the inventory that lists accounts and env names, use the 15-minute inventory.
1. Confirm where settings live
- Claude Code project settings:
.claude/settings.json. User settings:~/.claude/settings.json. Local overrides:.claude/settings.local.json(settings files and precedence). - Codex user config:
~/.codex/config.toml. Project overrides:.codex/config.toml, loaded only when the project is trusted (config basics). - Cursor ignore file:
.cursorignoreat the project root. Global ignore patterns live in Cursor user settings (ignore file). Also look at.cursor/mcp.jsonor~/.cursor/mcp.jsonfor MCP servers.
Write down which of those files exist. A missing file means you are on defaults, not on a locked-down profile.
2. Claude Code: five settings to read out loud
Open the project or user settings.json and check:
-
permissions.denyincludes your secret files (.env,.env.*, key directories) and the destructive commands you refuse to let an agent run. Remember the documented limit: deny rules are not a complete block, and aBash(curl *)rule does not match/usr/bin/curlorsh -c 'curl …'(settings reference). -
permissions.askcoversgit push, cloud CLIs,kubectl,terraform apply,npm publishand other actions you want to see first. -
permissions.disableBypassPermissionsModeis set to"disable"if you want bypass-permissions mode blocked, including the--dangerously-skip-permissionsflag. -
sandbox.enabledistrue. The sandbox is off by default. If you need the session to fail closed when the sandbox cannot start, also setsandbox.failIfUnavailabletotrue. -
sandbox.filesystem.denyReadincludes credential paths. With the sandbox on, reads still include~/.sshand~/.aws/credentialsunless you deny them (sandboxing).
Also scan .claude/settings.local.json. That is where "don't ask again" approvals are saved (permissions). Make sure it is gitignored, and remove any approval you do not remember giving.
3. Codex: sandbox, approval and the retired setting
Open ~/.codex/config.toml and check:
-
sandbox_modeisread-onlyorworkspace-write, notdanger-full-access(sandboxing). -
approval_policyison-requestfor interactive work, notnever, unless you are in a throwaway environment. - If you use
workspace-write, confirm[sandbox_workspace_write]hasnetwork_access = falseunless you have a clear reason to open it. - Search the file for
approval_policy = "untrusted". That value is retired and can prevent Codex from starting. Remove it (agent approvals and security). - List every
[mcp_servers.*]entry. For each one, write down the account or token scope it can reach.
A starter config is in the open-source starter repo.
4. Cursor: ignore file, terminal and MCP
- Confirm
.cursorignoreexists if you have secrets that are not already covered by.gitignoreor by Cursor's default list (which includes.env*). - Read the ignore patterns. Cursor blocks Agent, Tab and
@mentions for those paths. It does not block the terminal or MCP tools (ignore file). - Check your MCP config and write down each server's scope, the same way you would for Codex or Claude Code. The MCP server security checklist covers inventory, pinning, credentials and isolation.
- Keep terminal command approval on unless you are in a disposable workspace. Cursor's agent security docs describe run modes as best-effort guardrails, not a hard security boundary, and note that workspace trust is disabled by default.
If a secret has to stay in the repo folder, ignore files are not enough. Use filesystem permissions, a secrets manager, or a dedicated environment that never sees production credentials.
5. A 60-second live check
In a non-production copy of the project:
- Ask the agent to read
.envor a credentials file you have denied or ignored. You want a denial, a permission prompt or a sandbox error, not the contents. - Ask it to run
git status(should be fine) and then agit pushor a cloud CLI command (should prompt, or be denied). - If you use Claude Code, confirm you cannot switch into bypass-permissions mode when
disableBypassPermissionsModeis set to"disable".
If any of those fail open, fix the settings before you go back to a project that holds real keys. More detail on the controls themselves is in How to stop your AI coding agent reading .env and secrets.
6. Put a reminder on the calendar
Rerun this audit when you add an agent, an MCP server or a cloud account, and once a month otherwise. The blast radius changes when the logged-in accounts change, even if the settings file does not.
Get the worksheet
PTS publishes a free Agent Blast Radius Checklist with a 9-page worksheet and the starter files. Download it on Gumroad. This site has no forms and does not collect email.
The free AI + Blockchain Map is a starting point for this series. More guides live on the PTS site.
If you want new notes like this in your inbox, the newsletter is at https://paxtechservices.substack.com