Skip to content

Commit

Permalink
feat: [securitycenter] Add files field to finding's list of attributes (
Browse files Browse the repository at this point in the history
#8773)

* feat: Add files field to finding's list of attributes

PiperOrigin-RevId: 488290111

Source-Link: googleapis/googleapis@7349e1c

Source-Link: googleapis/googleapis-gen@721049d
Copy-Tag: eyJwIjoiamF2YS1zZWN1cml0eWNlbnRlci8uT3dsQm90LnlhbWwiLCJoIjoiNzIxMDQ5ZDUxMmRlZWJhYTk2ZDQzOGFhMjNlOTcwMjk5ZDk3NzEyYiJ9

* 🦉 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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and alicejli committed Nov 18, 2022
1 parent afda2d4 commit 8ad43db
Show file tree
Hide file tree
Showing 17 changed files with 746 additions and 158 deletions.
32 changes: 16 additions & 16 deletions java-securitycenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-securitycenter</artifactId>
<version>2.13.0</version>
<version>2.14.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-securitycenter:2.13.0'
implementation 'com.google.cloud:google-cloud-securitycenter:2.14.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.13.0"
libraryDependencies += "com.google.cloud" % "google-cloud-securitycenter" % "2.14.0"
```

## Authentication
Expand Down Expand Up @@ -159,16 +159,16 @@ Java is a registered trademark of Oracle and/or its affiliates.

[product-docs]: https://cloud.google.com/security-command-center
[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-securitycenter/latest/overview
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-securitycenter/java11.html
[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg
[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html
[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg
[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html
[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg
[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html
[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg
[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html
[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-securitycenter.svg
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-securitycenter&core=gav
Expand All @@ -180,9 +180,9 @@ Java is a registered trademark of Oracle and/or its affiliates.
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/java-securitycenter/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/java-securitycenter/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/java-securitycenter/blob/main/LICENSE
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE

[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=securitycenter.googleapis.com
[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3794,7 +3794,7 @@ public final UnaryCallable<RunAssetDiscoveryRequest, Operation> runAssetDiscover
*
* @param name Required. The relative resource name of the finding. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}".
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}".
* @param state Required. The desired State of the finding.
* @param startTime Required. The time at which the updated state takes effect.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
Expand Down Expand Up @@ -3833,7 +3833,7 @@ public final Finding setFindingState(FindingName name, Finding.State state, Time
*
* @param name Required. The relative resource name of the finding. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "organizations/{organization_id}/sources/{source_id}/finding/{finding_id}".
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}".
* @param state Required. The desired State of the finding.
* @param startTime Required. The time at which the updated state takes effect.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
Expand Down Expand Up @@ -3934,9 +3934,9 @@ public final UnaryCallable<SetFindingStateRequest, Finding> setFindingStateCalla
*
* @param name Required. The relative resource name of the finding. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "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}".
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
* @param mute Required. The desired state of the Mute.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand Down Expand Up @@ -3972,9 +3972,9 @@ public final Finding setMute(FindingName name, Finding.Mute mute) {
*
* @param name Required. The relative resource name of the finding. See:
* https://cloud.google.com/apis/design/resource_names#relative_resource_name Example:
* "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}".
* "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}",
* "folders/{folder_id}/sources/{source_id}/findings/{finding_id}",
* "projects/{project_id}/sources/{source_id}/findings/{finding_id}".
* @param mute Required. The desired state of the Mute.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ public void createFindingTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -403,6 +404,7 @@ public void createFindingTest2() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3125,6 +3127,7 @@ public void setFindingStateTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3206,6 +3209,7 @@ public void setFindingStateTest2() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3285,6 +3289,7 @@ public void setMuteTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3364,6 +3369,7 @@ public void setMuteTest2() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3693,6 +3699,7 @@ public void updateFindingTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3730,6 +3737,7 @@ public void updateFindingTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();

Finding actualResponse = client.updateFinding(finding);
Expand Down Expand Up @@ -3792,6 +3800,7 @@ public void updateFindingExceptionTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
client.updateFinding(finding);
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ public void createFindingTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -390,6 +391,7 @@ public void createFindingTest2() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2872,6 +2874,7 @@ public void setFindingStateTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2949,6 +2952,7 @@ public void setFindingStateTest2() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -3024,6 +3028,7 @@ public void setMuteTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -3098,6 +3103,7 @@ public void setMuteTest2() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -3382,6 +3388,7 @@ public void updateFindingTest() throws Exception {
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.addAllFiles(new ArrayList<File>())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down
Loading

0 comments on commit 8ad43db

Please sign in to comment.