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

> Repo role can create new GitHub environments in this repository by editing a workflow that references a nonexistent environment name

<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\_RepoRole](/opengraph/extensions/github/nodes/gh_reporole) | GH\_CanCreateEnvironment | [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository) |

```mermaid theme={null}
flowchart LR
    GH_RepoRole["GH_RepoRole"]
    GH_Repository["GH_Repository"]
    GH_RepoRole -- GH_CanCreateEnvironment --> GH_Repository
```

## General Information

The traversable GH\_CanCreateEnvironment edge is a computed edge indicating that a repository role can cause a new GitHub environment to be created in the repository. This is derived from the ability to create and modify runnable branches/workflows: if a workflow references an environment name that does not already exist, GitHub will create that environment automatically.

This edge is useful for modeling OIDC and deployment scenarios where trust is tied to an environment name. An attacker who can create a new environment through workflow changes may be able to instantiate a trusted environment on demand, even if it was not previously configured.

## Edge Schema

| Source                                                         | Destination                                                        | Traversable |
| -------------------------------------------------------------- | ------------------------------------------------------------------ | ----------- |
| [GH\_RepoRole](/opengraph/extensions/github/nodes/gh_reporole) | [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository) | `true`      |

## Diagram

```mermaid theme={null}
graph LR
    n0["GH_RepoRole"]
    n1["GH_Repository"]
    n0 -->|GH_CanCreateEnvironment| n1
```
