I want to use an agent for infrastructure work, but I'm uneasy about giving it broad access to systems and sensitive data. What permissions and safeguards are sensible to start with?
How much access should an AI agent get?
Answers
Start with a dedicated identity that can read only the resources needed for the task. An agent can still help review logs, investigate code changes, and suggest diagnoses without being able to modify infrastructure.
Read-only doesn't mean risk-free. Logs and configuration can contain sensitive information, so scope what it can see as well as what it can do. Expand access gradually if there's a clear reason.
Reply to this answer
Keep the agent out of the direct deployment path. Let it propose configuration changes through a pull request, then have a person review and approve them through the normal process. That gives you useful assistance without handing over the keys to production.
Reply to this answer
Watch the credentials. Give the agent its own short-lived identity rather than your personal token, and don't let it inherit a shell environment full of secrets. Scope the identity like you would a service account.
If a credential gets pasted into a prompt or otherwise exposed to an agent, treat it as potentially compromised and rotate it.
Reply to this answer
Run it in an isolated environment, ideally a disposable VM, and leave out SSH, cluster, and cloud credentials it doesn't need. A container can help too, but neither option is a magic shield.
Check network access as well. An agent that can't write to your infrastructure might still be able to send data elsewhere if it can read that data and reach the network.
Reply to this answer
Add your answer
Answers are reviewed before publication.
_y84!zorduno.2:
The review still needs to check what the proposed change actually does. A required approval isn't much protection if changes get waved through.