How the attack works
An organization does not only install apps, it also owns app registrations: OAuth apps and GitHub Apps that its teams built for sign-in, automation or integrations. Whoever controls a registration controls the app's credentials. GitHub states that with a client secret and a user's authorization code an OAuth app can sign in a user and generate access tokens that make API requests on behalf of that user. A GitHub App authenticates as itself with a private key, which is generated in the app's settings.
An attacker who reaches the settings of such an app can take it over in three ways that leave the app itself looking unchanged. Generating a new client secret for an OAuth app gives the attacker a working credential next to the legitimate one. Transferring the ownership of an OAuth app or a GitHub App registration to another user or organization moves the whole registration, with the ability to create its credentials, out of the organization. Adding a GitHub App manager gives another account lasting control over the settings of one app or of all apps the organization owns, and GitHub states that app managers can also transfer the ownership of a registration. GitHub records these steps as oauth_application.generate_client_secret, oauth_application.reset_secret, oauth_application.transfer, integration.transfer, integration.manager_added and org.integration_manager_added. The event reference lists no action for generating a private key or a client secret of a GitHub App, so that step cannot be seen in the audit log.
What an attacker needs
- Control of an organization owner account, since owners manage the app registrations the organization owns.
- Or control of a GitHub App manager, who can manage the settings of the apps the role covers and transfer their ownership.
- For an app owned by a personal account, control of that account.
Impact
The attacker holds a credential or the ownership of an application that users and organizations have already authorized or installed. With an OAuth app's client secret the attacker can complete the app's authorization flow and obtain user tokens in the app's name. As owner or manager of a GitHub App registration the attacker can change the app's settings, its permissions request and its webhook, and create its credentials. The access belongs to the app and not to a person, so it survives the reset of the account that was used to obtain it.
Detection rules
GitHub App Manager Added
Detects an account being made a GitHub App manager. integration.manager_added is written when a member of an enterprise or organization is added as a manager of a GitHub App, and org.integration_manager_added when an organization owner grants a member access to manage all GitHub Apps owned by the organization. App managers can manage the settings of the app registrations the role covers and can transfer their ownership, so the role gives lasting control over an app without the owner role. The event names the new manager in manager.
title: GitHub App Manager Added
id: cf7f66d4-b2ac-4cf5-9994-27480565acf8
status: experimental
description: >-
Detects an account being made a GitHub App manager.
integration.manager_added is written when a member of an enterprise or
organization is added as a manager of a GitHub App, and
org.integration_manager_added when an organization owner grants a member
access to manage all GitHub Apps owned by the organization. App managers
can manage the settings of the app registrations the role covers and can
transfer their ownership, so the role gives lasting control over an app
without the owner role. The event names the new manager in manager.
references:
- https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
- https://docs.github.com/en/enterprise-cloud@latest/organizations/managing-programmatic-access-to-your-organization/adding-and-removing-github-app-managers-in-your-organization
- https://attack.mitre.org/techniques/T1098/001/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.001
logsource:
product: github
service: audit
detection:
selection:
action:
- integration.manager_added
- org.integration_manager_added
condition: selection
falsepositives:
- A developer who joins the team that maintains an app. Confirm the grant with an organization owner, and prefer a manager for one app over a manager for all apps.
level: medium
False positives
- A developer who joins the team that maintains an app. Confirm the grant with an organization owner, and prefer a manager for one app over a manager for all apps.
GitHub App or OAuth App Ownership Transferred
Detects the transfer of an app registration to another account. integration.transfer is written when the ownership of a GitHub App is transferred to another user or organization, and oauth_application.transfer when an OAuth application is transferred from one account to another. The new owner manages the registration and can create its credentials, so a transfer out of the organization hands over an app that users and organizations already trust. For a GitHub App the event names both sides in transfer_from, transfer_to and transfer_to_type. Transfers are rare, so every one is worth a look.
title: GitHub App or OAuth App Ownership Transferred
id: f04b18f2-30f4-4260-8b89-26a0c075caf7
status: experimental
description: >-
Detects the transfer of an app registration to another account.
integration.transfer is written when the ownership of a GitHub App is
transferred to another user or organization, and
oauth_application.transfer when an OAuth application is transferred from
one account to another. The new owner manages the registration and can
create its credentials, so a transfer out of the organization hands over
an app that users and organizations already trust. For a GitHub App the
event names both sides in transfer_from, transfer_to and
transfer_to_type. Transfers are rare, so every one is worth a look.
references:
- https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
- https://docs.github.com/en/enterprise-cloud@latest/apps/maintaining-github-apps/transferring-ownership-of-a-github-app
- https://docs.github.com/en/enterprise-cloud@latest/apps/oauth-apps/maintaining-oauth-apps/transferring-ownership-of-an-oauth-app
- https://attack.mitre.org/techniques/T1098/001/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.001
logsource:
product: github
service: audit
detection:
selection:
action:
- integration.transfer
- oauth_application.transfer
condition: selection
falsepositives:
- An app that is moved from a developer's personal account to the organization, or from an organization to the enterprise account, which is good practice. Confirm that the receiving account in transfer_to is one of yours.
level: high
False positives
- An app that is moved from a developer's personal account to the organization, or from an organization to the enterprise account, which is good practice. Confirm that the receiving account in transfer_to is one of yours.
GitHub App or OAuth App Registered
Detects a new app registration: integration.create is written when a GitHub App is created and oauth_application.create when an OAuth application is created. A registration under the organization carries the organization's name when users are asked to authorize or install it, and its creator holds its credentials. The rule is context for the other rules on this page. A new registration followed by a client secret, a manager or a transfer shows the whole life of an app that somebody set up in a hurry.
title: GitHub App or OAuth App Registered
id: b3c158f6-54ca-48d0-9702-35e76e55eb2f
status: experimental
description: >-
Detects a new app registration: integration.create is written when a
GitHub App is created and oauth_application.create when an OAuth
application is created. A registration under the organization carries the
organization's name when users are asked to authorize or install it, and
its creator holds its credentials. The rule is context for the other
rules on this page. A new registration followed by a client secret, a
manager or a transfer shows the whole life of an app that somebody set up
in a hurry.
references:
- https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
- https://docs.github.com/en/enterprise-cloud@latest/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app
- https://attack.mitre.org/techniques/T1098/001/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.001
logsource:
product: github
service: audit
detection:
selection:
action:
- integration.create
- oauth_application.create
condition: selection
falsepositives:
- Teams that register an app for a new integration or for sign-in to an internal tool, which is the usual cause. Keep the rule for context, or alert on registrations by accounts that have never owned an app.
level: low
False positives
- Teams that register an app for a new integration or for sign-in to an internal tool, which is the usual cause. Keep the rule for context, or alert on registrations by accounts that have never owned an app.
GitHub OAuth App Client Secret Generated or Reset
Detects a new client secret for an OAuth app (oauth_application.generate_client_secret, which GitHub describes as an OAuth application's secret key that was generated) and a reset of the secret (oauth_application.reset_secret). GitHub states that with a client secret and a user's authorization code an app can sign in a user and generate access tokens. A secret that is generated outside a planned rotation gives its holder a credential for an app that users have already authorized. The event names the app in oauth_application and holds no secret value.
title: GitHub OAuth App Client Secret Generated or Reset
id: cb11ab72-3303-488f-bbaf-a994e1031de6
status: experimental
description: >-
Detects a new client secret for an OAuth app
(oauth_application.generate_client_secret, which GitHub describes as an
OAuth application's secret key that was generated) and a reset of the
secret (oauth_application.reset_secret). GitHub states that with a client
secret and a user's authorization code an app can sign in a user and
generate access tokens. A secret that is generated outside a planned
rotation gives its holder a credential for an app that users have already
authorized. The event names the app in oauth_application and holds no
secret value.
references:
- https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise
- https://docs.github.com/en/enterprise-cloud@latest/apps/oauth-apps/building-oauth-apps/best-practices-for-creating-an-oauth-app
- https://attack.mitre.org/techniques/T1098/001/
author: Forestall
date: 2026-11-18
tags:
- attack.persistence
- attack.privilege-escalation
- attack.t1098.001
logsource:
product: github
service: audit
detection:
selection:
action:
- oauth_application.generate_client_secret
- oauth_application.reset_secret
condition: selection
falsepositives:
- Planned rotation of a client secret by the team that owns the app, and the first secret of a newly registered app. Confirm with the owner, and check that the old secret was deleted afterwards.
level: medium
False positives
- Planned rotation of a client secret by the team that owns the app, and the first secret of a newly registered app. Confirm with the owner, and check that the old secret was deleted afterwards.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
App manager added and the same account changes the app soon after
The manager role is granted so that someone can change an app. A manager who is added and then transfers the registration, or generates a client secret, within a short time used the role for the two steps that take an app away from its owners. Each event alone is ordinary administration, and the order makes the difference.
- A manager is added:
integration.manager_addedororg.integration_manager_added. Keep the account inmanager, the app inintegrationornamewhere present, and the grantingactor. - Within 7 days the account from
managerappears asactorofintegration.transfer,oauth_application.transfer,oauth_application.generate_client_secretoroauth_application.reset_secret. - Alert on the pair, and raise the priority when
transfer_toofintegration.transfernames an account outside your enterprise.
Eventsintegration.manager_addedorg.integration_manager_addedintegration.transferoauth_application.transferoauth_application.generate_client_secret
LimitsA developer who becomes manager in order to rotate a secret matches as well, so the result needs the owner of the app. The generation of a private key for a GitHub App writes no audit event and stays invisible. The 7 days are a starting point.
Triage
- Identify who acted (
actor) and which app is concerned. The OAuth app actions carryoauth_application, and the GitHub App actions carryname,integrationandapplication_client_id. - For a transfer of a GitHub App read
transfer_from,transfer_toandtransfer_to_type, and check whether the receiving account belongs to your enterprise. For an OAuth app read the new owner in the app settings or ask the previous owner. - For a new manager read
managerand check whether the account is a member who works on the app. - For a new client secret ask the team that owns the app whether a rotation was planned, and check in the app settings how many client secrets exist now.
- Check whether a token made the change (
programmatic_access_type,hashed_token) and what else the actor changed in the same period, such as webhooks, organization roles or other apps.
Response
Once the attack is confirmed:
- Delete the client secret that was generated without a reason, generate a new one for the legitimate service and update that service.
- Remove the app manager that was added, and review the organization role assignments for the App Manager role.
- For a transfer that was not intended, ask the receiving account to transfer the registration back, and until then treat the app as no longer under your control. Uninstall it from your organizations or revoke its authorizations if it cannot be recovered.
- Revoke the user tokens of the app when its client secret may have been used by someone else. GitHub records that step as
oauth_application.revoke_all_tokensorintegration.revoke_all_tokens. - Review the private keys of a GitHub App whose settings the attacker could reach, and delete keys that nobody can account for, because GitHub writes no audit event when a key is generated.
- Secure the owner or manager account that made the change. Reset its credentials, end its sessions and revoke its tokens.
Mitigation
- Keep the number of organization owners small and grant the GitHub App manager role per app instead of for all apps of the organization.
- Register the apps your teams build under the organization and not under personal accounts, so that a registration does not depend on the account of one person.
- Store client secrets and private keys in a secret store, as GitHub recommends, and delete old client secrets after a rotation so that the list of secrets of an app stays short.
- Review the app registrations the organization owns, their managers and their credentials on a schedule.
- Alert on every new client secret, every ownership transfer and every new app manager.
Frequently asked questions
Does the audit log show when a private key of a GitHub App is generated?
Not according to GitHub's event reference. For GitHub Apps it lists creation, deletion, transfer, update, suspension, manager changes, token revocation and the removal of a client secret, but no action for generating a private key or a client secret. Private keys do not expire and have to be deleted by hand, so the key list in the app settings is the only place to find a key that should not exist.
What can someone do with the client secret of an OAuth app?
GitHub states that with a client secret and a user's authorization code the app can sign in a user and generate access tokens, and that client secrets are required to generate access tokens unless the app uses the device flow. Someone who holds the secret can therefore act as the app in the authorization flow. The secret alone does not give access to data. It needs a user who authorizes the app.
What does a GitHub App manager control?
GitHub describes app managers as users or teams who can manage the settings of some or all GitHub App registrations owned by the organization. The role does not allow installing or uninstalling apps on the organization. GitHub also states that app managers can transfer the ownership of a GitHub App registration to another account.
Is there an incident report that shows these steps in an audit log?
No public incident report describes these steps at the audit event level. The page is built on what GitHub documents client secrets, ownership transfers and app managers to do. The sibling page on installed apps covers the more common case of a third-party app that is installed or approved.
References
- MITRE ATT&CK T1098.001: Additional Cloud Credentials
- Audit log events for your enterprise
- Best practices for creating an OAuth app
- Authorizing OAuth apps
- Transferring ownership of an OAuth app
- Transferring ownership of a GitHub App
- Adding and removing GitHub App managers in your organization
- Managing private keys for GitHub Apps
- Roles in an organization