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

> Repository or environment has access to this variable

<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\_HasVariable | [GH\_RepoVariable](/opengraph/extensions/github/nodes/gh_repovariable)               |
| [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository)   | GH\_HasVariable | [GH\_OrgVariable](/opengraph/extensions/github/nodes/gh_orgvariable)                 |
| [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) | GH\_HasVariable | [GH\_EnvironmentVariable](/opengraph/extensions/github/nodes/gh_environmentvariable) |

```mermaid theme={null}
flowchart LR
    GH_Environment["GH_Environment"]
    GH_EnvironmentVariable["GH_EnvironmentVariable"]
    GH_OrgVariable["GH_OrgVariable"]
    GH_Repository["GH_Repository"]
    GH_RepoVariable["GH_RepoVariable"]
    GH_Environment -- GH_HasVariable --> GH_EnvironmentVariable
    GH_Repository -- GH_HasVariable --> GH_OrgVariable
    GH_Repository -- GH_HasVariable --> GH_RepoVariable
```

## General Information

The traversable GH\_HasVariable edge represents the relationship between a repository or environment and the variables accessible within that context. This edge shows which variables are available in which scopes. Repositories can have access to both organization-level variables (scoped by visibility to all, private, or selected repositories) and repository-level variables defined directly on the repo, while environments expose their own environment-scoped variables to jobs that target them. This edge is traversable because any principal that can execute a workflow in the relevant context may be able to read variable values at runtime, and variables may contain configuration data useful for lateral movement such as deployment URLs, service names, or environment identifiers.

## Edge Schema

| Source                                                               | Destination                                                                          | Traversable |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------- |
| [GH\_Environment](/opengraph/extensions/github/nodes/gh_environment) | [GH\_EnvironmentVariable](/opengraph/extensions/github/nodes/gh_environmentvariable) | `true`      |
| [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository)   | [GH\_OrgVariable](/opengraph/extensions/github/nodes/gh_orgvariable)                 | `true`      |
| [GH\_Repository](/opengraph/extensions/github/nodes/gh_repository)   | [GH\_RepoVariable](/opengraph/extensions/github/nodes/gh_repovariable)               | `true`      |

## Diagram

```mermaid theme={null}
graph LR
    n0["GH_Environment"]
    n1["GH_EnvironmentVariable"]
    n2["GH_Repository"]
    n3["GH_OrgVariable"]
    n4["GH_RepoVariable"]
    n0 -->|GH_HasVariable| n1
    n2 -->|GH_HasVariable| n3
    n2 -->|GH_HasVariable| n4
```
