CSE Roadmap

Core tier · about 4 hours · 13 parts

Part 9 of 13 · 1 min read

Answering least-privilege questions in an interview

How do you limit the damage of a compromised agent?

"Least privilege enforced outside the model: scoped, short-lived, per-task credentials with caps on amount and uses, narrow tools instead of a shell, no escalation paths, and approval for irreversible actions. In the example's simulation moving from one service account to scoped tools cut worst-case damage from about 27,000 to 4,500 units, and per-task grants to 53." Follow-up: "What does it cost?" 12 percent of legitimate tasks in the example's mix needed a refund above the cap and went to approval.

What is excessive agency?

"OWASP LLM06: the agent has too much functionality, permission or autonomy for its task. Typical cases are a general-purpose shell, a database role with write access when only reads are needed, or the ability to act without any check." Follow-up: "Which is easiest to fix?" Functionality: remove tools. Permissions need credential changes; autonomy needs an approval design.

How do you give a sub-agent access safely?

"By attenuation: the delegating agent derives a narrower grant (one resource, fewer actions, a lower cap, an earlier expiry, fewer uses) and the derivation fails if it would be broader. The sub-agent can never exceed its parent." Follow-up: "How is that enforced?" In a token or policy service the model cannot modify, not in the prompt.

Why are caps useful if you also have approvals?

"They bound the damage while approvals are slow, skipped or fatigued (Level 8 module 8). A cap is a hard numeric bound; approval is a human judgement that can be wrong." Follow-up: "How do you choose the cap?" From the loss you can tolerate per incident times the attempts an attacker could make before detection, then check it against legitimate task data.