Back to Blog
Certiv Team 7 min read

How do you enforce one security policy across every AI coding agent your team uses?

How do you enforce one security policy across every AI coding agent your team uses?

Surtout, faites simple. ‘Above all, keep it simple’ means more than the tired K.I.S.S. axiom of keeping things simple, stupid. In the kitchen of the Grand Hotel in Monte Carlo in 1884, it could explain a conviction Chef Auguste Escoffier had for how things should be done: have one rule, written once, and enforced in one place.

Kitchens in the 1880s would have sent the most ardent fans of Gordon Ramsay’s ‘Hell’s Kitchen’ into shock. Kitchen staff were exposed to billowing soot and smoke, cooks were given beer and wine to get through the heat (and would be drunk doing so). Orders were shouted over each other and cooks were treated as menial laborers and not the professionals we know today. Most importantly of all, kitchen stations didn’t exist yet, so everyone was responsible for everything.

Chef Escoffier cut through all of this. He cooked for the army during the Franco-Prussian War of 1870, and he brought the army’s discipline and structure with him. A head chef and a sous chef were established with a clear line of command for the kitchen staff to follow. He divided the kitchen into separate stations, where each owned a type of cooking: fish, meats, sauces or pastries.

Most of the fine dining establishments you’ve dined at still practice this method today. A barker (l’aboyeur) calls the order to the kitchen and is responsible for judging each dish and determining whether it is fit to send to the dining room. Dishes that aren’t correct or aren’t ready are called out by the barker and sent back.

And this division of labor provides the structure of how operations run. The cook prepares the dish at their station and in their own style, while the barker examines the plate, looking for mistakes, and decides whether it goes out to the dining table.

So what if a digital kitchen operated in the same way? You have a team of four dedicated chef agents who work at their own station. Each agent uses its own permission model and its own config file. But each member of the team runs on their own policy. Their actions all end up at the pass, so which one policy decides what reaches the dining room?

Why each agent’s own settings do not add up to a policy

Look at the four agents most teams are running right now, and how each one decides when to ask you and how it handles permissions:

AgentWhat it calls its controlsWhere the setting livesThe switch that turns it all off
GitHub Copilot CLIPer-tool approvals: --allow-tool, --allow-all-tools, --deny-tool (deny wins)Command-line flags/yolo
CursorRules files, plus run modes the docs call “best-effort guardrails rather than a hard security boundary”.cursor/rules (.mdc files) or AGENTS.md in the repo”Run Everything” run mode (used to be called YOLO mode); --force in the CLI
Claude CodeSix permission modes: default, acceptEdits, plan, auto, dontAsk, bypassPermissions--permission-mode flag or defaultMode in settings--dangerously-skip-permissions
CodexTwo settings: approval_policy (on-request, never) and sandbox_mode (read-only, workspace-write, danger-full-access)Config file--yolo, short for --dangerously-bypass-approvals-and-sandbox

That becomes four individual vocabularies, four different file formats, and four places to look. This leaves a few problems. Approval modes differ, so a common instruction (like “ask before running shell commands”) means something different to each agent. And a developer can edit or bypass the setting. An agent’s config file lives in the home directory of the developer and the repo, both of which the developer controls. No view tells you that Claude Code is in bypassPermissions while Codex is in workspace-write, or that Cursor has no rule for the thing Copilot denies. Claude Code and Cursor both let an admin lock things down, but each one only works inside that vendor’s product. Four dishes never make it to the table the same way twice, and there’s certainly no barker to apply consistent judgement.

What a single policy has to cover

Write the policy around actions, not agents. Start with what an agent can do, since all four can do the same things. Here are the ones worth naming first.

  • Credential-file reads. ~/.ssh, ~/.aws and .env hold what an attacker wants, and no task needs an agent to print them.
  • Outbound network from the agent. Data leaves through the network, so a rule on what the agent may send is a rule on exfiltration.
  • Package installs and manifest changes. A dependency the agent picked on its own enters your build with no review.
  • CI/CD and signing config edits. A change to a pipeline or a signing key changes what ships.
  • Destructive shell commands. rm -rf and a forced push cannot be undone.

Where the policy can live

There are four places you could put the rule, but none of them is perfect, since each one trades convenience for control.

  • The agent’s rules file. Quick to set up, but it’s a suggestion, not a rule. The model can skip it and a repo can overwrite it.
  • The repo is shared by every developer who clones it (which is good), but it also means it travels along with the code, so anyone who can push to the repo can edit the policy.
  • A gateway or proxy sits between the agent and the model, which gives you one place to watch. But it only sees network traffic. A shell command or a file read never leaves the machine, so the proxy never sees it.
  • The endpoint is the machine itself, so whatever the agent is and whatever it’s been told, the action has to run here.

Only the last one sits outside the reach of the agent and the repo.

A worked example: one rule, four agents

The rule: an agent may not read ~/.aws/credentials.

Here’s what happens when you try to write that in each agent. Claude Code can do it. Cursor fakes it with .cursorignore, a different file from its rules. Codex and Copilot can’t say it at all. And the ones that work live in files the developer controls.

Written once at the endpoint, the rule matches the file access itself. Codex tries to read the file and the read is steered. Claude Code tries, and the same thing happens. So do Cursor and Copilot. In every case the developer sees the agent report that the read was replaced with guidance, and the agent picks another approach. The wording of the agent’s reply varies by agent. The decision does not.

How Certiv addresses it

Certiv enforces managed policies on the endpoint. The policies cover the actions above that ship today, and each action ends in one of five responses. Operating at this level means every action passes through it, and each one is checked before it runs.

  • Block stops the action. The plate goes back.
  • Pause holds it until a person approves. Agent package installs work this way. The plate waits for the table.
  • Steer replaces the action with guidance, telling the agent why. Credential-file reads work this way, and they are not hard-blocked. The barker wipes the rim and it goes out.
  • Redact removes sensitive content from the action before it proceeds. The garnish comes off before it leaves.
  • Allow and record lets the action proceed and records it. The plate goes out, the ticket gets spiked.

Escoffier never asked which cook made the meat, the sauce or the pastry before the barker judged the dish, and Certiv doesn’t need those specifics either. The same policy covers Copilot, Cursor, Claude Code and Codex. See coding agents for how it works with each, the managed policies catalog for the current list, and the rules worth writing for Codex and Claude Code for the ones to write first. We don’t serve anything we haven’t tasted before it goes to the guest, and you shouldn’t either. Want to see the barker send a plate back? Book a demo and we’ll walk through it on a real laptop.

FAQ

Do I need a different policy per agent? No. Write the rule once against the action and apply it where the action runs. Each agent keeps its own settings, but they stop being your policy.

Can developers turn the policy off? Not from inside an agent. A rules file or a permission mode is a setting the developer controls. A policy enforced on the endpoint sits outside the agent, so editing the agent config does not change it.

Does this slow developers down? Routine actions proceed as before. Only the few actions the policy names get steered, paused, redacted or blocked.