Manoj Perla.ENGINEERING NOTES & OPEN SOURCE
All writing

Why AI Agents Need Least-Privilege Architecture

AI agents amplify the importance of least privilege because permissions translate directly into operational capability and potential blast radius.

Key takeaway

Design permissions around specific tasks and resources; review combinations of tools, not only individual tool names.

An agent with repository-write access and a pipeline trigger may be able to initiate changes far beyond what either tool name suggests. A useful least-privilege review starts with the effective action available to the identity, including the combination of tools, credentials, and target resources.

Build a capability map

TaskMinimum capabilityBoundary to test
Investigate a failed testRead selected logs and test artifactsCannot edit the repository or restart a service.
Draft a test changeWrite to an isolated branchCannot merge or deploy.
Upload diagnosticsWrite approved synthetic data to an allowlisted destinationCannot select arbitrary recipients or destinations.

Make the interface narrow enough to enforce

A tool named run_command can expose substantially more authority than a tool that accepts a validated test identifier. Constrain inputs as well as tool selection. Review destination, repository, environment, and operation independently; an allowed tool can still receive unsafe parameters.

Read and write access deserve separate decisions. A diagnostic task may need extensive observation without any need to mutate a target. Where an approval is required, bind it to the actual operation and target so changing the proposal invalidates the approval.

Test both sides of the permission

For each allowed capability, include a legitimate case and a nearby prohibited case: the same upload with another destination, the same file operation outside the assigned directory, or the same change against a protected branch. Record the attempted operation and enforcement result. For a prohibited change, also check the target state: a rejection message alone does not demonstrate that no side effect occurred. Keep this check in an isolated test environment with synthetic data. A prompt telling the agent to be careful does not establish an access boundary.

The public Lab demonstrates a small destination allowlist. It is a worked example of one control, not a complete least-privilege architecture. Runtime validation and identity-level permissions should be reviewed together.

Next step: See how runtime policy and permissions work together

Revised : Clarified how to verify prohibited operations by checking both the enforcement result and target state.

Zero Trust for AI Agents: Are Excessive Permissions Still Dangerous?

Runtime intent validation is valuable, but it does not make excessive AI-agent permissions harmless. Strong agent security requires layered controls.

Read essay · 2 min

The Emerging Role of the AI Agent Security Auditor

As organizations deploy more AI agents, they will need automated methods to discover agents, map capabilities, assess permissions and evaluate runtime protections.

Read essay · 2 min
Back to all writing