# Agents secrets and variables

Tier 2 key, `key:agent-secrets`. Page: https://ghtier.com/tier/keys-policies/agent-secrets

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.

**Related permissions:** [Agent secrets: Write (repository)](https://ghtier.com/tier/permissions/agent-secrets-write.md) (Tier 2), [Agent secrets: Write (organization)](https://ghtier.com/tier/permissions/organization-agent-secrets-write.md) (Tier 2), [Agent variables: Write (repository)](https://ghtier.com/tier/permissions/agent-variables-write.md) (Tier 2)

**Defenses (checklist):** [Decide which AI coding agents and MCP servers may work on the organization's repositories](https://ghtier.com/checklist/org-agent-mcp-controls.md)

**Sources:**
- [GitHub Docs: Configure secrets and variables for Copilot cloud agent](https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/configure-secrets-and-variables)

From ghtier (https://ghtier.com). Every entry and link: https://ghtier.com/data/graph.json. Tiers: https://ghtier.com/tier.
