gcpscc

package
v1.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package gcpscc provides the GCP Security Command Center integration definition for integrations

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrClientType indicates the provided client is not the expected type
	ErrClientType = errors.New("gcpscc: unexpected client type")
	// ErrCredentialMetadataRequired indicates no credential metadata was provided
	ErrCredentialMetadataRequired = errors.New("gcpscc: credential metadata required")
	// ErrMetadataDecode indicates credential metadata could not be decoded
	ErrMetadataDecode = errors.New("gcpscc: failed to decode credential metadata")
	// ErrProjectIDRequired indicates no project or organization ID was provided
	ErrProjectIDRequired = errors.New("gcpscc: project or organization ID required")
	// ErrServiceAccountKeyInvalid indicates the service account key JSON is invalid
	ErrServiceAccountKeyInvalid = errors.New("gcpscc: service account key invalid")
	// ErrSecurityCenterClientCreate indicates the SCC client could not be created
	ErrSecurityCenterClientCreate = errors.New("gcpscc: security center client creation failed")
	// ErrOperationConfigInvalid indicates operation config could not be decoded
	ErrOperationConfigInvalid = errors.New("gcpscc: operation config invalid")
	// ErrListSourcesFailed indicates the source listing request failed
	ErrListSourcesFailed = errors.New("gcpscc: list sources failed")
	// ErrListFindingsFailed indicates the findings listing request failed
	ErrListFindingsFailed = errors.New("gcpscc: list findings failed")
	// ErrFindingEncode indicates a finding payload could not be serialized
	ErrFindingEncode = errors.New("gcpscc: finding encode failed")
	// ErrResultEncode indicates an operation result could not be serialized
	ErrResultEncode = errors.New("gcpscc: result encode failed")
)

Functions

func Builder

func Builder() registry.Builder

Builder returns the GCP SCC definition builder

Types

type Client

type Client struct{}

Client builds GCP Security Command Center clients for one installation

func (Client) Build

func (Client) Build(ctx context.Context, req types.ClientBuildRequest) (any, error)

Build constructs the GCP Security Command Center client for one installation

type CredentialSchema

type CredentialSchema struct {
	// ServiceAccountKey is the service account key JSON used for direct credentials
	ServiceAccountKey string `` /* 169-byte string literal not displayed */
	// OrganizationID is the GCP organization identifier
	OrganizationID string `` /* 178-byte string literal not displayed */
	// ProjectID is the fallback GCP project identifier used for quota and parent resolution
	ProjectID string `` /* 163-byte string literal not displayed */
	// ProjectScope controls whether SCC collection targets all or specific projects
	ProjectScope string `` /* 179-byte string literal not displayed */
	// ProjectIDs lists the specific GCP projects used when project scope is specific
	ProjectIDs []string `` /* 141-byte string literal not displayed */
	// SourceIDs lists the SCC source identifiers used for collection
	SourceIDs []string `` /* 129-byte string literal not displayed */
	// Scopes lists the OAuth scopes requested for service account credentials
	Scopes []string `` /* 185-byte string literal not displayed */
}

CredentialSchema holds the GCP SCC credentials for one installation

type FindingsCollect

type FindingsCollect struct{}

FindingsCollect collects GCP SCC findings for ingest

func (FindingsCollect) IngestHandle

func (f FindingsCollect) IngestHandle() types.IngestHandler

IngestHandle adapts findings collection to the ingest operation registration boundary

func (FindingsCollect) Run

Run collects GCP SCC findings from configured sources

type FindingsSync added in v1.18.0

type FindingsSync struct {
	// PageSize controls the number of findings per API page
	PageSize int `json:"page_size,omitempty"`
	// MaxFindings caps the total number of findings returned
	MaxFindings int `json:"max_findings,omitempty"`
}

FindingsSync holds per-invocation parameters for the findings.collect operation

type FindingsSyncConfig added in v1.18.2

type FindingsSyncConfig struct {
	// FilterExpr limits imported records to envelopes matching the CEL expression
	FilterExpr string `` /* 236-byte string literal not displayed */
}

type HealthCheck

type HealthCheck struct {
	// Parents is the list of SCC parent resources that were probed
	Parents []string `json:"parents"`
}

HealthCheck holds the result of a GCP SCC health check

func (HealthCheck) Handle

func (h HealthCheck) Handle() types.OperationHandler

Handle adapts the health check to the generic operation registration boundary

func (HealthCheck) Run

Run executes the GCP SCC health check

type InstallationMetadata

type InstallationMetadata struct {
	// OrganizationID is the GCP organization identifier when collection is organization-scoped
	OrganizationID string `json:"organizationId,omitempty" jsonschema:"title=Organization ID"`
	// ProjectID is the primary GCP project identifier used for quota or fallback parent resolution
	ProjectID string `json:"projectId,omitempty" jsonschema:"title=Project ID"`
	// ProjectScope indicates whether collection targets all or specific projects
	ProjectScope string `json:"projectScope,omitempty" jsonschema:"title=Project Scope"`
	// ProjectIDs lists the explicitly selected GCP projects when project scope is specific
	ProjectIDs []string `json:"projectIds,omitempty" jsonschema:"title=Project IDs"`
	// SourceIDs lists the SCC source identifiers configured for collection
	SourceIDs []string `` /* 200-byte string literal not displayed */
	// ServiceAccountEmail is the service account email extracted from the configured key when available
	ServiceAccountEmail string `json:"serviceAccountEmail,omitempty" jsonschema:"title=Service Account Email"`
}

InstallationMetadata holds the stable GCP organization and service account identity for one installation

func (InstallationMetadata) InstallationIdentity

InstallationIdentity implements types.InstallationIdentifiable

type UserInput

type UserInput struct {
	// FindingsSync includes the configuration for the findings collection operation
	FindingsSync FindingsSyncConfig `json:"findingsSync,omitempty" jsonschema:"title=Findings Sync"`
}

UserInput holds installation-specific configuration collected from the user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL