Skip to content
Detectors

Scanner deep dive

Overview

GCP (Google Cloud Platform) is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products. GCP keys can be used to access and manage these services.
From the detector’s Description() in source

Needs a person to check

Provider and detector details

Summary

ProviderNo provider details added yet.

Runs on any connection. Triggered by keywords in the content, after decoding.How TruffleHog works

How detection works

The GCP detector looks for a single value in text that resembles a credential. It uses the word “provider_x509” to narrow its search.

Runs by default

Matching rules and source
Keywords
  • provider_x509

Regex

How it works

  1. Skips any text that doesn’t contain “provider_x509”. This keeps scanning fast.
  2. Looks for text matching its pattern.
  3. Values are trimmed before use.
  4. Reports each remaining match as a possible GCP credential. It isn’t known to work until it’s verified.
MustCompile
One value
Guards against false matches
Not found in source
Not found in source
  • rotation_guide
  • project
  • private_key_id
Pairing and normalization
  • values are trimmed before use

How it behaves

What this detector does at each step of the TruffleHog pipeline.

pkg/detectors/gcp · Scanner

Keywords

Any one of these in the decoded text wakes the detector.

  • provider_x509

gcp.go line 52 (opens TruffleHog source on GitHub)

Behavior

Multi-part
No
Match window
4096 bytes before and 2048 after a keyword
gcp.go line 58 (opens TruffleHog source on GitHub)
Custom endpoints
No
Cloud endpoint
None
Randomness check
None in this detector's own code

Verification. When a scan allows it, TruffleHog tests a match by calling the provider. A scan can turn this off for every detector or for this one. Atlas only describes this; it never tests credentials. How the verify decision works

Analyzer.None in the open-source code.

In short

Wakes on “provider_x509”, reads 4096 bytes before and 2048 after each hit and tests matches with the provider. A default scan runs it.

How verification works

What it means

Sends GET to www.googleapis.com.

The detection and verification evidence on this page comes from the Open Source implementation. Check the Enterprise coverage guide for product availability.

Does checking a key change anything at the provider?

Not expected to: it’s a GET request, which reads without changing anything, and the source declares no changes.

Source says: GET as declared in source; mutating side effects not declared

Verification walkthrough

How it works

  1. Sends a GET to www.googleapis.com.
  2. Puts the found credential in the request: credential is sent in the JSON token_uri field.

Evidence from source

Endpoint

https://www.googleapis.com/robot/v1/metadata/x509/

gcp.go:226 (opens TruffleHog source on GitHub)

Key is sent as

JSON token_uri field

How responses are judged

Not found in source

Troubleshoot this check

If a result looks wrong, work through these steps. They’re built from the request and status rules above. The Atlas doesn’t send anything.

1. Send the same request yourself

No command for this check. The check first trades the key for a token, so it takes more than one request.

Rule: oauth. Key placement as recorded: JSON token_uri field.

2. Likely causes

  • The scanner couldn't reach the provider. The scanner needs outbound HTTPS access to www.googleapis.com. A firewall, proxy or DNS problem can make the check fail.

3. Check the provider’s docs

No provider doc recorded for this check yet. Look up the API docs for www.googleapis.com and compare what they say each status means.

4. Still stuck

Report it to TruffleHog

Include the status code and response you got. Never include the key.

Errors, timeouts and rate limits
Not found in source
Not found in source
SetVerificationError

All URLs found in source

  • https://github.com/kubernetes/kubernetes/blob/10a06602223eab17e02e197d1da591727c756d32/test/e2e_node/runtime_conformance_test.go#L50
  • https://howtorotate.com/docs/tutorials/gcp/
  • https://www.googleapis.com/robot/v1/metadata/x509/
  • https://www.googleapis.com/auth/cloud-platform
  • https://github.com/trufflesecurity/trufflehog/issues/2864

Verified findings

Open Source · Standard output (stdout)

The CLI prints verified findings to stdout. Use --json for structured output.

Example scan output · credential redacted

✅ Found verified result 🐷🔑
Detector Type: GCP
Decoder Type: PLAIN
Raw result: [redacted]
Terminal printer source
CI formats

With --github-actions, GitHub Actions displays this workflow command as a warning on the indicated file and line.

::warning file=config/example.env,line=8,endLine=8::Found verified GCP result 🐷🔑
GitHub Actions printer source

Legacy compatibility. --json-legacy writes pre-v3 JSON for Git, GitLab, and GitHub sources only.

Enterprise alerts

When Enterprise verifies that a secret is live, a configured notifier can alert your team. The finding is also available through the Enterprise API.

See Cloud Analyze setup

A notifier that displays rotation guides can include this link with the alert.

Open rotation guide

Optional analysis

Cloud Analyze is available for this credential type.

Enterprise Cloud Analyze

Rotation resources

Token types

TruffleHog’s source doesn’t name a token type or require a fixed prefix for this detector.

Coverage in other scanners

3 scanners have a confirmed match.

Changes

No changes to GCP since Sep 18, 2026, when Atlas started recording.

When TruffleHog changes this detector, the changed fields, the pull request and the source diff appear here for review.

Browse all changesSource history on GitHub

Source

Every fact on this page was parsed from trufflesecurity/trufflehog at 2325546, unless a row below says otherwise.

2325546
2921dcc
Parser
trufflehog-detectors-analyzers-v12
Extraction
intel-detector-v7

5 of 20 evidence rows need attention

Evidence rows that need attention
FieldStatusValueSource
lastSeenAt2026-11-25T16:33:44.855ZNo citation
verify.statusCodesNone extractedFile
timeoutNone extractedFile
rateLimitNone extractedFile
verification.authenticationMethodJSON token_uri fieldParser confidence: mediumFile
All 20 evidence rows
All evidence rows
FieldStatusValueSource
descriptionGCP (Google Cloud Platform) is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products. GCP keys can be used to access and manage these services.File
keywordsprovider_x509File
detectorTypesGCPFile
filesgcp.goFile
patterns\{[^{]+auth_provider_x509_cert_url[^}]+\}File
patternTypemust_compileFile
statusactiveFile
lastSeenAt2026-11-25T16:33:44.855ZNo citation
rotationGuidehttps://howtorotate.com/docs/tutorials/gcp/File
verify.hasVerifyYesFile
verify.httpMethodsGETFile
verify.statusCodesNone extractedFile
timeoutNone extractedFile
rateLimitNone extractedFile
errorHandlingSetVerificationErrorFile
verify.urlshttps://github.com/kubernetes/kubernetes/blob/10a06602223eab17e02e197d1da591727c756d32/test/e2e_node/runtime_conformance_test.go#L50, https://howtorotate.com/docs/tutorials/gcp/, https://www.googleapis.com/robot/v1/metadata/x509/, https://www.googleapis.com/auth/cloud-platform, https://github.com/trufflesecurity/trufflehog/issues/2864File
detection.keywordsprovider_x509Lines 51–51
verification.endpointhttps://www.googleapis.com/robot/v1/metadata/x509/Lines 226–226
verification.httpMethodGETLines 226–226
verification.authenticationMethodJSON token_uri fieldParser confidence: mediumFile
Parser completeness
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Unknown
  • Field status: Unknown
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Extracted
  • Field status: Unknown
  • Field status: Not scanned
Package files (1)
  • gcp.go