Study FAQ
How should I scope GitHub Actions secrets for Copilot-assisted business workflows?
Also asked as 2
- Which secret scope and workflow boundaries should I check before a business automation uses credentials?
- How can I limit credential exposure in a GitHub Actions business workflow?
Answer
Choose the narrowest applicable secret scope and supply a credential only to the action or step that needs it. GitHub Actions supports repository, environment and organization secrets; storing a secret does not justify putting its value in a prompt or repository file.
For an organization secret, inspect its repository access policy and restrict it to the repositories that need it. Organization-level secrets are not accessible to private repositories on GitHub Free, so confirm plan and repository compatibility before assuming a workflow can receive one.
A workflow must explicitly provide the required secret to its consuming action or step through the documented secrets context as an input or environment variable. Secrets are not automatically passed to reusable workflows. With the exception of GITHUB_TOKEN, they are not passed to runners for workflows triggered from forks.
When a credential appears unavailable, identify the workflow's trigger, scope and explicit secret handoff rather than copying the value into task text. Inspect configuration and authorized execution behavior without logging the value. Also examine the external service identity's own permissions: selecting a narrow tool list cannot compensate for a credential whose resource reach exceeds the task.
References: Using secrets in GitHub Actions - GitHub Docs, Adding MCP servers for GitHub Copilot CLI - GitHub Docs.
Full explanation
GH-700: Apply Governance Controls to Copilot Business Work
Study guide · GH-700
Read the full explanation