Detection rules › Panther

GitHub Branch Protection Disabled

Severity
high
Log types
GitHub.Audit
Tags
GitHub, Initial Access:Supply Chain Compromise
Reference
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule
Source
github.com/panther-labs/panther-analysis

Disabling branch protection controls could indicate malicious use of admin credentials in an attempt to hide activity.

MITRE ATT&CK coverage

TacticTechniques
Initial AccessT1195 Supply Chain Compromise

Rules detecting the same action

Other rules on this platform that filter on the same API call or operation.

Rule body yaml

AnalysisType: rule
Filename: github_branch_protection_disabled.py
RuleID: "GitHub.Branch.ProtectionDisabled"
DisplayName: "GitHub Branch Protection Disabled"
Enabled: true
LogTypes:
  - GitHub.Audit
Tags:
  - GitHub
  - Initial Access:Supply Chain Compromise
Reports:
  MITRE ATT&CK:
    - TA0001:T1195
Severity: High
Description: Disabling branch protection controls could indicate malicious use of admin credentials in an attempt to hide activity.
Runbook: Verify that branch protection should be disabled on the repository and re-enable as necessary.
Reference: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule
Tests:
  - Name: GitHub - Branch Protection Disabled
    ExpectedResult: true
    Log:
      {
        "actor": "cat",
        "action": "protected_branch.destroy",
        "created_at": 1621305118553,
        "org": "my-org",
        "p_log_type": "GitHub.Audit",
        "repo": "my-org/my-repo",
      }
  - Name: GitHub - Protected Branch Name Updated
    ExpectedResult: false
    Log:
      {
        "actor": "cat",
        "action": "protected_branch.update_name",
        "created_at": 1621305118553,
        "org": "my-org",
        "p_log_type": "GitHub.Audit",
        "repo": "my-org/my-repo",
      }

Detection logic

Condition

action eq "protected_branch.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.

FieldKindValues
actioneq
  • protected_branch.destroy

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
repo
actor