Skip to content

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-securitycenter Python library installed in the agent environment
  • A GCP service account with the roles/securitycenter.findingsViewer role (or a custom role with securitycenter.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

  1. Checks that the file in GOOGLE_APPLICATION_CREDENTIALS exists and uses it for authentication
  2. Lists the findings of organizations/{GCP_ORGANIZATION_ID} (all sources, or only GCP_SOURCE) with the SCC v2 API in the global location, filtered by SCC_STATE and SCC_MIN_SEVERITY
  3. Groups findings by their resource name
  4. 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: ACTIVE is open, INACTIVE is closed, muted findings are risk-accepted
    • Details: description, CVEs, CVSS, package information and references
  5. 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_CREDENTIALS is missing or does not point to an existing file.
  • GCP_ORGANIZATION_ID and GCP_SOURCE also accept the organizations/<id> and sources/<id> forms.
  • Unrecognized SCC_MIN_SEVERITY or SCC_STATE values are ignored and logged.
  • The shared agent parameters (AGENT_CONFIG_* tags and severity filters) are not applied by this executor. Use SCC_MIN_SEVERITY to filter by severity.