GitHub Organization Removed or Transferred from Enterprise


Description

Identifies when a GitHub organization is removed from an enterprise or transferred to another enterprise. Removing an organization takes its repositories, members, audit history, and billing out of the enterprise's centralized management and security monitoring, while a transfer hands the organization and its repositories to a different enterprise or owner. An adversary with enterprise owner access can use either action to move intellectual property beyond the organization's visibility or to disrupt the enterprise's governance and security controls.

Query · esql

from logs-github.audit-* metadata _id, _index, _version
| where
  event.module == "github" and data_stream.dataset == "github.audit"
    and event.action in ("business.remove_organization", "org.transfer_outgoing", "org.transfer")
| keep
    _id,
    _index,
    _version,
    @timestamp,
    event.action,
    user.name,
    github.org,
    github.actor_ip,
    github.hashed_token,
    github.programmatic_access_type,
    github.user_agent,
    github.business

Investigation fields

Pivot points the source recommends for triage.

  • @timestamp
  • event.action
  • user.name
  • github.org
  • github.repo
  • github.actor_ip
  • github.hashed_token
  • github.programmatic_access_type
  • github.user_agent
  • github.business

Known false positives

  • Approved org moves between enterprises or decommission of a lab org. Confirm with enterprise owners before treating as incident.

Analyst notes

Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

Investigating GitHub Organization Removed or Transferred from Enterprise

This rule fires on business.remove_organization, which removes an organization from the enterprise, and on org.transfer_outgoing / org.transfer, which move an organization to a different enterprise or owner. Both actions remove the organization from the enterprise's centralized audit logging, policies, and security monitoring, and a transfer can additionally relocate all of its repositories to an attacker-controlled enterprise. Because these are high-impact, enterprise-owner-level operations, review the actor (user.name, github.actor_ip), the token used (github.hashed_token, github.programmatic_access_type), and the organization affected (github.org, github.business) to confirm whether the change was authorized.

Possible investigation steps

  • Identify the actor and confirm enterprise-owner privileges using user.name, github.actor_ip, github.hashed_token, and github.programmatic_access_type, and verify the actor is expected to manage enterprise membership.
  • Review event.action to distinguish a removal (business.remove_organization) from a transfer (org.transfer_outgoing / org.transfer), since the impact and remediation differ.
  • Determine the affected organization and enterprise from github.org and github.business, and for transfers identify the destination enterprise or owner to assess data exposure.
  • Check the enterprise audit log for related changes by the same actor, such as enterprise owner additions, policy modifications, or additional organization removals that indicate a broader takeover.
  • Review recent activity by the actor and token for clones, archive downloads, or repository transfers that suggest intellectual property was staged or exfiltrated before the organization was moved.

False positive analysis

  • Planned organizational restructuring, mergers, or decommissioning of a lab or test organization. Confirm the change with enterprise owners and validate it against an approved change-management record.
  • Consolidation of organizations between enterprises owned by the same company. Validate the destination enterprise and scope exceptions to the specific actor and organization where appropriate.

Response and remediation

  • If the action was unauthorized, contact GitHub Support immediately to attempt to restore the organization to the enterprise or reverse the transfer while it is still possible.
  • Revoke the token identified by github.hashed_token and the actor's other tokens, and require the user to reauthenticate.
  • Review the enterprise owner and administrator list, remove any unauthorized owners, and re-enroll the organization in required enterprise policies and audit log streaming.
  • Inventory the enterprise for additional organization removals, transfers, or policy changes by the same actor.
  • Rotate secrets and deploy keys in the affected organization's repositories and engage incident response per your organization's playbooks if sensitive data may have been exposed.
Raw source GitHub Organization Removed or Transferred from Enterprise · Elastic TOML
Esc
Published by elastic/detection-rules ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[metadata]
creation_date = "2026/09/22"
integration = ["github"]
maturity = "production"
updated_date = "2026/09/22"

[rule]
author = ["Elastic"]
description = """
Identifies when a GitHub organization is removed from an enterprise or transferred to another enterprise. Removing an
organization takes its repositories, members, audit history, and billing out of the enterprise's centralized management
and security monitoring, while a transfer hands the organization and its repositories to a different enterprise or owner.
An adversary with enterprise owner access can use either action to move intellectual property beyond the organization's
visibility or to disrupt the enterprise's governance and security controls.
"""
false_positives = [
    """
    Approved org moves between enterprises or decommission of a lab org. Confirm with enterprise owners before treating
    as incident.
    """,
]
from = "now-9m"
language = "esql"
license = "Elastic License v2"
name = "GitHub Organization Removed or Transferred from Enterprise"
note = """## Triage and analysis

> **Disclaimer**:
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.

### Investigating GitHub Organization Removed or Transferred from Enterprise

This rule fires on `business.remove_organization`, which removes an organization from the enterprise, and on `org.transfer_outgoing` / `org.transfer`, which move an organization to a different enterprise or owner. Both actions remove the organization from the enterprise's centralized audit logging, policies, and security monitoring, and a transfer can additionally relocate all of its repositories to an attacker-controlled enterprise. Because these are high-impact, enterprise-owner-level operations, review the actor (`user.name`, `github.actor_ip`), the token used (`github.hashed_token`, `github.programmatic_access_type`), and the organization affected (`github.org`, `github.business`) to confirm whether the change was authorized.

### Possible investigation steps

- Identify the actor and confirm enterprise-owner privileges using `user.name`, `github.actor_ip`, `github.hashed_token`, and `github.programmatic_access_type`, and verify the actor is expected to manage enterprise membership.
- Review `event.action` to distinguish a removal (`business.remove_organization`) from a transfer (`org.transfer_outgoing` / `org.transfer`), since the impact and remediation differ.
- Determine the affected organization and enterprise from `github.org` and `github.business`, and for transfers identify the destination enterprise or owner to assess data exposure.
- Check the enterprise audit log for related changes by the same actor, such as enterprise owner additions, policy modifications, or additional organization removals that indicate a broader takeover.
- Review recent activity by the actor and token for clones, archive downloads, or repository transfers that suggest intellectual property was staged or exfiltrated before the organization was moved.

### False positive analysis

- Planned organizational restructuring, mergers, or decommissioning of a lab or test organization. Confirm the change with enterprise owners and validate it against an approved change-management record.
- Consolidation of organizations between enterprises owned by the same company. Validate the destination enterprise and scope exceptions to the specific actor and organization where appropriate.

### Response and remediation

- If the action was unauthorized, contact GitHub Support immediately to attempt to restore the organization to the enterprise or reverse the transfer while it is still possible.
- Revoke the token identified by `github.hashed_token` and the actor's other tokens, and require the user to reauthenticate.
- Review the enterprise owner and administrator list, remove any unauthorized owners, and re-enroll the organization in required enterprise policies and audit log streaming.
- Inventory the enterprise for additional organization removals, transfers, or policy changes by the same actor.
- Rotate secrets and deploy keys in the affected organization's repositories and engage incident response per your organization's playbooks if sensitive data may have been exposed.
"""
references = [
    "https://docs.github.com/en/enterprise-cloud@latest/admin/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise",
]
risk_score = 73
rule_id = "0145d881-8374-4684-97e2-28fed7ea2b50"
severity = "high"
tags = [
    "Domain: Cloud",
    "Domain: SaaS",
    "Platform: GitHub",
    "Use Case: Threat Detection",
    "Tactic: Defense Evasion",
    "Tactic: Exfiltration",
    "Tactic: Impact",
    "Data Source: Github",
    "Data Source: GitHub Audit Logs",
    "Rule Type: ES|QL",
    "Resources: Investigation Guide",
]
timestamp_override = "event.ingested"
type = "esql"

query = '''
from logs-github.audit-* metadata _id, _index, _version
| where
  event.module == "github" and data_stream.dataset == "github.audit"
    and event.action in ("business.remove_organization", "org.transfer_outgoing", "org.transfer")
| keep
    _id,
    _index,
    _version,
    @timestamp,
    event.action,
    user.name,
    github.org,
    github.actor_ip,
    github.hashed_token,
    github.programmatic_access_type,
    github.user_agent,
    github.business
'''


[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1531"
name = "Account Access Removal"
reference = "https://attack.mitre.org/techniques/T1531/"


[rule.threat.tactic]
id = "TA0040"
name = "Impact"
reference = "https://attack.mitre.org/tactics/TA0040/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1562"
name = "Impair Defenses"
reference = "https://attack.mitre.org/techniques/T1562/"
[[rule.threat.technique.subtechnique]]
id = "T1562.001"
name = "Disable or Modify Tools"
reference = "https://attack.mitre.org/techniques/T1562/001/"


[rule.threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"
[[rule.threat]]
framework = "MITRE ATT&CK"
[[rule.threat.technique]]
id = "T1537"
name = "Transfer Data to Cloud Account"
reference = "https://attack.mitre.org/techniques/T1537/"


[rule.threat.tactic]
id = "TA0010"
name = "Exfiltration"
reference = "https://attack.mitre.org/tactics/TA0010/"

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "event.action",
    "user.name",
    "github.org",
    "github.repo",
    "github.actor_ip",
    "github.hashed_token",
    "github.programmatic_access_type",
    "github.user_agent",
    "github.business",
]

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.