> ## Documentation Index
> Fetch the complete documentation index at: https://bloodhound.specterops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# GH_CanDeployToEnvironment

> [Computed] Repository, branch, repo role, or reviewer can deploy to this GitHub environment after evaluating deployment branch policy, reviewer gates, and admin bypass behavior; reviewer edges require both self-approval and a deployable code path

<img noZoom src="https://mintcdn.com/specterops/tTIczgde9H07oLXf/assets/enterprise-AND-community-edition-pill-tag.svg?fit=max&auto=format&n=tTIczgde9H07oLXf&q=85&s=ad49a576589f4d2a8081df77d07fdf56" alt="Applies to BloodHound Enterprise and CE" width="482" height="45" data-path="assets/enterprise-AND-community-edition-pill-tag.svg" />

## Edge Schema

* Traversable: ✅

| Start                                                              | Kind                       | End                                                                  |
| ------------------------------------------------------------------ | -------------------------- | -------------------------------------------------------------------- |
| [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository) | GH\_CanDeployToEnvironment | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) |
| [GH\_Branch](/opengraph/extensions/github/nodes/gh_branch)         | GH\_CanDeployToEnvironment | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) |
| [GH\_RepoRole](/opengraph/extensions/github/nodes/gh_reporole)     | GH\_CanDeployToEnvironment | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) |
| [GH\_User](/opengraph/extensions/github/nodes/gh_user)             | GH\_CanDeployToEnvironment | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) |
| [GH\_Team](/opengraph/extensions/github/nodes/gh_team)             | GH\_CanDeployToEnvironment | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) |

```mermaid theme={null}
flowchart LR
    GH_Branch["GH_Branch"]
    GH_Environment["GH_Environment"]
    GH_RepoRole["GH_RepoRole"]
    GH_Repository["GH_Repository"]
    GH_Team["GH_Team"]
    GH_User["GH_User"]
    GH_Branch -- GH_CanDeployToEnvironment --> GH_Environment
    GH_RepoRole -- GH_CanDeployToEnvironment --> GH_Environment
    GH_Repository -- GH_CanDeployToEnvironment --> GH_Environment
    GH_Team -- GH_CanDeployToEnvironment --> GH_Environment
    GH_User -- GH_CanDeployToEnvironment --> GH_Environment
```

## General Information

The traversable GH\_CanDeployToEnvironment edge represents the ability for a repository, branch, repository role, or reviewer to satisfy the modeled deployment constraints for a GitHub Environment.

This edge is computed from environment deployment branch policy, branch protection state, required reviewer behavior, and administrator bypass behavior. For environments without required reviewers, unrestricted environments emit repository and branch edges, protected-branch-only environments emit edges only for protected branches unless no branch protection rules exist, and custom branch policies emit edges only for matching branches.

When required reviewers are configured and self-review is allowed, a configured [GH\_User](/opengraph/extensions/github/nodes/gh_user) or [GH\_Team](/opengraph/extensions/github/nodes/gh_team) reviewer receives GH\_CanDeployToEnvironment only when the same actor can also supply deployable code. For unrestricted environments this means the actor can create a branch in the repository. For protected-branch-only or custom branch policy environments this means the actor can write to an eligible branch under the existing [GH\_CanWriteBranch](/opengraph/extensions/github/edges/gh_canwritebranch) rules.

Self-review alone is not sufficient for this edge. [GH\_ApprovesDeploymentTo](/opengraph/extensions/github/edges/gh_approvesdeploymentto) remains the non-traversable representation of reviewer authority, while GH\_CanDeployToEnvironment represents the combined ability to satisfy both the approval gate and the code-supply path. When prevent\_self\_review is enabled, no direct deploy edge is emitted for the reviewer because the required split-principal flow is not currently modeled.

## Edge Schema

| Source                                                             | Destination                                                          | Traversable |
| ------------------------------------------------------------------ | -------------------------------------------------------------------- | ----------- |
| [GH\_Branch](/opengraph/extensions/github/nodes/gh_branch)         | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) | `true`      |
| [GH\_RepoRole](/opengraph/extensions/github/nodes/gh_reporole)     | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) | `true`      |
| [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository) | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) | `true`      |
| [GH\_Team](/opengraph/extensions/github/nodes/gh_team)             | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) | `true`      |
| [GH\_User](/opengraph/extensions/github/nodes/gh_user)             | [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) | `true`      |

## Diagram

```mermaid theme={null}
graph LR
    n0["GH_Branch"]
    n1["GH_Environment"]
    n2["GH_RepoRole"]
    n3["GH_Repository"]
    n4["GH_Team"]
    n5["GH_User"]
    n0 -->|GH_CanDeployToEnvironment| n1
    n2 -->|GH_CanDeployToEnvironment| n1
    n3 -->|GH_CanDeployToEnvironment| n1
    n4 -->|GH_CanDeployToEnvironment| n1
    n5 -->|GH_CanDeployToEnvironment| n1
```
