AWS codebuild medium security documentation change
Summary
Corrected GitHub MAINTAIN role name and added custom role mapping documentation
Security assessment
Fixes incorrect role name (GITHUB_MAINTAINER → GITHUB_MAINTAIN) which could cause misconfiguration in approval policies. Adds explicit documentation for custom GitHub Enterprise role-to-permission mapping, preventing privilege escalation risks from incorrect mappings. Directly impacts access control configuration.
Diff
diff --git a/codebuild/latest/userguide/pull-request-build-policy.md b/codebuild/latest/userguide/pull-request-build-policy.md index 223f9639c..b876bba6e 100644 --- a//codebuild/latest/userguide/pull-request-build-policy.md +++ b//codebuild/latest/userguide/pull-request-build-policy.md @@ -122 +122 @@ Valid values for GitHub projects (the values are mapped to the GitHub roles): - * Default: `["GITHUB_ADMIN", "GITHUB_MAINTAINER", "GITHUB_WRITE"]` + * Default: `["GITHUB_ADMIN", "GITHUB_MAINTAIN", "GITHUB_WRITE"]` @@ -158,0 +159,24 @@ Valid values for Bitbucket projects (the values are mapped to the Bitbucket role +**Custom GitHub Enterprise roles** + + +CodeBuild maps custom GitHub Enterprise (GHE) repository roles to standard `GITHUB_*` values based on the highest permission level granted to the custom role. CodeBuild evaluates permissions from highest to lowest privilege, and the first enabled permission determines the mapped role. + + * `admin` → `GITHUB_ADMIN` + + * `maintain` → `GITHUB_MAINTAIN` + + * `push` (write) → `GITHUB_WRITE` + + * `triage` → `GITHUB_TRIAGE` + + * `pull` (read) → `GITHUB_READ` + + + + +For example, a custom role that grants both `push` and `triage` permissions maps to `GITHUB_WRITE` because `push` has higher privilege than `triage`. + +If a custom role has none of the recognized permissions (admin, maintain, push, triage, pull all disabled), the user does not match any approver role and is treated as an untrusted contributor. + +Standard GitHub roles (Admin, Maintain, Write, Triage, Read) map directly to their corresponding `GITHUB_*` values without permission-based resolution. + @@ -182 +206 @@ Users with GitHub roles Admin, Maintain, will be treated as trusted contributors - "approverRoles": ["GITHUB_ADMIN", "GITHUB_MAINTAINER"] + "approverRoles": ["GITHUB_ADMIN", "GITHUB_MAINTAIN"]