Slide 20 of 27
Part 4 · PreventionSlide 20
Slide 20 · Mitigation 2 of 7
Credentials should only grant what the task requires — read-only when reading.
📄 OWASP LLM Top 10:2025 · LLM06 Prevention — Minimize Permissions
M2 — Least-Privilege Permissions
Authenticate Agents with the Minimum OAuth Scope and IAM Role for Each Task

“Avoid using overpowered extensions or tokens. Restrict the permissions granted to LLM extensions to only the minimum necessary. Authenticate to external services using OAuth with a scope limited to the specific task.” A read credential fails safely — an admin credential fails catastrophically.

OpenClaw (2026): corporate AI agents connected to Slack, Google Workspace, and project systems used shared admin service accounts. When malicious plugins exploited the agents, attackers inherited admin-level access to every connected system. The credentials were never scoped to the task — they were scoped to whatever was convenient to configure once.

→ For every external system an agent touches, define the minimum OAuth scope or IAM role needed
→ Use per-task credentials, not shared service accounts
→ Execute agent actions in the user’s security context where possible — actions inherit the user’s own access controls
→ Never use admin credentials for read-only tasks

Attempt a write, delete, or privileged operation using the agent’s credentials outside the agent. If it succeeds but the agent’s task doesn’t require it, the credential scope is too broad. Treat credential audits as part of your agent deployment checklist.

← BackNext → M3: Human-in-the-loop