Class: Google::Apis::SecuritypostureV1::CustomConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/securityposture_v1/classes.rb,
lib/google/apis/securityposture_v1/representations.rb,
lib/google/apis/securityposture_v1/representations.rb

Overview

A custom module configuration for Security Health Analytics. Use CustomConfig to create custom detectors that generate custom findings for resources that you specify.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CustomConfig

Returns a new instance of CustomConfig.



204
205
206
# File 'lib/google/apis/securityposture_v1/classes.rb', line 204

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#custom_outputGoogle::Apis::SecuritypostureV1::CustomOutputSpec

Definitions of custom source properties that can appear in findings. Corresponds to the JSON property customOutput



159
160
161
# File 'lib/google/apis/securityposture_v1/classes.rb', line 159

def custom_output
  @custom_output
end

#descriptionString

Optional. A description of the vulnerability or misconfiguration that the custom module detects. The description appears in each finding. Provide enough information to help an investigator understand the finding. The value must be enclosed in quotation marks. Corresponds to the JSON property description

Returns:

  • (String)


167
168
169
# File 'lib/google/apis/securityposture_v1/classes.rb', line 167

def description
  @description
end

#predicateGoogle::Apis::SecuritypostureV1::Expr

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: " Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example ( Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. Corresponds to the JSON property predicate



186
187
188
# File 'lib/google/apis/securityposture_v1/classes.rb', line 186

def predicate
  @predicate
end

#recommendationString

Required. An explanation of the steps that security teams can take to resolve the detected issue. The explanation appears in each finding. Corresponds to the JSON property recommendation

Returns:

  • (String)


192
193
194
# File 'lib/google/apis/securityposture_v1/classes.rb', line 192

def recommendation
  @recommendation
end

#resource_selectorGoogle::Apis::SecuritypostureV1::ResourceSelector

A selector for the resource types to run the detector on. Corresponds to the JSON property resourceSelector



197
198
199
# File 'lib/google/apis/securityposture_v1/classes.rb', line 197

def resource_selector
  @resource_selector
end

#severityString

Required. The severity of findings generated by the custom module. Corresponds to the JSON property severity

Returns:

  • (String)


202
203
204
# File 'lib/google/apis/securityposture_v1/classes.rb', line 202

def severity
  @severity
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



209
210
211
212
213
214
215
216
# File 'lib/google/apis/securityposture_v1/classes.rb', line 209

def update!(**args)
  @custom_output = args[:custom_output] if args.key?(:custom_output)
  @description = args[:description] if args.key?(:description)
  @predicate = args[:predicate] if args.key?(:predicate)
  @recommendation = args[:recommendation] if args.key?(:recommendation)
  @resource_selector = args[:resource_selector] if args.key?(:resource_selector)
  @severity = args[:severity] if args.key?(:severity)
end