Detection rules › Kusto
GitHub - Repository was destroyed
Detect activities when a repository was destroyed. This query runs every day and its severity is Medium.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | T1078 Valid Accounts |
Event coverage
| Provider | Event |
|---|---|
| GitHub-repo | repo.destroy |
Rules detecting the same action
Other rules on this platform that filter on the same API call or operation.
- Github Delete Action Invoked (Sigma)
- GitHub Enterprise Repository Deleted (Splunk)
- GitHub Repository Archived Or Deleted (YARA-L)
- GitHub Repository Deleted (Elastic)
Rule body kusto
id: 0b85a077-8ba5-4cb5-90f7-1e882afe10c3
name: GitHub - Repository was destroyed
description: |
'Detect activities when a repository was destroyed. This query runs every day and its severity is Medium.'
severity: Medium
status: Available
requiredDataConnectors: []
queryFrequency: 1d
queryPeriod: 7d
triggerOperator: gt
triggerThreshold: 0
tactics:
- InitialAccess
relevantTechniques:
- T1078
query: |
GitHubAuditData
| where Action == "repo.destroy"
| extend AccountName = tostring(split(Actor, "@")[0]), AccountUPNSuffix = tostring(split(Actor, "@")[1])
entityMappings:
- entityType: Account
fieldMappings:
- identifier: FullName
columnName: Actor
- identifier: Name
columnName: AccountName
- identifier: UPNSuffix
columnName: AccountUPNSuffix
version: 1.0.1
kind: Scheduled
Stages and Predicates
Stage 1: source
GitHubAuditData
Stage 2: where
| where Action == "repo.destroy"
Stage 3: extend
| extend AccountName = tostring(split(Actor, "@")[0]), AccountUPNSuffix = tostring(split(Actor, "@")[1])
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 |
|
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field | Source |
|---|---|
AccountName | extend |
AccountUPNSuffix | extend |