A coding agent needs to create issues and push commits in three specific repositories, but should have no access to any other repositories in the organization. What is the most secure authentication configuration for this agent?
Select an answer to reveal the explanation.
Short Explanation and Infographic
A GitHub App is a VIP pass scoped to specific rooms, not a master key. You install it on exactly the three repositories you want to give it access to — it is physically incapable of touching any other repository in the organization, no matter what.
Full explanation below image
Full Explanation
GitHub Apps are the recommended authentication mechanism for agents that need scoped, multi-repository access. Unlike personal access tokens (which grant access to all repositories the creating user can access), GitHub Apps have two levels of permission scoping: (1) the App definition specifies which permission types and levels are needed (issues:write, contents:write), and (2) the App installation specifies exactly which repositories the App can access. Installing the App on only three repositories means it literally cannot make API calls against any other repository in the organization, even if someone tried to use the token against them.
Option A (organization-level PAT) typically grants access to all repositories the creating user has access to, or can be scoped to specific repositories in fine-grained PATs. However, organization-level PATs tie access to the human user's account, creating a security dependency on that account's continued employment and access level.
Option C (GITHUB_TOKEN) automatically scopes to the current workflow repository. For a multi-repository scenario requiring access to three repositories, the default GITHUB_TOKEN is insufficient — it is scoped to one repository per workflow run. Cross-repository access requires additional configuration.
Option D (machine user with collaborator access) is a legacy pattern. Machine users are full GitHub accounts that count against organizational seat limits, cannot be scoped below the repository level (all-or-nothing per repo), and do not support fine-grained permission types.
GitHub Apps with installation scoping are the current best practice for multi-repository agent authentication.