Skip to content

Commit

Permalink
feat: Added mute related APIs, proto messages and fields (#438)
Browse files Browse the repository at this point in the history
* feat: Added mute related APIs, proto messages and fields

PiperOrigin-RevId: 409484892

Source-Link: googleapis/googleapis@2de80fe

Source-Link: googleapis/googleapis-gen@48307f8
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDgzMDdmODBhNDI4ZjRiZDMzOThkM2FiNmE1MjE2OGM5YzBjZDQwNiJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Nov 15, 2021
1 parent e8d3566 commit cd9addc
Show file tree
Hide file tree
Showing 18 changed files with 10,915 additions and 3,516 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,21 @@ message Finding {
LOW = 4;
}

// Mute state a finding can be in.
enum Mute {
// Unspecified.
MUTE_UNSPECIFIED = 0;

// Finding has been muted.
MUTED = 1;

// Finding has been unmuted.
UNMUTED = 2;

// Finding has never been muted/unmuted.
UNDEFINED = 4;
}

// Represents what kind of Finding it is.
enum FindingClass {
// Unspecified finding class.
Expand Down Expand Up @@ -207,6 +222,10 @@ message Finding {
// finding.
string canonical_name = 14;

// Indicates the mute state of a finding (either unspecified, muted, unmuted
// or undefined).
Mute mute = 15;

// The class of the finding.
FindingClass finding_class = 17;

Expand All @@ -221,4 +240,12 @@ message Finding {
// CVE stands for Common Vulnerabilities and Exposures
// (https://cve.mitre.org/about/)
Vulnerability vulnerability = 20;

// Output only. The most recent time this finding was muted or unmuted.
google.protobuf.Timestamp mute_update_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY];

// First known as mute_annotation. Records additional information about the
// mute operation e.g. mute config that muted the finding, user who muted the
// finding, etc.
string mute_initiator = 28;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.securitycenter.v1;

import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter";
option java_multiple_files = true;
option java_outer_classname = "MuteConfigProto";
option java_package = "com.google.cloud.securitycenter.v1";
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
option ruby_package = "Google::Cloud::SecurityCenter::V1";

// A mute config is a Cloud SCC resource that contains the configuration
// to mute create/update events of findings.
message MuteConfig {
option (google.api.resource) = {
type: "securitycenter.googleapis.com/MuteConfig"
pattern: "organizations/{organization}/muteConfigs/{mute_config}"
pattern: "folders/{folder}/muteConfigs/{mute_config}"
pattern: "projects/{project}/muteConfigs/{mute_config}"
};

// This field will be ignored if provided on config creation. Format
// "organizations/{organization}/muteConfigs/{mute_config}"
// "folders/{folder}/muteConfigs/{mute_config}"
// "projects/{project}/muteConfigs/{mute_config}"
string name = 1;

// The human readable name to be displayed for the mute config.
string display_name = 2 [deprecated = true];

// A description of the mute config.
string description = 3;

// Required. An expression that defines the filter to apply across create/update events
// of findings. While creating a filter string, be mindful of the
// scope in which the mute configuration is being created. E.g., If a filter
// contains project = X but is created under the project = Y scope, it might
// not match any findings.
//
// The following field and operator combinations are supported:
//
// * severity: `=`, `:`
// * category: `=`, `:`
// * resource.name: `=`, `:`
// * resource.project_name: `=`, `:`
// * resource.project_display_name: `=`, `:`
// * resource.folders.resource_folder: `=`, `:`
// * resource.parent_name: `=`, `:`
// * resource.parent_display_name: `=`, `:`
// * resource.type: `=`, `:`
// * finding_class: `=`, `:`
// * indicator.ip_addresses: `=`, `:`
// * indicator.domains: `=`, `:`
string filter = 4 [(google.api.field_behavior) = REQUIRED];

// Output only. The time at which the mute config was created.
// This field is set by the server and will be ignored if provided on config
// creation.
google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The most recent time at which the mute config was updated.
// This field is set by the server and will be ignored if provided on config
// creation or update.
google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Email address of the user who last edited the mute config.
// This field is set by the server and will be ignored if provided on config
// creation or update.
string most_recent_editor = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}
Loading

0 comments on commit cd9addc

Please sign in to comment.