← All articles

The AI Agent Permission Checklist: How to Give an Agent Access Without Giving Away the Keys

· 5 min read

The AI Agent Permission Checklist: How to Give an Agent Access Without Giving Away the Keys

This checklist is for team leads, developers and business owners whose staff are starting to use AI agents that can read files, run commands or call company systems. It explains the one principle that matters most, how to apply it with real settings in Claude Code, and a checklist you can adopt this week.

The principle: least agency

An agent that can only read a folder can do little damage. An agent that can run any command, read your passwords and send email can do a lot, whether through its own mistake or because someone tricked it. OWASP, the security community behind the well-known web "Top 10" lists, published its first Top 10 for Agentic Applications in December 2025. It frames the defence as "least agency": do not give an agent more autonomy than the job needs. Two of its risk areas are tool misuse, where an agent misuses a legitimate tool because it has too much power, and identity and privilege abuse, where an agent reuses or leaks inherited credentials or access.

This follows the old rule of least privilege, applied to software that makes its own decisions.

Step 1: write down what the agent may touch

For each agent or tool, list four things: which folders or systems it can read, which it can change, which outside services it can reach, and who approved that. If nobody can fill in the list, the agent has too much access by default.

Give each agent its own credentials, never a shared admin login, so you can switch one off without breaking the rest.

Step 2: use deny, ask and allow rules

Claude Code, Anthropic's coding agent, is a good example of how permissions can work. Its documentation describes three kinds of rule. Allow rules let a tool run without asking. Ask rules prompt for confirmation. Deny rules block it. Rules are checked in the order deny, then ask, then allow, and the first match decides the outcome.

How Claude Code decides: deny rules first, then ask, then allow; the first match wins
Permission rule order, from the Claude Code documentation.

Two details from the documentation are worth knowing. A broad deny rule beats a narrower allow rule, so an allow rule cannot carve an exception out of a deny. And a bare tool name in a deny rule removes the tool from the agent's context entirely, so it never sees it. A scoped rule such as Bash(rm *) leaves the tool available but blocks matching commands.

Rules can be checked into version control so every developer on a project gets the same limits. Start strict, then add allow rules for commands you trust, such as running your tests.

Step 3: protect secrets and sensitive files

The documentation shows how to block file reads with a Read deny rule for a path, such as your .env file or a secrets folder. Do this on day one, before an agent ever sees your keys. A Read deny rule also stops the agent editing or creating files at that path.

Step 4: know what a rule does not stop

Claude Code's own documentation is honest about limits. It says a Bash deny or ask rule matches the command text Claude writes, and is not a security boundary around the program, because the same program can be invoked in a different form. It also says that using the web-fetch tool alone does not prevent network access if Bash is allowed, because the agent can still use curl or similar tools. For restrictions that must hold, the documentation points to a sandbox with a network allowlist, and to hooks that check commands before they run.

The lesson applies to any agent: a rule is one layer. Add a second layer you do not depend on the model to obey.

Step 5: control the tools you connect

Each MCP server or plugin you connect adds actions the agent can take. In Claude Code you can deny every MCP tool, or allow tools only from a named server. Connect only servers you have checked; our guide on [how to vet an MCP server](https://encoderbytes.com/Blog/how-to-choose-and-vet-an-mcp-server-before-connecting) shows how.

Step 6: require approval for risky actions

Decide in advance which actions always need a person: deleting data, spending money, sending messages to customers, changing production systems, sharing files outside the company. Ask rules are built for this. Do not approve prompts you have not read, and do not switch to a mode that skips prompts for work that touches real data.

Step 7: log and review

Keep a record of what each agent did: which tools, which files and which commands. Review it weekly at first. Remove access nobody has used.

The checklist

1. Each agent has a named owner and a written list of its access. 2. Each agent has its own credentials, with the narrowest scope. 3. Secrets and sensitive folders are blocked with deny rules. 4. Deny, ask and allow rules are saved in the project and reviewed. 5. Risky actions always need a person's approval. 6. Rules are backed by a second layer: a sandbox, network limits or hooks. 7. Connected tools and servers are vetted and listed. 8. Logs are kept and reviewed, and unused access is removed.

Untrusted text can also steer an agent that has access. Read our explanation of [prompt injection](https://encoderbytes.com/Blog/prompt-injection-explained-security-hole-in-every-ai-app). This is general guidance, not a guarantee of security for your setup.

Sources

Claude Code documentation, Configure permissions: https://code.claude.com/docs/en/permissions

OWASP, Top 10 for Agentic Applications announcement: https://genai.owasp.org/2025/12/09/owasp-top-10-for-agentic-applications-the-benchmark-for-agentic-security-in-the-age-of-autonomous-ai/

Anthropic, Building effective agents: https://www.anthropic.com/engineering/building-effective-agents

Frequently asked questions

What is least privilege for an AI agent?

It means giving the agent only the files, tools and accounts its task needs. OWASP's agentic list calls the wider idea least agency: no more autonomy than the job justifies.

How do Claude Code permission rules work?

You can set allow, ask and deny rules. Claude Code checks deny first, then ask, then allow, and the first match decides, so an allow rule cannot override a deny.

Are permission rules enough to secure an AI agent?

No. Claude Code's documentation says Bash rules are not a security boundary, so use a sandbox, network limits, hooks and approvals as extra layers.

Should an AI agent ever run without approvals?

Only for low-risk work in an isolated environment. Anything touching real data, money or customers should need a person's approval.

Contact

Let's Discuss Your Project

Tell us what you are building. Every conversation is covered by a mutual NDA.

What happens next

  1. 1Our team contacts you within one business day
  2. 2An initial discussion to understand your requirements
  3. 3A scope assessment and proposal

We reply from info@encoderbytes.com.