From 7b83366a08f508a9deb08f6102071d5cd73656d8 Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Fri, 25 Mar 2022 18:42:21 +0000
Subject: [PATCH 1/5] chore(main): release 2.5.3-SNAPSHOT (#786)
:robot: I have created a release *beep* *boop*
---
### Updating meta-information for bleeding-edge SNAPSHOT release.
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
---
google-cloud-securitycenter-bom/pom.xml | 16 ++++++++--------
google-cloud-securitycenter/pom.xml | 4 ++--
grpc-google-cloud-securitycenter-v1/pom.xml | 4 ++--
grpc-google-cloud-securitycenter-v1beta1/pom.xml | 4 ++--
.../pom.xml | 4 ++--
pom.xml | 16 ++++++++--------
proto-google-cloud-securitycenter-v1/pom.xml | 4 ++--
.../pom.xml | 4 ++--
.../pom.xml | 4 ++--
versions.txt | 14 +++++++-------
10 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/google-cloud-securitycenter-bom/pom.xml b/google-cloud-securitycenter-bom/pom.xml
index 8a87382d7..5ccaf4ad0 100644
--- a/google-cloud-securitycenter-bom/pom.xml
+++ b/google-cloud-securitycenter-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-securitycenter-bom
- 2.5.2
+ 2.5.3-SNAPSHOT
pom
com.google.cloud
@@ -53,37 +53,37 @@
com.google.cloud
google-cloud-securitycenter
- 2.5.2
+ 2.5.3-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-securitycenter-v1
- 2.5.2
+ 2.5.3-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-securitycenter-v1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-securitycenter-v1p1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
com.google.api.grpc
proto-google-cloud-securitycenter-v1
- 2.5.2
+ 2.5.3-SNAPSHOT
com.google.api.grpc
proto-google-cloud-securitycenter-v1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
com.google.api.grpc
proto-google-cloud-securitycenter-v1p1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
diff --git a/google-cloud-securitycenter/pom.xml b/google-cloud-securitycenter/pom.xml
index 4e36a584f..25ecf8256 100644
--- a/google-cloud-securitycenter/pom.xml
+++ b/google-cloud-securitycenter/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-securitycenter
- 2.5.2
+ 2.5.3-SNAPSHOT
jar
Google Cloud Security Command Center
https://github.com/googleapis/java-securitycenter
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.2
+ 2.5.3-SNAPSHOT
google-cloud-securitycenter
diff --git a/grpc-google-cloud-securitycenter-v1/pom.xml b/grpc-google-cloud-securitycenter-v1/pom.xml
index 6b04e4fc8..3a48e83f1 100644
--- a/grpc-google-cloud-securitycenter-v1/pom.xml
+++ b/grpc-google-cloud-securitycenter-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-securitycenter-v1
- 2.5.2
+ 2.5.3-SNAPSHOT
grpc-google-cloud-securitycenter-v1
GRPC library for grpc-google-cloud-securitycenter-v1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.2
+ 2.5.3-SNAPSHOT
diff --git a/grpc-google-cloud-securitycenter-v1beta1/pom.xml b/grpc-google-cloud-securitycenter-v1beta1/pom.xml
index f9872d909..58c24fe7b 100644
--- a/grpc-google-cloud-securitycenter-v1beta1/pom.xml
+++ b/grpc-google-cloud-securitycenter-v1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-securitycenter-v1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
grpc-google-cloud-securitycenter-v1beta1
GRPC library for grpc-google-cloud-securitycenter-v1beta1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.2
+ 2.5.3-SNAPSHOT
diff --git a/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml b/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml
index f2b14a79c..943c73679 100644
--- a/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml
+++ b/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-securitycenter-v1p1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
grpc-google-cloud-securitycenter-v1p1beta1
GRPC library for grpc-google-cloud-securitycenter-v1p1beta1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.2
+ 2.5.3-SNAPSHOT
diff --git a/pom.xml b/pom.xml
index b35c720cc..47b2319d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-securitycenter-parent
pom
- 2.5.2
+ 2.5.3-SNAPSHOT
Google Cloud Security Command Center Parent
https://github.com/googleapis/java-securitycenter
@@ -61,37 +61,37 @@
com.google.api.grpc
proto-google-cloud-securitycenter-v1
- 2.5.2
+ 2.5.3-SNAPSHOT
com.google.api.grpc
proto-google-cloud-securitycenter-v1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
com.google.api.grpc
proto-google-cloud-securitycenter-v1p1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-securitycenter-v1
- 2.5.2
+ 2.5.3-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-securitycenter-v1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
com.google.api.grpc
grpc-google-cloud-securitycenter-v1p1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
com.google.cloud
google-cloud-securitycenter
- 2.5.2
+ 2.5.3-SNAPSHOT
diff --git a/proto-google-cloud-securitycenter-v1/pom.xml b/proto-google-cloud-securitycenter-v1/pom.xml
index 51d4681ee..2ac6561b7 100644
--- a/proto-google-cloud-securitycenter-v1/pom.xml
+++ b/proto-google-cloud-securitycenter-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-securitycenter-v1
- 2.5.2
+ 2.5.3-SNAPSHOT
proto-google-cloud-securitycenter-v1
PROTO library for proto-google-cloud-securitycenter-v1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.2
+ 2.5.3-SNAPSHOT
diff --git a/proto-google-cloud-securitycenter-v1beta1/pom.xml b/proto-google-cloud-securitycenter-v1beta1/pom.xml
index fb974ecc1..49da8d364 100644
--- a/proto-google-cloud-securitycenter-v1beta1/pom.xml
+++ b/proto-google-cloud-securitycenter-v1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-securitycenter-v1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
proto-google-cloud-securitycenter-v1beta1
PROTO library for proto-google-cloud-securitycenter-v1beta1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.2
+ 2.5.3-SNAPSHOT
diff --git a/proto-google-cloud-securitycenter-v1p1beta1/pom.xml b/proto-google-cloud-securitycenter-v1p1beta1/pom.xml
index e87c8cd7c..683ab39d0 100644
--- a/proto-google-cloud-securitycenter-v1p1beta1/pom.xml
+++ b/proto-google-cloud-securitycenter-v1p1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-securitycenter-v1p1beta1
- 0.100.2
+ 0.100.3-SNAPSHOT
proto-google-cloud-securitycenter-v1p1beta1
PROTO library for proto-google-cloud-securitycenter-v1p1beta1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.2
+ 2.5.3-SNAPSHOT
diff --git a/versions.txt b/versions.txt
index d406e4f75..b2978d8f6 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,10 +1,10 @@
# Format:
# module:released-version:current-version
-google-cloud-securitycenter:2.5.2:2.5.2
-grpc-google-cloud-securitycenter-v1:2.5.2:2.5.2
-grpc-google-cloud-securitycenter-v1beta1:0.100.2:0.100.2
-grpc-google-cloud-securitycenter-v1p1beta1:0.100.2:0.100.2
-proto-google-cloud-securitycenter-v1:2.5.2:2.5.2
-proto-google-cloud-securitycenter-v1beta1:0.100.2:0.100.2
-proto-google-cloud-securitycenter-v1p1beta1:0.100.2:0.100.2
+google-cloud-securitycenter:2.5.2:2.5.3-SNAPSHOT
+grpc-google-cloud-securitycenter-v1:2.5.2:2.5.3-SNAPSHOT
+grpc-google-cloud-securitycenter-v1beta1:0.100.2:0.100.3-SNAPSHOT
+grpc-google-cloud-securitycenter-v1p1beta1:0.100.2:0.100.3-SNAPSHOT
+proto-google-cloud-securitycenter-v1:2.5.2:2.5.3-SNAPSHOT
+proto-google-cloud-securitycenter-v1beta1:0.100.2:0.100.3-SNAPSHOT
+proto-google-cloud-securitycenter-v1p1beta1:0.100.2:0.100.3-SNAPSHOT
From 05018a50e2f05ed093aa8a738bb8b78862774998 Mon Sep 17 00:00:00 2001
From: Sita Lakshmi Sangameswaran
Date: Sat, 26 Mar 2022 01:23:46 +0530
Subject: [PATCH 2/5] docs(samples): added samples for Mute config (#719)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* docs(scc-samples): init add CRUD mute config samples
* added bulk mute and mute/unmute samples
* refactor(samples): modified class name
* refactor(samples): added muteConfigId and refactored class name
* test(samples): added tests for mute config samples
* 🦉 Updates from OwlBot
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs(samples): updated samples and test files
* 🦉 Updates from OwlBot
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs(samples): lint fix
* 🦉 Updates from OwlBot
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs(samples): applied documentation review comments
* docs(samples): applied review comments
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs(samples): added test env variables
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* docs(samples): added test env variables
* updated config typo
* test: try changing the env var name
* Update samples.cfg
* Update samples.cfg
* updated samples.cfg
* docs(samples): updated acc to review comments
* lint fix
* lint fix
* lint fix
Co-authored-by: Owl Bot
Co-authored-by: Neenu Shaji
---
.kokoro/presubmit/samples.cfg | 2 +-
README.md | 9 +
samples/snippets/pom.xml | 1 +
.../snippets/muteconfig/BulkMuteFindings.java | 71 ++++++
.../snippets/muteconfig/CreateMuteRule.java | 79 ++++++
.../snippets/muteconfig/DeleteMuteRule.java | 60 +++++
.../snippets/muteconfig/GetMuteRule.java | 62 +++++
.../snippets/muteconfig/ListMuteRules.java | 61 +++++
.../muteconfig/SetMuteUnmuteFinding.java | 62 +++++
.../snippets/muteconfig/UpdateMuteRule.java | 74 ++++++
.../snippets/MuteFindingIT.java | 238 ++++++++++++++++++
11 files changed, 718 insertions(+), 1 deletion(-)
create mode 100644 samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/BulkMuteFindings.java
create mode 100644 samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/CreateMuteRule.java
create mode 100644 samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/DeleteMuteRule.java
create mode 100644 samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/GetMuteRule.java
create mode 100644 samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/ListMuteRules.java
create mode 100644 samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/SetMuteUnmuteFinding.java
create mode 100644 samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/UpdateMuteRule.java
create mode 100644 samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java
diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg
index 01e096004..67806dd18 100644
--- a/.kokoro/presubmit/samples.cfg
+++ b/.kokoro/presubmit/samples.cfg
@@ -29,5 +29,5 @@ env_vars: {
env_vars: {
key: "SECRET_MANAGER_KEYS"
- value: "java-docs-samples-service-account"
+ value: "java-docs-samples-service-account,java-scc-samples-secrets"
}
\ No newline at end of file
diff --git a/README.md b/README.md
index 210137792..8d9f0fe7b 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
com.google.cloud
google-cloud-securitycenter
+ 2.3.1
@@ -56,6 +57,7 @@ If you are using Gradle 5.x or later, add this to your dependencies
```Groovy
implementation platform('com.google.cloud:libraries-bom:25.0.0')
+
implementation 'com.google.cloud:google-cloud-securitycenter'
```
If you are using Gradle without BOM, add this to your dependencies
@@ -117,6 +119,13 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-securitycente
| List Notification Config Snippets | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/ListNotificationConfigSnippets.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/ListNotificationConfigSnippets.java) |
| Notification Receiver | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/NotificationReceiver.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/NotificationReceiver.java) |
| Update Notification Config Snippets | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/UpdateNotificationConfigSnippets.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/UpdateNotificationConfigSnippets.java) |
+| Bulk Mute Findings | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/BulkMuteFindings.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/BulkMuteFindings.java) |
+| Create Mute Rule | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/CreateMuteRule.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/CreateMuteRule.java) |
+| Delete Mute Rule | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/DeleteMuteRule.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/DeleteMuteRule.java) |
+| Get Mute Rule | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/GetMuteRule.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/GetMuteRule.java) |
+| List Mute Rules | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/ListMuteRules.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/ListMuteRules.java) |
+| Set Mute Unmute Finding | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/SetMuteUnmuteFinding.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/SetMuteUnmuteFinding.java) |
+| Update Mute Rule | [source code](https://github.com/googleapis/java-securitycenter/blob/main/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/UpdateMuteRule.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-securitycenter&page=editor&open_in_editor=samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/UpdateMuteRule.java) |
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 773ac5f31..7682bff4e 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -41,6 +41,7 @@
com.google.cloud
google-cloud-securitycenter
+ 2.3.1
diff --git a/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/BulkMuteFindings.java b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/BulkMuteFindings.java
new file mode 100644
index 000000000..2a5d36932
--- /dev/null
+++ b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/BulkMuteFindings.java
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+
+package com.google.cloud.examples.securitycenter.snippets.muteconfig;
+
+// [START securitycenter_bulk_mute]
+
+import com.google.cloud.securitycenter.v1.BulkMuteFindingsRequest;
+import com.google.cloud.securitycenter.v1.BulkMuteFindingsResponse;
+import com.google.cloud.securitycenter.v1.SecurityCenterClient;
+import java.io.IOException;
+import java.util.concurrent.ExecutionException;
+
+public class BulkMuteFindings {
+
+ public static void main(String[] args) {
+ // TODO: Replace the variables within {}
+
+ // parentPath: Use any one of the following options:
+ // - organizations/{organization_id}
+ // - folders/{folder_id}
+ // - projects/{project_id}
+ String parentPath = String.format("projects/%s", "your-google-cloud-project-id");
+
+ // muteRule: Expression that identifies findings that should be muted.
+ // eg: "resource.project_display_name=\"PROJECT_ID\""
+ String muteRule = "{filter-condition}";
+
+ bulkMute(parentPath, muteRule);
+ }
+
+ // Kicks off a long-running operation (LRO) to bulk mute findings for a parent based on a filter.
+ // The parent can be either an organization, folder, or project. The findings
+ // matched by the filter will be muted after the LRO is done.
+ public static void bulkMute(String parentPath, String muteRule) {
+ // Initialize client that will be used to send requests. This client only needs to be created
+ // once, and can be reused for multiple requests. After completing all of your requests, call
+ // the "close" method on the client to safely clean up any remaining background resources.
+ try (SecurityCenterClient client = SecurityCenterClient.create()) {
+
+ BulkMuteFindingsRequest bulkMuteFindingsRequest =
+ BulkMuteFindingsRequest.newBuilder()
+ .setParent(parentPath)
+ // To create mute rules, see:
+ // https://cloud.google.com/security-command-center/docs/how-to-mute-findings#create_mute_rules
+ .setFilter(muteRule)
+ .build();
+
+ // ExecutionException is thrown if the below call fails.
+ BulkMuteFindingsResponse response =
+ client.bulkMuteFindingsAsync(bulkMuteFindingsRequest).get();
+ System.out.println("Bulk mute findings completed successfully! " + response);
+ } catch (IOException | InterruptedException | ExecutionException e) {
+ System.out.println("Bulk mute findings failed! \n Exception: " + e);
+ }
+ }
+}
+// [END securitycenter_bulk_mute]
diff --git a/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/CreateMuteRule.java b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/CreateMuteRule.java
new file mode 100644
index 000000000..90e07ca14
--- /dev/null
+++ b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/CreateMuteRule.java
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+package com.google.cloud.examples.securitycenter.snippets.muteconfig;
+
+// [START securitycenter_create_mute_config]
+
+import com.google.cloud.securitycenter.v1.CreateMuteConfigRequest;
+import com.google.cloud.securitycenter.v1.MuteConfig;
+import com.google.cloud.securitycenter.v1.SecurityCenterClient;
+import java.io.IOException;
+import java.util.UUID;
+
+public class CreateMuteRule {
+
+ public static void main(String[] args) {
+ // TODO: Replace the variables within {}
+
+ // parentPath: Use any one of the following options:
+ // - organizations/{organization_id}
+ // - folders/{folder_id}
+ // - projects/{project_id}
+ String parentPath = String.format("projects/%s", "your-google-cloud-project-id");
+
+ // muteConfigId: Set a random id; max of 63 chars.
+ String muteConfigId = "random-mute-id-" + UUID.randomUUID();
+ createMuteRule(parentPath, muteConfigId);
+ }
+
+ // Creates a mute configuration under a given scope that will mute
+ // all new findings that match a given filter.
+ // Existing findings will not be muted.
+ public static void createMuteRule(String parentPath, String muteConfigId) {
+ // Initialize client that will be used to send requests. This client only needs to be created
+ // once, and can be reused for multiple requests. After completing all of your requests, call
+ // the "close" method on the client to safely clean up any remaining background resources.
+ try (SecurityCenterClient client = SecurityCenterClient.create()) {
+
+ MuteConfig muteConfig =
+ MuteConfig.newBuilder()
+ .setDescription("Mute low-medium IAM grants excluding 'compute' ")
+ // Set mute rule(s).
+ // To construct mute rules and for supported properties, see:
+ // https://cloud.google.com/security-command-center/docs/how-to-mute-findings#create_mute_rules
+ .setFilter(
+ "severity=\"LOW\" OR severity=\"MEDIUM\" AND "
+ + "category=\"Persistence: IAM Anomalous Grant\" AND "
+ + "-resource.type:\"compute\"")
+ .build();
+
+ CreateMuteConfigRequest request =
+ CreateMuteConfigRequest.newBuilder()
+ .setParent(parentPath)
+ .setMuteConfigId(muteConfigId)
+ .setMuteConfig(muteConfig)
+ .build();
+
+ // ExecutionException is thrown if the below call fails.
+ MuteConfig response = client.createMuteConfig(request);
+ System.out.println("Mute rule created successfully: " + response.getName());
+ } catch (IOException e) {
+ System.out.println("Mute rule creation failed! \n Exception: " + e);
+ }
+ }
+}
+// [END securitycenter_create_mute_config]
diff --git a/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/DeleteMuteRule.java b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/DeleteMuteRule.java
new file mode 100644
index 000000000..e959269cf
--- /dev/null
+++ b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/DeleteMuteRule.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2022 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.
+ */
+
+package com.google.cloud.examples.securitycenter.snippets.muteconfig;
+
+// [START securitycenter_delete_mute_config]
+
+import com.google.cloud.securitycenter.v1.MuteConfigName;
+import com.google.cloud.securitycenter.v1.SecurityCenterClient;
+import java.io.IOException;
+
+public class DeleteMuteRule {
+
+ public static void main(String[] args) {
+ // TODO(Developer): Replace the following variables
+ // parentPath: Use any one of the following options:
+ // - organizations/{organization_id}
+ // - folders/{folder_id}
+ // - projects/{project_id}
+ String parentPath = String.format("projects/%s", "your-google-cloud-project-id");
+
+ // muteConfigId: Specify the name of the mute config to delete.
+ String muteConfigId = "mute-config-id";
+
+ deleteMuteRule(parentPath, muteConfigId);
+ }
+
+ // Deletes a mute configuration given its resource name.
+ // Note: Previously muted findings are not affected when a mute config is deleted.
+ public static void deleteMuteRule(String projectId, String muteConfigId) {
+ // Initialize client that will be used to send requests. This client only needs to be created
+ // once, and can be reused for multiple requests. After completing all of your requests, call
+ // the "close" method on the client to safely clean up any remaining background resources.
+ try (SecurityCenterClient client = SecurityCenterClient.create()) {
+ // Use appropriate MuteConfigName methods depending on the type of parent.
+ // org -> MuteConfigName.ofOrganizationMuteConfigName()
+ // folder -> MuteConfigName.ofFolderMuteConfigName()
+ // project -> MuteConfigName.ofProjectMuteConfigName)
+ client.deleteMuteConfig(MuteConfigName.ofProjectMuteConfigName(projectId, muteConfigId));
+
+ System.out.println("Mute rule deleted successfully: " + muteConfigId);
+ } catch (IOException e) {
+ System.out.println("Mute rule deletion failed! \n Exception: " + e);
+ }
+ }
+}
+// [END securitycenter_delete_mute_config]
diff --git a/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/GetMuteRule.java b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/GetMuteRule.java
new file mode 100644
index 000000000..4947d40e2
--- /dev/null
+++ b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/GetMuteRule.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2022 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.
+ */
+
+package com.google.cloud.examples.securitycenter.snippets.muteconfig;
+
+// [START securitycenter_get_mute_config]
+
+import com.google.cloud.securitycenter.v1.MuteConfig;
+import com.google.cloud.securitycenter.v1.MuteConfigName;
+import com.google.cloud.securitycenter.v1.SecurityCenterClient;
+import java.io.IOException;
+
+public class GetMuteRule {
+
+ public static void main(String[] args) {
+ // TODO(Developer): Replace the following variables
+
+ // parentPath: Use any one of the following options:
+ // - organizations/{organization_id}
+ // - folders/{folder_id}
+ // - projects/{project_id}
+ String parentPath = String.format("projects/%s", "your-google-cloud-project-id");
+
+ // muteConfigId: Name of the mute config to retrieve.
+ String muteConfigId = "mute-config-id";
+
+ getMuteRule(parentPath, muteConfigId);
+ }
+
+ // Retrieves a mute configuration given its resource name.
+ public static void getMuteRule(String projectId, String muteConfigId) {
+ // Initialize client that will be used to send requests. This client only needs to be created
+ // once, and can be reused for multiple requests. After completing all of your requests, call
+ // the "close" method on the client to safely clean up any remaining background resources.
+ try (SecurityCenterClient client = SecurityCenterClient.create()) {
+ // Use appropriate MuteConfigName methods depending on the type of parent.
+ // (org -> MuteConfigName.ofOrganizationMuteConfigName()
+ // folder -> MuteConfigName.ofFolderMuteConfigName()
+ // project -> MuteConfigName.ofProjectMuteConfigName)
+ MuteConfig muteConfig =
+ client.getMuteConfig(MuteConfigName.ofProjectMuteConfigName(projectId, muteConfigId));
+
+ System.out.println("Retrieved the mute config: " + muteConfig);
+ } catch (IOException e) {
+ System.out.println("Mute rule retrieval failed! \n Exception: " + e);
+ }
+ }
+}
+// [END securitycenter_get_mute_config]
diff --git a/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/ListMuteRules.java b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/ListMuteRules.java
new file mode 100644
index 000000000..521d89394
--- /dev/null
+++ b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/ListMuteRules.java
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ */
+
+package com.google.cloud.examples.securitycenter.snippets.muteconfig;
+
+// [START securitycenter_list_mute_configs]
+
+import com.google.cloud.securitycenter.v1.ListMuteConfigsRequest;
+import com.google.cloud.securitycenter.v1.MuteConfig;
+import com.google.cloud.securitycenter.v1.SecurityCenterClient;
+import java.io.IOException;
+
+public class ListMuteRules {
+
+ public static void main(String[] args) {
+ // TODO: Replace variables enclosed within {}
+
+ // parent: Use any one of the following resource paths to list mute configurations:
+ // - organizations/{organization_id}
+ // - folders/{folder_id}
+ // - projects/{project_id}
+ String parentPath = String.format("projects/%s", "your-google-cloud-project-id");
+ listMuteRules(parentPath);
+ }
+
+ // Listing mute configs at the organization level will return all the configs
+ // at the org, folder, and project levels.
+ // Similarly, listing configs at folder level will list all the configs
+ // at the folder and project levels.
+ public static void listMuteRules(String parent) {
+ // Initialize client that will be used to send requests. This client only needs to be created
+ // once, and can be reused for multiple requests. After completing all of your requests, call
+ // the "close" method on the client to safely clean up any remaining background resources.
+ try (SecurityCenterClient client = SecurityCenterClient.create()) {
+
+ ListMuteConfigsRequest listMuteConfigsRequest =
+ ListMuteConfigsRequest.newBuilder().setParent(parent).build();
+
+ // List all mute configs present in the resource.
+ for (MuteConfig muteConfig : client.listMuteConfigs(listMuteConfigsRequest).iterateAll()) {
+ System.out.println(muteConfig.getName());
+ }
+ } catch (IOException e) {
+ System.out.println("Listing Mute rule failed! \n Exception: " + e);
+ }
+ }
+}
+// [END securitycenter_list_mute_configs]
diff --git a/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/SetMuteUnmuteFinding.java b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/SetMuteUnmuteFinding.java
new file mode 100644
index 000000000..5091fba88
--- /dev/null
+++ b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/SetMuteUnmuteFinding.java
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+package com.google.cloud.examples.securitycenter.snippets.muteconfig;
+
+// [START securitycenter_set_mute_unmute]
+
+import com.google.cloud.securitycenter.v1.Finding;
+import com.google.cloud.securitycenter.v1.Finding.Mute;
+import com.google.cloud.securitycenter.v1.SecurityCenterClient;
+import com.google.cloud.securitycenter.v1.SetMuteRequest;
+import java.io.IOException;
+
+public class SetMuteUnmuteFinding {
+
+ public static void main(String[] args) {
+ // TODO: Replace the variables within {}
+
+ // findingPath: The relative resource name of the finding. See:
+ // https://cloud.google.com/apis/design/resource_names#relative_resource_name
+ // Use any one of the following formats:
+ // - organizations/{organization_id}/sources/{source_id}/finding/{finding_id}
+ // - folders/{folder_id}/sources/{source_id}/finding/{finding_id}
+ // - projects/{project_id}/sources/{source_id}/finding/{finding_id}
+ String findingPath = "{path-to-the-finding}";
+ setMute(findingPath);
+ }
+
+ // Mute/unmute an individual finding.
+ // If a finding is already muted, muting it again has no effect.
+ // Similarly, unmuting a finding that isn't muted has no effect.
+ // Various mute states are: MUTE_UNSPECIFIED/MUTE/UNMUTE.
+ public static void setMute(String findingPath) {
+ // Initialize client that will be used to send requests. This client only needs to be created
+ // once, and can be reused for multiple requests. After completing all of your requests, call
+ // the "close" method on the client to safely clean up any remaining background resources.
+ try (SecurityCenterClient client = SecurityCenterClient.create()) {
+
+ SetMuteRequest setMuteRequest =
+ SetMuteRequest.newBuilder().setName(findingPath).setMute(Mute.MUTED).build();
+
+ Finding finding = client.setMute(setMuteRequest);
+ System.out.println("Mute value for the finding: " + finding.getMute());
+ } catch (IOException e) {
+ System.out.println("Failed to set the specified mute value. \n Exception: " + e);
+ }
+ }
+}
+// [END securitycenter_set_mute_unmute]
diff --git a/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/UpdateMuteRule.java b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/UpdateMuteRule.java
new file mode 100644
index 000000000..507c87770
--- /dev/null
+++ b/samples/snippets/src/main/java/com/google/cloud/examples/securitycenter/snippets/muteconfig/UpdateMuteRule.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2022 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.
+ */
+
+package com.google.cloud.examples.securitycenter.snippets.muteconfig;
+
+// [START securitycenter_update_mute_config]
+
+import com.google.cloud.securitycenter.v1.MuteConfig;
+import com.google.cloud.securitycenter.v1.SecurityCenterClient;
+import com.google.cloud.securitycenter.v1.UpdateMuteConfigRequest;
+import com.google.protobuf.FieldMask;
+import java.io.IOException;
+
+public class UpdateMuteRule {
+
+ public static void main(String[] args) {
+ // TODO: Replace the variables within {}
+
+ // Specify the name of the mute config to delete.
+ // muteConfigName: Use any one of the following formats:
+ // - organizations/{organization}/muteConfigs/{config_id}
+ // - folders/{folder}/muteConfigs/{config_id}
+ // - projects/{project}/muteConfigs/{config_id}
+ String muteConfigName = "{any-one-of-the-above-formats}";
+ updateMuteRule(muteConfigName);
+ }
+
+ // Updates an existing mute configuration.
+ // The following can be updated in a mute config: description and filter.
+ public static void updateMuteRule(String muteConfigName) {
+ // Initialize client that will be used to send requests. This client only needs to be created
+ // once, and can be reused for multiple requests. After completing all of your requests, call
+ // the "close" method on the client to safely clean up any remaining background resources.
+ try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
+
+ MuteConfig updateMuteConfig =
+ MuteConfig.newBuilder()
+ .setName(muteConfigName)
+ .setDescription("Updated mute config description")
+ .build();
+
+ UpdateMuteConfigRequest updateMuteConfigRequest =
+ UpdateMuteConfigRequest.newBuilder()
+ .setMuteConfig(updateMuteConfig)
+ // Set the update mask to specify which properties of the mute config should be
+ // updated.
+ // If empty, all mutable fields will be updated.
+ // Make sure that the mask fields match the properties changed in 'updateMuteConfig'.
+ // For more info on constructing update mask path, see the proto or:
+ // https://cloud.google.com/security-command-center/docs/reference/rest/v1/folders.muteConfigs/patch?hl=en#query-parameters
+ .setUpdateMask(FieldMask.newBuilder().addPaths("description").build())
+ .build();
+
+ MuteConfig response = securityCenterClient.updateMuteConfig(updateMuteConfigRequest);
+ System.out.println(response);
+ } catch (IOException e) {
+ System.out.println("Mute rule update failed! \n Exception: " + e);
+ }
+ }
+}
+// [END securitycenter_update_mute_config]
diff --git a/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java b/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java
new file mode 100644
index 000000000..56a8d1cbe
--- /dev/null
+++ b/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java
@@ -0,0 +1,238 @@
+/*
+ * Copyright 2022 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.
+ */
+
+package com.google.cloud.examples.securitycenter.snippets;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.common.truth.Truth.assertWithMessage;
+
+import com.google.cloud.examples.securitycenter.snippets.muteconfig.BulkMuteFindings;
+import com.google.cloud.examples.securitycenter.snippets.muteconfig.CreateMuteRule;
+import com.google.cloud.examples.securitycenter.snippets.muteconfig.DeleteMuteRule;
+import com.google.cloud.examples.securitycenter.snippets.muteconfig.GetMuteRule;
+import com.google.cloud.examples.securitycenter.snippets.muteconfig.ListMuteRules;
+import com.google.cloud.examples.securitycenter.snippets.muteconfig.SetMuteUnmuteFinding;
+import com.google.cloud.examples.securitycenter.snippets.muteconfig.UpdateMuteRule;
+import com.google.cloud.securitycenter.v1.CreateSourceRequest;
+import com.google.cloud.securitycenter.v1.Finding;
+import com.google.cloud.securitycenter.v1.Finding.FindingClass;
+import com.google.cloud.securitycenter.v1.Finding.Mute;
+import com.google.cloud.securitycenter.v1.Finding.Severity;
+import com.google.cloud.securitycenter.v1.Finding.State;
+import com.google.cloud.securitycenter.v1.ListFindingsRequest;
+import com.google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult;
+import com.google.cloud.securitycenter.v1.SecurityCenterClient;
+import com.google.cloud.securitycenter.v1.SecurityCenterClient.ListFindingsPagedResponse;
+import com.google.cloud.securitycenter.v1.Source;
+import com.google.protobuf.Timestamp;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.time.Instant;
+import java.util.UUID;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class MuteFindingIT {
+
+ // TODO(Developer): Replace the below variables.
+ private static final String PROJECT_ID = System.getenv("SCC_PROJECT_ID");
+ private static final String ORGANIZATION_ID = System.getenv("SCC_PROJECT_ORG_ID");
+
+ private static final String MUTE_RULE_CREATE = "random-mute-id-" + UUID.randomUUID();
+ private static final String MUTE_RULE_UPDATE = "random-mute-id-" + UUID.randomUUID();
+ private static Source SOURCE;
+ // The findings will be used to test bulk mute.
+ private static Finding FINDING_1;
+ private static Finding FINDING_2;
+ private static Finding FINDING_3;
+
+ private static ByteArrayOutputStream stdOut;
+
+ // Check if the required environment variables are set.
+ public static void requireEnvVar(String envVarName) {
+ assertWithMessage(String.format("Missing environment variable '%s' ", envVarName))
+ .that(System.getenv(envVarName))
+ .isNotEmpty();
+ }
+
+ @BeforeClass
+ public static void setUp() throws IOException {
+ requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS");
+ requireEnvVar("SCC_PROJECT_ID");
+ requireEnvVar("SCC_PROJECT_ORG_ID");
+
+ // Create mute rules.
+ CreateMuteRule.createMuteRule(String.format("projects/%s", PROJECT_ID), MUTE_RULE_CREATE);
+ CreateMuteRule.createMuteRule(String.format("projects/%s", PROJECT_ID), MUTE_RULE_UPDATE);
+ // Create source.
+ SOURCE = createSource(ORGANIZATION_ID);
+ // Create findings within the source.
+ String uuid = UUID.randomUUID().toString().split("-")[0];
+ FINDING_1 = createFinding(SOURCE.getName(), "1testingscc" + uuid);
+ FINDING_2 = createFinding(SOURCE.getName(), "2testingscc" + uuid);
+ FINDING_3 = createFinding(SOURCE.getName(), "3testingscc" + uuid);
+ }
+
+ @AfterClass
+ public static void cleanUp() {
+ final PrintStream out = System.out;
+ stdOut = new ByteArrayOutputStream();
+ System.setOut(new PrintStream(stdOut));
+ DeleteMuteRule.deleteMuteRule(PROJECT_ID, MUTE_RULE_CREATE);
+ assertThat(stdOut.toString()).contains("Mute rule deleted successfully: " + MUTE_RULE_CREATE);
+ DeleteMuteRule.deleteMuteRule(PROJECT_ID, MUTE_RULE_UPDATE);
+ assertThat(stdOut.toString()).contains("Mute rule deleted successfully: " + MUTE_RULE_UPDATE);
+ stdOut = null;
+ System.setOut(out);
+ }
+
+ public static Source createSource(String organizationId) throws IOException {
+ try (SecurityCenterClient client = SecurityCenterClient.create()) {
+
+ Source source =
+ Source.newBuilder()
+ .setDisplayName("Custom display name")
+ .setDescription("A source that does X")
+ .build();
+
+ CreateSourceRequest createSourceRequest =
+ CreateSourceRequest.newBuilder()
+ .setParent(String.format("organizations/%s", organizationId))
+ .setSource(source)
+ .build();
+
+ Source response = client.createSource(createSourceRequest);
+ System.out.println("Created source : " + response.getName());
+ return response;
+ }
+ }
+
+ public static Finding createFinding(String sourceName, String findingId) throws IOException {
+ try (SecurityCenterClient client = SecurityCenterClient.create()) {
+
+ Instant eventTime = Instant.now();
+
+ // The resource this finding applies to. The Cloud Security Command Center UI can link
+ // the findings for a resource to the corresponding asset of a resource
+ // if there are matches.
+ // TODO(Developer): Replace the sample resource name
+ String resourceName = "//cloudresourcemanager.googleapis.com/organizations/11232";
+
+ // Set up a request to create a finding in a source.
+ Finding finding =
+ Finding.newBuilder()
+ .setParent(sourceName)
+ .setState(State.ACTIVE)
+ .setSeverity(Severity.LOW)
+ .setMute(Mute.UNMUTED)
+ .setFindingClass(FindingClass.OBSERVATION)
+ .setResourceName(resourceName)
+ .setEventTime(
+ Timestamp.newBuilder()
+ .setSeconds(eventTime.getEpochSecond())
+ .setNanos(eventTime.getNano()))
+ .setCategory("LOW_RISK_ONE")
+ .build();
+
+ Finding response = client.createFinding(sourceName, findingId, finding);
+
+ System.out.println("Created Finding: " + response);
+ return response;
+ }
+ }
+
+ public static ListFindingsPagedResponse getAllFindings(String sourceName) throws IOException {
+ try (SecurityCenterClient client = SecurityCenterClient.create()) {
+
+ ListFindingsRequest request = ListFindingsRequest.newBuilder().setParent(sourceName).build();
+
+ return client.listFindings(request);
+ }
+ }
+
+ private static String getOrganizationId() {
+ return "1081635000895";
+ }
+
+ private static String getProject() {
+ return "project-a-id";
+ }
+
+ @Before
+ public void beforeEach() {
+ stdOut = new ByteArrayOutputStream();
+ System.setOut(new PrintStream(stdOut));
+ }
+
+ @After
+ public void afterEach() {
+ stdOut = null;
+ System.setOut(null);
+ }
+
+ @Test
+ public void testGetMuteRule() {
+ GetMuteRule.getMuteRule(PROJECT_ID, MUTE_RULE_CREATE);
+ assertThat(stdOut.toString()).contains("Retrieved the mute config: ");
+ assertThat(stdOut.toString()).contains(MUTE_RULE_CREATE);
+ }
+
+ @Test
+ public void testListMuteRules() {
+ ListMuteRules.listMuteRules(String.format("projects/%s", PROJECT_ID));
+ assertThat(stdOut.toString()).contains(MUTE_RULE_CREATE);
+ assertThat(stdOut.toString()).contains(MUTE_RULE_UPDATE);
+ }
+
+ @Test
+ public void testUpdateMuteRules() {
+ UpdateMuteRule.updateMuteRule(
+ String.format("projects/%s/muteConfigs/%s", PROJECT_ID, MUTE_RULE_UPDATE));
+ GetMuteRule.getMuteRule(PROJECT_ID, MUTE_RULE_UPDATE);
+ assertThat(stdOut.toString()).contains("Updated mute config description");
+ }
+
+ @Test
+ public void testSetMuteFinding() {
+ SetMuteUnmuteFinding.setMute(FINDING_1.getName());
+ assertThat(stdOut.toString()).contains("Mute value for the finding: MUTED");
+ }
+
+ @Test
+ public void testBulkMuteFindings() throws IOException {
+ // Mute findings that belong to this project.
+ BulkMuteFindings.bulkMute(
+ String.format("projects/%s", PROJECT_ID),
+ String.format("resource.project_display_name=\"%s\"", PROJECT_ID));
+
+ // Get all findings in the source to check if they are muted.
+ ListFindingsPagedResponse response =
+ getAllFindings(
+ String.format("projects/%s/sources/%s",
+ PROJECT_ID, SOURCE.getName().split("/")[3]));
+ for (ListFindingsResult finding : response.iterateAll()) {
+ Assert.assertEquals(finding.getFinding().getMute(), Mute.MUTED);
+ }
+ }
+}
From 375f632140fd41d96eee5f33c57743fd8f5eeb86 Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Tue, 29 Mar 2022 19:53:26 +0200
Subject: [PATCH 3/5] build(deps): update dependency
com.google.cloud:google-cloud-shared-config to v1.3.2 (#789)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.3.2
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot
---
.kokoro/presubmit/samples.cfg | 2 +-
README.md | 5 ++---
google-cloud-securitycenter-bom/pom.xml | 2 +-
pom.xml | 2 +-
.../examples/securitycenter/snippets/MuteFindingIT.java | 3 +--
5 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg
index 67806dd18..01e096004 100644
--- a/.kokoro/presubmit/samples.cfg
+++ b/.kokoro/presubmit/samples.cfg
@@ -29,5 +29,5 @@ env_vars: {
env_vars: {
key: "SECRET_MANAGER_KEYS"
- value: "java-docs-samples-service-account,java-scc-samples-secrets"
+ value: "java-docs-samples-service-account"
}
\ No newline at end of file
diff --git a/README.md b/README.md
index 8d9f0fe7b..085ae6882 100644
--- a/README.md
+++ b/README.md
@@ -57,19 +57,18 @@ If you are using Gradle 5.x or later, add this to your dependencies
```Groovy
implementation platform('com.google.cloud:libraries-bom:25.0.0')
-
implementation 'com.google.cloud:google-cloud-securitycenter'
```
If you are using Gradle without BOM, add this to your dependencies
```Groovy
-implementation 'com.google.cloud:google-cloud-securitycenter:2.5.1'
+implementation 'com.google.cloud:google-cloud-securitycenter:2.5.2'
```
If you are using SBT, add this to your dependencies
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.5.1"
+libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.5.2"
```
## Authentication
diff --git a/google-cloud-securitycenter-bom/pom.xml b/google-cloud-securitycenter-bom/pom.xml
index 5ccaf4ad0..9408591ca 100644
--- a/google-cloud-securitycenter-bom/pom.xml
+++ b/google-cloud-securitycenter-bom/pom.xml
@@ -8,7 +8,7 @@
com.google.cloud
google-cloud-shared-config
- 1.3.0
+ 1.3.2
Google Cloud Security Command Center BOM
diff --git a/pom.xml b/pom.xml
index 47b2319d6..6417c935e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
com.google.cloud
google-cloud-shared-config
- 1.3.0
+ 1.3.2
diff --git a/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java b/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java
index 56a8d1cbe..80f9e335b 100644
--- a/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java
+++ b/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java
@@ -229,8 +229,7 @@ public void testBulkMuteFindings() throws IOException {
// Get all findings in the source to check if they are muted.
ListFindingsPagedResponse response =
getAllFindings(
- String.format("projects/%s/sources/%s",
- PROJECT_ID, SOURCE.getName().split("/")[3]));
+ String.format("projects/%s/sources/%s", PROJECT_ID, SOURCE.getName().split("/")[3]));
for (ListFindingsResult finding : response.iterateAll()) {
Assert.assertEquals(finding.getFinding().getMute(), Mute.MUTED);
}
From 2d7513657e0f46c7bb2b2127ea767ecdbe72cddf Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate
Date: Tue, 29 Mar 2022 19:56:28 +0200
Subject: [PATCH 4/5] deps: update dependency
com.google.cloud:google-cloud-shared-dependencies to v2.9.0 (#791)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.8.0` -> `2.9.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) |
---
### Release Notes
googleapis/java-shared-dependencies
### [`v2.9.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#290-httpsgithubcomgoogleapisjava-shared-dependenciescomparev280v290-2022-03-28)
[Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.8.0...v2.9.0)
##### Dependencies
- guava 31.1 ([#635](https://togithub.com/googleapis/java-shared-dependencies/issues/635)) ([0939b06](https://togithub.com/googleapis/java-shared-dependencies/commit/0939b063a79cd4ffafb49cf04861ce577e35efd6))
- update dependency com.fasterxml.jackson:jackson-bom to v2.13.2 ([#626](https://togithub.com/googleapis/java-shared-dependencies/issues/626)) ([6014663](https://togithub.com/googleapis/java-shared-dependencies/commit/601466339c9631faa88033d1ff1e31582fb67b7b))
- update dependency com.fasterxml.jackson:jackson-bom to v2.13.2.20220324 ([#636](https://togithub.com/googleapis/java-shared-dependencies/issues/636)) ([6c833fa](https://togithub.com/googleapis/java-shared-dependencies/commit/6c833faa7815147013999bfc2bb6935fd8fe6b34))
- update dependency com.google.api-client:google-api-client-bom to v1.33.4 ([#642](https://togithub.com/googleapis/java-shared-dependencies/issues/642)) ([57bd912](https://togithub.com/googleapis/java-shared-dependencies/commit/57bd9124ce8981b7b3b5d0c87b7c1e5f935b7150))
- update dependency com.google.api:api-common to v2.1.5 ([#637](https://togithub.com/googleapis/java-shared-dependencies/issues/637)) ([d3a00fa](https://togithub.com/googleapis/java-shared-dependencies/commit/d3a00fa5ce9908000122d8365fb2f2d0e388494b))
- update dependency com.google.auth:google-auth-library-bom to v1.6.0 ([#631](https://togithub.com/googleapis/java-shared-dependencies/issues/631)) ([53dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/53dc7c2fe255a6c7ca059dd414449bf96780f936))
- update dependency com.google.cloud:google-cloud-core-bom to v2.5.11 ([#644](https://togithub.com/googleapis/java-shared-dependencies/issues/644)) ([4331dcc](https://togithub.com/googleapis/java-shared-dependencies/commit/4331dcc331e8377fcc57e5404321611186ca22cb))
- update dependency com.google.http-client:google-http-client-bom to v1.41.5 ([#638](https://togithub.com/googleapis/java-shared-dependencies/issues/638)) ([e007d23](https://togithub.com/googleapis/java-shared-dependencies/commit/e007d2381bd388a1c199fc3f31d0b965f8ae592d))
- update dependency io.grpc:grpc-bom to v1.45.0 ([#630](https://togithub.com/googleapis/java-shared-dependencies/issues/630)) ([20334e3](https://togithub.com/googleapis/java-shared-dependencies/commit/20334e30d256897cd7ef52c646e5c4549cd7ae69))
- update dependency org.threeten:threetenbp to v1.6.0 ([#633](https://togithub.com/googleapis/java-shared-dependencies/issues/633)) ([1a2716d](https://togithub.com/googleapis/java-shared-dependencies/commit/1a2716d22e442c5cd6adea9449756b9ac3ddbf8e))
- update gax.version to v2.13.0 ([#641](https://togithub.com/googleapis/java-shared-dependencies/issues/641)) ([b863746](https://togithub.com/googleapis/java-shared-dependencies/commit/b863746727fadd45c35198f58eb862f47fe14945))
- update google.common-protos.version to v2.8.0 ([#639](https://togithub.com/googleapis/java-shared-dependencies/issues/639)) ([252afba](https://togithub.com/googleapis/java-shared-dependencies/commit/252afba1df8e4cfdf2574d127097b0978b7778c0))
- update google.core.version to v2.5.10 ([#628](https://togithub.com/googleapis/java-shared-dependencies/issues/628)) ([fec6f51](https://togithub.com/googleapis/java-shared-dependencies/commit/fec6f5121384a04a389bad6f6477a9a5ce468016))
- update iam.version to v1.2.10 ([#625](https://togithub.com/googleapis/java-shared-dependencies/issues/625)) ([0d7ca29](https://togithub.com/googleapis/java-shared-dependencies/commit/0d7ca2924bd24abe14883c173156bb4dc5fb90bf))
---
### Configuration
📅 **Schedule**: At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.
â™» **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.
🔕 **Ignore**: Close this PR and you won't be reminded about this update again.
---
- [ ] If you want to rebase/retry this PR, click this checkbox.
---
This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-securitycenter).
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 6417c935e..6fed2fc54 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,7 +97,7 @@
com.google.cloud
google-cloud-shared-dependencies
- 2.8.0
+ 2.9.0
pom
import
From 9fe395645df7a640dcffad2542ef10084f1074a1 Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
<55107282+release-please[bot]@users.noreply.github.com>
Date: Wed, 30 Mar 2022 00:12:12 +0000
Subject: [PATCH 5/5] chore(main): release 2.5.3 (#787)
:robot: I have created a release *beep* *boop*
---
### [2.5.3](https://github.com/googleapis/java-securitycenter/compare/v2.5.2...v2.5.3) (2022-03-29)
### Documentation
* **samples:** added samples for Mute config ([#719](https://github.com/googleapis/java-securitycenter/issues/719)) ([05018a5](https://github.com/googleapis/java-securitycenter/commit/05018a50e2f05ed093aa8a738bb8b78862774998))
### Dependencies
* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.9.0 ([#791](https://github.com/googleapis/java-securitycenter/issues/791)) ([2d75136](https://github.com/googleapis/java-securitycenter/commit/2d7513657e0f46c7bb2b2127ea767ecdbe72cddf))
---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
---
CHANGELOG.md | 12 ++++++++++++
google-cloud-securitycenter-bom/pom.xml | 16 ++++++++--------
google-cloud-securitycenter/pom.xml | 4 ++--
grpc-google-cloud-securitycenter-v1/pom.xml | 4 ++--
grpc-google-cloud-securitycenter-v1beta1/pom.xml | 4 ++--
.../pom.xml | 4 ++--
pom.xml | 16 ++++++++--------
proto-google-cloud-securitycenter-v1/pom.xml | 4 ++--
.../pom.xml | 4 ++--
.../pom.xml | 4 ++--
versions.txt | 14 +++++++-------
11 files changed, 49 insertions(+), 37 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dcb4033d7..9950d2a7b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog
+### [2.5.3](https://github.com/googleapis/java-securitycenter/compare/v2.5.2...v2.5.3) (2022-03-29)
+
+
+### Documentation
+
+* **samples:** added samples for Mute config ([#719](https://github.com/googleapis/java-securitycenter/issues/719)) ([05018a5](https://github.com/googleapis/java-securitycenter/commit/05018a50e2f05ed093aa8a738bb8b78862774998))
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.9.0 ([#791](https://github.com/googleapis/java-securitycenter/issues/791)) ([2d75136](https://github.com/googleapis/java-securitycenter/commit/2d7513657e0f46c7bb2b2127ea767ecdbe72cddf))
+
### [2.5.2](https://github.com/googleapis/java-securitycenter/compare/v2.5.1...v2.5.2) (2022-03-25)
diff --git a/google-cloud-securitycenter-bom/pom.xml b/google-cloud-securitycenter-bom/pom.xml
index 9408591ca..6bc96126c 100644
--- a/google-cloud-securitycenter-bom/pom.xml
+++ b/google-cloud-securitycenter-bom/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-securitycenter-bom
- 2.5.3-SNAPSHOT
+ 2.5.3
pom
com.google.cloud
@@ -53,37 +53,37 @@
com.google.cloud
google-cloud-securitycenter
- 2.5.3-SNAPSHOT
+ 2.5.3
com.google.api.grpc
grpc-google-cloud-securitycenter-v1
- 2.5.3-SNAPSHOT
+ 2.5.3
com.google.api.grpc
grpc-google-cloud-securitycenter-v1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
com.google.api.grpc
grpc-google-cloud-securitycenter-v1p1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
com.google.api.grpc
proto-google-cloud-securitycenter-v1
- 2.5.3-SNAPSHOT
+ 2.5.3
com.google.api.grpc
proto-google-cloud-securitycenter-v1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
com.google.api.grpc
proto-google-cloud-securitycenter-v1p1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
diff --git a/google-cloud-securitycenter/pom.xml b/google-cloud-securitycenter/pom.xml
index 25ecf8256..35a9324e7 100644
--- a/google-cloud-securitycenter/pom.xml
+++ b/google-cloud-securitycenter/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-securitycenter
- 2.5.3-SNAPSHOT
+ 2.5.3
jar
Google Cloud Security Command Center
https://github.com/googleapis/java-securitycenter
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.3-SNAPSHOT
+ 2.5.3
google-cloud-securitycenter
diff --git a/grpc-google-cloud-securitycenter-v1/pom.xml b/grpc-google-cloud-securitycenter-v1/pom.xml
index 3a48e83f1..00c2d3d22 100644
--- a/grpc-google-cloud-securitycenter-v1/pom.xml
+++ b/grpc-google-cloud-securitycenter-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-securitycenter-v1
- 2.5.3-SNAPSHOT
+ 2.5.3
grpc-google-cloud-securitycenter-v1
GRPC library for grpc-google-cloud-securitycenter-v1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.3-SNAPSHOT
+ 2.5.3
diff --git a/grpc-google-cloud-securitycenter-v1beta1/pom.xml b/grpc-google-cloud-securitycenter-v1beta1/pom.xml
index 58c24fe7b..b167060f0 100644
--- a/grpc-google-cloud-securitycenter-v1beta1/pom.xml
+++ b/grpc-google-cloud-securitycenter-v1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-securitycenter-v1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
grpc-google-cloud-securitycenter-v1beta1
GRPC library for grpc-google-cloud-securitycenter-v1beta1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.3-SNAPSHOT
+ 2.5.3
diff --git a/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml b/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml
index 943c73679..0a279c60e 100644
--- a/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml
+++ b/grpc-google-cloud-securitycenter-v1p1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-securitycenter-v1p1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
grpc-google-cloud-securitycenter-v1p1beta1
GRPC library for grpc-google-cloud-securitycenter-v1p1beta1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.3-SNAPSHOT
+ 2.5.3
diff --git a/pom.xml b/pom.xml
index 6fed2fc54..beed6deeb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-securitycenter-parent
pom
- 2.5.3-SNAPSHOT
+ 2.5.3
Google Cloud Security Command Center Parent
https://github.com/googleapis/java-securitycenter
@@ -61,37 +61,37 @@
com.google.api.grpc
proto-google-cloud-securitycenter-v1
- 2.5.3-SNAPSHOT
+ 2.5.3
com.google.api.grpc
proto-google-cloud-securitycenter-v1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
com.google.api.grpc
proto-google-cloud-securitycenter-v1p1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
com.google.api.grpc
grpc-google-cloud-securitycenter-v1
- 2.5.3-SNAPSHOT
+ 2.5.3
com.google.api.grpc
grpc-google-cloud-securitycenter-v1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
com.google.api.grpc
grpc-google-cloud-securitycenter-v1p1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
com.google.cloud
google-cloud-securitycenter
- 2.5.3-SNAPSHOT
+ 2.5.3
diff --git a/proto-google-cloud-securitycenter-v1/pom.xml b/proto-google-cloud-securitycenter-v1/pom.xml
index 2ac6561b7..57e08461b 100644
--- a/proto-google-cloud-securitycenter-v1/pom.xml
+++ b/proto-google-cloud-securitycenter-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-securitycenter-v1
- 2.5.3-SNAPSHOT
+ 2.5.3
proto-google-cloud-securitycenter-v1
PROTO library for proto-google-cloud-securitycenter-v1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.3-SNAPSHOT
+ 2.5.3
diff --git a/proto-google-cloud-securitycenter-v1beta1/pom.xml b/proto-google-cloud-securitycenter-v1beta1/pom.xml
index 49da8d364..71ab24752 100644
--- a/proto-google-cloud-securitycenter-v1beta1/pom.xml
+++ b/proto-google-cloud-securitycenter-v1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-securitycenter-v1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
proto-google-cloud-securitycenter-v1beta1
PROTO library for proto-google-cloud-securitycenter-v1beta1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.3-SNAPSHOT
+ 2.5.3
diff --git a/proto-google-cloud-securitycenter-v1p1beta1/pom.xml b/proto-google-cloud-securitycenter-v1p1beta1/pom.xml
index 683ab39d0..5ec2dc8d1 100644
--- a/proto-google-cloud-securitycenter-v1p1beta1/pom.xml
+++ b/proto-google-cloud-securitycenter-v1p1beta1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
proto-google-cloud-securitycenter-v1p1beta1
- 0.100.3-SNAPSHOT
+ 0.100.3
proto-google-cloud-securitycenter-v1p1beta1
PROTO library for proto-google-cloud-securitycenter-v1p1beta1
com.google.cloud
google-cloud-securitycenter-parent
- 2.5.3-SNAPSHOT
+ 2.5.3
diff --git a/versions.txt b/versions.txt
index b2978d8f6..794a7528c 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,10 +1,10 @@
# Format:
# module:released-version:current-version
-google-cloud-securitycenter:2.5.2:2.5.3-SNAPSHOT
-grpc-google-cloud-securitycenter-v1:2.5.2:2.5.3-SNAPSHOT
-grpc-google-cloud-securitycenter-v1beta1:0.100.2:0.100.3-SNAPSHOT
-grpc-google-cloud-securitycenter-v1p1beta1:0.100.2:0.100.3-SNAPSHOT
-proto-google-cloud-securitycenter-v1:2.5.2:2.5.3-SNAPSHOT
-proto-google-cloud-securitycenter-v1beta1:0.100.2:0.100.3-SNAPSHOT
-proto-google-cloud-securitycenter-v1p1beta1:0.100.2:0.100.3-SNAPSHOT
+google-cloud-securitycenter:2.5.3:2.5.3
+grpc-google-cloud-securitycenter-v1:2.5.3:2.5.3
+grpc-google-cloud-securitycenter-v1beta1:0.100.3:0.100.3
+grpc-google-cloud-securitycenter-v1p1beta1:0.100.3:0.100.3
+proto-google-cloud-securitycenter-v1:2.5.3:2.5.3
+proto-google-cloud-securitycenter-v1beta1:0.100.3:0.100.3
+proto-google-cloud-securitycenter-v1p1beta1:0.100.3:0.100.3