logo svg
logo

November 29, 2026

Updated: November 29, 2026

GCP Penetration Testing: Google Cloud Rules, Methodology, and Checklist

What Google allows, the identity and metadata paths testers follow, and a checklist with the evidence to collect.

Mohammed Khalil

Mohammed Khalil

Featured Image

You can run a penetration test against your own Google Cloud projects without asking Google first. The limits are Google's Acceptable Use Policy and Terms of Service, and the test must not affect anyone else's projects. Inside those limits, most of the work is about identity: who and what can act in each project, and which of those identities can become a more powerful one.

This guide covers Google's rules, what is different about testing Google Cloud, the paths testers follow, and a checklist you can hand to a team or a provider.

Google's Penetration Testing Rules

Google states the rule in its security and compliance FAQ: "If you plan to evaluate the security of your Cloud Platform infrastructure with penetration testing, you are not required to contact us." The same answer adds that you have to abide by the Acceptable Use Policy and Terms of Service, "and ensure that your tests only affect your projects (and not other customers' applications)."

QuestionWhat the rule means in practice
Do you have to notify Google?No
What can you test?Resources in projects you own or are authorized to test
What is off limits?Other customers' applications and Google's own platform
What if you find a flaw in Google's platform?Google asks you to report it through its Vulnerability Reward Program
What about load or resilience tests?The FAQ does not address them. Read the Acceptable Use Policy and agree limits in writing before running any
Google Cloud penetration test in four stages after the rule: authorize, map identity, test resources, report paths.

Two things still need written approval, and neither comes from Google. The owner of the projects has to authorize the test, and any third party whose systems sit in the path, such as a managed service provider, has to agree to its part.

What Is Different About Testing Google Cloud

Three features of the platform shape the test.

The same skills apply as on other clouds, but the names and the paths differ. For the other two major platforms, see our guides to AWS penetration testing and Azure penetration testing.

Five Paths Testers Follow in Google Cloud

Five paths in a Google Cloud penetration test: basic roles, default service accounts, service account impersonation, service account keys and the metadata server, each one a route to wider access in the project.

1. Basic roles

Google's roles documentation describes basic roles as "highly permissive roles that give broad access to Google Cloud resources", and lists Owner, Editor and Viewer as legacy basic roles. Testers list every principal that holds one, at every level of the hierarchy, because an Editor on a project can change most of what runs in it.

2. Default service accounts

Google's page on service account types says: "Depending on your organization policy configuration, the default service account might automatically be granted the Editor role on your project." It adds that the constraint which stops this is enforced by default only for organizations created after May 3, 2024. In an older organization, a virtual machine that runs as the default service account may hold Editor on the whole project.

3. Service account impersonation

Impersonation is a feature, and it is also a common way to move from one identity to a stronger one. Google's impersonation documentation explains that it "lets an authenticated principal access whatever the service account can access", and that it needs the iam.serviceAccounts.getAccessToken permission, found in roles such as Service Account Token Creator. Testers map who can impersonate which service account and follow the chain to the most privileged one.

4. Service account keys

Long-lived keys end up in code repositories, build logs and laptops. Google's guidance on managing service account keys names the threats directly, starting with credential leakage: "A bad actor can use a leaked service account key to authenticate and gain a foothold in your environment." A test looks for keys in the places they leak to, checks their age, and checks what the account behind each key can do.

5. The metadata server

Every Compute Engine instance can reach a metadata server, and Google's documentation notes that instances access it "without needing additional authorization". An application on the instance can request an access token for the attached service account from it. That is why a server-side request forgery flaw in an application hosted on Google Cloud is tested against the metadata endpoint. One control helps: the metadata server denies requests that lack the Metadata-Flavor: Google header, so the tester checks whether the flaw lets an attacker set headers.

Storage, GKE and the Rest of the Scope

Cloud Storage. The test lists buckets and objects that are readable or writable by anyone, and checks whether public access prevention is enforced. Google describes public access prevention as a control under which "no one can make data in applicable buckets public through IAM policies or ACLs". Where it is enforced at the organization level, a whole class of finding is closed.

Google Kubernetes Engine. The questions are how pods get Google Cloud credentials and whether a compromised pod can reach the node's service account. Google calls Workload Identity Federation for GKE "the recommended way" for workloads on GKE to access Google Cloud services in most cases. Clusters that do not use it are a priority. The in-cluster work is covered in our guide to Kubernetes penetration testing.

Serverless and managed services. Cloud Run services, functions and managed databases are tested for who can invoke or reach them and which service account they run as.

Detection. A test is also a chance to see what your logging caught. Ask for a list of the tester's main actions with timestamps so that you can check them against your own alerts.

GCP Penetration Testing Checklist

AreaCheckEvidence to collect
AuthorizationWritten approval from the project owner, list of projects in scope, test windowSigned scope and rules of engagement
HierarchyRole grants at organization and folder level that reach the projects in scopeExport of allow policies at each level
Basic rolesPrincipals holding Owner, Editor or ViewerList with the level of each grant
Default service accountsDefault accounts that still hold Editor, and workloads that run as themRole bindings and the instances attached
ImpersonationWho holds Service Account Token Creator or the getAccessToken permission, and on which accountsThe chain from a low-privilege identity to the strongest reachable one
KeysUser-managed keys, their age and where copies existKey inventory, any key found outside a secret store
Metadata serverApplications that fetch user-supplied URLs, tested against the metadata endpointRequest and response, with any token redacted
Cloud StoragePublic buckets and objects, public access prevention settingBucket list with the setting for each
GKEHow workloads get credentials, node service account rolesCluster settings and a test from inside a pod
ExposureInstances, load balancers and services reachable from the internetList of external addresses and open services
DetectionWhich test actions produced a log entry or an alertTimeline matched against your alerts

A configuration scanner covers part of this list automatically. It reports that a setting is weak, and the penetration test shows what an attacker can reach by combining several weak settings. For the tooling side, see our guides to CSPM tools and cloud penetration testing tools.

What the Report Should Contain

A Google Cloud report needs two things on top of the usual findings. The first is the path: each finding should show the starting identity, every step and the access gained at the end, because a single misconfiguration rarely tells the story. The second is the level of each fix, since a role removed at project level does nothing if the same role is inherited from a folder. For the general structure, see our guide to the penetration testing report, and for how test evidence maps to audits, cloud compliance requirements.

FAQs

Do I need Google's permission to penetration test GCP?

No. Google's FAQ says you are not required to contact Google. You do have to follow the Acceptable Use Policy and Terms of Service, and keep the test inside your own projects.

Can I test Google's own services?

No. The rule covers your projects only. If you find a weakness in Google's platform during a test, Google asks you to report it through its Vulnerability Reward Program.

What access do testers need?

That depends on the question. A test of what an outsider can reach needs none. A test of what a compromised identity can do needs a low-privilege account in each project, and a review of the whole hierarchy needs read access to IAM policies at organization and folder level.

Is a GCP penetration test the same as a configuration review?

No. A configuration review compares settings with a benchmark. A penetration test starts from an identity or an exposed service and shows how far it can get.

Planning a Google Cloud Test

Start by writing down the projects in scope, the organization and folder they sit under, and the identities the testers will start from. That one page settles most of the effort. DeepStrike provides manual cloud penetration testing across Google Cloud, AWS and Azure, and our penetration testing scope guide has a template for the scope document.

About The Author

Mohammed Khalil is a Cybersecurity Architect at DeepStrike, specializing in advanced penetration testing and offensive security operations. With certifications including CISSP, OSCP, and OSWE, he has led numerous red team engagements, focusing on cloud security, application vulnerabilities, and adversary emulation. His work involves dissecting complex attack chains and developing resilient defense strategies for clients in the finance, healthcare, and technology sectors.

Sources and References

background
Let's hack you before real hackers do

Stay secure with DeepStrike penetration testing services. Reach out for a quote or customized technical proposal today

Contact Us