Yes. Restricting access to the GitHub-hosted agents pool is supported.
The key difference is that the Azure Pipelines pool is open to all pipelines by default and its pipeline permissions can't be configured, but other agent pools can be restricted. The GitHub-hosted agents pool is a separate pool, so it can be managed through agent pool security and pipeline permissions.
To limit usage to only selected projects or pipelines:
- In the target project, go to Project settings > Agent pools.
- Select GitHub-hosted agents.
- Open Security.
- In Pipeline permissions, turn on Restrict permission.
- Use Add pipeline to authorize only the YAML pipelines that should use this pool.
- In User permissions, assign only the required users or groups the User or Administrator role.
Behavior to expect:
- If a restricted YAML pipeline is not authorized for the pool, an authorization request is raised and an agent pool Administrator must approve it.
- Classic pipelines are not restricted by pipeline permissions.
- The Azure Pipelines pool cannot be locked down this way, but the GitHub-hosted agents pool can because it is a separate pool.
- Existing pipelines do not start using the GitHub-hosted agents pool automatically. A pipeline must explicitly reference that pool in YAML or select it in the classic editor.
About automatic access for new projects:
- The context does not state that the GitHub-hosted agents pool is automatically added to all new projects.
- The documented behavior is that enabling pay-as-you-go creates a new GitHub-hosted agents pool in the organization, and no existing pipelines use it unless explicitly updated.
- Access control is done through the pool's Security and Pipeline permissions settings.
About restricting which VM images can be used:
- No supported control for allow/deny by image label is described in the context.
- Only pool-level usage restriction is documented.