Class: AWSCDK::SecurityAgent::CfnPentestProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
security_agent/cfn_pentest_props.rb

Overview

Properties for defining a CfnPentest.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(agent_space_id:, assets:, service_role:, code_remediation_strategy: nil, exclude_risk_types: nil, log_config: nil, network_traffic_config: nil, title: nil, vpc_config: nil) ⇒ CfnPentestProps

Returns a new instance of CfnPentestProps.

Parameters:



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'security_agent/cfn_pentest_props.rb', line 18

def initialize(agent_space_id:, assets:, service_role:, code_remediation_strategy: nil, exclude_risk_types: nil, log_config: nil, network_traffic_config: nil, title: nil, vpc_config: nil)
  @agent_space_id = agent_space_id
  Jsii::Type.check_type(@agent_space_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "agentSpaceId")
  @assets = assets.is_a?(Hash) ? ::AWSCDK::SecurityAgent::CfnPentest::AssetsProperty.new(**assets.transform_keys(&:to_sym)) : assets
  Jsii::Type.check_type(@assets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZWN1cml0eWFnZW50LkNmblBlbnRlc3QuQXNzZXRzUHJvcGVydHkifV19fQ==")), "assets")
  @service_role = service_role
  Jsii::Type.check_type(@service_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceRole")
  @code_remediation_strategy = code_remediation_strategy
  Jsii::Type.check_type(@code_remediation_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "codeRemediationStrategy") unless @code_remediation_strategy.nil?
  @exclude_risk_types = exclude_risk_types
  Jsii::Type.check_type(@exclude_risk_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "excludeRiskTypes") unless @exclude_risk_types.nil?
  @log_config = log_config.is_a?(Hash) ? ::AWSCDK::SecurityAgent::CfnPentest::CloudWatchLogProperty.new(**log_config.transform_keys(&:to_sym)) : log_config
  Jsii::Type.check_type(@log_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZWN1cml0eWFnZW50LkNmblBlbnRlc3QuQ2xvdWRXYXRjaExvZ1Byb3BlcnR5In1dfX0=")), "logConfig") unless @log_config.nil?
  @network_traffic_config = network_traffic_config.is_a?(Hash) ? ::AWSCDK::SecurityAgent::CfnPentest::NetworkTrafficConfigProperty.new(**network_traffic_config.transform_keys(&:to_sym)) : network_traffic_config
  Jsii::Type.check_type(@network_traffic_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZWN1cml0eWFnZW50LkNmblBlbnRlc3QuTmV0d29ya1RyYWZmaWNDb25maWdQcm9wZXJ0eSJ9XX19")), "networkTrafficConfig") unless @network_traffic_config.nil?
  @title = title
  Jsii::Type.check_type(@title, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "title") unless @title.nil?
  @vpc_config = vpc_config.is_a?(Hash) ? ::AWSCDK::SecurityAgent::CfnPentest::VPCConfigProperty.new(**vpc_config.transform_keys(&:to_sym)) : vpc_config
  Jsii::Type.check_type(@vpc_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19zZWN1cml0eWFnZW50LkNmblBlbnRlc3QuVnBjQ29uZmlnUHJvcGVydHkifV19fQ==")), "vpcConfig") unless @vpc_config.nil?
end

Instance Attribute Details

#agent_space_idString (readonly)

Identifier of agent space where the pentest should be created.



43
44
45
# File 'security_agent/cfn_pentest_props.rb', line 43

def agent_space_id
  @agent_space_id
end

#assetsAWSCDK::IResolvable, AWSCDK::SecurityAgent::CfnPentest::AssetsProperty (readonly)

Collection of assets to be tested during the pentest.



48
49
50
# File 'security_agent/cfn_pentest_props.rb', line 48

def assets
  @assets
end

#code_remediation_strategyString? (readonly)

Strategy for remediating code vulnerabilities discovered during the pentest.



58
59
60
# File 'security_agent/cfn_pentest_props.rb', line 58

def code_remediation_strategy
  @code_remediation_strategy
end

#exclude_risk_typesArray<String>? (readonly)

A list of risk types excluded from the pentest execution.



63
64
65
# File 'security_agent/cfn_pentest_props.rb', line 63

def exclude_risk_types
  @exclude_risk_types
end

#log_configAWSCDK::IResolvable, ... (readonly)

CloudWatch Logs configuration for pentest output.



68
69
70
# File 'security_agent/cfn_pentest_props.rb', line 68

def log_config
  @log_config
end

#network_traffic_configAWSCDK::IResolvable, ... (readonly)

Network traffic configuration for the pentest.



73
74
75
# File 'security_agent/cfn_pentest_props.rb', line 73

def network_traffic_config
  @network_traffic_config
end

#service_roleString (readonly)

Service role for accessing resources.



53
54
55
# File 'security_agent/cfn_pentest_props.rb', line 53

def service_role
  @service_role
end

#titleString? (readonly)

Title of the penetration test.



78
79
80
# File 'security_agent/cfn_pentest_props.rb', line 78

def title
  @title
end

#vpc_configAWSCDK::IResolvable, ... (readonly)

VPC configuration that the pentest agent accesses.



83
84
85
# File 'security_agent/cfn_pentest_props.rb', line 83

def vpc_config
  @vpc_config
end

Class Method Details

.jsii_propertiesObject



85
86
87
88
89
90
91
92
93
94
95
96
97
# File 'security_agent/cfn_pentest_props.rb', line 85

def self.jsii_properties
  {
    :agent_space_id => "agentSpaceId",
    :assets => "assets",
    :service_role => "serviceRole",
    :code_remediation_strategy => "codeRemediationStrategy",
    :exclude_risk_types => "excludeRiskTypes",
    :log_config => "logConfig",
    :network_traffic_config => "networkTrafficConfig",
    :title => "title",
    :vpc_config => "vpcConfig",
  }
end

Instance Method Details

#to_jsiiObject



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'security_agent/cfn_pentest_props.rb', line 99

def to_jsii
  result = {}
  result.merge!({
    "agentSpaceId" => @agent_space_id,
    "assets" => @assets,
    "serviceRole" => @service_role,
    "codeRemediationStrategy" => @code_remediation_strategy,
    "excludeRiskTypes" => @exclude_risk_types,
    "logConfig" => @log_config,
    "networkTrafficConfig" => @network_traffic_config,
    "title" => @title,
    "vpcConfig" => @vpc_config,
  })
  result.compact
end