IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.

GitHub Repo Created

edit

Identifies the creation of a GitHub repository by a non-bot actor. Unexpected repository creation can indicate unauthorized infrastructure setup, data staging, or misuse of a compromised GitHub account.

Rule type: query

Rule indices:

  • logs-github.audit-*

Severity: low

Risk score: 21

Runs every: 5m

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References:

Tags:

  • Domain: Cloud
  • Use Case: Threat Detection
  • Use Case: UEBA
  • Tactic: Execution
  • Tactic: Resource Development
  • Data Source: Github
  • Data Source: GitHub Audit Logs
  • Resources: Investigation Guide
  • Noise: Medium
  • Performance: Fast
  • Rule Type: Custom Query (KQL)
  • Platform: GitHub
  • Domain: SaaS

Version: 211

Rule authors:

  • Elastic

Rule license: Elastic License v2

Investigation guide

edit

Triage and analysis

Investigating GitHub Repo Created

This rule detects repository creation by an actor that GitHub does not identify as a bot. Repository creation is common in normal development, but it can also support unauthorized code hosting, data staging, persistence, or resource development after an account is compromised.

Possible investigation steps

  • Review user.name, github.org, github.repo, and github.actor_ip to identify the actor and repository.
  • Confirm the repository name, visibility, ownership, and creation purpose with the actor or organization owner.
  • Review nearby audit events for permission changes, collaborator additions, deploy keys, webhooks, secrets, workflow creation, pushes, transfers, or visibility changes.
  • Check whether the source IP, user agent, and authentication method are expected for the actor.
  • Determine whether sensitive code, credentials, or organization data were subsequently added to the repository.

False positive analysis

  • Developers and administrators routinely create repositories for approved projects, testing, migrations, and documentation.
  • Internal automation not identified by GitHub as a bot can still trigger this rule. Scope exceptions to a verified actor and organization when that behavior is expected.

Response and remediation

  • If unauthorized, restrict or remove the repository, revoke suspicious sessions or tokens, and review the actor’s recent GitHub activity.
  • Remove unauthorized collaborators, deploy keys, webhooks, workflows, and secrets.
  • Preserve relevant audit events and repository contents before deletion when incident-response evidence is required.

Rule query

edit
data_stream.dataset:"github.audit" and event.category:"configuration" and event.action:"repo.create" and
not github.actor_is_bot:true

Framework: MITRE ATT&CKTM