Skip to main content
We recommend using GitHub Apps and fine‑grained personal access tokens (PATs) for automation and integrations because they provide better security controls and least‑privilege options. However, without organization‑level governance, even secure options can be misused. This guide explains how to enforce consistent approval workflows for third‑party apps, OAuth apps, and fine‑grained PATs so you can protect your source code and metadata.
A slide titled "The Secure Choices" showing two rounded option cards—"GitHub Apps" and "Fine-grained PATs"—each with a blue icon and a green check mark.
Why worry? A developer can unknowingly grant a malicious third‑party application access to repositories, exposing proprietary code and organization data.
A slide titled "But How Do We Govern It?" showing a simple diagram where a junior developer grants access to a malicious third-party app, which then connects to the Internet.
Default behavior: newly created organizations are permissive. By default, any member can authorize an OAuth app or install a GitHub App — a sizable attack surface if left uncontrolled.
An infographic titled "The Default – Wide Open" shows a newly created organization (building icon with five user icons). An arrow points to an OAuth App card labeled "any member can authorize" with an open padlock.
Administrator action (must do): enable third‑party application access restrictions at the organization or enterprise level. This flips the model from permissive installs to a controlled, review‑based workflow.
A slide showing an organization settings panel for "Third‑party Access" titled "Enable the Restriction." The "Third‑party application access restrictions" option is labeled "Not restricted" with the toggle switched off.
What happens after enabling restrictions
  • Marketplace installs or OAuth/GitHub App authorizations must be requested instead of immediately granted.
  • Requests enter a pending queue for organization owners and administrators to review.
  • Requests include the requester identity, app description, and the permissions requested.
Users trying to add a code scanning tool, CI app, or other integration will see a “Request installation” button and their request will be routed to the admin review queue instead of being instantly authorized.
A presentation slide titled "A Formal Request Instead" showing UI cards for a "Code scanning app" with a blue "Request installation" button. To the right is a "Third-party Access › Pending requests" panel noting the app was requested by a member and reviewed by organization owners.
During review, check:
  • Who requested the app (identity and role)
  • What the app does (purpose and vendor)
  • The permission scopes requested (read vs write; repository vs admin level)
If the requested scopes are minimal (e.g., read‑only access to issues for a project board), approving is reasonable. If the app requires admin or write access to sensitive settings, deny or request reduced scopes. The same approval model applies to fine‑grained PATs. Require administrator review when tokens are scoped to access organization repositories; such tokens remain pending until an admin approves them.
A diagram titled "Token Approval Mandate" showing a developer requesting scopes for a fine-grained personal access token marked "Pending approval" that will be scoped to an organization repository. An administrator icon and a "Reviews" check indicate an approval step.
Quick reference for admins For exam purposes, remember two core points:
  • By default, any organization member can install apps or authorize OAuth apps.
  • Enabling third‑party application access restrictions routes install/authorization attempts to an administrator approval queue.
A slide titled "For the Exam" listing two points: (1) any member can install apps, illustrated by a person icon pointing to an app and an unlocked padlock, and (2) restrictions route installs to a queue, shown with a toggle switch and a blocked/cross icon. Copyright KodeKloud appears at the bottom.
Enforce consistent governance As an administrator you control approvals and denials in line with corporate security policy. Enforce the approval workflow consistently for OAuth apps, GitHub Apps, and fine‑grained PATs at the org or enterprise level to protect code, secrets, and repository metadata.
Enable and configure third‑party application access restrictions at the org or enterprise level to force admin review of OAuth apps, GitHub Apps, and fine‑grained PATs that target your organization’s resources.
Further reading and references
If you manage multiple organizations, consider enabling restrictions at the enterprise level to enforce a single, consistent approval policy across all child organizations.

Watch Video