1. Resources
  2. Detection rules
  3. GitHub App or OAuth App Granted Organization Access

GitHub App or OAuth App Granted Organization Access detection rules

An attacker installs a GitHub App, widens an installation's permissions or repositories, or approves an OAuth app, so an application they control keeps access to organization code and settings independently of the account used.

Platform
GitHub
Severity
Medium
Log source
GitHub audit log
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Control of an organization owner account, or of a repository admin account for apps that request only repository permissions other than Administration.
Impact
Persistent, user-independent access to repositories, issues, Actions and organization settings within the permissions granted to the app.
Response
Suspend the installation to block the app's access while it is investigated, or withdraw the OAuth app's approval, and secure the account that granted the access.
Mitigation
Keep OAuth app access restrictions enabled and restrict GitHub App installation by repository administrators, so that only owners can grant applications access.
Audit actions
integration_installation.createintegration_installation.repositories_addedintegration_installation.version_updatedorg.oauth_app_access_approvedorg.disable_oauth_app_restrictions
Threat groups
None listed in MITRE ATT&CK for this technique

How the attack works

GitHub Apps are installed on an organization with their own permissions and repository selection, and act through installation tokens that do not belong to any user. OAuth apps act on behalf of the users who authorize them; with OAuth app access restrictions enabled, they reach organization resources only after an owner approves them. Organization owners can install any app; unless owners restrict it, repository administrators can install apps that request neither organization permissions nor the repository Administration permission on the repositories they administer, and add those repositories to apps that are already installed.

An attacker with owner or repository admin access can install an app they control, add repositories to an existing installation, approve broader permissions for it, approve an OAuth app or disable the OAuth restrictions altogether. A GitHub App keeps its access after the compromised account is reset or removed, and its activity appears under the app's name rather than the attacker's; an OAuth app's tokens keep working until they are revoked or the authorizing user loses access. Installs, permission updates and approvals are recorded in the audit log.

What an attacker needs

  • Control of an organization owner account, or of a repository admin account for apps that request only repository permissions other than Administration.
  • An application controlled by the attacker, or a legitimate one whose credentials or publisher account the attacker controls.

Impact

Persistent, user-independent access to repositories, issues, Actions and organization settings within the granted permissions. An installation with administrative organization permissions is as powerful as an owner.

Detection rules

GitHub App Installed or Installation Access Expanded

Detects a GitHub App being installed on an organization, repositories being added to an existing installation, or updated permissions being approved for an installation.

LevelMediumStatusExperimentalLog sourceGitHub audit log
title: GitHub App Installed or Installation Access Expanded
id: d49fefdc-e163-4e5e-8487-12a983bda8db
status: experimental
description: >-
  Detects a GitHub App being installed on an organization, repositories being
  added to an existing installation, or updated permissions being approved
  for an installation.
references:
  - https://attack.mitre.org/techniques/T1671/
  - https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/audit-log-events-for-your-organization
  - https://docs.github.com/en/apps/using-github-apps/reviewing-and-modifying-installed-github-apps
author: Forestall
date: 2026-11-10
tags:
  - attack.persistence
  - attack.t1671
logsource:
  product: github
  service: audit
detection:
  selection:
    action:
      - integration_installation.create
      - integration_installation.repositories_added
      - integration_installation.version_updated
  condition: selection
falsepositives:
  - Approved integrations being rolled out or updated by their publishers. Keep an allow-list of reviewed apps (integration) and alert on the rest.
level: medium

False positives

  • Approved integrations being rolled out or updated by their publishers. Keep an allow-list of reviewed apps (integration) and alert on the rest.

GitHub OAuth App Approved or OAuth App Restrictions Disabled

Detects an owner granting an OAuth app access to organization resources, or disabling OAuth app access restrictions, after which any OAuth app a member authorizes can reach the organization's private resources.

LevelMediumStatusExperimentalLog sourceGitHub audit log
title: GitHub OAuth App Approved or OAuth App Restrictions Disabled
id: 0e2c1f73-a029-44a4-8bb9-98ba8ee7c755
status: experimental
description: >-
  Detects an owner granting an OAuth app access to organization resources, or
  disabling OAuth app access restrictions, after which any OAuth app a member
  authorizes can reach the organization's private resources.
references:
  - https://attack.mitre.org/techniques/T1671/
  - https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/audit-log-events-for-your-organization
  - https://docs.github.com/en/organizations/managing-oauth-access-to-your-organizations-data/about-oauth-app-access-restrictions
author: Forestall
date: 2026-11-10
tags:
  - attack.persistence
  - attack.t1671
logsource:
  product: github
  service: audit
detection:
  selection:
    action:
      - org.oauth_app_access_approved
      - org.disable_oauth_app_restrictions
  condition: selection
falsepositives:
  - Owners approving OAuth apps that members requested; review the app (oauth_application_name) and keep an allow-list of approved ones. Disabling the restrictions is rarely legitimate.
level: medium

False positives

  • Owners approving OAuth apps that members requested; review the app (oauth_application_name) and keep an allow-list of approved ones. Disabling the restrictions is rarely legitimate.

Triage

  • Identify the application (integration, oauth_application_name), who granted access (actor) and the repositories and permissions involved (repository_selection, repositories_added_names).
  • Check the app's publisher and whether the app was requested through the normal approval path (integration_installation_request.create or org.oauth_app_access_requested events).
  • If unexpected, suspend or uninstall the app, revoke its tokens and review the actions it performed since installation.

Response

Once the attack is confirmed:

  1. Suspend the installation, which blocks the app's access while keeping it installed for the investigation, and uninstall it when the review is done. For an OAuth app, withdraw its approval and switch OAuth app access restrictions back on if they were disabled.
  2. Secure the account that granted the access. Reset its credentials and sessions and revoke its tokens and SSH keys, because the app was only the second foothold.
  3. Search the audit log for the application as the actor since it was installed. A GitHub App's activity appears under the app's name and not under the account that installed it.
  4. Treat the repositories and settings within the app's permissions as exposed. Rotate secrets stored in repositories it could read, and check what it could change with write permissions, such as workflow files and repository settings.
  5. For an OAuth app, have the members who authorized it revoke the authorization. Its tokens act for those users and keep working until they are revoked or the user loses access.
  6. Look for installations of the same app in the other organizations of the enterprise and on other repositories.

Mitigation

  • Keep OAuth app access restrictions enabled and restrict GitHub App installation by repository administrators, so only owners can grant applications access.
  • Grant installations access to selected repositories only, and review installed apps and their permissions regularly.
  • Alert on app installations, permission updates and OAuth app approvals, and remove applications without a clear owner.

Frequently asked questions

Why does the app still have access after the compromised account was reset?

A GitHub App is installed on the organization with its own permissions and acts through installation tokens that do not belong to any user. Resetting or removing the account that installed it changes nothing for the app. Its access ends when the installation is suspended or uninstalled, or is narrowed when its permissions and repositories are reduced.

Can someone who is not an organization owner install an app?

Yes, unless owners restrict it. Repository administrators can install apps that request neither organization permissions nor the repository Administration permission on the repositories they administer, and can add those repositories to apps that are already installed. A compromised repository admin account is therefore enough for a limited installation.

How do an OAuth app and a GitHub App differ as a way to keep access?

A GitHub App has its own installation and permissions, so its access is independent of any user and its activity appears under the app's name. An OAuth app acts on behalf of the users who authorized it, and with OAuth app access restrictions enabled it reaches organization resources only after an owner approves it. Its tokens keep working until they are revoked or the authorizing user loses access.

Which benign events match the installation rule?

Approved integrations being rolled out, repositories being added to them, and updated permissions being approved for an installation. Keep an allow-list of reviewed apps by the `integration` field and alert on the rest. An app that was requested through the normal approval path leaves an `integration_installation_request.create` event before the installation.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.