2026/11/12 - AWS Security Agent - 2 updated api methods
Changes Adds support for cleanup strategy in CreatePentestInput and UpdatePentestInput.
{'cleanUpStrategy': 'BEST_EFFORT_DELETE | RETAIN_ALL'}
Creates a new pentest configuration in an agent space. A pentest defines the security test parameters, including target assets, risk type exclusions, and logging configuration.
See also: AWS API Documentation
Request Syntax
client.create_pentest(
title='string',
agentSpaceId='string',
assets={
'endpoints': [
{
'uri': 'string'
},
],
'actors': [
{
'identifier': 'string',
'uris': [
'string',
],
'authentication': {
'providerType': 'SECRETS_MANAGER'|'AWS_LAMBDA'|'AWS_IAM_ROLE'|'AWS_INTERNAL',
'value': 'string'
},
'description': 'string',
'enableEmailMfa': True|False,
'mfaForwardingAddress': 'string'
},
],
'documents': [
{
's3Location': 'string',
'artifactId': 'string',
'integratedDocument': {
'integrationId': 'string',
'resourceId': 'string'
}
},
],
'sourceCode': [
{
's3Location': 'string'
},
],
'integratedRepositories': [
{
'integrationId': 'string',
'providerResourceId': 'string',
'branch': 'string'
},
],
'trustedCaCertificates': [
{
'source': {
'inlinePem': 'string',
'artifactId': 'string',
's3Location': 'string'
}
},
],
'clientCertificates': [
{
'name': 'string',
'secretArn': 'string',
'origins': [
'string',
]
},
]
},
excludeRiskTypes=[
'CROSS_SITE_SCRIPTING'|'DEFAULT_CREDENTIALS'|'INSECURE_DIRECT_OBJECT_REFERENCE'|'PRIVILEGE_ESCALATION'|'SERVER_SIDE_TEMPLATE_INJECTION'|'COMMAND_INJECTION'|'CODE_INJECTION'|'SQL_INJECTION'|'ARBITRARY_FILE_UPLOAD'|'INSECURE_DESERIALIZATION'|'LOCAL_FILE_INCLUSION'|'INFORMATION_DISCLOSURE'|'PATH_TRAVERSAL'|'SERVER_SIDE_REQUEST_FORGERY'|'JSON_WEB_TOKEN_VULNERABILITIES'|'XML_EXTERNAL_ENTITY'|'FILE_DELETION'|'OTHER'|'GRAPHQL_VULNERABILITIES'|'BUSINESS_LOGIC_VULNERABILITIES'|'CRYPTOGRAPHIC_VULNERABILITIES'|'DENIAL_OF_SERVICE'|'FILE_ACCESS'|'FILE_CREATION'|'DATABASE_MODIFICATION'|'DATABASE_ACCESS'|'OUTBOUND_SERVICE_REQUEST'|'UNKNOWN',
],
serviceRole='string',
logConfig={
'logGroup': 'string',
'logStream': 'string'
},
vpcConfig={
'vpcArn': 'string',
'securityGroupArns': [
'string',
],
'subnetArns': [
'string',
]
},
networkTrafficConfig={
'rules': [
{
'effect': 'ALLOW'|'DENY',
'pattern': 'string',
'networkTrafficRuleType': 'URL'
},
],
'customHeaders': [
{
'name': 'string',
'value': 'string'
},
]
},
codeRemediationStrategy='AUTOMATIC'|'DISABLED',
cleanUpStrategy='BEST_EFFORT_DELETE'|'RETAIN_ALL',
disableManagedSkills=[
'FINDING_PERSONALIZATION'|'LOGIN_OPTIMIZATION',
],
maxTaskHours=123.0,
reportDestination={
'integrationId': 'string',
'containerId': 'string',
'parentId': 'string',
'documentId': 'string'
},
reportFilters={
'riskLevels': [
'UNKNOWN'|'INFORMATIONAL'|'LOW'|'MEDIUM'|'HIGH'|'CRITICAL',
],
'confidenceLevels': [
'FALSE_POSITIVE'|'UNCONFIRMED'|'LOW'|'MEDIUM'|'HIGH',
],
'statuses': [
'ACTIVE'|'RESOLVED'|'ACCEPTED'|'FALSE_POSITIVE',
],
'riskTypes': [
'CROSS_SITE_SCRIPTING'|'DEFAULT_CREDENTIALS'|'INSECURE_DIRECT_OBJECT_REFERENCE'|'PRIVILEGE_ESCALATION'|'SERVER_SIDE_TEMPLATE_INJECTION'|'COMMAND_INJECTION'|'CODE_INJECTION'|'SQL_INJECTION'|'ARBITRARY_FILE_UPLOAD'|'INSECURE_DESERIALIZATION'|'LOCAL_FILE_INCLUSION'|'INFORMATION_DISCLOSURE'|'PATH_TRAVERSAL'|'SERVER_SIDE_REQUEST_FORGERY'|'JSON_WEB_TOKEN_VULNERABILITIES'|'XML_EXTERNAL_ENTITY'|'FILE_DELETION'|'OTHER'|'GRAPHQL_VULNERABILITIES'|'BUSINESS_LOGIC_VULNERABILITIES'|'CRYPTOGRAPHIC_VULNERABILITIES'|'DENIAL_OF_SERVICE'|'FILE_ACCESS'|'FILE_CREATION'|'DATABASE_MODIFICATION'|'DATABASE_ACCESS'|'OUTBOUND_SERVICE_REQUEST'|'UNKNOWN',
],
'findingTypes': [
'string',
],
'taskStatuses': [
'IN_PROGRESS'|'ABORTED'|'COMPLETED'|'INTERNAL_ERROR'|'FAILED',
],
'annotationNotes': True|False,
'complianceReport': True|False
},
cicdConfiguration={
'enabled': True|False
},
testScope={
'type': 'WEB_APP'|'GENERATIVE_AI_APP'
}
)
string
[REQUIRED]
The title of the pentest.
string
[REQUIRED]
The unique identifier of the agent space to create the pentest in.
dict
The assets to include in the pentest, such as endpoints, actors, documents, and source code.
endpoints (list) --
The list of endpoints to test during the pentest.
(dict) --
Represents a target endpoint for penetration testing.
uri (string) --
The URI of the endpoint.
actors (list) --
The list of actors used during penetration testing.
(dict) --
Represents an actor used during penetration testing. An actor defines a user or entity that interacts with the target application, including authentication credentials and target URIs.
identifier (string) --
The unique identifier for the actor.
uris (list) --
The list of URIs that the actor targets during testing.
(string) --
authentication (dict) --
The authentication configuration for the actor.
providerType (string) --
The type of authentication provider. Valid values include SECRETS_MANAGER, AWS_LAMBDA, AWS_IAM_ROLE, and AWS_INTERNAL.
value (string) --
The authentication value, such as a secret ARN, Lambda function ARN, or IAM role ARN, depending on the provider type.
description (string) --
A description of the actor.
enableEmailMfa (boolean) --
Whether email-based MFA is enabled for this actor.
mfaForwardingAddress (string) --
Server-generated email forwarding address for receiving MFA codes.
documents (list) --
The list of documents that provide context for the pentest.
(dict) --
Represents a document that provides context for security testing.
s3Location (string) --
The Amazon S3 location of the document.
artifactId (string) --
The unique identifier of the artifact associated with the document.
integratedDocument (dict) --
A reference to a document in an integrated third-party provider.
integrationId (string) -- [REQUIRED]
The identifier of the integration that provides access to the document.
resourceId (string) -- [REQUIRED]
The provider-specific resource identifier for the document.
sourceCode (list) --
The list of source code repositories to analyze during the pentest.
(dict) --
Represents a source code repository used for security analysis during a pentest.
s3Location (string) --
The Amazon S3 location of the source code repository archive.
integratedRepositories (list) --
The list of integrated repositories associated with the pentest.
(dict) --
Represents a code repository that is integrated with the service through a third-party provider.
integrationId (string) -- [REQUIRED]
The unique identifier of the integration that provides access to the repository.
providerResourceId (string) -- [REQUIRED]
The provider-specific resource identifier for the repository.
branch (string) --
An optional override for the repository branch.
trustedCaCertificates (list) --
The trust anchors used to validate target endpoint TLS certificates. Provide these for endpoints served by a private or internal certificate authority (CA), an intermediate CA, or a self-signed certificate.
(dict) --
A trust anchor used when validating a target endpoint's TLS certificate.
source (dict) -- [REQUIRED]
The source that Security Agent reads the certificate from.
inlinePem (string) --
A PEM-encoded X.509 certificate supplied inline.
artifactId (string) --
The artifact ID of an uploaded certificate file.
s3Location (string) --
The Amazon S3 location URI of a customer-staged certificate.
clientCertificates (list) --
The client certificates for mutual TLS (mTLS) authentication to target hosts. Each certificate is stored in Secrets Manager and scoped to specific target origins.
(dict) --
A client certificate for mutual TLS (mTLS) authentication to target hosts.
name (string) -- [REQUIRED]
A customer-chosen name for this client certificate, used in error messages and console display.
secretArn (string) -- [REQUIRED]
The ARN of the Secrets Manager secret containing the certificate and private key.
origins (list) -- [REQUIRED]
The origins (scheme://host[:port]) this certificate applies to. Paths are not supported. Each hostname can have at most one client certificate.
(string) --
list
The list of risk types to exclude from the pentest.
(string) --
Type of security risk.
string
The IAM service role to use for the pentest.
dict
The CloudWatch Logs configuration for the pentest.
logGroup (string) --
The name of the CloudWatch log group.
logStream (string) --
The name of the CloudWatch log stream.
dict
The VPC configuration for the pentest.
vpcArn (string) --
The Amazon Resource Name (ARN) or ID of the VPC.
securityGroupArns (list) --
The Amazon Resource Names (ARNs) or IDs of the security groups for the VPC configuration.
(string) --
ARN or ID of a security group.
subnetArns (list) --
The Amazon Resource Names (ARNs) or IDs of the subnets for the VPC configuration.
(string) --
ARN or ID of a subnet.
dict
The network traffic configuration for the pentest, including custom headers and traffic rules.
rules (list) --
The list of network traffic rules that control which URLs are allowed or denied during testing.
(dict) --
A rule that controls network traffic during penetration testing by allowing or denying traffic to specific URL patterns.
effect (string) --
The effect of the rule. Valid values are ALLOW and DENY.
pattern (string) --
The URL pattern to match for the rule.
networkTrafficRuleType (string) --
The type of the network traffic rule. Currently, only URL is supported.
customHeaders (list) --
The list of custom HTTP headers to include in network traffic during testing.
(dict) --
A custom HTTP header to include in network traffic during penetration testing.
name (string) --
The name of the custom header.
value (string) --
The value of the custom header.
string
The code remediation strategy for the pentest. Valid values are AUTOMATIC and DISABLED.
string
The strategy for cleaning up resources after pentest job completion. Valid values are BEST_EFFORT_DELETE and RETAIN_ALL.
list
A list of managed skills to disable for this pentest. Valid values include FINDING_PERSONALIZATION and LOGIN_OPTIMIZATION.
(string) --
Type of managed skill that can be enabled or disabled for a pentest.
float
The maximum number of billable task hours allowed for jobs started from this pentest. Must be a positive number. If not set, jobs run to completion with no budget cap.
dict
The destination for publishing scan reports to an integrated document provider.
integrationId (string) -- [REQUIRED]
The integration identifier for the document provider.
containerId (string) -- [REQUIRED]
The container identifier where the report will be published.
parentId (string) --
The parent document identifier under which the report will be created.
documentId (string) --
The existing document identifier to update instead of creating a new document.
dict
The report-generation filters applied when the report is exported.
riskLevels (list) --
The severity levels to include in the report.
(string) --
Risk severity level.
confidenceLevels (list) --
The confidence levels to include in the report.
(string) --
Finding confidence level.
statuses (list) --
The finding statuses to include in the report.
(string) --
Finding status.
riskTypes (list) --
The risk types to include in the report.
(string) --
Type of security risk.
findingTypes (list) --
The finding types to include in the report.
(string) --
A single report-filter value for one filter dimension.
taskStatuses (list) --
The task execution statuses to include in the report's task table.
(string) --
Execution status of a task.
annotationNotes (boolean) --
Whether to include reviewer annotation notes under each finding.
complianceReport (boolean) --
Whether to include the compliance-ready report additions.
dict
The CI/CD pentesting configuration to apply to the pentest.
enabled (boolean) --
Whether CI/CD pentesting is enabled for this pentest.
dict
The category of application a pentest targets.
type (string) -- [REQUIRED]
The category of application under test.
dict
Response Syntax
{
'pentestId': 'string',
'title': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'assets': {
'endpoints': [
{
'uri': 'string'
},
],
'actors': [
{
'identifier': 'string',
'uris': [
'string',
],
'authentication': {
'providerType': 'SECRETS_MANAGER'|'AWS_LAMBDA'|'AWS_IAM_ROLE'|'AWS_INTERNAL',
'value': 'string'
},
'description': 'string',
'enableEmailMfa': True|False,
'mfaForwardingAddress': 'string'
},
],
'documents': [
{
's3Location': 'string',
'artifactId': 'string',
'integratedDocument': {
'integrationId': 'string',
'resourceId': 'string'
}
},
],
'sourceCode': [
{
's3Location': 'string'
},
],
'integratedRepositories': [
{
'integrationId': 'string',
'providerResourceId': 'string',
'branch': 'string'
},
],
'trustedCaCertificates': [
{
'source': {
'inlinePem': 'string',
'artifactId': 'string',
's3Location': 'string'
}
},
],
'clientCertificates': [
{
'name': 'string',
'secretArn': 'string',
'origins': [
'string',
]
},
]
},
'excludeRiskTypes': [
'CROSS_SITE_SCRIPTING'|'DEFAULT_CREDENTIALS'|'INSECURE_DIRECT_OBJECT_REFERENCE'|'PRIVILEGE_ESCALATION'|'SERVER_SIDE_TEMPLATE_INJECTION'|'COMMAND_INJECTION'|'CODE_INJECTION'|'SQL_INJECTION'|'ARBITRARY_FILE_UPLOAD'|'INSECURE_DESERIALIZATION'|'LOCAL_FILE_INCLUSION'|'INFORMATION_DISCLOSURE'|'PATH_TRAVERSAL'|'SERVER_SIDE_REQUEST_FORGERY'|'JSON_WEB_TOKEN_VULNERABILITIES'|'XML_EXTERNAL_ENTITY'|'FILE_DELETION'|'OTHER'|'GRAPHQL_VULNERABILITIES'|'BUSINESS_LOGIC_VULNERABILITIES'|'CRYPTOGRAPHIC_VULNERABILITIES'|'DENIAL_OF_SERVICE'|'FILE_ACCESS'|'FILE_CREATION'|'DATABASE_MODIFICATION'|'DATABASE_ACCESS'|'OUTBOUND_SERVICE_REQUEST'|'UNKNOWN',
],
'serviceRole': 'string',
'logConfig': {
'logGroup': 'string',
'logStream': 'string'
},
'agentSpaceId': 'string',
'reportDestination': {
'integrationId': 'string',
'containerId': 'string',
'parentId': 'string',
'documentId': 'string'
},
'reportFilters': {
'riskLevels': [
'UNKNOWN'|'INFORMATIONAL'|'LOW'|'MEDIUM'|'HIGH'|'CRITICAL',
],
'confidenceLevels': [
'FALSE_POSITIVE'|'UNCONFIRMED'|'LOW'|'MEDIUM'|'HIGH',
],
'statuses': [
'ACTIVE'|'RESOLVED'|'ACCEPTED'|'FALSE_POSITIVE',
],
'riskTypes': [
'CROSS_SITE_SCRIPTING'|'DEFAULT_CREDENTIALS'|'INSECURE_DIRECT_OBJECT_REFERENCE'|'PRIVILEGE_ESCALATION'|'SERVER_SIDE_TEMPLATE_INJECTION'|'COMMAND_INJECTION'|'CODE_INJECTION'|'SQL_INJECTION'|'ARBITRARY_FILE_UPLOAD'|'INSECURE_DESERIALIZATION'|'LOCAL_FILE_INCLUSION'|'INFORMATION_DISCLOSURE'|'PATH_TRAVERSAL'|'SERVER_SIDE_REQUEST_FORGERY'|'JSON_WEB_TOKEN_VULNERABILITIES'|'XML_EXTERNAL_ENTITY'|'FILE_DELETION'|'OTHER'|'GRAPHQL_VULNERABILITIES'|'BUSINESS_LOGIC_VULNERABILITIES'|'CRYPTOGRAPHIC_VULNERABILITIES'|'DENIAL_OF_SERVICE'|'FILE_ACCESS'|'FILE_CREATION'|'DATABASE_MODIFICATION'|'DATABASE_ACCESS'|'OUTBOUND_SERVICE_REQUEST'|'UNKNOWN',
],
'findingTypes': [
'string',
],
'taskStatuses': [
'IN_PROGRESS'|'ABORTED'|'COMPLETED'|'INTERNAL_ERROR'|'FAILED',
],
'annotationNotes': True|False,
'complianceReport': True|False
},
'cicdConfiguration': {
'enabled': True|False
},
'testScope': {
'type': 'WEB_APP'|'GENERATIVE_AI_APP'
}
}
Response Structure
(dict) --
Output for the CreatePentest operation.
pentestId (string) --
The unique identifier of the created pentest.
title (string) --
The title of the pentest.
createdAt (datetime) --
The date and time the pentest was created, in UTC format.
updatedAt (datetime) --
The date and time the pentest was last updated, in UTC format.
assets (dict) --
The assets included in the pentest.
endpoints (list) --
The list of endpoints to test during the pentest.
(dict) --
Represents a target endpoint for penetration testing.
uri (string) --
The URI of the endpoint.
actors (list) --
The list of actors used during penetration testing.
(dict) --
Represents an actor used during penetration testing. An actor defines a user or entity that interacts with the target application, including authentication credentials and target URIs.
identifier (string) --
The unique identifier for the actor.
uris (list) --
The list of URIs that the actor targets during testing.
(string) --
authentication (dict) --
The authentication configuration for the actor.
providerType (string) --
The type of authentication provider. Valid values include SECRETS_MANAGER, AWS_LAMBDA, AWS_IAM_ROLE, and AWS_INTERNAL.
value (string) --
The authentication value, such as a secret ARN, Lambda function ARN, or IAM role ARN, depending on the provider type.
description (string) --
A description of the actor.
enableEmailMfa (boolean) --
Whether email-based MFA is enabled for this actor.
mfaForwardingAddress (string) --
Server-generated email forwarding address for receiving MFA codes.
documents (list) --
The list of documents that provide context for the pentest.
(dict) --
Represents a document that provides context for security testing.
s3Location (string) --
The Amazon S3 location of the document.
artifactId (string) --
The unique identifier of the artifact associated with the document.
integratedDocument (dict) --
A reference to a document in an integrated third-party provider.
integrationId (string) --
The identifier of the integration that provides access to the document.
resourceId (string) --
The provider-specific resource identifier for the document.
sourceCode (list) --
The list of source code repositories to analyze during the pentest.
(dict) --
Represents a source code repository used for security analysis during a pentest.
s3Location (string) --
The Amazon S3 location of the source code repository archive.
integratedRepositories (list) --
The list of integrated repositories associated with the pentest.
(dict) --
Represents a code repository that is integrated with the service through a third-party provider.
integrationId (string) --
The unique identifier of the integration that provides access to the repository.
providerResourceId (string) --
The provider-specific resource identifier for the repository.
branch (string) --
An optional override for the repository branch.
trustedCaCertificates (list) --
The trust anchors used to validate target endpoint TLS certificates. Provide these for endpoints served by a private or internal certificate authority (CA), an intermediate CA, or a self-signed certificate.
(dict) --
A trust anchor used when validating a target endpoint's TLS certificate.
source (dict) --
The source that Security Agent reads the certificate from.
inlinePem (string) --
A PEM-encoded X.509 certificate supplied inline.
artifactId (string) --
The artifact ID of an uploaded certificate file.
s3Location (string) --
The Amazon S3 location URI of a customer-staged certificate.
clientCertificates (list) --
The client certificates for mutual TLS (mTLS) authentication to target hosts. Each certificate is stored in Secrets Manager and scoped to specific target origins.
(dict) --
A client certificate for mutual TLS (mTLS) authentication to target hosts.
name (string) --
A customer-chosen name for this client certificate, used in error messages and console display.
secretArn (string) --
The ARN of the Secrets Manager secret containing the certificate and private key.
origins (list) --
The origins (scheme://host[:port]) this certificate applies to. Paths are not supported. Each hostname can have at most one client certificate.
(string) --
excludeRiskTypes (list) --
The list of risk types excluded from the pentest.
(string) --
Type of security risk.
serviceRole (string) --
The IAM service role used for the pentest.
logConfig (dict) --
The CloudWatch Logs configuration for the pentest.
logGroup (string) --
The name of the CloudWatch log group.
logStream (string) --
The name of the CloudWatch log stream.
agentSpaceId (string) --
The unique identifier of the agent space that contains the pentest.
reportDestination (dict) --
The destination for publishing scan reports to an integrated document provider.
integrationId (string) --
The integration identifier for the document provider.
containerId (string) --
The container identifier where the report will be published.
parentId (string) --
The parent document identifier under which the report will be created.
documentId (string) --
The existing document identifier to update instead of creating a new document.
reportFilters (dict) --
The report-generation filters applied when the report is exported.
riskLevels (list) --
The severity levels to include in the report.
(string) --
Risk severity level.
confidenceLevels (list) --
The confidence levels to include in the report.
(string) --
Finding confidence level.
statuses (list) --
The finding statuses to include in the report.
(string) --
Finding status.
riskTypes (list) --
The risk types to include in the report.
(string) --
Type of security risk.
findingTypes (list) --
The finding types to include in the report.
(string) --
A single report-filter value for one filter dimension.
taskStatuses (list) --
The task execution statuses to include in the report's task table.
(string) --
Execution status of a task.
annotationNotes (boolean) --
Whether to include reviewer annotation notes under each finding.
complianceReport (boolean) --
Whether to include the compliance-ready report additions.
cicdConfiguration (dict) --
The CI/CD pentesting configuration applied to the pentest.
enabled (boolean) --
Whether CI/CD pentesting is enabled for this pentest.
testScope (dict) --
The category of application a pentest targets.
type (string) --
The category of application under test.
{'cleanUpStrategy': 'BEST_EFFORT_DELETE | RETAIN_ALL'}
Updates an existing pentest configuration.
See also: AWS API Documentation
Request Syntax
client.update_pentest(
pentestId='string',
agentSpaceId='string',
title='string',
assets={
'endpoints': [
{
'uri': 'string'
},
],
'actors': [
{
'identifier': 'string',
'uris': [
'string',
],
'authentication': {
'providerType': 'SECRETS_MANAGER'|'AWS_LAMBDA'|'AWS_IAM_ROLE'|'AWS_INTERNAL',
'value': 'string'
},
'description': 'string',
'enableEmailMfa': True|False,
'mfaForwardingAddress': 'string'
},
],
'documents': [
{
's3Location': 'string',
'artifactId': 'string',
'integratedDocument': {
'integrationId': 'string',
'resourceId': 'string'
}
},
],
'sourceCode': [
{
's3Location': 'string'
},
],
'integratedRepositories': [
{
'integrationId': 'string',
'providerResourceId': 'string',
'branch': 'string'
},
],
'trustedCaCertificates': [
{
'source': {
'inlinePem': 'string',
'artifactId': 'string',
's3Location': 'string'
}
},
],
'clientCertificates': [
{
'name': 'string',
'secretArn': 'string',
'origins': [
'string',
]
},
]
},
excludeRiskTypes=[
'CROSS_SITE_SCRIPTING'|'DEFAULT_CREDENTIALS'|'INSECURE_DIRECT_OBJECT_REFERENCE'|'PRIVILEGE_ESCALATION'|'SERVER_SIDE_TEMPLATE_INJECTION'|'COMMAND_INJECTION'|'CODE_INJECTION'|'SQL_INJECTION'|'ARBITRARY_FILE_UPLOAD'|'INSECURE_DESERIALIZATION'|'LOCAL_FILE_INCLUSION'|'INFORMATION_DISCLOSURE'|'PATH_TRAVERSAL'|'SERVER_SIDE_REQUEST_FORGERY'|'JSON_WEB_TOKEN_VULNERABILITIES'|'XML_EXTERNAL_ENTITY'|'FILE_DELETION'|'OTHER'|'GRAPHQL_VULNERABILITIES'|'BUSINESS_LOGIC_VULNERABILITIES'|'CRYPTOGRAPHIC_VULNERABILITIES'|'DENIAL_OF_SERVICE'|'FILE_ACCESS'|'FILE_CREATION'|'DATABASE_MODIFICATION'|'DATABASE_ACCESS'|'OUTBOUND_SERVICE_REQUEST'|'UNKNOWN',
],
serviceRole='string',
logConfig={
'logGroup': 'string',
'logStream': 'string'
},
vpcConfig={
'vpcArn': 'string',
'securityGroupArns': [
'string',
],
'subnetArns': [
'string',
]
},
networkTrafficConfig={
'rules': [
{
'effect': 'ALLOW'|'DENY',
'pattern': 'string',
'networkTrafficRuleType': 'URL'
},
],
'customHeaders': [
{
'name': 'string',
'value': 'string'
},
]
},
codeRemediationStrategy='AUTOMATIC'|'DISABLED',
cleanUpStrategy='BEST_EFFORT_DELETE'|'RETAIN_ALL',
disableManagedSkills=[
'FINDING_PERSONALIZATION'|'LOGIN_OPTIMIZATION',
],
maxTaskHours=123.0,
reportDestination={
'integrationId': 'string',
'containerId': 'string',
'parentId': 'string',
'documentId': 'string'
},
reportFilters={
'riskLevels': [
'UNKNOWN'|'INFORMATIONAL'|'LOW'|'MEDIUM'|'HIGH'|'CRITICAL',
],
'confidenceLevels': [
'FALSE_POSITIVE'|'UNCONFIRMED'|'LOW'|'MEDIUM'|'HIGH',
],
'statuses': [
'ACTIVE'|'RESOLVED'|'ACCEPTED'|'FALSE_POSITIVE',
],
'riskTypes': [
'CROSS_SITE_SCRIPTING'|'DEFAULT_CREDENTIALS'|'INSECURE_DIRECT_OBJECT_REFERENCE'|'PRIVILEGE_ESCALATION'|'SERVER_SIDE_TEMPLATE_INJECTION'|'COMMAND_INJECTION'|'CODE_INJECTION'|'SQL_INJECTION'|'ARBITRARY_FILE_UPLOAD'|'INSECURE_DESERIALIZATION'|'LOCAL_FILE_INCLUSION'|'INFORMATION_DISCLOSURE'|'PATH_TRAVERSAL'|'SERVER_SIDE_REQUEST_FORGERY'|'JSON_WEB_TOKEN_VULNERABILITIES'|'XML_EXTERNAL_ENTITY'|'FILE_DELETION'|'OTHER'|'GRAPHQL_VULNERABILITIES'|'BUSINESS_LOGIC_VULNERABILITIES'|'CRYPTOGRAPHIC_VULNERABILITIES'|'DENIAL_OF_SERVICE'|'FILE_ACCESS'|'FILE_CREATION'|'DATABASE_MODIFICATION'|'DATABASE_ACCESS'|'OUTBOUND_SERVICE_REQUEST'|'UNKNOWN',
],
'findingTypes': [
'string',
],
'taskStatuses': [
'IN_PROGRESS'|'ABORTED'|'COMPLETED'|'INTERNAL_ERROR'|'FAILED',
],
'annotationNotes': True|False,
'complianceReport': True|False
},
cicdConfiguration={
'enabled': True|False
},
testScope={
'type': 'WEB_APP'|'GENERATIVE_AI_APP'
}
)
string
[REQUIRED]
The unique identifier of the pentest to update.
string
[REQUIRED]
The unique identifier of the agent space that contains the pentest.
string
The updated title of the pentest.
dict
The updated assets for the pentest.
endpoints (list) --
The list of endpoints to test during the pentest.
(dict) --
Represents a target endpoint for penetration testing.
uri (string) --
The URI of the endpoint.
actors (list) --
The list of actors used during penetration testing.
(dict) --
Represents an actor used during penetration testing. An actor defines a user or entity that interacts with the target application, including authentication credentials and target URIs.
identifier (string) --
The unique identifier for the actor.
uris (list) --
The list of URIs that the actor targets during testing.
(string) --
authentication (dict) --
The authentication configuration for the actor.
providerType (string) --
The type of authentication provider. Valid values include SECRETS_MANAGER, AWS_LAMBDA, AWS_IAM_ROLE, and AWS_INTERNAL.
value (string) --
The authentication value, such as a secret ARN, Lambda function ARN, or IAM role ARN, depending on the provider type.
description (string) --
A description of the actor.
enableEmailMfa (boolean) --
Whether email-based MFA is enabled for this actor.
mfaForwardingAddress (string) --
Server-generated email forwarding address for receiving MFA codes.
documents (list) --
The list of documents that provide context for the pentest.
(dict) --
Represents a document that provides context for security testing.
s3Location (string) --
The Amazon S3 location of the document.
artifactId (string) --
The unique identifier of the artifact associated with the document.
integratedDocument (dict) --
A reference to a document in an integrated third-party provider.
integrationId (string) -- [REQUIRED]
The identifier of the integration that provides access to the document.
resourceId (string) -- [REQUIRED]
The provider-specific resource identifier for the document.
sourceCode (list) --
The list of source code repositories to analyze during the pentest.
(dict) --
Represents a source code repository used for security analysis during a pentest.
s3Location (string) --
The Amazon S3 location of the source code repository archive.
integratedRepositories (list) --
The list of integrated repositories associated with the pentest.
(dict) --
Represents a code repository that is integrated with the service through a third-party provider.
integrationId (string) -- [REQUIRED]
The unique identifier of the integration that provides access to the repository.
providerResourceId (string) -- [REQUIRED]
The provider-specific resource identifier for the repository.
branch (string) --
An optional override for the repository branch.
trustedCaCertificates (list) --
The trust anchors used to validate target endpoint TLS certificates. Provide these for endpoints served by a private or internal certificate authority (CA), an intermediate CA, or a self-signed certificate.
(dict) --
A trust anchor used when validating a target endpoint's TLS certificate.
source (dict) -- [REQUIRED]
The source that Security Agent reads the certificate from.
inlinePem (string) --
A PEM-encoded X.509 certificate supplied inline.
artifactId (string) --
The artifact ID of an uploaded certificate file.
s3Location (string) --
The Amazon S3 location URI of a customer-staged certificate.
clientCertificates (list) --
The client certificates for mutual TLS (mTLS) authentication to target hosts. Each certificate is stored in Secrets Manager and scoped to specific target origins.
(dict) --
A client certificate for mutual TLS (mTLS) authentication to target hosts.
name (string) -- [REQUIRED]
A customer-chosen name for this client certificate, used in error messages and console display.
secretArn (string) -- [REQUIRED]
The ARN of the Secrets Manager secret containing the certificate and private key.
origins (list) -- [REQUIRED]
The origins (scheme://host[:port]) this certificate applies to. Paths are not supported. Each hostname can have at most one client certificate.
(string) --
list
The updated list of risk types to exclude from the pentest.
(string) --
Type of security risk.
string
The updated IAM service role for the pentest.
dict
The updated CloudWatch Logs configuration for the pentest.
logGroup (string) --
The name of the CloudWatch log group.
logStream (string) --
The name of the CloudWatch log stream.
dict
The updated VPC configuration for the pentest.
vpcArn (string) --
The Amazon Resource Name (ARN) or ID of the VPC.
securityGroupArns (list) --
The Amazon Resource Names (ARNs) or IDs of the security groups for the VPC configuration.
(string) --
ARN or ID of a security group.
subnetArns (list) --
The Amazon Resource Names (ARNs) or IDs of the subnets for the VPC configuration.
(string) --
ARN or ID of a subnet.
dict
The updated network traffic configuration for the pentest.
rules (list) --
The list of network traffic rules that control which URLs are allowed or denied during testing.
(dict) --
A rule that controls network traffic during penetration testing by allowing or denying traffic to specific URL patterns.
effect (string) --
The effect of the rule. Valid values are ALLOW and DENY.
pattern (string) --
The URL pattern to match for the rule.
networkTrafficRuleType (string) --
The type of the network traffic rule. Currently, only URL is supported.
customHeaders (list) --
The list of custom HTTP headers to include in network traffic during testing.
(dict) --
A custom HTTP header to include in network traffic during penetration testing.
name (string) --
The name of the custom header.
value (string) --
The value of the custom header.
string
The updated code remediation strategy for the pentest.
string
The updated strategy for cleaning up resources after pentest job completion.
list
The updated list of managed skills to disable for this pentest. Valid values include FINDING_PERSONALIZATION and LOGIN_OPTIMIZATION.
(string) --
Type of managed skill that can be enabled or disabled for a pentest.
float
The updated maximum number of billable task hours allowed for jobs started from this pentest.
dict
The destination for publishing scan reports to an integrated document provider.
integrationId (string) -- [REQUIRED]
The integration identifier for the document provider.
containerId (string) -- [REQUIRED]
The container identifier where the report will be published.
parentId (string) --
The parent document identifier under which the report will be created.
documentId (string) --
The existing document identifier to update instead of creating a new document.
dict
The report-generation filters applied when the report is exported.
riskLevels (list) --
The severity levels to include in the report.
(string) --
Risk severity level.
confidenceLevels (list) --
The confidence levels to include in the report.
(string) --
Finding confidence level.
statuses (list) --
The finding statuses to include in the report.
(string) --
Finding status.
riskTypes (list) --
The risk types to include in the report.
(string) --
Type of security risk.
findingTypes (list) --
The finding types to include in the report.
(string) --
A single report-filter value for one filter dimension.
taskStatuses (list) --
The task execution statuses to include in the report's task table.
(string) --
Execution status of a task.
annotationNotes (boolean) --
Whether to include reviewer annotation notes under each finding.
complianceReport (boolean) --
Whether to include the compliance-ready report additions.
dict
The updated CI/CD pentesting configuration to apply to the pentest.
enabled (boolean) --
Whether CI/CD pentesting is enabled for this pentest.
dict
The category of application a pentest targets.
type (string) -- [REQUIRED]
The category of application under test.
dict
Response Syntax
{
'pentestId': 'string',
'title': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'assets': {
'endpoints': [
{
'uri': 'string'
},
],
'actors': [
{
'identifier': 'string',
'uris': [
'string',
],
'authentication': {
'providerType': 'SECRETS_MANAGER'|'AWS_LAMBDA'|'AWS_IAM_ROLE'|'AWS_INTERNAL',
'value': 'string'
},
'description': 'string',
'enableEmailMfa': True|False,
'mfaForwardingAddress': 'string'
},
],
'documents': [
{
's3Location': 'string',
'artifactId': 'string',
'integratedDocument': {
'integrationId': 'string',
'resourceId': 'string'
}
},
],
'sourceCode': [
{
's3Location': 'string'
},
],
'integratedRepositories': [
{
'integrationId': 'string',
'providerResourceId': 'string',
'branch': 'string'
},
],
'trustedCaCertificates': [
{
'source': {
'inlinePem': 'string',
'artifactId': 'string',
's3Location': 'string'
}
},
],
'clientCertificates': [
{
'name': 'string',
'secretArn': 'string',
'origins': [
'string',
]
},
]
},
'excludeRiskTypes': [
'CROSS_SITE_SCRIPTING'|'DEFAULT_CREDENTIALS'|'INSECURE_DIRECT_OBJECT_REFERENCE'|'PRIVILEGE_ESCALATION'|'SERVER_SIDE_TEMPLATE_INJECTION'|'COMMAND_INJECTION'|'CODE_INJECTION'|'SQL_INJECTION'|'ARBITRARY_FILE_UPLOAD'|'INSECURE_DESERIALIZATION'|'LOCAL_FILE_INCLUSION'|'INFORMATION_DISCLOSURE'|'PATH_TRAVERSAL'|'SERVER_SIDE_REQUEST_FORGERY'|'JSON_WEB_TOKEN_VULNERABILITIES'|'XML_EXTERNAL_ENTITY'|'FILE_DELETION'|'OTHER'|'GRAPHQL_VULNERABILITIES'|'BUSINESS_LOGIC_VULNERABILITIES'|'CRYPTOGRAPHIC_VULNERABILITIES'|'DENIAL_OF_SERVICE'|'FILE_ACCESS'|'FILE_CREATION'|'DATABASE_MODIFICATION'|'DATABASE_ACCESS'|'OUTBOUND_SERVICE_REQUEST'|'UNKNOWN',
],
'serviceRole': 'string',
'logConfig': {
'logGroup': 'string',
'logStream': 'string'
},
'agentSpaceId': 'string',
'reportDestination': {
'integrationId': 'string',
'containerId': 'string',
'parentId': 'string',
'documentId': 'string'
},
'reportFilters': {
'riskLevels': [
'UNKNOWN'|'INFORMATIONAL'|'LOW'|'MEDIUM'|'HIGH'|'CRITICAL',
],
'confidenceLevels': [
'FALSE_POSITIVE'|'UNCONFIRMED'|'LOW'|'MEDIUM'|'HIGH',
],
'statuses': [
'ACTIVE'|'RESOLVED'|'ACCEPTED'|'FALSE_POSITIVE',
],
'riskTypes': [
'CROSS_SITE_SCRIPTING'|'DEFAULT_CREDENTIALS'|'INSECURE_DIRECT_OBJECT_REFERENCE'|'PRIVILEGE_ESCALATION'|'SERVER_SIDE_TEMPLATE_INJECTION'|'COMMAND_INJECTION'|'CODE_INJECTION'|'SQL_INJECTION'|'ARBITRARY_FILE_UPLOAD'|'INSECURE_DESERIALIZATION'|'LOCAL_FILE_INCLUSION'|'INFORMATION_DISCLOSURE'|'PATH_TRAVERSAL'|'SERVER_SIDE_REQUEST_FORGERY'|'JSON_WEB_TOKEN_VULNERABILITIES'|'XML_EXTERNAL_ENTITY'|'FILE_DELETION'|'OTHER'|'GRAPHQL_VULNERABILITIES'|'BUSINESS_LOGIC_VULNERABILITIES'|'CRYPTOGRAPHIC_VULNERABILITIES'|'DENIAL_OF_SERVICE'|'FILE_ACCESS'|'FILE_CREATION'|'DATABASE_MODIFICATION'|'DATABASE_ACCESS'|'OUTBOUND_SERVICE_REQUEST'|'UNKNOWN',
],
'findingTypes': [
'string',
],
'taskStatuses': [
'IN_PROGRESS'|'ABORTED'|'COMPLETED'|'INTERNAL_ERROR'|'FAILED',
],
'annotationNotes': True|False,
'complianceReport': True|False
},
'cicdConfiguration': {
'enabled': True|False
},
'testScope': {
'type': 'WEB_APP'|'GENERATIVE_AI_APP'
}
}
Response Structure
(dict) --
Output for the UpdatePentest operation.
pentestId (string) --
The unique identifier of the pentest.
title (string) --
The title of the pentest.
createdAt (datetime) --
The date and time the pentest was created, in UTC format.
updatedAt (datetime) --
The date and time the pentest was last updated, in UTC format.
assets (dict) --
The assets included in the pentest.
endpoints (list) --
The list of endpoints to test during the pentest.
(dict) --
Represents a target endpoint for penetration testing.
uri (string) --
The URI of the endpoint.
actors (list) --
The list of actors used during penetration testing.
(dict) --
Represents an actor used during penetration testing. An actor defines a user or entity that interacts with the target application, including authentication credentials and target URIs.
identifier (string) --
The unique identifier for the actor.
uris (list) --
The list of URIs that the actor targets during testing.
(string) --
authentication (dict) --
The authentication configuration for the actor.
providerType (string) --
The type of authentication provider. Valid values include SECRETS_MANAGER, AWS_LAMBDA, AWS_IAM_ROLE, and AWS_INTERNAL.
value (string) --
The authentication value, such as a secret ARN, Lambda function ARN, or IAM role ARN, depending on the provider type.
description (string) --
A description of the actor.
enableEmailMfa (boolean) --
Whether email-based MFA is enabled for this actor.
mfaForwardingAddress (string) --
Server-generated email forwarding address for receiving MFA codes.
documents (list) --
The list of documents that provide context for the pentest.
(dict) --
Represents a document that provides context for security testing.
s3Location (string) --
The Amazon S3 location of the document.
artifactId (string) --
The unique identifier of the artifact associated with the document.
integratedDocument (dict) --
A reference to a document in an integrated third-party provider.
integrationId (string) --
The identifier of the integration that provides access to the document.
resourceId (string) --
The provider-specific resource identifier for the document.
sourceCode (list) --
The list of source code repositories to analyze during the pentest.
(dict) --
Represents a source code repository used for security analysis during a pentest.
s3Location (string) --
The Amazon S3 location of the source code repository archive.
integratedRepositories (list) --
The list of integrated repositories associated with the pentest.
(dict) --
Represents a code repository that is integrated with the service through a third-party provider.
integrationId (string) --
The unique identifier of the integration that provides access to the repository.
providerResourceId (string) --
The provider-specific resource identifier for the repository.
branch (string) --
An optional override for the repository branch.
trustedCaCertificates (list) --
The trust anchors used to validate target endpoint TLS certificates. Provide these for endpoints served by a private or internal certificate authority (CA), an intermediate CA, or a self-signed certificate.
(dict) --
A trust anchor used when validating a target endpoint's TLS certificate.
source (dict) --
The source that Security Agent reads the certificate from.
inlinePem (string) --
A PEM-encoded X.509 certificate supplied inline.
artifactId (string) --
The artifact ID of an uploaded certificate file.
s3Location (string) --
The Amazon S3 location URI of a customer-staged certificate.
clientCertificates (list) --
The client certificates for mutual TLS (mTLS) authentication to target hosts. Each certificate is stored in Secrets Manager and scoped to specific target origins.
(dict) --
A client certificate for mutual TLS (mTLS) authentication to target hosts.
name (string) --
A customer-chosen name for this client certificate, used in error messages and console display.
secretArn (string) --
The ARN of the Secrets Manager secret containing the certificate and private key.
origins (list) --
The origins (scheme://host[:port]) this certificate applies to. Paths are not supported. Each hostname can have at most one client certificate.
(string) --
excludeRiskTypes (list) --
The list of risk types excluded from the pentest.
(string) --
Type of security risk.
serviceRole (string) --
The IAM service role used for the pentest.
logConfig (dict) --
The CloudWatch Logs configuration for the pentest.
logGroup (string) --
The name of the CloudWatch log group.
logStream (string) --
The name of the CloudWatch log stream.
agentSpaceId (string) --
The unique identifier of the agent space that contains the pentest.
reportDestination (dict) --
The destination for publishing scan reports to an integrated document provider.
integrationId (string) --
The integration identifier for the document provider.
containerId (string) --
The container identifier where the report will be published.
parentId (string) --
The parent document identifier under which the report will be created.
documentId (string) --
The existing document identifier to update instead of creating a new document.
reportFilters (dict) --
The report-generation filters applied when the report is exported.
riskLevels (list) --
The severity levels to include in the report.
(string) --
Risk severity level.
confidenceLevels (list) --
The confidence levels to include in the report.
(string) --
Finding confidence level.
statuses (list) --
The finding statuses to include in the report.
(string) --
Finding status.
riskTypes (list) --
The risk types to include in the report.
(string) --
Type of security risk.
findingTypes (list) --
The finding types to include in the report.
(string) --
A single report-filter value for one filter dimension.
taskStatuses (list) --
The task execution statuses to include in the report's task table.
(string) --
Execution status of a task.
annotationNotes (boolean) --
Whether to include reviewer annotation notes under each finding.
complianceReport (boolean) --
Whether to include the compliance-ready report additions.
cicdConfiguration (dict) --
The CI/CD pentesting configuration applied to the pentest.
enabled (boolean) --
Whether CI/CD pentesting is enabled for this pentest.
testScope (dict) --
The category of application a pentest targets.
type (string) --
The category of application under test.