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, source_id=None, finding_id=None)[source]

Creates a finding in CSCC.

Parameters:
  • finding (dict) – Forseti violation in CSCC format.
  • 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

list_findings(source_id)[source]

Lists all the findings in CSCC.

Parameters:source_id (str) – Unique ID assigned by CSCC, to the organization that the violations are originating from.
Returns:An API response containing all the CSCC findings.
Return type:object
update_finding(finding, finding_id, source_id=None)[source]

Updates a finding in CSCC.

Parameters:
  • finding (dict) – Forseti violation in CSCC format.
  • finding_id (str) – id hash of the CSCC finding.
  • source_id (str) – Unique ID assigned by CSCC, to the organization that the violations are originating from.
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.ListQueryMixin, google.cloud.forseti.common.gcp_api.repository_mixins.PatchResourceMixin, google.cloud.forseti.common.gcp_api._base_repository.GCPRepository

Implementation of CSCC Organizations Findings repository.