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

feat: Adding database access information, such as queries field to a finding. A database may be a sub-resource of an instance (as in the case of CloudSQL instances or Cloud Spanner instances), or the database instance itself #902

Merged
merged 2 commits into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ public void createFindingTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -399,6 +400,7 @@ public void createFindingTest2() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -2789,6 +2791,7 @@ public void setFindingStateTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -2868,6 +2871,7 @@ public void setFindingStateTest2() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -2945,6 +2949,7 @@ public void setMuteTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3022,6 +3027,7 @@ public void setMuteTest2() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3349,6 +3355,7 @@ public void updateFindingTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);

Expand Down Expand Up @@ -3384,6 +3391,7 @@ public void updateFindingTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();

Finding actualResponse = client.updateFinding(finding);
Expand Down Expand Up @@ -3444,6 +3452,7 @@ public void updateFindingExceptionTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.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 @@ -313,6 +313,7 @@ public void createFindingTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -386,6 +387,7 @@ public void createFindingTest2() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2560,6 +2562,7 @@ public void setFindingStateTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2635,6 +2638,7 @@ public void setFindingStateTest2() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2708,6 +2712,7 @@ public void setMuteTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -2780,6 +2785,7 @@ public void setMuteTest2() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down Expand Up @@ -3062,6 +3068,7 @@ public void updateFindingTest() throws Exception {
.setNextSteps("nextSteps1206138868")
.addAllContainers(new ArrayList<Container>())
.setKubernetes(Kubernetes.newBuilder().build())
.setDatabase(Database.newBuilder().build())
.build();
mockSecurityCenter.addResponse(expectedResponse);

Expand Down
Loading