feat(gcp): grant table + topic getIamPolicy permissions#51
Merged
Conversation
The nullify-platform CSPM pipeline added two new resource-level IAM checks that the connector wasn't granting yet: - **BigQuery table-level IAM** — `gcp-bigquery-table-public` and related rules need `bigquery.tables.getIamPolicy` to detect tables bound to `allUsers` / `allAuthenticatedUsers`. We can't grant `roles/bigquery.dataViewer` for this because it would also expose table row data; the per-permission grant gives us only the IAM surface. - **Pub/Sub topic-level IAM** — `gcp-pubsub-no-public-access` needs `pubsub.topics.getIamPolicy`. The predefined `roles/pubsub.viewer` role already in the connector grants topic / subscription metadata listing but explicitly *not* IAM-policy reads. Both are pure-read additions consistent with the connector's metadata-only posture documented in main.tf. Updates docs/permissions.md accordingly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vik-nullify
approved these changes
May 19, 2026
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
Adds two resource-level IAM read permissions to the GCP connector custom role to unblock new CSPM rules landing in nullify-platform PR #4777.
bigquery.tables.getIamPolicyallUsers/allAuthenticatedUsersand other table-level IAM misconfigurations.roles/bigquery.dataViewer(would also expose row data) — we want only the IAM surface.pubsub.topics.getIamPolicypubsub.topics.publishandsubscriptions.consume— read-only IAM only.Both grants are pure-read and consistent with the connector's metadata-only posture documented in
main.tf.Files
gcp-integration-setup/terraform/modules/nullify-gcp-integration/main.tf— adds 2 entries tocustom_role_permissions_commonwith inline explanatory commentsgcp-integration-setup/docs/permissions.md— updates the customer-facing permission table to reflect the additions and the explicit rationale for not usingroles/bigquery.dataViewerTest plan
terraform fmt -recursive(no changes)terraform validate— successgcloud iam roles describe nullifyCloudConnector --project=<dev-project>gcp-bigquery-table-publicandgcp-pubsub-no-public-accessfindings when seeded misconfigurations exist.🤖 Generated with Claude Code