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/12/10"
6min_stack_version = "8.13.0"
7min_stack_comments = "Breaking change at 8.13.0 for the Github Integration."
8
9[rule]
10author = ["Elastic"]
11description = """
12This rule detects setting modifications for protected branches of a GitHub repository. Branch protection rules can be
13used to enforce certain workflows or requirements before a contributor can push changes to a branch in your repository.
14Changes to these protected branch settings should be investigated and verified as legitimate activity. Unauthorized
15changes could be used to lower your organization's security posture and leave you exposed for future attacks.
16"""
17from = "now-9m"
18index = ["logs-github.audit-*"]
19language = "eql"
20license = "Elastic License v2"
21name = "GitHub Protected Branch Settings Changed"
22risk_score = 47
23rule_id = "07639887-da3a-4fbf-9532-8ce748ff8c50"
24severity = "medium"
25tags = ["Domain: Cloud", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Data Source: Github"]
26timestamp_override = "event.ingested"
27type = "eql"
28
29query = '''
30configuration where event.dataset == "github.audit"
31 and github.category == "protected_branch" and event.type == "change"
32'''
33
34
35[[rule.threat]]
36framework = "MITRE ATT&CK"
37[[rule.threat.technique]]
38id = "T1562"
39name = "Impair Defenses"
40reference = "https://attack.mitre.org/techniques/T1562/"
41[[rule.threat.technique.subtechnique]]
42id = "T1562.001"
43name = "Disable or Modify Tools"
44reference = "https://attack.mitre.org/techniques/T1562/001/"
45
46
47
48[rule.threat.tactic]
49id = "TA0005"
50name = "Defense Evasion"
51reference = "https://attack.mitre.org/tactics/TA0005/"
Related rules
- GitHub App Deleted
- GitHub Owner Role Granted To User
- GitHub Repository Deleted
- GitHub UEBA - Multiple Alerts from a GitHub Account
- High Number of Cloned GitHub Repos From PAT