GitHub SSO Recovery Codes Activity

Last updated a day ago on 2026-11-02
Created a day ago on 2026-11-02

About

Detects viewing, downloading, printing, generating, or using GitHub enterprise or organization SSO recovery codes. These codes bypass the IdP and are break-glass credentials.
Tags
Domain: CloudDomain: SaaSPlatform: GitHubUse Case: Threat DetectionTactic: Credential AccessTactic: PersistenceData Source: GitHub Audit LogsRule Type: ESQLLanguage: esql
Severity
high
Risk Score
73
MITRE ATT&CK™

Credential Access (TA0006)(external, opens in a new tab or window)

Persistence (TA0003)(external, opens in a new tab or window)

False Positive Examples
Documented disaster-recovery tests. Dual-control these events and store codes offline.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

github(external, opens in a new tab or window)

Query
text code block:
from logs-github.audit-* metadata _id, _index, _version | where event.module == "github" and data_stream.dataset == "github.audit" and event.action in ( "business.recovery_codes_downloaded", "business.recovery_codes_generated", "business.recovery_codes_printed", "business.recovery_codes_viewed", "business.recovery_code_used", "business.recovery_code_failed", "org.recovery_codes_downloaded", "org.recovery_codes_generated", "org.recovery_codes_printed", "org.recovery_codes_viewed", "org.recovery_code_used", "org.recovery_code_failed" ) | keep _id, _index, _version, @timestamp, event.action, user.name, github.org, github.actor_is_bot, github.repo, github.actor_ip, github.hashed_token, github.programmatic_access_type, github.user_agent, github.business

Install detection rules in Elastic Security

Detect GitHub SSO Recovery Codes Activity in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).