fix(lwpreflight): correct GCP and AWS required-permission lists - #1852
Open
lokesh-vadlamudi wants to merge 3 commits into
Open
fix(lwpreflight): correct GCP and AWS required-permission lists#1852lokesh-vadlamudi wants to merge 3 commits into
lokesh-vadlamudi wants to merge 3 commits into
Conversation
lokesh-vadlamudi
force-pushed
the
lvadlamudi/cad-2292-gcp-project-projects-list
branch
from
August 12, 2026 22:37
79915ec to
85d40db
Compare
GCP marks resourcemanager.projects.list as "Not applicable for project-level custom roles", so a customer onboarding a project-level GCP Configuration integration cannot grant it. Discovery required it anyway and failed with "Required permission missing", leaving no way forward. The permission was only ever needed at org scope, where it is already listed in RequiredPermissionsForOrg. Preflight itself never calls projects.list, and the project-level terraform-gcp-config custom role does not use it either. CAD-2292
lokesh-vadlamudi
force-pushed
the
lvadlamudi/cad-2292-gcp-project-projects-list
branch
from
August 13, 2026 00:20
85d40db to
e77a6af
Compare
Terraform force-destroys the Agentless scanning bucket, which enumerates the objects before deleting them. The Agentless permission lists granted storage.objects.delete but not storage.objects.list, so the destroy died partway through with "Permission 'storage.objects.list' denied". That partial destroy is what orphans resources: the Lacework integration is itself a Terraform-managed resource that depends on the GCP ones, so it is destroyed first and the account disappears from Cloud Accounts while the GCP resources it was meant to clean up survive. The AWS Agentless lists already pair s3:ListBucket with s3:DeleteObject for this same force-destroy path. GCP was missing the equivalent. CAD-2294 CAD-2295
FetchEKSClusters calls eks:ListClusters once per region to enumerate the clusters to onboard, but neither EksAuditLog permission list required it, so preflight passed and Discovery then failed with a 403. CAD-2296
lokesh-vadlamudi
marked this pull request as ready for review
August 13, 2026 00:51
lokesh-vadlamudi
enabled auto-merge (squash)
August 13, 2026 00:52
lokesh-vadlamudi
disabled auto-merge
August 13, 2026 00:54
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.
Three permission-list corrections, each one line of data. All share a shape: the required-permission list did not match what the operation actually needs, so onboarding or teardown failed with no way for the customer to satisfy it.
resourcemanager.projects.listremoved from project-level GCP ConfigGoogle marks this permission "Not applicable for project-level custom roles", so it cannot be granted there at all.
CheckPermissionsselectsRequiredPermissionswheneverorgIDis empty, so every project-scope Config onboarding demanded it and died at Discovery with "Required permission missing", unsatisfiably.It was a copy from the org list. Preflight never calls
projects.list, the project-levelterraform-gcp-configcustom role does not use it, and it was the only project-level list carrying it.RequiredPermissionsForOrgkeeps it, so org validation is unchanged.CAD-2292
storage.objects.listadded to GCP AgentlessTerraform force-destroys the Agentless scanning bucket, which enumerates the objects before deleting them. The lists granted
storage.objects.deletewithoutstorage.objects.list, sodestroydied partway with "Permission 'storage.objects.list' denied".The partial destroy is what orphans resources: the Lacework integration is itself a Terraform-managed resource depending on the GCP ones, so it is torn down first and the account disappears from Cloud Accounts while the GCP resources survive.
The AWS Agentless lists already pair
s3:ListBucketwiths3:DeleteObjectfor this same path.CAD-2294
CAD-2295
eks:ListClustersadded to AWS EKS Audit LogFetchEKSClusterscallseks:ListClustersonce per region to enumerate the clusters to onboard. Neither EksAuditLog list required it, so preflight passed and Discovery then failed with a 403. The task is added only underparams.EksAuditLog, so the permission belongs on these two lists alone.CAD-2296