> ## 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_HasEnvironment

> Repository or branch has/can deploy to this environment

<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

* Source: [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository), [GH\_Branch](/opengraph/extensions/github/nodes/gh_branch)
* Destination: [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment)
* Traversable: ❌

## General Information

The non-traversable GH\_HasEnvironment edge represents the relationship between a repository or branch and its deployment environments. This edge links environments to the repositories that define them and to the branches that are allowed to deploy to them (via deployment branch policies). Environments are security-relevant because they can gate access to secrets and cloud credentials, and their deployment branch policies control which branches can trigger deployments.

```mermaid theme={null}
graph LR
    node1("GH_Repository GitHound")
    node2("GH_Environment production")
    node3("GH_Environment staging")
    node4("GH_Branch main")
    node1 -- GH_HasEnvironment --> node2
    node1 -- GH_HasEnvironment --> node3
    node4 -- GH_HasEnvironment --> node2
```
