GitHub: Unauthorized modification of private repository forking policy
An attacker with compromised organization owner credentials may enable private repository forking to exfiltrate proprietary source code to personal accounts, necessitating monitoring of GitHub audit logs for organization-level configuration changes.
Triage facts
Revision 1- Applicability
- GitHub
- Evidence
- Unknown
- Severity
- Medium
- Action
- Elevated
- Sources
- 2 public sources
- Freshness
- Revision 1Nov 2, 15:09 UTC
- Source quality
- A1Likely
This alert monitors for the enabling of private repository forking within a GitHub organization. Allowing forks of private repositories permits code to be copied out of the organization into personal forks, representing a high-risk collection path following an organization-owner compromise. This setting change is an indicator of potential data exfiltration.
Impact
Enabling private repository forking increases the risk of unauthorized source code exfiltration by allowing users with access to private repositories to fork them into personal accounts outside the organization's control.
Recommendation
- Review organization settings to ensure private repository forking is disabled unless explicitly required for inner-source development programs.
- Investigate the
user.nameandgithub.actor_ipassociated with the policy change eventprivate_repository_forking.enable. - Audit for repository fork activity (
repo.forkevents) immediately following any detected policy change to identify if unauthorized copies were created. - Transfer or delete any unauthorized forks identified during the investigation window.
Threat Hunt
Identify unauthorized repository forks following an organization-level policy change.
Data: GitHub audit logs: event.action == "repo.fork", GitHub audit logs: event.action == "private_repository_forking.enable"
Mitigations
Disable private repository forking in GitHub organization settings
GitHub Private Repository Forking Policy