GitHub Payment Method Removed

Identifies the removal of a payment method from a GitHub organization or enterprise. Billing changes are high-privilege actions, and an adversary with billing-manager or owner access can delete a payment instrument to disrupt the organization's paid plan, which can lead to downgraded features, suspended private repositories, and loss of access to paid capabilities. The action may also be used to obscure fraudulent plan changes or to pressure the organization during an extortion or takeover scenario.

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 the removal of a payment method from a GitHub organization or enterprise. Billing changes are high-privilege
 11actions, and an adversary with billing-manager or owner access can delete a payment instrument to disrupt the
 12organization's paid plan, which can lead to downgraded features, suspended private repositories, and loss of access to
 13paid capabilities. The action may also be used to obscure fraudulent plan changes or to pressure the organization during
 14an extortion or takeover scenario.
 15"""
 16false_positives = ["Finance rotating cards at expiry. Confirm with the billing owners."]
 17from = "now-9m"
 18language = "esql"
 19license = "Elastic License v2"
 20name = "GitHub Payment Method Removed"
 21note = """## Triage and analysis
 22
 23> **Disclaimer**:
 24> 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.
 25
 26### Investigating GitHub Payment Method Removed
 27
 28The `payment_method.remove` audit action is logged when a billing manager, organization owner, or enterprise owner removes a payment method. Billing operations are high-privilege and rarely performed, so an unexpected removal can be an attempt to disrupt the organization by causing its paid plan to lapse, which downgrades features and can suspend private repositories. Review the actor (`user.name`, `github.actor_ip`), the token used (`github.hashed_token`, `github.programmatic_access_type`), and the organization or enterprise affected (`github.org`, `github.business`), and correlate with any surrounding plan changes or owner modifications to determine whether the action was authorized.
 29
 30### Possible investigation steps
 31
 32- Identify the actor and confirm billing-manager or owner privileges using `user.name`, `github.actor_ip`, `github.hashed_token`, and `github.programmatic_access_type`, and verify the actor is expected to manage billing.
 33- Confirm with the finance or billing owners whether a card rotation, expiry replacement, or plan change was planned for the affected organization or enterprise (`github.org`, `github.business`).
 34- Review the GitHub billing audit log for related events by the same actor, such as additional payment method changes, plan downgrades, or spending-limit modifications.
 35- Check for enterprise or organization owner changes and membership modifications around the same time that could indicate account takeover.
 36- Review the actor's recent activity for other high-impact or destructive actions, such as repository deletions or transfers and visibility changes, that suggest a broader disruption or takeover.
 37
 38### False positive analysis
 39
 40- Routine finance operations such as replacing an expired card or rotating payment instruments. Confirm with the billing owners and scope exceptions to the specific actor where appropriate.
 41- Planned plan or vendor changes during organizational restructuring. Validate against change-management or finance records before dismissing.
 42
 43### Response and remediation
 44
 45- If the removal was unauthorized, restore a valid payment method promptly to avoid a lapse that could downgrade the plan or suspend private repositories.
 46- Revoke the token identified by `github.hashed_token` and the actor's other tokens if the identity is suspected compromised, and require reauthentication.
 47- Review the billing managers, organization owners, and enterprise owners, removing any unauthorized members.
 48- Audit recent billing and ownership changes for additional unauthorized modifications by the same actor.
 49- Engage incident response and your finance team per your organization's playbooks if account takeover or fraud is suspected.
 50"""
 51references = ["https://docs.github.com/en/billing/how-tos/set-up-payment/manage-payment-info"]
 52risk_score = 47
 53rule_id = "d2eb8be6-c172-41d0-bf2d-feabc231936a"
 54severity = "medium"
 55tags = [
 56    "Domain: Cloud",
 57    "Domain: SaaS",
 58    "Platform: GitHub",
 59    "Use Case: Threat Detection",
 60    "Tactic: Impact",
 61    "Data Source: Github",
 62    "Data Source: GitHub Audit Logs",
 63    "Rule Type: ES|QL",
 64    "Resources: Investigation Guide",
 65]
 66timestamp_override = "event.ingested"
 67type = "esql"
 68
 69query = '''
 70from logs-github.audit-* metadata _id, _index, _version
 71| where
 72  event.module == "github" and data_stream.dataset == "github.audit"
 73    and event.action == "payment_method.remove"
 74| keep
 75    _id,
 76    _index,
 77    _version,
 78    @timestamp,
 79    event.action,
 80    user.name,
 81    github.org,
 82    github.actor_ip,
 83    github.hashed_token,
 84    github.programmatic_access_type,
 85    github.user_agent,
 86    github.business
 87'''
 88
 89
 90[[rule.threat]]
 91framework = "MITRE ATT&CK"
 92[[rule.threat.technique]]
 93id = "T1531"
 94name = "Account Access Removal"
 95reference = "https://attack.mitre.org/techniques/T1531/"
 96
 97
 98[rule.threat.tactic]
 99id = "TA0040"
100name = "Impact"
101reference = "https://attack.mitre.org/tactics/TA0040/"
102
103[rule.investigation_fields]
104field_names = [
105    "@timestamp",
106    "event.action",
107    "user.name",
108    "github.org",
109    "github.actor_ip",
110    "github.hashed_token",
111    "github.programmatic_access_type",
112    "github.user_agent",
113    "github.business",
114]

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 Payment Method Removed

The payment_method.remove audit action is logged when a billing manager, organization owner, or enterprise owner removes a payment method. Billing operations are high-privilege and rarely performed, so an unexpected removal can be an attempt to disrupt the organization by causing its paid plan to lapse, which downgrades features and can suspend private repositories. Review the actor (user.name, github.actor_ip), the token used (github.hashed_token, github.programmatic_access_type), and the organization or enterprise affected (github.org, github.business), and correlate with any surrounding plan changes or owner modifications to determine whether the action was authorized.

Possible investigation steps

  • Identify the actor and confirm billing-manager or owner privileges using user.name, github.actor_ip, github.hashed_token, and github.programmatic_access_type, and verify the actor is expected to manage billing.
  • Confirm with the finance or billing owners whether a card rotation, expiry replacement, or plan change was planned for the affected organization or enterprise (github.org, github.business).
  • Review the GitHub billing audit log for related events by the same actor, such as additional payment method changes, plan downgrades, or spending-limit modifications.
  • Check for enterprise or organization owner changes and membership modifications around the same time that could indicate account takeover.
  • Review the actor's recent activity for other high-impact or destructive actions, such as repository deletions or transfers and visibility changes, that suggest a broader disruption or takeover.

False positive analysis

  • Routine finance operations such as replacing an expired card or rotating payment instruments. Confirm with the billing owners and scope exceptions to the specific actor where appropriate.
  • Planned plan or vendor changes during organizational restructuring. Validate against change-management or finance records before dismissing.

Response and remediation

  • If the removal was unauthorized, restore a valid payment method promptly to avoid a lapse that could downgrade the plan or suspend private repositories.
  • Revoke the token identified by github.hashed_token and the actor's other tokens if the identity is suspected compromised, and require reauthentication.
  • Review the billing managers, organization owners, and enterprise owners, removing any unauthorized members.
  • Audit recent billing and ownership changes for additional unauthorized modifications by the same actor.
  • Engage incident response and your finance team per your organization's playbooks if account takeover or fraud is suspected.

References

Related rules

to-top