Scanner deep dive
Google Cloud Storage (GCS)
The Google Cloud Storage integration scans objects in GCS buckets for credentials and other sensitive data.
Use cases and coverage
Scanning use cases
Check a bucket used for diagnostic uploads
Choose the Google Cloud project and include the intended bucket. Scan its objects for credentials copied into uploaded reports.
Review an export before granting a partner access
Use the object include settings to target the export. Give the export owner the affected object names so they can replace the files.
Related incidentA cloud credential in Codecov’s Docker image · Service accessed
April 2021 · Service accessed
A cloud credential in Codecov’s Docker image
Codecov traced a change to its Bash Uploader back to a service-account key left in an intermediate layer of a published Docker image. The key allowed changes to the uploader in Google Cloud Storage.
How this relates to Google Cloud Storage (GCS)
The uploader was modified in Cloud Storage. The exposed key was in a Docker image, outside the scope of a bucket-object scan.
Review Google Cloud Storage (GCS) scan scopeCodecov report · Root Cause
Source check
Atlas AI-assisted source check · 2026-11-22. The publisher describes the event or study. The Atlas explains its relevance to this connector. Detection depends on the scan scope and detectors in use.
What it covers
Compare in matrixWhat the docs page’s Capabilities table says, sorted into what the source reaches, how deep it reads and how it runs. Hatched segments and dashes are capabilities the page doesn’t mention. Select ⓘ for what each one means.
- GCS objects
What it reaches
1 supported · 3 not documented
- GCS objects✓
- History–
- Comments–
- Attachments–
How deep it reads
4 supported
- Archives✓
- Binaries✓
- Base64✓
- Office docs✓
How it runs
2 supported · 4 not documented
- Filters✓
- Auto-resume✓
- Real-time–
- Pre-commit–
- Pre-receive–
- In CI–
Limits
The Atlas has no additional limits recorded from this integration guide.
What TruffleHog documents
- Integration guide
For local configuration, the guide describes anonymous access to public buckets, Application Default Credentials, and a service account key file. The web setup asks for an identity with read access.
Read the Google Cloud Storage (GCS) integration guide- Open-source CLI
Bucket filters, object filters and the maximum object size all affect which objects the CLI reads. Apply them together when estimating the size of a scan.
Read the pinned README passage
Sources checked .
Scan setup and permissions
Set it up
Pick how you’ll run it: each tab has its steps and its options. Enterprise paths come from Truffle’s public docs. The open-source CLI is read from the public TruffleHog code at a pinned commit; it’s a separate product from Enterprise.
Web interface or local configuration
- 1For private buckets, identify the project and an identity with bucket-listing and object-read access. The local setup supports Application Default Credentials or a service account file.
- 2For a public-bucket scan without authentication, explicitly list the buckets. Bucket discovery requires credentials.
Suggested contact (Atlas suggestion) · Google Cloud project owner or storage IAM administrator
Suggested first check (Atlas suggestion) · Confirm access to an object in one intended bucket.
Setup reference checked 2026-11-22 · Configuration
In the web UI
- Configure from the Integrations page with an identity that can read the project and buckets.
Config file options (9)
Options for sources.GCS in a local YAML config. Required fields come first.
All 9 config options0 required
| Field | What it does | Type |
|---|---|---|
projectIdDepends | GCP project ID. Required for IAM credentials and service account modes. | string |
adcDepends | Empty object: use Application Default Credentials. Required for IAM credentials mode. | object |
serviceAccountFileDepends | Path to a service account JSON key. Required for service account mode. | string |
unauthenticatedDepends | Empty object for no authentication. | object |
includeBuckets | Buckets to scan; omit to scan all listable buckets. Required when unauthenticated. | list |
excludeBuckets | Buckets to skip. | list |
includeObjects | Objects to include; supports * globs. | list |
excludeObjects | Objects to skip; supports * globs. | list |
maxObjectSize | Maximum object size in bytes; larger objects are skipped. | integer |
Check the options in your installed version with trufflehog gcs --help.
- 1Choose the project and bucket list for authenticated scanning. The CLI supports Application Default Credentials or a service account file.
- 2For an approved public bucket, use the documented unauthenticated mode with explicit bucket selection. Keep its inputs separate from the authenticated project route.
Suggested contact (Atlas suggestion) · Google Cloud storage owner
Suggested first check (Atlas suggestion) · Confirm the pilot bucket and object scope before widening the scan.
Setup reference checked 2026-11-22 · gcs command declaration
Find credentials in GCS buckets. pkg/sources/gcs · main.go line 195
Open-source TruffleHog, read from the public code at commit ffdee00 (v3.99.9-6-gffdee00a). Newer releases may differ.
All 10 CLI flagsNone required
| Flag | What it does | Type |
|---|---|---|
| --project-id | GCS project ID used to authenticate. Can NOT be used with unauth scan. Can be provided with environment variable GOOGLE_CLOUD_PROJECT. | string |
| --cloud-environment | Use Application Default Credentials, IAM credentials to authenticate. | bool |
| --service-account | Path to GCS service account JSON file. | existingfile |
| --without-auth | Scan GCS buckets without authentication. This will only work for public buckets | bool |
| --api-key | GCS API key used to authenticate. Can be provided with environment variable GOOGLE_API_KEY. | string |
| --include-buckets | Buckets to scan. Comma separated list of buckets. You can repeat this flag. Globs are supported | strings |
| --exclude-buckets | Buckets to exclude from scan. Comma separated list of buckets. Globs are supported | strings |
| --include-objects | Objects to scan. Comma separated list of objects. you can repeat this flag. Globs are supported | strings |
| --exclude-objects | Objects to exclude from scan. Comma separated list of objects. You can repeat this flag. Globs are supported | strings |
| --max-object-size | Maximum size of objects to scan. Objects larger than this will be skipped. (Byte units eg. 512B, 2KB, 4MB)Default 10MB. | bytes |
Access
How the scanner authenticates and what it’s allowed to read. Write access is highlighted.
All read-only, as documented.
Auth methods
- IAM credentials
- Service account file
- Unauthenticated
Permissions
2 permissionsroles/storage.objectViewerread object contentsroles/storage.bucketViewerlist buckets in project
If Google Cloud Storage (GCS) keys leak
The credentials you give this connector are secrets too. These detectors find Google Cloud Storage (GCS) keys anywhere TruffleHog scans, not only inside Google Cloud Storage (GCS).
Sources and related tools
Evidence
Docs scraped 2026-11-17. Each docs page was fetched with Firecrawl twice (an overview pass and a detail pass for capabilities, options, permissions and notes) and read by an extraction prompt. Descriptions are short paraphrases. Open-source CLI facts are parsed from main.go at the pinned TruffleHog commit. Not reviewed by a person. Pinned commit ffdee00. Check the source before quoting a detail, or review this connector so the badge says so. Truffle’s integrations page doesn’t list this connector, so the Atlas picked its category.
- Source docs pageUpdated 12 May 2026
- Open-source packagepkg/sources/gcs
- Sources indexStatus, edition, deployment