Google Cloud Security Command Center Executor¶
Category: Cloud Security
Script: gcp_scc.py
Integration: Python SDK (google-cloud-securitycenter)
Faraday Plugin: Raw JSON
Website: https://cloud.google.com/security-command-center
Description¶
Imports security findings from Google Cloud Security Command Center (SCC) into Faraday. Findings are grouped by the affected GCP resource: each resource becomes a host and each finding a vulnerability prefixed with [CNAPP].
Prerequisites¶
- The
google-cloud-securitycenterPython library installed in the agent environment - A GCP service account with the
roles/securitycenter.findingsViewerrole (or a custom role withsecuritycenter.findings.list) on the organization - The service account JSON key file on the agent machine
- The numeric ID of your GCP organization
Configuration¶
Environment Variables (Setup)¶
| Variable | Required | Description |
|---|---|---|
GOOGLE_APPLICATION_CREDENTIALS |
Yes | Path to the service account JSON key file (e.g., /etc/faraday/gcp-scc-key.json) |
These variables are also accepted as execution arguments, so a single run can override them.
Execution Arguments¶
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
GCP_ORGANIZATION_ID |
string | Yes | Numeric ID of the GCP organization to query |
GCP_SOURCE |
string | No | Numeric ID of a single SCC source to query (default: all sources) |
SCC_MIN_SEVERITY |
string | No | Minimum severity to import: info, low, medium, high or critical (default: info) |
SCC_STATE |
string | No | Import only findings in this state: ACTIVE or INACTIVE (default: all) |
YAML Configuration Example¶
executors:
gcp_scc:
repo_executor: gcp_scc.py
max_size: 65536
varenvs:
GOOGLE_APPLICATION_CREDENTIALS: "/etc/faraday/gcp-scc-key.json"
params:
GCP_ORGANIZATION_ID:
mandatory: true
type: string
base: string
GCP_SOURCE:
mandatory: false
type: string
base: string
SCC_MIN_SEVERITY:
mandatory: false
type: string
base: string
SCC_STATE:
mandatory: false
type: string
base: string
How It Works¶
- Checks that the file in
GOOGLE_APPLICATION_CREDENTIALSexists and uses it for authentication - Lists the findings of
organizations/{GCP_ORGANIZATION_ID}(all sources, or onlyGCP_SOURCE) with the SCC v2 API in thegloballocation, filtered bySCC_STATEandSCC_MIN_SEVERITY - Groups findings by their resource name
- Maps each finding to a Faraday vulnerability:
- Name:
[CNAPP]plus the finding's category and affected resource - Severity: SCC's severity, or the CVSS score when SCC gives none
- Status:
ACTIVEis open,INACTIVEis closed, muted findings are risk-accepted - Details: description, CVEs, CVSS, package information and references
- Name:
- Creates one host per resource with its type, project and location in the description
Notes¶
- Hosts use the synthetic IP
0.0.0.0; the hostname is the resource's display name followed by its full GCP resource name. - The executor fails if
GOOGLE_APPLICATION_CREDENTIALSis missing or does not point to an existing file. GCP_ORGANIZATION_IDandGCP_SOURCEalso accept theorganizations/<id>andsources/<id>forms.- Unrecognized
SCC_MIN_SEVERITYorSCC_STATEvalues are ignored and logged. - The shared agent parameters (
AGENT_CONFIG_*tags and severity filters) are not applied by this executor. UseSCC_MIN_SEVERITYto filter by severity.