
- Repository policies (create, delete, transfer, rename, change visibility)
- Actions and Actions runners policies
- Codespaces policies
- Member privileges
- Advanced Security features (for example: secret scanning and AI detection in secret scanning)

- Select Repository policies and choose Create new policy.
- Give the policy a clear name (for this demo we use
repo-policy-1) and set Enforcement to Active or Dry-run depending on whether you want immediate enforcement. - Configure the allow list (bypass list) to exempt specific roles or teams from restrictions. In this example we add
Organization adminto the allow list. - Target the scope: choose specific organizations, repository name patterns, or all repositories. In this demo we target an organization called
Game Dev Studio.

Game Dev Studio) you’ll see the policy targeting summary and the allow list showing Organization admin as an allowed role.

You can use pattern targeting to include specific repos (for example
game-*), or explicit repo selection. Use the allow list to grant exceptions for administrative roles or trusted teams.
In this demo we enable “Restrict creations” so that only identities on the allow list (Organization admin) can create repositories in the targeted organization(s).

- Organization admins (in the allow list) retain the ability to create repositories inside the targeted organization. For example, an admin will see the targeted org in the owner selector and can create a repository named
new-repo.

- Non-admin members (for example, a
Dev2user) will not be able to create repositories in the targeted organization: the org option will be disabled for them. They can still create repos in their personal accounts unless a separate policy restricts personal-account repo creation.
Repository policies apply only to the organizations or repositories you target. A “Restrict creations” rule prevents non-allowed identities from creating repositories in those targeted organizations, but it does not block users from creating repositories in their personal accounts unless you explicitly include those accounts in your policy scope.
- Use descriptive policy names (for example:
restrict-repo-creations-gamedev) and include the enforcement mode in your naming convention if you run dry-runs. - Start in Dry-run to monitor impact, then switch to Active after confirming no unintended blocking.
- Use allow lists sparingly; prefer role-based allow lists (e.g.,
Organization admin) instead of broad team or user allow lists. - Document policy scope and exceptions in your internal admin playbook so organization admins understand the intended behavior.