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

> A GitHub Actions deployment environment with protection rules and deployment branch policies

<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" />

Represents a GitHub Actions deployment environment configured on a repository. Environments can have protection rules including required reviewers, wait timers, and deployment branch policies. When custom branch policies are configured, the environment is connected to specific branches; otherwise, it is connected directly to the repository.

## Edges

<Note>
  The tables below list edges defined by the GitHub extension only. Additional edges to or from this node may be created by other extensions.
</Note>

### Inbound Edges

| Edge Type                                                                  | Source Node Types                                                                                                              | Traversable |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------- |
| [GH\_HasEnvironment](/opengraph/extensions/github/edges/gh_hasenvironment) | [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository), [GH\_Branch](/opengraph/extensions/github/nodes/gh_branch) | ❌           |

### Outbound Edges

| Edge Type                                                                        | Destination Node Types                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Traversable |
| -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| [GH\_CanAssumeIdentity](/opengraph/extensions/github/edges/gh_canassumeidentity) | [AZFederatedIdentityCredential](/resources/nodes/az-federated-identity-credential), `AWSRole`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | ✅           |
| [GH\_Contains](/opengraph/extensions/github/edges/gh_contains)                   | [GH\_User](/opengraph/extensions/github/nodes/gh_user), [GH\_Team](/opengraph/extensions/github/nodes/gh_team), [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository), [GH\_OrgRole](/opengraph/extensions/github/nodes/gh_orgrole), [GH\_RepoRole](/opengraph/extensions/github/nodes/gh_reporole), [GH\_TeamRole](/opengraph/extensions/github/nodes/gh_teamrole), [GH\_OrgSecret](/opengraph/extensions/github/nodes/gh_orgsecret), [GH\_AppInstallation](/opengraph/extensions/github/nodes/gh_appinstallation), [GH\_PersonalAccessToken](/opengraph/extensions/github/nodes/gh_personalaccesstoken), [GH\_PersonalAccessTokenRequest](/opengraph/extensions/github/nodes/gh_personalaccesstokenrequest), [GH\_RepoSecret](/opengraph/extensions/github/nodes/gh_reposecret), [GH\_EnvironmentSecret](/opengraph/extensions/github/nodes/gh_environmentsecret), [GH\_SecretScanningAlert](/opengraph/extensions/github/nodes/gh_secretscanningalert) | ❌           |
| [GH\_HasSecret](/opengraph/extensions/github/edges/gh_hassecret)                 | [GH\_OrgSecret](/opengraph/extensions/github/nodes/gh_orgsecret), [GH\_RepoSecret](/opengraph/extensions/github/nodes/gh_reposecret), [GH\_EnvironmentSecret](/opengraph/extensions/github/nodes/gh_environmentsecret)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | ✅           |

## Properties

| Property Name       | Data Type | Description                                                                   |
| ------------------- | --------- | ----------------------------------------------------------------------------- |
| objectid            | string    | The GitHub `node_id` of the environment, used as the unique graph identifier. |
| id                  | integer   | The numeric GitHub ID of the environment.                                     |
| node\_id            | string    | The GitHub node ID. Redundant with objectid.                                  |
| name                | string    | The fully qualified environment name (e.g., `repoName\production`).           |
| short\_name         | string    | The environment's display name (e.g., `production`, `staging`).               |
| can\_admins\_bypass | boolean   | Whether repository administrators can bypass environment protection rules.    |
| environment\_name   | string    | The name of the environment (GitHub organization)                             |
| environmentid       | string    | The node\_id of the environment (GitHub organization)                         |
| repository\_name    | string    | The full name of the containing repository.                                   |
| repository\_id      | string    | The ID of the containing repository.                                          |

## Diagram

```mermaid theme={null}
flowchart TD
    GH_Environment[fa:fa-leaf GH_Environment]
    GH_Repository[fa:fa-box-archive GH_Repository]
    GH_Branch[fa:fa-code-branch GH_Branch]
    GH_EnvironmentSecret[fa:fa-lock GH_EnvironmentSecret]
    GH_EnvironmentVariable[fa:fa-lock-open GH_EnvironmentVariable]
    AZFederatedIdentityCredential[fa:fa-id-card AZFederatedIdentityCredential]


    GH_Repository -.->|GH_HasEnvironment| GH_Environment
    GH_Branch -.->|GH_HasEnvironment| GH_Environment
    GH_Environment -.->|GH_Contains| GH_EnvironmentSecret
    GH_Environment -.->|GH_Contains| GH_EnvironmentVariable
    GH_Environment -->|GH_HasSecret| GH_EnvironmentSecret
    GH_Environment -->|GH_CanAssumeIdentity| AZFederatedIdentityCredential
```
