GitHub Private Repository Forking Enabled
Description
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.
Query · esql
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
Investigation fields
Pivot points the source recommends for triage.
@timestampevent.actionuser.namegithub.orggithub.repogithub.actor_ipgithub.hashed_tokengithub.programmatic_access_typegithub.user_agentgithub.visibility
Known false positives
- Planned policy change to allow inner-source forks. Confirm change tickets and that the setting is reverted if it was a test.
Analyst notes
Investigating GitHub Private Repository Forking Enabled
private_repository_forking.enable is an organization policy change. Follow with repo.fork if present.
Possible investigation steps
- Identify
user.name,github.org, andgithub.actor_ip. - Check whether private repos were forked afterward and to which accounts.
False positive analysis
- Approved inner-source programs that temporarily enable forking.
Response and remediation
- Disable private repository forking unless required. Review forks created in the same window and transfer or delete unauthorized copies.