You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/official-docs/opengraph/extensions/github/privilege-zone-rules.mdx
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ This file is automatically generated from the [JSON Privilege Zone rule files](h
14
14
15
15
The synthetic all_repo_admin role grants admin access to every repository in the organization. This role is inherited by the owners role via GH_HasBaseRole and cascades admin permissions including branch protection editing, secret access, and deploy key management to all repositories.
16
16
17
+
Zone: Tier Zero
18
+
17
19
```cypher
18
20
MATCH (n:GH_OrgRole)
19
21
WHERE n.name ENDS
@@ -27,6 +29,8 @@ This rule is defined in the [t0-all-repo-admin-role.json](https://github.com/Spe
27
29
28
30
GitHub App installations scoped to all repositories in the organization that have at least one write permission. A compromised app credential grants write access to every repository. Installations with only read permissions are excluded — they pose a data exfiltration risk but do not grant control over the organization.
29
31
32
+
Zone: Tier Zero
33
+
30
34
```cypher
31
35
MATCH (n:GH_AppInstallation {repository_selection:'all'})
32
36
WHERE n.permissions CONTAINS '"write"'
@@ -39,6 +43,8 @@ This rule is defined in the [t0-app-installations-all-repos.json](https://github
39
43
40
44
GitHub App definitions whose installations have write access to all repositories. The app owner controls the private key that can generate tokens for any installation. Compromise of the app's private key grants write access to every repository in organizations where it is installed. Apps whose installations have only read permissions are excluded.
41
45
46
+
Zone: Tier Zero
47
+
42
48
```cypher
43
49
MATCH (n:GH_App)-[:GH_InstalledAs]->(i:GH_AppInstallation {repository_selection:'all'})
44
50
WHERE i.permissions CONTAINS '"write"'
@@ -51,6 +57,8 @@ This rule is defined in the [t0-apps-all-repos.json](https://github.com/SpecterO
51
57
52
58
External identities from SAML/SCIM providers that map to GitHub users holding the owners role. Compromise of these external identities in the identity provider grants organizational owner access to GitHub via SSO.
53
59
60
+
Zone: Tier Zero
61
+
54
62
```cypher
55
63
MATCH (n:GH_ExternalIdentity)-[:GH_MapsToUser]->(:GH_User)-[:GH_HasRole]->(:GH_OrgRole {short_name:'owners'})
56
64
RETURN n
@@ -62,6 +70,8 @@ This rule is defined in the [t0-external-identities-owners.json](https://github.
62
70
63
71
GitHub organizations are the root trust boundary for all repositories, teams, users, and settings. Compromise of the organization grants full administrative control over all contained assets.
64
72
73
+
Zone: Tier Zero
74
+
65
75
```cypher
66
76
MATCH (n:GH_Organization)
67
77
RETURN n
@@ -73,6 +83,8 @@ This rule is defined in the [t0-organizations.json](https://github.com/SpecterOp
73
83
74
84
Users who hold the organization owners role have full administrative control over the GitHub organization. Compromise of any owner account grants control over all repositories, secrets, SSO configuration, and cloud identities.
75
85
86
+
Zone: Tier Zero
87
+
76
88
```cypher
77
89
MATCH (n:GH_User)-[:GH_HasRole]->(:GH_OrgRole {short_name:'owners'})
78
90
RETURN n
@@ -84,6 +96,8 @@ This rule is defined in the [t0-owner-users.json](https://github.com/SpecterOps/
84
96
85
97
The owners organization role grants full administrative control including all repository admin, member management, SSO configuration, app management, and billing. Owners inherit all_repo_admin, cascading admin access to every repository, secret, environment, and cloud identity in the organization.
86
98
99
+
Zone: Tier Zero
100
+
87
101
```cypher
88
102
MATCH (n:GH_OrgRole {short_name:'owners'})
89
103
RETURN n
@@ -95,6 +109,8 @@ This rule is defined in the [t0-owners-role.json](https://github.com/SpecterOps/
95
109
96
110
Fine-grained personal access tokens scoped to all repositories in the organization that have at least one write permission. A single compromised token grants write access to every repository. PATs with only read permissions are excluded — they pose a data exfiltration risk but do not grant control over the organization.
97
111
112
+
Zone: Tier Zero
113
+
98
114
```cypher
99
115
MATCH (n:GH_PersonalAccessToken {repository_selection:'all'})
100
116
WHERE n.permissions CONTAINS '"write"'
@@ -107,6 +123,8 @@ This rule is defined in the [t0-pats-all-repos.json](https://github.com/SpecterO
107
123
108
124
Custom organization roles with write_organization_custom_org_role permission can modify organization role definitions, including setting the base_role to inherit all_repo_admin. Since this permission only exists on custom organization roles, the holder can escalate the role they already hold — a guaranteed self-escalation path to full organizational control.
109
125
126
+
Zone: Tier Zero
127
+
110
128
```cypher
111
129
MATCH (n:GH_OrgRole)-[:GH_WriteOrganizationCustomOrgRole]->(:GH_Organization)
112
130
RETURN n
@@ -118,6 +136,8 @@ This rule is defined in the [t0-privilege-escalation-roles.json](https://github.
118
136
119
137
Users who hold custom organization roles with write_organization_custom_org_role permission. These users can modify organization role definitions — including the role they hold — to set the base_role to all_repo_admin, granting themselves admin access to every repository in the organization.
120
138
139
+
Zone: Tier Zero
140
+
121
141
```cypher
122
142
MATCH (n:GH_User)-[:GH_HasRole|GH_HasBaseRole*1..]->(:GH_OrgRole)-[:GH_WriteOrganizationCustomOrgRole]->(:GH_Organization)
123
143
RETURN n
@@ -129,6 +149,8 @@ This rule is defined in the [t0-privilege-escalation-users.json](https://github.
129
149
130
150
SAML identity providers control authentication for all organization members via SSO. Compromise of the identity provider grants the ability to impersonate any user, including organization owners, by manipulating SAML assertions or resetting credentials.
0 commit comments