Skip to content

Commit

Permalink
feat: Added container field to findings attributes
Browse files Browse the repository at this point in the history
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: googleapis/googleapis-gen@0be13cf
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuQ2xvdWQuU2VjdXJpdHlDZW50ZXIuVjEvLk93bEJvdC55YW1sIiwiaCI6IjBiZTEzY2Y1M2NhNDU1NTU0ODlkNzM0MTlkMTA1M2E3MDlhOGRlY2QifQ==
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Jul 21, 2022
1 parent 9fefb3d commit e8abc9d
Show file tree
Hide file tree
Showing 8 changed files with 3,363 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ public void CreateFindingRequestObject()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.CreateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -311,6 +313,8 @@ public void CreateFindingRequestObject()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.CreateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -381,6 +385,8 @@ public void CreateFinding()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.CreateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -449,6 +455,8 @@ public void CreateFinding()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.CreateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -519,6 +527,8 @@ public void CreateFindingResourceNames()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.CreateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -587,6 +597,8 @@ public void CreateFindingResourceNames()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.CreateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2627,6 +2639,8 @@ public void SetFindingStateRequestObject()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetFindingState(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2695,6 +2709,8 @@ public void SetFindingStateRequestObject()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetFindingStateAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2765,6 +2781,8 @@ public void SetFindingState()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetFindingState(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2833,6 +2851,8 @@ public void SetFindingState()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetFindingStateAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2903,6 +2923,8 @@ public void SetFindingStateResourceNames()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetFindingState(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -2971,6 +2993,8 @@ public void SetFindingStateResourceNames()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetFindingStateAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3040,6 +3064,8 @@ public void SetMuteRequestObject()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetMute(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3107,6 +3133,8 @@ public void SetMuteRequestObject()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetMuteAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3176,6 +3204,8 @@ public void SetMute()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetMute(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3243,6 +3273,8 @@ public void SetMute()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetMuteAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3312,6 +3344,8 @@ public void SetMuteResourceNames()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetMute(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3379,6 +3413,8 @@ public void SetMuteResourceNames()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.SetMuteAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3920,6 +3956,8 @@ public void UpdateFindingRequestObject()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.UpdateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -3987,6 +4025,8 @@ public void UpdateFindingRequestObject()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.UpdateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -4055,6 +4095,8 @@ public void UpdateFinding()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.UpdateFinding(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(expectedResponse);
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down Expand Up @@ -4121,6 +4163,8 @@ public void UpdateFinding()
Exfiltration = new Exfiltration(),
IamBindings = { new IamBinding(), },
NextSteps = "next_stepsc5904826",
Containers = { new Container(), },
Kubernetes = new Kubernetes(),
};
mockGrpcClient.Setup(x => x.UpdateFindingAsync(request, moq::It.IsAny<grpccore::CallOptions>())).Returns(new grpccore::AsyncUnaryCall<Finding>(stt::Task.FromResult(expectedResponse), null, null, null, null));
SecurityCenterClient client = new SecurityCenterClientImpl(mockGrpcClient.Object, null, null);
Expand Down
Loading

0 comments on commit e8abc9d

Please sign in to comment.