google.cloud.forseti.common.gcp_api.securitycenter module

Wrapper for Cloud Security Command Center API client.

class SecurityCenterClient(version=None)[source]

Bases: object

Cloud Security Command Center Client.

https://cloud.google.com/security-command-center/docs/reference/rest

create_finding(finding, organization_id=None, source_id=None, finding_id=None)[source]

Creates a finding in CSCC.

Parameters:
  • finding (dict) – Forseti violation in CSCC format.
  • organization_id (str) – The id prefixed with ‘organizations/’.
  • source_id (str) – Unique ID assigned by CSCC, to the organization that the violations are originating from.
  • finding_id (str) – id hash of the CSCC finding
Returns:

An API response containing one page of results.

Return type:

dict

class SecurityCenterRepositoryClient(quota_max_calls=None, quota_period=1.0, use_rate_limiter=True, version=None)[source]

Bases: google.cloud.forseti.common.gcp_api._base_repository.BaseRepositoryClient

SecurityCenter API Respository.

findings

Returns _SecurityCenterOrganizationsFindingsRepository instance.

class _SecurityCenterOrganizationsFindingsRepository(**kwargs)[source]

Bases: google.cloud.forseti.common.gcp_api.repository_mixins.CreateQueryMixin, google.cloud.forseti.common.gcp_api.repository_mixins.PatchResourceMixin, google.cloud.forseti.common.gcp_api._base_repository.GCPRepository

Implementation of CSCC Organizations Findings repository.