CfnPentestProps Struct
Properties for defining a CfnPentest.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_securityagent as securityagent } from 'aws-cdk-lib';
const cfnPentestProps: securityagent.CfnPentestProps = {
agentSpaceId: 'agentSpaceId',
assets: {
actors: [{
authentication: {
providerType: 'providerType',
value: 'value',
},
description: 'description',
enableEmailMfa: false,
identifier: 'identifier',
mfaForwardingAddress: 'mfaForwardingAddress',
uris: ['uris'],
}],
clientCertificates: [{
name: 'name',
origins: ['origins'],
secretArn: 'secretArn',
}],
documents: [{
artifactId: 'artifactId',
s3Location: 's3Location',
}],
endpoints: [{
uri: 'uri',
}],
integratedRepositories: [{
integrationId: 'integrationId',
providerResourceId: 'providerResourceId',
// the properties below are optional
branch: 'branch',
}],
sourceCode: [{
s3Location: 's3Location',
}],
trustedCaCertificates: [{
source: {
artifactId: 'artifactId',
inlinePem: 'inlinePem',
s3Location: 's3Location',
},
}],
},
serviceRole: 'serviceRole',
// the properties below are optional
ciCdConfiguration: {
enabled: false,
},
cleanUpStrategy: 'cleanUpStrategy',
codeRemediationStrategy: 'codeRemediationStrategy',
disableManagedSkills: ['disableManagedSkills'],
excludeRiskTypes: ['excludeRiskTypes'],
logConfig: {
logGroup: 'logGroup',
logStream: 'logStream',
},
maxTaskHours: 123,
networkTrafficConfig: {
customHeaders: [{
name: 'name',
value: 'value',
}],
rules: [{
effect: 'effect',
networkTrafficRuleType: 'networkTrafficRuleType',
pattern: 'pattern',
}],
},
reportDestination: {
containerId: 'containerId',
integrationId: 'integrationId',
// the properties below are optional
documentId: 'documentId',
parentId: 'parentId',
},
reportFilters: {
annotationNotes: false,
complianceReport: false,
confidenceLevels: ['confidenceLevels'],
findingTypes: ['findingTypes'],
riskLevels: ['riskLevels'],
riskTypes: ['riskTypes'],
statuses: ['statuses'],
taskStatuses: ['taskStatuses'],
},
testScope: {
type: 'type',
},
title: 'title',
vpcConfig: {
securityGroupArns: ['securityGroupArns'],
subnetArns: ['subnetArns'],
vpcArn: 'vpcArn',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_securityagent as securityagent
cfn_pentest_props = securityagent.CfnPentestProps(
agent_space_id="agentSpaceId",
assets=securityagent.CfnPentest.AssetsProperty(
actors=[securityagent.CfnPentest.ActorProperty(
authentication=securityagent.CfnPentest.AuthenticationProperty(
provider_type="providerType",
value="value"
),
description="description",
enable_email_mfa=False,
identifier="identifier",
mfa_forwarding_address="mfaForwardingAddress",
uris=["uris"]
)],
client_certificates=[securityagent.CfnPentest.ClientCertificateProperty(
name="name",
origins=["origins"],
secret_arn="secretArn"
)],
documents=[securityagent.CfnPentest.DocumentInfoProperty(
artifact_id="artifactId",
s3_location="s3Location"
)],
endpoints=[securityagent.CfnPentest.EndpointProperty(
uri="uri"
)],
integrated_repositories=[securityagent.CfnPentest.IntegratedRepositoryProperty(
integration_id="integrationId",
provider_resource_id="providerResourceId",
# the properties below are optional
branch="branch"
)],
source_code=[securityagent.CfnPentest.SourceCodeRepositoryProperty(
s3_location="s3Location"
)],
trusted_ca_certificates=[securityagent.CfnPentest.TrustedCaCertificateProperty(
source=securityagent.CfnPentest.CaCertificateSourceProperty(
artifact_id="artifactId",
inline_pem="inlinePem",
s3_location="s3Location"
)
)]
),
service_role="serviceRole",
# the properties below are optional
ci_cd_configuration=securityagent.CfnPentest.CiCdConfigurationProperty(
enabled=False
),
clean_up_strategy="cleanUpStrategy",
code_remediation_strategy="codeRemediationStrategy",
disable_managed_skills=["disableManagedSkills"],
exclude_risk_types=["excludeRiskTypes"],
log_config=securityagent.CfnPentest.CloudWatchLogProperty(
log_group="logGroup",
log_stream="logStream"
),
max_task_hours=123,
network_traffic_config=securityagent.CfnPentest.NetworkTrafficConfigProperty(
custom_headers=[securityagent.CfnPentest.CustomHeaderProperty(
name="name",
value="value"
)],
rules=[securityagent.CfnPentest.NetworkTrafficRuleProperty(
effect="effect",
network_traffic_rule_type="networkTrafficRuleType",
pattern="pattern"
)]
),
report_destination=securityagent.CfnPentest.ReportDestinationProperty(
container_id="containerId",
integration_id="integrationId",
# the properties below are optional
document_id="documentId",
parent_id="parentId"
),
report_filters=securityagent.CfnPentest.ReportFiltersProperty(
annotation_notes=False,
compliance_report=False,
confidence_levels=["confidenceLevels"],
finding_types=["findingTypes"],
risk_levels=["riskLevels"],
risk_types=["riskTypes"],
statuses=["statuses"],
task_statuses=["taskStatuses"]
),
test_scope=securityagent.CfnPentest.TestScopeProperty(
type="type"
),
title="title",
vpc_config=securityagent.CfnPentest.VpcConfigProperty(
security_group_arns=["securityGroupArns"],
subnet_arns=["subnetArns"],
vpc_arn="vpcArn"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.securityagent.*;
CfnPentestProps cfnPentestProps = CfnPentestProps.builder()
.agentSpaceId("agentSpaceId")
.assets(AssetsProperty.builder()
.actors(List.of(ActorProperty.builder()
.authentication(AuthenticationProperty.builder()
.providerType("providerType")
.value("value")
.build())
.description("description")
.enableEmailMfa(false)
.identifier("identifier")
.mfaForwardingAddress("mfaForwardingAddress")
.uris(List.of("uris"))
.build()))
.clientCertificates(List.of(ClientCertificateProperty.builder()
.name("name")
.origins(List.of("origins"))
.secretArn("secretArn")
.build()))
.documents(List.of(DocumentInfoProperty.builder()
.artifactId("artifactId")
.s3Location("s3Location")
.build()))
.endpoints(List.of(EndpointProperty.builder()
.uri("uri")
.build()))
.integratedRepositories(List.of(IntegratedRepositoryProperty.builder()
.integrationId("integrationId")
.providerResourceId("providerResourceId")
// the properties below are optional
.branch("branch")
.build()))
.sourceCode(List.of(SourceCodeRepositoryProperty.builder()
.s3Location("s3Location")
.build()))
.trustedCaCertificates(List.of(TrustedCaCertificateProperty.builder()
.source(CaCertificateSourceProperty.builder()
.artifactId("artifactId")
.inlinePem("inlinePem")
.s3Location("s3Location")
.build())
.build()))
.build())
.serviceRole("serviceRole")
// the properties below are optional
.ciCdConfiguration(CiCdConfigurationProperty.builder()
.enabled(false)
.build())
.cleanUpStrategy("cleanUpStrategy")
.codeRemediationStrategy("codeRemediationStrategy")
.disableManagedSkills(List.of("disableManagedSkills"))
.excludeRiskTypes(List.of("excludeRiskTypes"))
.logConfig(CloudWatchLogProperty.builder()
.logGroup("logGroup")
.logStream("logStream")
.build())
.maxTaskHours(123)
.networkTrafficConfig(NetworkTrafficConfigProperty.builder()
.customHeaders(List.of(CustomHeaderProperty.builder()
.name("name")
.value("value")
.build()))
.rules(List.of(NetworkTrafficRuleProperty.builder()
.effect("effect")
.networkTrafficRuleType("networkTrafficRuleType")
.pattern("pattern")
.build()))
.build())
.reportDestination(ReportDestinationProperty.builder()
.containerId("containerId")
.integrationId("integrationId")
// the properties below are optional
.documentId("documentId")
.parentId("parentId")
.build())
.reportFilters(ReportFiltersProperty.builder()
.annotationNotes(false)
.complianceReport(false)
.confidenceLevels(List.of("confidenceLevels"))
.findingTypes(List.of("findingTypes"))
.riskLevels(List.of("riskLevels"))
.riskTypes(List.of("riskTypes"))
.statuses(List.of("statuses"))
.taskStatuses(List.of("taskStatuses"))
.build())
.testScope(TestScopeProperty.builder()
.type("type")
.build())
.title("title")
.vpcConfig(VpcConfigProperty.builder()
.securityGroupArns(List.of("securityGroupArns"))
.subnetArns(List.of("subnetArns"))
.vpcArn("vpcArn")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.SecurityAgent;
var cfnPentestProps = new CfnPentestProps {
AgentSpaceId = "agentSpaceId",
Assets = new AssetsProperty {
Actors = new [] { new ActorProperty {
Authentication = new AuthenticationProperty {
ProviderType = "providerType",
Value = "value"
},
Description = "description",
EnableEmailMfa = false,
Identifier = "identifier",
MfaForwardingAddress = "mfaForwardingAddress",
Uris = new [] { "uris" }
} },
ClientCertificates = new [] { new ClientCertificateProperty {
Name = "name",
Origins = new [] { "origins" },
SecretArn = "secretArn"
} },
Documents = new [] { new DocumentInfoProperty {
ArtifactId = "artifactId",
S3Location = "s3Location"
} },
Endpoints = new [] { new EndpointProperty {
Uri = "uri"
} },
IntegratedRepositories = new [] { new IntegratedRepositoryProperty {
IntegrationId = "integrationId",
ProviderResourceId = "providerResourceId",
// the properties below are optional
Branch = "branch"
} },
SourceCode = new [] { new SourceCodeRepositoryProperty {
S3Location = "s3Location"
} },
TrustedCaCertificates = new [] { new TrustedCaCertificateProperty {
Source = new CaCertificateSourceProperty {
ArtifactId = "artifactId",
InlinePem = "inlinePem",
S3Location = "s3Location"
}
} }
},
ServiceRole = "serviceRole",
// the properties below are optional
CiCdConfiguration = new CiCdConfigurationProperty {
Enabled = false
},
CleanUpStrategy = "cleanUpStrategy",
CodeRemediationStrategy = "codeRemediationStrategy",
DisableManagedSkills = new [] { "disableManagedSkills" },
ExcludeRiskTypes = new [] { "excludeRiskTypes" },
LogConfig = new CloudWatchLogProperty {
LogGroup = "logGroup",
LogStream = "logStream"
},
MaxTaskHours = 123,
NetworkTrafficConfig = new NetworkTrafficConfigProperty {
CustomHeaders = new [] { new CustomHeaderProperty {
Name = "name",
Value = "value"
} },
Rules = new [] { new NetworkTrafficRuleProperty {
Effect = "effect",
NetworkTrafficRuleType = "networkTrafficRuleType",
Pattern = "pattern"
} }
},
ReportDestination = new ReportDestinationProperty {
ContainerId = "containerId",
IntegrationId = "integrationId",
// the properties below are optional
DocumentId = "documentId",
ParentId = "parentId"
},
ReportFilters = new ReportFiltersProperty {
AnnotationNotes = false,
ComplianceReport = false,
ConfidenceLevels = new [] { "confidenceLevels" },
FindingTypes = new [] { "findingTypes" },
RiskLevels = new [] { "riskLevels" },
RiskTypes = new [] { "riskTypes" },
Statuses = new [] { "statuses" },
TaskStatuses = new [] { "taskStatuses" }
},
TestScope = new TestScopeProperty {
Type = "type"
},
Title = "title",
VpcConfig = new VpcConfigProperty {
SecurityGroupArns = new [] { "securityGroupArns" },
SubnetArns = new [] { "subnetArns" },
VpcArn = "vpcArn"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnPentestProps := &CfnPentestProps{
AgentSpaceId: jsii.String("agentSpaceId"),
Assets: &AssetsProperty{
Actors: []interface{}{
&ActorProperty{
Authentication: &AuthenticationProperty{
ProviderType: jsii.String("providerType"),
Value: jsii.String("value"),
},
Description: jsii.String("description"),
EnableEmailMfa: jsii.Boolean(false),
Identifier: jsii.String("identifier"),
MfaForwardingAddress: jsii.String("mfaForwardingAddress"),
Uris: []*string{
jsii.String("uris"),
},
},
},
ClientCertificates: []interface{}{
&ClientCertificateProperty{
Name: jsii.String("name"),
Origins: []*string{
jsii.String("origins"),
},
SecretArn: jsii.String("secretArn"),
},
},
Documents: []interface{}{
&DocumentInfoProperty{
ArtifactId: jsii.String("artifactId"),
S3Location: jsii.String("s3Location"),
},
},
Endpoints: []interface{}{
&EndpointProperty{
Uri: jsii.String("uri"),
},
},
IntegratedRepositories: []interface{}{
&IntegratedRepositoryProperty{
IntegrationId: jsii.String("integrationId"),
ProviderResourceId: jsii.String("providerResourceId"),
// the properties below are optional
Branch: jsii.String("branch"),
},
},
SourceCode: []interface{}{
&SourceCodeRepositoryProperty{
S3Location: jsii.String("s3Location"),
},
},
TrustedCaCertificates: []interface{}{
&TrustedCaCertificateProperty{
Source: &CaCertificateSourceProperty{
ArtifactId: jsii.String("artifactId"),
InlinePem: jsii.String("inlinePem"),
S3Location: jsii.String("s3Location"),
},
},
},
},
ServiceRole: jsii.String("serviceRole"),
// the properties below are optional
CiCdConfiguration: &CiCdConfigurationProperty{
Enabled: jsii.Boolean(false),
},
CleanUpStrategy: jsii.String("cleanUpStrategy"),
CodeRemediationStrategy: jsii.String("codeRemediationStrategy"),
DisableManagedSkills: []*string{
jsii.String("disableManagedSkills"),
},
ExcludeRiskTypes: []*string{
jsii.String("excludeRiskTypes"),
},
LogConfig: &CloudWatchLogProperty{
LogGroup: jsii.String("logGroup"),
LogStream: jsii.String("logStream"),
},
MaxTaskHours: jsii.Number(123),
NetworkTrafficConfig: &NetworkTrafficConfigProperty{
CustomHeaders: []interface{}{
&CustomHeaderProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
Rules: []interface{}{
&NetworkTrafficRuleProperty{
Effect: jsii.String("effect"),
NetworkTrafficRuleType: jsii.String("networkTrafficRuleType"),
Pattern: jsii.String("pattern"),
},
},
},
ReportDestination: &ReportDestinationProperty{
ContainerId: jsii.String("containerId"),
IntegrationId: jsii.String("integrationId"),
// the properties below are optional
DocumentId: jsii.String("documentId"),
ParentId: jsii.String("parentId"),
},
ReportFilters: &ReportFiltersProperty{
AnnotationNotes: jsii.Boolean(false),
ComplianceReport: jsii.Boolean(false),
ConfidenceLevels: []*string{
jsii.String("confidenceLevels"),
},
FindingTypes: []*string{
jsii.String("findingTypes"),
},
RiskLevels: []*string{
jsii.String("riskLevels"),
},
RiskTypes: []*string{
jsii.String("riskTypes"),
},
Statuses: []*string{
jsii.String("statuses"),
},
TaskStatuses: []*string{
jsii.String("taskStatuses"),
},
},
TestScope: &TestScopeProperty{
Type: jsii.String("type"),
},
Title: jsii.String("title"),
VpcConfig: &VpcConfigProperty{
SecurityGroupArns: []*string{
jsii.String("securityGroupArns"),
},
SubnetArns: []*string{
jsii.String("subnetArns"),
},
VpcArn: jsii.String("vpcArn"),
},
}
Properties
agentSpaceIdstringagent_space_idstragentSpaceIdStringAgentSpaceIdstringAgentSpaceId*string required #Identifier of agent space where the pentest should be created.
assetsIResolvable | CfnPentest.AssetsPropertyassetstyping.Union[IResolvable, AssetsProperty]assetsIResolvableAssetsIResolvableAssetsinterface{} required #Collection of assets to be tested during the pentest.
ciCdConfigurationoptionalIResolvable | CfnPentest.ci_cd_configurationoptionaltyping.Union[IResolvable, CiCdConfigurationProperty]ciCdConfigurationoptionalIResolvableCiCdConfigurationoptionalIResolvableCiCdConfigurationoptionalinterface{} #Configuration for running pentests automatically from a CI/CD pipeline.
cleanUpStrategyoptionalstringclean_up_strategyoptionalstrcleanUpStrategyoptionalStringCleanUpStrategyoptionalstringCleanUpStrategyoptional*string #Strategy for cleaning up resources after pentest job completion.
codeRemediationStrategyoptionalstringcode_remediation_strategyoptionalstrcodeRemediationStrategyoptionalStringCodeRemediationStrategyoptionalstringCodeRemediationStrategyoptional*string #Strategy for remediating code vulnerabilities discovered during the pentest.
disableManagedSkillsoptionalstring[]disable_managed_skillsoptionaltyping.List[str]disableManagedSkillsoptionalList<String>DisableManagedSkillsoptionalstring[]DisableManagedSkillsoptional*[]*string #A list of managed skills to disable for this pentest.
excludeRiskTypesoptionalstring[]exclude_risk_typesoptionaltyping.List[str]excludeRiskTypesoptionalList<String>ExcludeRiskTypesoptionalstring[]ExcludeRiskTypesoptional*[]*string #A list of risk types excluded from the pentest execution.
logConfigoptionalIResolvable | CfnPentest.CloudWatchLogPropertylog_configoptionaltyping.Union[IResolvable, CloudWatchLogProperty]logConfigoptionalIResolvableLogConfigoptionalIResolvableLogConfigoptionalinterface{} #CloudWatch Logs configuration for pentest output.
maxTaskHoursoptionalnumbermax_task_hoursoptionalint | floatmaxTaskHoursoptionalNumberMaxTaskHoursoptionaldoubleMaxTaskHoursoptional*float64 #The maximum number of billable task hours allowed for jobs started from this pentest.
If not set, jobs run to completion with no budget cap.
networkTrafficConfigoptionalIResolvable | CfnPentest.network_traffic_configoptionaltyping.Union[IResolvable, NetworkTrafficConfigProperty]networkTrafficConfigoptionalIResolvableNetworkTrafficConfigoptionalIResolvableNetworkTrafficConfigoptionalinterface{} #Network traffic configuration for the pentest.
reportDestinationoptionalIResolvable | CfnPentest.report_destinationoptionaltyping.Union[IResolvable, ReportDestinationProperty]reportDestinationoptionalIResolvableReportDestinationoptionalIResolvableReportDestinationoptionalinterface{} #Destination for publishing a scan report to Confluence.
reportFiltersoptionalIResolvable | CfnPentest.ReportFiltersPropertyreport_filtersoptionaltyping.Union[IResolvable, ReportFiltersProperty]reportFiltersoptionalIResolvableReportFiltersoptionalIResolvableReportFiltersoptionalinterface{} #Filters applied when a scan report is published to Confluence.
Service role for accessing resources.
testScopeoptionalIResolvable | CfnPentest.TestScopePropertytest_scopeoptionaltyping.Union[IResolvable, TestScopeProperty]testScopeoptionalIResolvableTestScopeoptionalIResolvableTestScopeoptionalinterface{} #Scope of the target under test, determining which classes of risk are assessed.
Title of the penetration test.
vpcConfigoptionalIResolvable | CfnPentest.VpcConfigPropertyvpc_configoptionaltyping.Union[IResolvable, VpcConfigProperty]vpcConfigoptionalIResolvableVpcConfigoptionalIResolvableVpcConfigoptionalinterface{} #VPC configuration that the pentest agent accesses.