Skip to content

Commit

Permalink
feat: Added container field to findings attributes (#875)
Browse files Browse the repository at this point in the history
* feat: Added container field to findings attributes
feat: Added kubernetes field to findings attribute. This field is populated only when the container is a kubernetes cluster explicitly

PiperOrigin-RevId: 462248767

Source-Link: googleapis/googleapis@dd2b0d2

Source-Link: https://github.com/googleapis/googleapis-gen/commit/0be13cf53ca45555489d73419d1053a709a8decd
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGJlMTNjZjUzY2E0NTU1NTQ4OWQ3MzQxOWQxMDUzYTcwOWE4ZGVjZCJ9

* 🦉 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
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jul 21, 2022
1 parent 6a3085c commit d9b8007
Show file tree
Hide file tree
Showing 21 changed files with 18,112 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ public void createFindingTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -395,6 +397,8 @@ public void createFindingTest2() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -2783,6 +2787,8 @@ public void setFindingStateTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -2860,6 +2866,8 @@ public void setFindingStateTest2() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -2935,6 +2943,8 @@ public void setMuteTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3010,6 +3020,8 @@ public void setMuteTest2() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3335,6 +3347,8 @@ public void updateFindingTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3368,6 +3382,8 @@ public void updateFindingTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();

Finding actualResponse = client.updateFinding(finding);
Expand Down Expand Up @@ -3426,6 +3442,8 @@ public void updateFindingExceptionTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
client.updateFinding(finding);
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ public void createFindingTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -382,6 +384,8 @@ public void createFindingTest2() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2554,6 +2558,8 @@ public void setFindingStateTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2627,6 +2633,8 @@ public void setFindingStateTest2() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2698,6 +2706,8 @@ public void setMuteTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2768,6 +2778,8 @@ public void setMuteTest2() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -3048,6 +3060,8 @@ public void updateFindingTest() throws Exception {
.setExfiltration(Exfiltration.newBuilder().build())
.addAllIamBindings(new ArrayList<IamBinding>())
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down
Loading

0 comments on commit d9b8007

Please sign in to comment.