feat(gcp): add image metadata and GKE workload read permissions#50
Merged
vik-nullify merged 1 commit intoMay 11, 2026
Conversation
Extends the read-only custom role with two capabilities:
1. Artifact Registry image metadata
- artifactregistry.dockerimages.{get,list}
- artifactregistry.tags.{get,list}
- artifactregistry.versions.{get,list}
Resolves image digests, tag history, and version metadata so deployed
images can be correlated back to their source repository. Layer bytes
(artifactregistry.repositories.downloadArtifacts) are intentionally
not included.
2. GKE workload read via the control-plane proxy
- Workloads: deployments, statefulSets, daemonSets, jobs, cronJobs, pods
- Networking: services, ingresses, networkPolicies
- RBAC: serviceAccounts, roles, roleBindings, clusterRoles,
clusterRoleBindings
- Config: configMaps, namespaces, nodes
All get/list only. ConfigMap values are read; Kubernetes Secret values
(container.secrets.*) are intentionally not requested. PersistentVolume
data, runtime events, custom resource definitions, and write/data-plane
verbs are excluded.
docs/permissions.md is updated to justify each new permission and call out
the explicit exclusions for security review.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tim-thacker-nullify
approved these changes
May 11, 2026
a9b6936
into
fix/gcp-custom-role-project-scope
8 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends the read-only custom role with two additive capabilities:
dockerimages.{get,list},tags.{get,list},versions.{get,list}so deployed images can be correlated back to their tagget/listonly).docs/permissions.mdis updated with a per-permission justification and the explicit exclusions for security review.Excluded by design
artifactregistry.repositories.downloadArtifactscontainer.secrets.*container.events.*container.bindings.*,container.tokenReviews.*,container.subjectAccessReviews.*container.persistentVolumes.*,container.persistentVolumeClaims.*container.customResourceDefinitions.*,container.thirdPartyObjects.*The role still honours the "strict allowlist of
*.get/*.listonly — no mutations and no data-plane reads" discipline stated in the existing code comments.Stacking
This PR is stacked on top of
fix/gcp-custom-role-project-scopebecause thecustom_role_permissions_commonlocal that this PR extends is introduced by that fix. Once that lands, retarget the base branch tomainand rebase.Test plan
terraform validatepasses forgcp-integration-setup/terraformterraform planinexamples/single-projectshows only the additive permissions as a diff againstfix/gcp-custom-role-project-scopeterraform planinexamples/organizationshows the same additive permissions (these new perms are valid at both project and org custom-role scope)gcloud iam roles describeof the rendered custom role lists the new permissions and does not listcontainer.secrets.*orartifactregistry.repositories.downloadArtifacts🤖 Generated with Claude Code