Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSCCHealthStatus ¶
GetSCCHealthStatus gets Google Security Command Center health information and returns 1 on healthy response, 0 otherwise Check is performed by fetching list of incidents from Google Cloud Status Dashboard and checking if there are ongoing incidents with cloud-security-command-center; url parameter should be set to https://status.cloud.google.com/incidents.json for proper result retrieval
func GetSCCLatestEventTime ¶
GetSCCLatestEventTime return map of sources and their latest event update time difference with now original: https://github.com/GoogleCloudPlatform/golang-samples/blob/master/securitycenter/findings/list_filtered_findings.go
func GetSCCSourcesByName ¶
GetSCCSourcesByName returns Security Command Center sources for given numeric orgID, filtered by name by given regex original: https://github.com/GoogleCloudPlatform/golang-samples/blob/master/securitycenter/findings/list_sources.go
Types ¶
type ComplianceInfo ¶
type ComplianceInfo struct { Name string `json:"name"` Description string `json:"description"` PoliciesCount int `json:"assignedPolicies"` PassedAssetsCount int `json:"passedResources"` FailedAssetsCount int `json:"failedResources"` TotalAssetsCount int `json:"totalResources"` }
ComplianceInfo store assets compliance information for single policy
type CompliancePosture ¶
type CompliancePosture struct {
ComplianceDetails []ComplianceInfo `json:"complianceDetails"`
}
CompliancePosture stores overall posture statistics and is required to unwrap the nested JSON scheme
type Prisma ¶
type Prisma struct {
// contains filtered or unexported fields
}
Prisma contain credentials for API access
func (*Prisma) GatherComplianceInfo ¶
func (p *Prisma) GatherComplianceInfo() ([]ComplianceInfo, error)
GatherComplianceInfo get assets compliance information for last day https://api.docs.prismacloud.io/reference#compliance-posture
func (*Prisma) GetAPIHealthStatus ¶
GetAPIHealthStatus gets Prisma API health information and returns 1 on healthy response, 0 otherwise https://api.docs.prismacloud.io/reference#health-check