GitHub Protected Branch Settings Changed

This rule detects setting modifications for protected branches of a GitHub repository. Branch protection rules can be used to enforce certain workflows or requirements before a contributor can push changes to a branch in your repository. Changes to these protected branch settings should be investigated and verified as legitimate activity. Unauthorized changes could be used to lower your organization's security posture and leave you exposed for future attacks.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/08/29"
 3integration = ["github"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10This rule detects setting modifications for protected branches of a GitHub repository. Branch protection rules can be
11used to enforce certain workflows or requirements before a contributor can push changes to a branch in your repository.
12Changes to these protected branch settings should be investigated and verified as legitimate activity. Unauthorized
13changes could be used to lower your organization's security posture and leave you exposed for future attacks.
14"""
15from = "now-9m"
16index = ["logs-github.audit-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "GitHub Protected Branch Settings Changed"
20risk_score = 47
21rule_id = "07639887-da3a-4fbf-9532-8ce748ff8c50"
22severity = "medium"
23tags = ["Domain: Cloud", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Data Source: Github"]
24timestamp_override = "event.ingested"
25type = "eql"
26
27query = '''
28configuration where event.dataset == "github.audit" 
29  and github.category == "protected_branch" and event.type == "change"
30'''
31
32
33[[rule.threat]]
34framework = "MITRE ATT&CK"
35[[rule.threat.technique]]
36id = "T1562"
37name = "Impair Defenses"
38reference = "https://attack.mitre.org/techniques/T1562/"
39[[rule.threat.technique.subtechnique]]
40id = "T1562.001"
41name = "Disable or Modify Tools"
42reference = "https://attack.mitre.org/techniques/T1562/001/"
43
44
45
46[rule.threat.tactic]
47id = "TA0005"
48name = "Defense Evasion"
49reference = "https://attack.mitre.org/tactics/TA0005/"

Related rules

to-top