Least privilege for agents
For engineers
Scoped short-lived credentials, separate agent identities, read-only defaults and approval gates for actions that cannot be undone
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
An agent only needs to post comments on pull requests in one repository. Which token fits best?
Check yourself · 2 of 5
Why give an agent its own service account instead of using an employee's login?
Check yourself · 3 of 5
What is the safest starting set of tools for a new agent that summarises support tickets?
Check yourself · 4 of 5
Which agent action most clearly needs a human approval first?
Check yourself · 5 of 5
What is the main goal of a permission review for an agent?
Topics
- Scoped, short-lived tokens for agents4 min read · Fine-grained access tokens, narrow OAuth scopes and per-task credentials that expire, instead of a human's admin token
- Separate identities for agents and humans4 min read · Service accounts and on-behalf-of delegation so agent actions are attributable and never exceed the delegating user's rights
- Read-only by default, write by exception4 min read · Starting agents with read tools, adding narrow write tools one at a time, and using dry runs and staging copies
- Approval gates for irreversible agent actions4 min read · Which actions need a human (send, delete, pay, merge, deploy), showing the exact action for approval, and avoiding approval fatigue
- Auditing agent permissions and action logs4 min read · Reviewing granted scopes against actual use, reading action logs, and revoking access the agent no longer needs
Start here
- OWASP AI Agent Security Cheat Sheet (opens in a new tab)ArticleFree
Practical controls for agent tools, permissions, human approval and monitoring.
- LLM06: Excessive Agency (OWASP Gen AI Security Project) (opens in a new tab)StandardFree
Names excessive functionality, permissions and autonomy as the root causes, with mitigations.
- GitHub Docs: Managing your personal access tokens (opens in a new tab)DocsFree
How fine-grained tokens limit repositories, permissions and lifetime.
Scenarios
Helps to know first
110 questions · last verified 2026-12