Skip to main content
Applies to BloodHound Enterprise and CE Represents a branch protection rule configured on a GitHub repository. Protection rules define requirements that must be met before changes can be merged to matching branches, such as required reviews, status checks, and restrictions on who can push. A single protection rule can apply to multiple branches via pattern matching (e.g., main, release/*). Created by: Git-HoundBranch

Edges

The tables below list edges defined by the GitHound extension only. Additional edges to or from this node may be created by other extensions.

Inbound Edges

Outbound Edges

Edge TypeDestination Node TypesTraversable
GH_ProtectedByGH_Branch

Properties

Property NameData TypeDescription
objectidstringThe GitHub node ID of the branch protection rule: BPR_kwDOMuFnXM4DPZQt
namestringDisplay name (e.g., repo\main).
idstringSame as objectid.
environment_namestringThe GitHub organization login name.
environmentidstringThe GitHub organization node ID.
patternstringThe branch name pattern this rule applies to (e.g., main, release/*).
enforce_adminsbooleanWhether branch protection rules are enforced for administrators.
lock_branchbooleanWhether the branch is locked (read-only).
blocks_creationsbooleanWhether creating branches matching this pattern is restricted. Only effective when push_restrictions is also true; silently reverts to false otherwise.
required_pull_request_reviewsbooleanWhether pull request reviews are required before merging.
required_approving_review_countintegerThe number of approving reviews required.
require_code_owner_reviewsbooleanWhether reviews from code owners are required.
require_last_push_approvalbooleanWhether the last push must be approved by someone other than the pusher.
push_restrictionsbooleanWhether push access is restricted to specific users/teams.
requires_status_checksbooleanWhether status checks must pass before merging.
requires_strict_status_checksbooleanWhether branches must be up to date with the base branch before merging.
dismisses_stale_reviewsbooleanWhether new commits dismiss previously approved reviews.
allows_force_pushesbooleanWhether force pushes are allowed to matching branches.
allows_deletionsbooleanWhether matching branches can be deleted.

Diagram

Security Considerations

Branch protection rules are critical security controls. Key settings to review:
  • enforce_admins: Enforces merge-gate controls (PR reviews, lock branch) for admins and users with bypass_branch_protection. Does not enforce push-gate controls (push_restrictions) for admins or users with push_protected_branch.
  • required_pull_request_reviews: Blocks direct pushes to existing protected branches. Bypassed by GH_BypassBranchProtection and GH_BypassPullRequestAllowances (both suppressed by enforce_admins).
  • push_restrictions: Restricts who can push. Bypassed by GH_PushProtectedBranch, GH_AdminTo, and GH_RestrictionsCanPush (none suppressed by enforce_admins).
  • blocks_creations: Restricts new branch creation when push_restrictions is also true. Same bypass vectors as push_restrictions. Silently reverts to false if push_restrictions is disabled.
  • lock_branch: Makes branch read-only. Bypassed by GH_BypassBranchProtection (suppressed by enforce_admins).
  • require_code_owner_reviews: If false, changes to critical paths may not require owner approval.
  • allows_force_pushes: Controls whether history rewrites are allowed. Does not grant push access — it is not a bypass mechanism.
  • allows_deletions: If true, branches can be deleted (potentially losing code).

Secret Exfiltration Mitigation

The only branch protection configuration that blocks the write-access → workflow → secrets exfiltration attack path is push_restrictions + blocks_creations on a * pattern rule. However, users with GH_PushProtectedBranch, GH_AdminTo, GH_RestrictionsCanPush, or GH_EditRepoProtections can bypass this control. For complete analysis, see BloodHound Docs: GitHound - Mitigating Controls.

Identifying Bypass Actors

Use these edges to identify users and teams with elevated branch permissions: