A cloud agent's identity needs hard limits, such as pushing only to its own branches and passing the same rulesets and reviews as people. GitHub documents these protections for Copilot cloud agent and how to build an enterprise environment around them, including secrets for its MCP servers. Apply the same pattern to any third party agent with repository access.
Read in this order
- OfficialRisks and mitigations for GitHub Copilot cloud agentStart here: the built-in limits on a cloud agent and why each exists.
- OfficialGitHub: Building a secure cloud environment for agents in your enterpriseA step by step enterprise setup you can copy for other agents.
- OfficialClaude Code: Configure cloud environments (network secrets)How another vendor handles network access and secrets in cloud sessions.