Warning
This service is in early access. Functionality and availability may change without notice.
A Privateer plugin that evaluates Google Cloud Storage (GCS) buckets against the CCC Object Storage catalog controls.
This plugin connects to a GCS bucket and evaluates its configuration against the Common Cloud Controls (CCC) Object Storage catalog. It checks encryption, access control, versioning, retention, immutability, logging, and policy compliance — producing a structured report of passed, failed, and review-needed controls.
- Go 1.26.2 or later
- A GCP project with a Cloud Storage bucket to evaluate
- GCP credentials (one of the following):
- An active
gcloud auth application-default loginsession - A service account key with the required roles
- Workload Identity or
GOOGLE_APPLICATION_CREDENTIALSenvironment variable
- An active
The plugin performs read-only operations. Minimum required roles:
| Role | Scope | Covers |
|---|---|---|
roles/storage.objectViewer |
Bucket or project | Read bucket data, object metadata, and object data |
roles/storage.legacyBucketReader |
Bucket or project | Read bucket metadata including IAM policy and logging config |
git clone https://github.com/revanite-io/pvtr-gcp-cloud-storage.git
cd pvtr-gcp-cloud-storage
make buildDownload the latest binary from the releases page.
Copy example-config.yml and customize it:
cp example-config.yml config.ymlAt minimum, set the bucketname to your target GCS bucket:
services:
myService1:
plugin: pvtr-gcp-cloud-storage
policy:
catalogs: ["CCC.ObjStor"]
vars:
bucketname: my-gcs-bucket-nameThe plugin uses Application Default Credentials (ADC), tried in this order:
-
GOOGLE_APPLICATION_CREDENTIALSenvironment variable pointing to a service account key file:export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.json -
gcloudCLI credentials (for local development):gcloud auth application-default login
-
Workload Identity / attached service account (for GCE, GKE, Cloud Run, etc.) — no configuration needed; credentials are retrieved automatically from the metadata server.
This plugin is designed to run via Privateer. See the Privateer documentation for details on running plugins.
For local development and debugging:
make buildThe plugin evaluates controls from the CCC.ObjStor catalog:
| Control | Description |
|---|---|
| CN01 | Prevent requests with untrusted KMS keys |
| CN02 | Uniform bucket-level access enforcement |
| CN03 | Bucket deletion recovery and retention policy immutability |
| CN04 | Default retention policies |
| CN05 | Object versioning |
| CN06 | Access logging |
| CN07 | MFA deletion protection |
# Run tests
make test
# Run tests with coverage
make test-cov
# Build
make build
# Tidy dependencies
make tidyWe welcome contributions. See CONTRIBUTING.md for guidelines on how to get started.
Looking for something to work on? Check the contribute page for good first issues.
- privateer-sdk - The SDK this plugin is built on
- go-gemara - Assessment framework types
- Common Cloud Controls - The control catalogs evaluated by this plugin