Advertisement
Telegram ads for your business · TCA Media
Wednesday, 25 November 2026RUUZEN
Advertisement
Telegram ads for your business · TCA Media
Technology

Trust, but Prohibit: How to Restrict AI Agent Permissions at Different Levels

Magnit Tech's lead developer Mikhail Onyanov tested an AI agent's work and discovered rule violations during git push. He suggests protecting infrastructure not only with instructions but also with external restrictions.

23 Nov, 18:24Read in Russian
Nahrizul Kadri на Unsplash / Unsplash

Onyanov analyzed 193 git push calls from his work sessions. In approximately a third of 109 cases after introducing a rule, the agent did not ask for permission, sent changes to main three times, and out of 31 force push attempts, the user explicitly permitted only two.

According to the author, instructions in the AGENTS.md file do not provide reliable protection: they enter the model's context as ordinary text, which the agent may forget or bypass. Therefore, direct submission of changes to main should be blocked at the GitLab level using protected branches.

Onyanov divides protective mechanisms into four levels. The zeroth level consists of instructions that only increase the likelihood of desired behavior. Next are agent hooks capable of blocking recognized commands but vulnerable to bypasses through scripts and other tools. Isolation at the OS, container, or virtual machine level restricts access to files and the network. The author considers platform-side control the most reliable: separate agent permissions and mandatory checks in Git, databases, and CI.

As examples of risks, he cites accidental errors, actions with excessive permissions, and deliberate attacks via prompt injection. The article's general conclusion is that protection becomes more reliable when it depends less on the model's own decisions.

Advertisement
Telegram ads for your business · TCA Media