GitHub Organization Removed or Transferred from Enterprise

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.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2026/09/22"
  3integration = ["github"]
  4maturity = "production"
  5updated_date = "2026/09/22"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies when a GitHub organization is removed from an enterprise or transferred to another enterprise. Removing an
 11organization takes its repositories, members, audit history, and billing out of the enterprise's centralized management
 12and security monitoring, while a transfer hands the organization and its repositories to a different enterprise or owner.
 13An adversary with enterprise owner access can use either action to move intellectual property beyond the organization's
 14visibility or to disrupt the enterprise's governance and security controls.
 15"""
 16false_positives = [
 17    """
 18    Approved org moves between enterprises or decommission of a lab org. Confirm with enterprise owners before treating
 19    as incident.
 20    """,
 21]
 22from = "now-9m"
 23language = "esql"
 24license = "Elastic License v2"
 25name = "GitHub Organization Removed or Transferred from Enterprise"
 26note = """## Triage and analysis
 27
 28> **Disclaimer**:
 29> 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.
 30
 31### Investigating GitHub Organization Removed or Transferred from Enterprise
 32
 33This 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.
 34
 35### Possible investigation steps
 36
 37- 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.
 38- Review `event.action` to distinguish a removal (`business.remove_organization`) from a transfer (`org.transfer_outgoing` / `org.transfer`), since the impact and remediation differ.
 39- 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.
 40- 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.
 41- 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.
 42
 43### False positive analysis
 44
 45- 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.
 46- 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.
 47
 48### Response and remediation
 49
 50- 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.
 51- Revoke the token identified by `github.hashed_token` and the actor's other tokens, and require the user to reauthenticate.
 52- Review the enterprise owner and administrator list, remove any unauthorized owners, and re-enroll the organization in required enterprise policies and audit log streaming.
 53- Inventory the enterprise for additional organization removals, transfers, or policy changes by the same actor.
 54- 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.
 55"""
 56references = [
 57    "https://docs.github.com/en/enterprise-cloud@latest/admin/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise",
 58]
 59risk_score = 73
 60rule_id = "0145d881-8374-4684-97e2-28fed7ea2b50"
 61severity = "high"
 62tags = [
 63    "Domain: Cloud",
 64    "Domain: SaaS",
 65    "Platform: GitHub",
 66    "Use Case: Threat Detection",
 67    "Tactic: Defense Evasion",
 68    "Tactic: Exfiltration",
 69    "Tactic: Impact",
 70    "Data Source: Github",
 71    "Data Source: GitHub Audit Logs",
 72    "Rule Type: ES|QL",
 73    "Resources: Investigation Guide",
 74]
 75timestamp_override = "event.ingested"
 76type = "esql"
 77
 78query = '''
 79from logs-github.audit-* metadata _id, _index, _version
 80| where
 81  event.module == "github" and data_stream.dataset == "github.audit"
 82    and event.action in ("business.remove_organization", "org.transfer_outgoing", "org.transfer")
 83| keep
 84    _id,
 85    _index,
 86    _version,
 87    @timestamp,
 88    event.action,
 89    user.name,
 90    github.org,
 91    github.actor_ip,
 92    github.hashed_token,
 93    github.programmatic_access_type,
 94    github.user_agent,
 95    github.business
 96'''
 97
 98
 99[[rule.threat]]
100framework = "MITRE ATT&CK"
101[[rule.threat.technique]]
102id = "T1531"
103name = "Account Access Removal"
104reference = "https://attack.mitre.org/techniques/T1531/"
105
106
107[rule.threat.tactic]
108id = "TA0040"
109name = "Impact"
110reference = "https://attack.mitre.org/tactics/TA0040/"
111[[rule.threat]]
112framework = "MITRE ATT&CK"
113[[rule.threat.technique]]
114id = "T1562"
115name = "Impair Defenses"
116reference = "https://attack.mitre.org/techniques/T1562/"
117[[rule.threat.technique.subtechnique]]
118id = "T1562.001"
119name = "Disable or Modify Tools"
120reference = "https://attack.mitre.org/techniques/T1562/001/"
121
122
123[rule.threat.tactic]
124id = "TA0005"
125name = "Defense Evasion"
126reference = "https://attack.mitre.org/tactics/TA0005/"
127[[rule.threat]]
128framework = "MITRE ATT&CK"
129[[rule.threat.technique]]
130id = "T1537"
131name = "Transfer Data to Cloud Account"
132reference = "https://attack.mitre.org/techniques/T1537/"
133
134
135[rule.threat.tactic]
136id = "TA0010"
137name = "Exfiltration"
138reference = "https://attack.mitre.org/tactics/TA0010/"
139
140[rule.investigation_fields]
141field_names = [
142    "@timestamp",
143    "event.action",
144    "user.name",
145    "github.org",
146    "github.repo",
147    "github.actor_ip",
148    "github.hashed_token",
149    "github.programmatic_access_type",
150    "github.user_agent",
151    "github.business",
152]

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

Related rules

to-top