This is a policy template for teams that use AI coding agents such as Claude Code, Codex and Cursor. It sets which tools and accounts are allowed, what agents may read, which actions need a person's approval, and how agent-written code is reviewed. The download is an editable Word file. Checked November 21, 2026.
The fifteen sections and five appendices are summarised below, and the rules that matter most are explained in full. Every placeholder in the Word file is highlighted, so you can find each blank at a glance. Have your security and legal leads review it before you adopt it. It is a starting point, not legal advice.
This is spoke 4 of the AI SDLC field guide. The review rules in section 7 come from the AI code review checklist, which is spoke 2.
What the template covers
| Section | What it settles |
|---|---|
| 1-2. Purpose and scope | Which tools count as coding agents, and who the policy applies to |
| 3. Approved tools and accounts | Company accounts only, and the vendor answers on retention and training you record before approving a tool |
| 4. What agents may access | Four data classes (public, internal, confidential, restricted) and which may enter agent context |
| 5. Permissions and approvals | What a person must approve, when no-approval modes are allowed, and how secrets are denied |
| 6. MCP servers and integrations | Approval, version pinning, token scope, and untrusted content |
| 7. Code review and merge | Author disclosure, human approval, risk tiers, and limits on cloud agents |
| 8-10. Dependencies, agent config files, secrets | Package checks, ownership of AGENTS.md and CLAUDE.md, and what to do when a secret leaks |
| 11-15. Disclosure, incidents, training, exceptions, review | The operating rules, with a review every three months |
Five appendices hold the working lists: the approved tools register, repositories by data class, the enforced settings for each tool, the risk tiers, and the exceptions register.
Why a general AI policy does not cover coding agents
A company AI acceptable use policy is written for people typing into a chat window. It covers what data you may paste in and how to check the answer. A coding agent does more. It reads your repository, runs shell commands, installs packages, calls connected services and opens pull requests. Each of those maps to a risk the chat policy never had to address:
- Excessive agency. An agent with more permissions than its task needs can do more damage when it gets something wrong. Excessive Agency is LLM06 in the OWASP Top 10 for LLM Applications 2025.[1]
- Prompt injection. Instructions hidden in content the agent reads, such as an issue, a web page or a dependency's README, can steer what it does next. This is LLM01 on the same list.[1]
- Supply chain. Models suggest packages that do not exist. In a USENIX Security 2025 study, the average share of hallucinated packages was at least 5.2% for commercial models and 21.7% for open-source models.[2] If an attacker registers one of those names, anyone who installs the suggestion without checking gets the attacker's package.
- Local tool servers. A local MCP server is a program downloaded and run on the developer's machine. The MCP specification's security guidance warns that, without sandboxing and consent, such a server can execute commands with the client's privileges, and that clients should warn users that MCP servers run with the same privileges as the client.[3]
The rules that do most of the work
Most of the template is ordinary governance. These eight rules are the ones specific to agents, with the section numbers they come from.
- Company accounts only, with the vendor's answers on file (3.2, 3.3). Before a tool is approved, someone records how long the vendor keeps prompts and code, whether your data may be used for training under your contract, and where it is processed. The answer can depend on your plan and contract, so the answer and the date go in Appendix A.
- Agents never hold production credentials or customer data (4.1). Development environments only. Tests use fixtures or synthetic data.
- A person approves commands and network access by default (5.1). Teams may pre-approve safe commands such as the test runner. Modes that skip approvals are allowed only in a container or VM with nothing worth stealing (5.2).
- Secrets are denied in the tool and enforced centrally (5.3, 5.4). A deny rule in a developer's own settings can be removed by that developer. Managed settings cannot.
- MCP servers are approved like dependencies (6.1 to 6.3). Check the publisher and source, pin the version, and give each one the narrowest token scope that works.
- Untrusted content and secrets never share a session (6.4). A session that reads outside content must not also hold secrets or write access to production.
- A person approves every merge (7.2, 7.5). An AI review is a first pass. Cloud agents may open pull requests but may not merge them or push to protected branches.
- Agent instruction files are code (9.1). AGENTS.md, CLAUDE.md and the tool configuration folders change only through reviewed pull requests, with owners in CODEOWNERS. A one-line change there alters what every later agent run does.
For how to write those instruction files well, see how to write specs for AI coding agents.
Enforce it in the tool, not only on paper
A policy that lives only in a document depends on every engineer remembering it. The template's Appendix C records the settings that enforce section 5 for each approved tool, with the date they were checked. Claude Code is filled in as the worked example, from its permissions documentation as read on November 21, 2026:[4]
- Rules are evaluated in the order deny, then ask, then allow, and an allow rule cannot carve an exception out of a deny rule.
- Read access to secrets is denied with rules such as
Read(./.env)andRead(./secrets/**). - Setting
permissions.disableBypassPermissionsModeto"disable"in managed settings stops anyone switching on bypassPermissions, the mode that skips approvals. The documentation says that mode should only be used in isolated environments like containers or VMs. - Managed settings cannot be overridden by user or project settings, apart from a few security-sensitive keys listed in the documentation.
- Read and Edit deny rules do not stop a script the agent runs from opening files itself. For OS-level enforcement, the documentation points to the sandbox.
A minimal managed settings file for those rules looks like this. Add your own secret paths:
{
"permissions": {
"disableBypassPermissionsMode": "disable",
"deny": [
"Read(./.env)",
"Read(./secrets/**)"
]
}
}
For Codex, Cursor and any other tool you approve, Appendix C has an empty entry to fill in from that vendor's documentation, with the date. Behaviour changes between versions (Claude Code's permissions page marks several rules as applying only from a given version), so a dated entry is more useful than a copied one.
On GitHub, two controls back up section 7. Copilot code review leaves a "Comment" review by default, which does not count toward required approvals.[5] Branch protection can require a code owner's approval, so a CODEOWNERS entry for agent configuration and CI paths puts a person on every change to them.[6]
How to roll it out
- Fill in Appendix A first. List the tools people already use, then get the vendor answers on retention, training and data location for each one. Remove tools you cannot get answers for.
- Classify your repositories (Appendix B). Most will be internal. Name the confidential ones and decide which tools may touch them.
- Turn on enforcement. Deploy managed settings for each tool that has them, and add the agent config and CI paths to
CODEOWNERS. - Add the pull request template from the AI code review checklist, so every PR states how it was written.
- Set the review date. A three-month review, with Appendix C re-checked against each vendor's current documentation, keeps the policy matched to the tools people actually run.
If you are still deciding whether a team is ready for agents at all, the AI readiness assessment covers the organisational questions. For the rollout plan and adoption metrics, see the Claude Code and Codex implementation guide. Governance for AI features inside your own product is a different problem, covered in the AI governance framework.