Skip to content

Commit 64a2db3

Browse files
committed
add zone to pz rules output file
1 parent 319ad4d commit 64a2db3

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

docs/official-docs/opengraph/extensions/github/privilege-zone-rules.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ This file is automatically generated from the [JSON Privilege Zone rule files](h
1414

1515
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.
1616

17+
Zone: Tier Zero
18+
1719
```cypher
1820
MATCH (n:GH_OrgRole)
1921
WHERE n.name ENDS
@@ -27,6 +29,8 @@ This rule is defined in the [t0-all-repo-admin-role.json](https://github.com/Spe
2729

2830
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.
2931

32+
Zone: Tier Zero
33+
3034
```cypher
3135
MATCH (n:GH_AppInstallation {repository_selection:'all'})
3236
WHERE n.permissions CONTAINS '"write"'
@@ -39,6 +43,8 @@ This rule is defined in the [t0-app-installations-all-repos.json](https://github
3943

4044
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.
4145

46+
Zone: Tier Zero
47+
4248
```cypher
4349
MATCH (n:GH_App)-[:GH_InstalledAs]->(i:GH_AppInstallation {repository_selection:'all'})
4450
WHERE i.permissions CONTAINS '"write"'
@@ -51,6 +57,8 @@ This rule is defined in the [t0-apps-all-repos.json](https://github.com/SpecterO
5157

5258
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.
5359

60+
Zone: Tier Zero
61+
5462
```cypher
5563
MATCH (n:GH_ExternalIdentity)-[:GH_MapsToUser]->(:GH_User)-[:GH_HasRole]->(:GH_OrgRole {short_name:'owners'})
5664
RETURN n
@@ -62,6 +70,8 @@ This rule is defined in the [t0-external-identities-owners.json](https://github.
6270

6371
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.
6472

73+
Zone: Tier Zero
74+
6575
```cypher
6676
MATCH (n:GH_Organization)
6777
RETURN n
@@ -73,6 +83,8 @@ This rule is defined in the [t0-organizations.json](https://github.com/SpecterOp
7383

7484
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.
7585

86+
Zone: Tier Zero
87+
7688
```cypher
7789
MATCH (n:GH_User)-[:GH_HasRole]->(:GH_OrgRole {short_name:'owners'})
7890
RETURN n
@@ -84,6 +96,8 @@ This rule is defined in the [t0-owner-users.json](https://github.com/SpecterOps/
8496

8597
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.
8698

99+
Zone: Tier Zero
100+
87101
```cypher
88102
MATCH (n:GH_OrgRole {short_name:'owners'})
89103
RETURN n
@@ -95,6 +109,8 @@ This rule is defined in the [t0-owners-role.json](https://github.com/SpecterOps/
95109

96110
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.
97111

112+
Zone: Tier Zero
113+
98114
```cypher
99115
MATCH (n:GH_PersonalAccessToken {repository_selection:'all'})
100116
WHERE n.permissions CONTAINS '"write"'
@@ -107,6 +123,8 @@ This rule is defined in the [t0-pats-all-repos.json](https://github.com/SpecterO
107123

108124
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.
109125

126+
Zone: Tier Zero
127+
110128
```cypher
111129
MATCH (n:GH_OrgRole)-[:GH_WriteOrganizationCustomOrgRole]->(:GH_Organization)
112130
RETURN n
@@ -118,6 +136,8 @@ This rule is defined in the [t0-privilege-escalation-roles.json](https://github.
118136

119137
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.
120138

139+
Zone: Tier Zero
140+
121141
```cypher
122142
MATCH (n:GH_User)-[:GH_HasRole|GH_HasBaseRole*1..]->(:GH_OrgRole)-[:GH_WriteOrganizationCustomOrgRole]->(:GH_Organization)
123143
RETURN n
@@ -129,6 +149,8 @@ This rule is defined in the [t0-privilege-escalation-users.json](https://github.
129149

130150
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.
131151

152+
Zone: Tier Zero
153+
132154
```cypher
133155
MATCH (n:GH_SamlIdentityProvider)
134156
RETURN n

0 commit comments

Comments
 (0)