GitHub Permissions

The permissions required to successfully connect the GitHub adapter depend on the authentication method you use. In addition, some permissions are required only for fetching specific asset types.

Permissions for Authenticating with an Authorization Token

For all asset types except for Secrets, Alerts/Incidents, and Application Settings

Roles:

  • The Security Manager role is required to fetch Aggregated Security Findings

Repository Permissions:

  • Administration - Read-only
  • Codespaces metadata - Read-only
  • Commit statuses - Read-only
  • Contents - Read-only
  • Metadata - Read-only
  • Pull requests - Read-only

Account permissions:

  • Email addresses - Read-only
  • Gists - Read-only
  • Profile - Read-only

For Fetching Secrets

Repository Permissions:

  • Codespaces secrets - Read-only
  • Secrets - Read-only

Account permissions:

  • GPG keys - Read-only
  • Git SSH keys - Read-only
  • SSH signing keys - Read-only

For Fetching Alerts/Incidents

Repository AND Account permissions:

  • Code scanning - Read-only
  • Secret scanning - Read-only

For Fetching Application Settings and Licenses

The 'Plan - Read-only' Account permission is required.

Permissions for Authenticating with a GitHub App

Grant the GitHub App only the permissions you need. All read permissions are set to Read-only. Metadata is mandatory for every GitHub App.

Always Required

These permissions are required to fetch users, organizations, and repositories.

ScopePermissionAccessUsed For
RepositoryMetadataRead-onlyRepositories, tags, contributors, and collaborators
OrganizationMembersRead-onlyMembers and roles, teams, outside collaborators, and SAML/SCIM identities
OrganizationAdministrationRead-onlyInstalled apps (Extensions)
OrganizationPersonal access tokensRead-onlyPersonal access tokens as Secrets. Not required if you turn off this setting.
OrganizationPlanRead-onlyOrganization plan for Licenses

Required Only When an Advanced Setting Is Enabled

Advanced SettingScopePermissionAccess
Fetch code and secret scanning alertsRepositoryCode scanning alertsRead-only
RepositorySecret scanning alertsRead-only
RepositoryContentsRead-only (CodeQL databases)
Fetch repository vulnerabilitiesRepositoryDependabot alertsRead-only
Fetch repository commits, last login per user, SBOM, or default branchesRepositoryContentsRead-only
Fetch branch rulesRepositoryAdministrationRead-only (branch protection)
Fetch repository runnersRepositoryAdministrationRead-only
Fetch user repository SSH keysRepositoryAdministrationRead-only (deploy keys)
Fetch repository workflowsRepositoryActionsRead-only
Fetch IssuesRepositoryIssuesRead-only
Fetch Projects V2OrganizationProjectsRead-only
RepositoryIssues and Pull requestsRead-only (to read project item content)
Copilot license (SaaS Management)OrganizationGitHub Copilot BusinessRead-only (together with Organization Administration - Read-only)

Required for Enforcement Actions

These permissions require write access and are needed only if you use the actions.

Enforcement ActionScopePermissionAccess
GitHub - Create Issue and GitHub - Update IssueRepositoryIssuesRead and write
GitHub - Add issues to projectsOrganizationProjectsRead and write
📘

Account permissions apply only to user-to-server tokens, so they are not required for a GitHub App. Set all other permissions that are not listed here to No access.


Did this page help you?