ghtier
← All keys & policies
Key·repository

Agents secrets and variables

Tier 2 · MediumData

Why Tier 2

Credentials handed to the agent's environment. The agent and anything it runs can read them, so a prompt-injected agent can use or leak them. How bad that is depends on what each one unlocks.

Secrets and variables of the Agents type, set by repository administrators or, for many repositories at once, organization owners. They are environment variables in the agent's development environment, including copilot-setup-steps.yml; names starting with COPILOT_MCP_ only reach MCP servers.

Available on: Free (with a Copilot plan), Team (with a Copilot plan), Enterprise Cloud, EMU. Source

Attack path

An issue or comment the agent reads can tell it to print or send its environment. The firewall limits where it can send them, but setup steps and MCP servers run outside it.

Mitigations

Detect

Nothing in the organization or enterprise audit log shows this. Review it on a schedule instead.

Related permissions

GitHub Docs: Configure secrets and variables for Copilot cloud agent