Detection rules › Sigma
Github Delete Action Invoked
Detects delete action in the Github audit logs for codespaces, environment, project and repo.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Collection | T1213.003 Data from Information Repositories: Code Repositories |
Event coverage
Rules detecting the same action
Other rules on this platform that filter on the same API call or operation.
- GitHub - Repository was destroyed (Kusto)
- GitHub Enterprise Repository Deleted (Splunk)
- GitHub Repository Archived Or Deleted (YARA-L)
- GitHub Repository Deleted (Elastic)
Rule body yaml
title: Github Delete Action Invoked
id: 16a71777-0b2e-4db7-9888-9d59cb75200b
status: test
description: Detects delete action in the Github audit logs for codespaces, environment, project and repo.
author: Muhammad Faisal (@faisalusuf)
date: 2023-01-19
modified: 2026-03-09
references:
- https://docs.github.com/en/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#audit-log-actions
- https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/security-log-events#codespaces
tags:
- attack.impact
- attack.collection
- attack.t1213.003
logsource:
product: github
service: audit
definition: 'Requirements: The audit log streaming feature must be enabled to be able to receive such logs. You can enable following the documentation here: https://docs.github.com/en/enterprise-cloud@latest/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise#setting-up-audit-log-streaming'
detection:
selection:
action:
- 'codespaces.destroy'
- 'environment.delete'
- 'project.delete'
- 'repo.destroy'
condition: selection
falsepositives:
- Validate the deletion activity is permitted. The "actor" field need to be validated.
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
action:
- 'codespaces.destroy'
- 'environment.delete'
- 'project.delete'
- 'repo.destroy'
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
action | eq |
|