Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add TOXIC_COMBINATION to FindingClass enum #26148

Merged
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 @@ -2063,7 +2063,7 @@ def validate_event_threat_detection_custom_module request, options = nil
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
# @overload get_security_center_service(name: nil)
# @overload get_security_center_service(name: nil, show_eligible_modules_only: nil)
# Pass arguments to `get_security_center_service` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
Expand All @@ -2084,6 +2084,9 @@ def validate_event_threat_detection_custom_module request, options = nil
# * security-health-analytics
# * vm-threat-detection
# * web-security-scanner
# @param show_eligible_modules_only [::Boolean]
# Flag that, when set, will be used to filter the ModuleSettings that are
# in scope. The default setting is that all modules will be shown.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService]
Expand Down Expand Up @@ -2164,7 +2167,7 @@ def get_security_center_service request, options = nil
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
# @overload list_security_center_services(parent: nil, page_size: nil, page_token: nil)
# @overload list_security_center_services(parent: nil, page_size: nil, page_token: nil, show_eligible_modules_only: nil)
# Pass arguments to `list_security_center_services` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
Expand All @@ -2182,6 +2185,9 @@ def get_security_center_service request, options = nil
# Default is 10, minimum is 1, maximum is 1000.
# @param page_token [::String]
# Optional. The value returned by the last call indicating a continuation.
# @param show_eligible_modules_only [::Boolean]
# Flag that, when set, will be used to filter the ModuleSettings that are
# in scope. The default setting is that all modules will be shown.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1931,7 +1931,7 @@ def validate_event_threat_detection_custom_module request, options = nil
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
# @overload get_security_center_service(name: nil)
# @overload get_security_center_service(name: nil, show_eligible_modules_only: nil)
# Pass arguments to `get_security_center_service` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
Expand All @@ -1952,6 +1952,9 @@ def validate_event_threat_detection_custom_module request, options = nil
# * security-health-analytics
# * vm-threat-detection
# * web-security-scanner
# @param show_eligible_modules_only [::Boolean]
# Flag that, when set, will be used to filter the ModuleSettings that are
# in scope. The default setting is that all modules will be shown.
# @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService]
# @yieldparam operation [::Gapic::Rest::TransportOperation]
Expand Down Expand Up @@ -2025,7 +2028,7 @@ def get_security_center_service request, options = nil
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
# @overload list_security_center_services(parent: nil, page_size: nil, page_token: nil)
# @overload list_security_center_services(parent: nil, page_size: nil, page_token: nil, show_eligible_modules_only: nil)
# Pass arguments to `list_security_center_services` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
Expand All @@ -2043,6 +2046,9 @@ def get_security_center_service request, options = nil
# Default is 10, minimum is 1, maximum is 1000.
# @param page_token [::String]
# Optional. The value returned by the last call indicating a continuation.
# @param show_eligible_modules_only [::Boolean]
# Flag that, when set, will be used to filter the ModuleSettings that are
# in scope. The default setting is that all modules will be shown.
# @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenterManagement::V1::SecurityCenterService>]
# @yieldparam operation [::Gapic::Rest::TransportOperation]
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,10 @@ module FindingClass
# Describes a potential security risk due to a change in the security
# posture.
POSTURE_VIOLATION = 6

# Describes a combination of security issues that represent a more severe
# security problem when taken together.
TOXIC_COMBINATION = 7
end
end

Expand Down Expand Up @@ -1167,6 +1171,10 @@ class Position
# * security-health-analytics
# * vm-threat-detection
# * web-security-scanner
# @!attribute [rw] show_eligible_modules_only
# @return [::Boolean]
# Flag that, when set, will be used to filter the ModuleSettings that are
# in scope. The default setting is that all modules will be shown.
class GetSecurityCenterServiceRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
Expand All @@ -1189,6 +1197,10 @@ class GetSecurityCenterServiceRequest
# @!attribute [rw] page_token
# @return [::String]
# Optional. The value returned by the last call indicating a continuation.
# @!attribute [rw] show_eligible_modules_only
# @return [::Boolean]
# Flag that, when set, will be used to filter the ModuleSettings that are
# in scope. The default setting is that all modules will be shown.
class ListSecurityCenterServicesRequest
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,7 @@ def test_get_security_center_service

# Create request parameters for a unary method.
name = "hello world"
show_eligible_modules_only = true

get_security_center_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:|
assert options.metadata.key? :"x-goog-api-client"
Expand All @@ -1092,27 +1093,27 @@ def test_get_security_center_service
end

# Use hash object
client.get_security_center_service({ name: name }) do |_result, response|
client.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }) do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use named arguments
client.get_security_center_service name: name do |_result, response|
client.get_security_center_service name: name, show_eligible_modules_only: show_eligible_modules_only do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use protobuf object
client.get_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name) do |_result, response|
client.get_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only) do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use hash object with options
client.get_security_center_service({ name: name }, call_options) do |_result, response|
client.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }, call_options) do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use protobuf object with options
client.get_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name), call_options) do |_result, response|
client.get_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only), call_options) do |_result, response|
assert_equal http_response, response.underlying_op
end

Expand All @@ -1133,6 +1134,7 @@ def test_list_security_center_services
parent = "hello world"
page_size = 42
page_token = "hello world"
show_eligible_modules_only = true

list_security_center_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:|
assert options.metadata.key? :"x-goog-api-client"
Expand All @@ -1148,27 +1150,27 @@ def test_list_security_center_services
end

# Use hash object
client.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response|
client.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }) do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use named arguments
client.list_security_center_services parent: parent, page_size: page_size, page_token: page_token do |_result, response|
client.list_security_center_services parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use protobuf object
client.list_security_center_services ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response|
client.list_security_center_services ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only) do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use hash object with options
client.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response|
client.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }, call_options) do |_result, response|
assert_equal http_response, response.underlying_op
end

# Use protobuf object with options
client.list_security_center_services(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response|
client.list_security_center_services(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only), call_options) do |_result, response|
assert_equal http_response, response.underlying_op
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1190,11 +1190,13 @@ def test_get_security_center_service

# Create request parameters for a unary method.
name = "hello world"
show_eligible_modules_only = true

get_security_center_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:|
assert_equal :get_security_center_service, name
assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest, request
assert_equal "hello world", request["name"]
assert_equal true, request["show_eligible_modules_only"]
refute_nil options
end

Expand All @@ -1205,31 +1207,31 @@ def test_get_security_center_service
end

# Use hash object
client.get_security_center_service({ name: name }) do |response, operation|
client.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end

# Use named arguments
client.get_security_center_service name: name do |response, operation|
client.get_security_center_service name: name, show_eligible_modules_only: show_eligible_modules_only do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end

# Use protobuf object
client.get_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name) do |response, operation|
client.get_security_center_service ::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end

# Use hash object with options
client.get_security_center_service({ name: name }, grpc_options) do |response, operation|
client.get_security_center_service({ name: name, show_eligible_modules_only: show_eligible_modules_only }, grpc_options) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end

# Use protobuf object with options
client.get_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name), grpc_options) do |response, operation|
client.get_security_center_service(::Google::Cloud::SecurityCenterManagement::V1::GetSecurityCenterServiceRequest.new(name: name, show_eligible_modules_only: show_eligible_modules_only), grpc_options) do |response, operation|
assert_equal grpc_response, response
assert_equal grpc_operation, operation
end
Expand All @@ -1250,13 +1252,15 @@ def test_list_security_center_services
parent = "hello world"
page_size = 42
page_token = "hello world"
show_eligible_modules_only = true

list_security_center_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:|
assert_equal :list_security_center_services, name
assert_kind_of ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest, request
assert_equal "hello world", request["parent"]
assert_equal 42, request["page_size"]
assert_equal "hello world", request["page_token"]
assert_equal true, request["show_eligible_modules_only"]
refute_nil options
end

Expand All @@ -1267,35 +1271,35 @@ def test_list_security_center_services
end

# Use hash object
client.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation|
client.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }) do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
end

# Use named arguments
client.list_security_center_services parent: parent, page_size: page_size, page_token: page_token do |response, operation|
client.list_security_center_services parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
end

# Use protobuf object
client.list_security_center_services ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation|
client.list_security_center_services ::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only) do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
end

# Use hash object with options
client.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation|
client.list_security_center_services({ parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only }, grpc_options) do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
end

# Use protobuf object with options
client.list_security_center_services(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation|
client.list_security_center_services(::Google::Cloud::SecurityCenterManagement::V1::ListSecurityCenterServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token, show_eligible_modules_only: show_eligible_modules_only), grpc_options) do |response, operation|
assert_kind_of Gapic::PagedEnumerable, response
assert_equal grpc_response, response.response
assert_equal grpc_operation, operation
Expand Down