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

> User or team has a role assignment (org role, team role, or repo role)

<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\_User](/opengraph/extensions/github/nodes/gh_user)                     | GH\_HasRole | [GH\_TeamRole](/opengraph/extensions/github/nodes/gh_teamrole)             |
| [GH\_User](/opengraph/extensions/github/nodes/gh_user)                     | GH\_HasRole | [GH\_OrgRole](/opengraph/extensions/github/nodes/gh_orgrole)               |
| [GH\_User](/opengraph/extensions/github/nodes/gh_user)                     | GH\_HasRole | [GH\_EnterpriseRole](/opengraph/extensions/github/nodes/gh_enterpriserole) |
| [GH\_EnterpriseTeam](/opengraph/extensions/github/nodes/gh_enterpriseteam) | GH\_HasRole | [GH\_EnterpriseRole](/opengraph/extensions/github/nodes/gh_enterpriserole) |
| [GH\_Team](/opengraph/extensions/github/nodes/gh_team)                     | GH\_HasRole | [GH\_OrgRole](/opengraph/extensions/github/nodes/gh_orgrole)               |
| [GH\_User](/opengraph/extensions/github/nodes/gh_user)                     | GH\_HasRole | [GH\_RepoRole](/opengraph/extensions/github/nodes/gh_reporole)             |
| [GH\_Team](/opengraph/extensions/github/nodes/gh_team)                     | GH\_HasRole | [GH\_RepoRole](/opengraph/extensions/github/nodes/gh_reporole)             |

```mermaid theme={null}
flowchart LR
    GH_EnterpriseRole["GH_EnterpriseRole"]
    GH_EnterpriseTeam["GH_EnterpriseTeam"]
    GH_OrgRole["GH_OrgRole"]
    GH_RepoRole["GH_RepoRole"]
    GH_Team["GH_Team"]
    GH_TeamRole["GH_TeamRole"]
    GH_User["GH_User"]
    GH_EnterpriseTeam -- GH_HasRole --> GH_EnterpriseRole
    GH_Team -- GH_HasRole --> GH_OrgRole
    GH_Team -- GH_HasRole --> GH_RepoRole
    GH_User -- GH_HasRole --> GH_EnterpriseRole
    GH_User -- GH_HasRole --> GH_OrgRole
    GH_User -- GH_HasRole --> GH_RepoRole
    GH_User -- GH_HasRole --> GH_TeamRole
```

## General Information

The traversable GH\_HasRole edge represents the assignment of a user or team to a specific role within the organization, repository, or team. This is the primary edge for connecting identities to their permissions and serves as the foundation of all access paths in the GitHub permission model. Because role assignment is the starting point for determining what a principal can do, this edge is traversable and critical for attack path analysis.

## Edge Schema

| Source                                                                     | Destination                                                                | Traversable |
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------- |
| [GH\_EnterpriseTeam](/opengraph/extensions/github/nodes/gh_enterpriseteam) | [GH\_EnterpriseRole](/opengraph/extensions/github/nodes/gh_enterpriserole) | `true`      |
| [GH\_Team](/opengraph/extensions/github/nodes/gh_team)                     | [GH\_OrgRole](/opengraph/extensions/github/nodes/gh_orgrole)               | `true`      |
| [GH\_Team](/opengraph/extensions/github/nodes/gh_team)                     | [GH\_RepoRole](/opengraph/extensions/github/nodes/gh_reporole)             | `true`      |
| [GH\_User](/opengraph/extensions/github/nodes/gh_user)                     | [GH\_EnterpriseRole](/opengraph/extensions/github/nodes/gh_enterpriserole) | `true`      |
| [GH\_User](/opengraph/extensions/github/nodes/gh_user)                     | [GH\_OrgRole](/opengraph/extensions/github/nodes/gh_orgrole)               | `true`      |
| [GH\_User](/opengraph/extensions/github/nodes/gh_user)                     | [GH\_RepoRole](/opengraph/extensions/github/nodes/gh_reporole)             | `true`      |
| [GH\_User](/opengraph/extensions/github/nodes/gh_user)                     | [GH\_TeamRole](/opengraph/extensions/github/nodes/gh_teamrole)             | `true`      |

## Diagram

```mermaid theme={null}
graph LR
    n0["GH_EnterpriseTeam"]
    n1["GH_EnterpriseRole"]
    n2["GH_Team"]
    n3["GH_OrgRole"]
    n4["GH_RepoRole"]
    n5["GH_User"]
    n6["GH_TeamRole"]
    n0 -->|GH_HasRole| n1
    n2 -->|GH_HasRole| n3
    n2 -->|GH_HasRole| n4
    n5 -->|GH_HasRole| n1
    n5 -->|GH_HasRole| n3
    n5 -->|GH_HasRole| n4
    n5 -->|GH_HasRole| n6
```
