GitHub Private Repository Forking Enabled

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

About

Detects enabling of private repository forking on a GitHub organization. Allowing forks of private repositories lets code leave the organization into personal forks, which is a common collection path after an org-owner compromise.
Tags
Domain: CloudDomain: SaaSPlatform: GitHubUse Case: Threat DetectionTactic: CollectionTactic: Defense EvasionData Source: GitHub Audit LogsRule Type: ESQLLanguage: esql
Severity
medium
Risk Score
47
MITRE ATT&CK™

Collection (TA0009)(external, opens in a new tab or window)

Defense Evasion (TA0005)(external, opens in a new tab or window)

False Positive Examples
Planned policy change to allow inner-source forks. Confirm change tickets and that the setting is reverted if it was a test.
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 == "private_repository_forking.enable" | keep _id, _index, _version, @timestamp, event.action, user.name, github.org, github.repo, github.actor_ip, github.hashed_token, github.programmatic_access_type, github.user_agent, github.visibility

Install detection rules in Elastic Security

Detect GitHub Private Repository Forking Enabled 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).