Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

feat(v1): add field severity to findings; add common resource helper; expose client tranport #87

Merged
merged 7 commits into from Dec 15, 2020
1 change: 1 addition & 0 deletions docs/securitycenter_v1/types.rst
Expand Up @@ -3,3 +3,4 @@ Types for Google Cloud Securitycenter v1 API

.. automodule:: google.cloud.securitycenter_v1.types
:members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/securitycenter_v1beta1/types.rst
Expand Up @@ -3,3 +3,4 @@ Types for Google Cloud Securitycenter v1beta1 API

.. automodule:: google.cloud.securitycenter_v1beta1.types
:members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/securitycenter_v1p1beta1/types.rst
Expand Up @@ -3,3 +3,4 @@ Types for Google Cloud Securitycenter v1p1beta1 API

.. automodule:: google.cloud.securitycenter_v1p1beta1.types
:members:
:show-inheritance:
63 changes: 63 additions & 0 deletions google/cloud/securitycenter_v1/proto/finding.proto
Expand Up @@ -56,6 +56,65 @@ message Finding {
INACTIVE = 2;
}

// The severity of the finding.
enum Severity {
// This value is used for findings when a source doesn't write a severity
// value.
SEVERITY_UNSPECIFIED = 0;

// Vulnerability:
// A critical vulnerability is easily discoverable by an external actor,
// exploitable, and results in the direct ability to execute arbitrary code,
// exfiltrate data, and otherwise gain additional access and privileges to
// cloud resources and workloads. Examples include publicly accessible
// unprotected user data, public SSH access with weak or no passwords, etc.
//
// Threat:
// Indicates a threat that is able to access, modify, or delete data or
// execute unauthorized code within existing resources.
CRITICAL = 1;

// Vulnerability:
// A high risk vulnerability can be easily discovered and exploited in
// combination with other vulnerabilities in order to gain direct access and
// the ability to execute arbitrary code, exfiltrate data, and otherwise
// gain additional access and privileges to cloud resources and workloads.
// An example is a database with weak or no passwords that is only
// accessible internally. This database could easily be compromised by an
// actor that had access to the internal network.
//
// Threat:
// Indicates a threat that is able to create new computational resources in
// an environment but not able to access data or execute code in existing
// resources.
HIGH = 2;

// Vulnerability:
// A medium risk vulnerability could be used by an actor to gain access to
// resources or privileges that enable them to eventually (through multiple
// steps or a complex exploit) gain access and the ability to execute
// arbitrary code or exfiltrate data. An example is a service account with
// access to more projects than it should have. If an actor gains access to
// the service account, they could potentially use that access to manipulate
// a project the service account was not intended to.
//
// Threat:
// Indicates a threat that is able to cause operational impact but may not
// access data or execute unauthorized code.
MEDIUM = 3;

// Vulnerability:
// A low risk vulnerability hampers a security organization鈥檚 ability to
// detect vulnerabilities or active threats in their deployment, or prevents
// the root cause investigation of security issues. An example is monitoring
// and logs being disabled for resource configurations and access.
//
// Threat:
// Indicates a threat that has obtained minimal access to an environment but
// is not able to access data, execute code, or create resources.
LOW = 4;
}

// The relative resource name of this finding. See:
// https://cloud.google.com/apis/design/resource_names#relative_resource_name
// Example:
Expand Down Expand Up @@ -110,4 +169,8 @@ message Finding {

// The time at which the finding was created in Security Command Center.
google.protobuf.Timestamp create_time = 10;

// The severity of the finding. This field is managed by the source that
// writes the finding.
Severity severity = 12;
}
10 changes: 5 additions & 5 deletions google/cloud/securitycenter_v1/proto/notification_config.proto
Expand Up @@ -78,14 +78,14 @@ message NotificationConfig {
// The description of the notification config (max of 1024 characters).
string description = 2;

// The PubSub topic to send notifications to. Its format is
// The Pub/Sub topic to send notifications to. Its format is
// "projects/[project_id]/topics/[topic]".
string pubsub_topic = 3 [
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" }
];
string pubsub_topic = 3 [(google.api.resource_reference) = {
type: "pubsub.googleapis.com/Topic"
}];

// Output only. The service account that needs "pubsub.topics.publish"
// permission to publish to the PubSub topic.
// permission to publish to the Pub/Sub topic.
string service_account = 4 [(google.api.field_behavior) = OUTPUT_ONLY];

// The config for triggering notifications.
Expand Down