AWS Security Agent

2026/09/24 - AWS Security Agent - 13 updated api methods

Changes  Added support for Confluence export, enabling customers to publish security findings to Confluence pages.

BatchDeletePentests (updated) Link ¶
Changes (response)
{'deleted': {'reportDestination': {'containerId': 'string',
                                   'documentId': 'string',
                                   'integrationId': 'string',
                                   'parentId': 'string'},
             'reportFilters': {'annotationNotes': 'boolean',
                               'complianceReport': 'boolean',
                               'confidenceLevels': ['FALSE_POSITIVE | '
                                                    'UNCONFIRMED | LOW | '
                                                    'MEDIUM | HIGH'],
                               'findingTypes': ['string'],
                               'riskLevels': ['UNKNOWN | INFORMATIONAL | LOW | '
                                              'MEDIUM | HIGH | CRITICAL'],
                               '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'],
                               'statuses': ['ACTIVE | RESOLVED | ACCEPTED | '
                                            'FALSE_POSITIVE'],
                               'taskStatuses': ['IN_PROGRESS | ABORTED | '
                                                'COMPLETED | INTERNAL_ERROR | '
                                                'FAILED']}}}

Deletes one or more pentests from an agent space.

See also: AWS API Documentation

Request Syntax

client.batch_delete_pentests(
    pentestIds=[
        'string',
    ],
    agentSpaceId='string'
)
type pentestIds:

list

param pentestIds:

[REQUIRED]

The list of pentest identifiers to delete.

  • (string) --

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the pentests to delete.

rtype:

dict

returns:

Response Syntax

{
    'deleted': [
        {
            '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'
                        }
                    },
                ]
            },
            '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
            },
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'failed': [
        {
            'pentestId': 'string',
            'reason': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Output for the BatchDeletePentests operation.

    • deleted (list) --

      The list of pentests that were successfully deleted.

      • (dict) --

        Represents a pentest configuration that defines the parameters for security testing, including target assets, risk type exclusions, and infrastructure settings.

        • pentestId (string) --

          The unique identifier of the pentest.

        • agentSpaceId (string) --

          The unique identifier of the agent space that contains the pentest.

        • title (string) --

          The title of the pentest.

        • 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.

        • 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.

        • vpcConfig (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.

        • networkTrafficConfig (dict) --

          The 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.

        • codeRemediationStrategy (string) --

          The code remediation strategy for the pentest.

        • cleanUpStrategy (string) --

          Strategy for cleaning up resources after pentest job completion.

        • disableManagedSkills (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.

        • maxTaskHours (float) --

          The maximum number of billable task hours allowed for jobs started from this pentest. If a job reaches the configured limit, it is gracefully stopped. If not set, jobs run to completion with no budget cap.

        • 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.

        • 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.

    • failed (list) --

      The list of pentests that failed to delete, including the reason for each failure.

      • (dict) --

        Contains information about a pentest that failed to delete.

        • pentestId (string) --

          The unique identifier of the pentest that failed to delete.

        • reason (string) --

          The reason the pentest failed to delete.

BatchGetCodeReviewJobs (updated) Link ¶
Changes (response)
{'codeReviewJobs': {'reportDestination': {'containerId': 'string',
                                          'documentId': 'string',
                                          'integrationId': 'string',
                                          'parentId': 'string'}}}

Retrieves information about one or more code review jobs in an agent space.

See also: AWS API Documentation

Request Syntax

client.batch_get_code_review_jobs(
    codeReviewJobIds=[
        'string',
    ],
    agentSpaceId='string'
)
type codeReviewJobIds:

list

param codeReviewJobIds:

[REQUIRED]

The list of code review job identifiers to retrieve.

  • (string) --

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the code review jobs.

rtype:

dict

returns:

Response Syntax

{
    'codeReviewJobs': [
        {
            'codeReviewJobId': 'string',
            'codeReviewId': 'string',
            'title': 'string',
            'overview': 'string',
            'status': 'IN_PROGRESS'|'STOPPING'|'STOPPED'|'FAILED'|'COMPLETED',
            'documents': [
                {
                    's3Location': 'string',
                    'artifactId': 'string',
                    'integratedDocument': {
                        'integrationId': 'string',
                        'resourceId': 'string'
                    }
                },
            ],
            'sourceCode': [
                {
                    's3Location': 'string'
                },
            ],
            'steps': [
                {
                    'name': 'PREFLIGHT'|'STATIC_ANALYSIS'|'PENTEST'|'FINALIZING'|'VALIDATION',
                    'status': 'NOT_STARTED'|'IN_PROGRESS'|'COMPLETED'|'FAILED'|'STOPPED',
                    'createdAt': datetime(2015, 1, 1),
                    'updatedAt': datetime(2015, 1, 1)
                },
            ],
            'executionContext': [
                {
                    'contextType': 'ERROR'|'CLIENT_ERROR'|'WARNING'|'INFO',
                    'context': 'string',
                    'timestamp': datetime(2015, 1, 1)
                },
            ],
            'serviceRole': 'string',
            'logConfig': {
                'logGroup': 'string',
                'logStream': 'string'
            },
            'errorInformation': {
                'code': 'CLIENT_ERROR'|'INTERNAL_ERROR'|'STOPPED_BY_USER',
                'message': 'string'
            },
            'integratedRepositories': [
                {
                    'integrationId': 'string',
                    'providerResourceId': 'string',
                    'branch': 'string'
                },
            ],
            'codeRemediationStrategy': 'AUTOMATIC'|'DISABLED',
            'maxTaskHours': 123.0,
            'reportDestination': {
                'integrationId': 'string',
                'containerId': 'string',
                'parentId': 'string',
                'documentId': 'string'
            },
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'notFound': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Output for the BatchGetCodeReviewJobs operation.

    • codeReviewJobs (list) --

      The list of code review jobs that were found.

      • (dict) --

        Represents a code review job, which is an execution instance of a code review. A code review job progresses through preflight, static analysis, and finalizing steps.

        • codeReviewJobId (string) --

          The unique identifier of the code review job.

        • codeReviewId (string) --

          The unique identifier of the code review associated with the job.

        • title (string) --

          The title of the code review job.

        • overview (string) --

          An overview of the code review job results.

        • status (string) --

          The current status of the code review job.

        • documents (list) --

          The list of documents providing context for the code review job.

          • (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 analyzed during the code review job.

          • (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.

        • steps (list) --

          The list of steps in the code review job execution.

          • (dict) --

            Represents a step in the pentest job execution pipeline. Steps include preflight, static analysis, pentest, and finalizing.

            • name (string) --

              The name of the step. Valid values include PREFLIGHT, STATIC_ANALYSIS, PENTEST, VALIDATION, and FINALIZING.

            • status (string) --

              The current status of the step.

            • createdAt (datetime) --

              The date and time the step was created, in UTC format.

            • updatedAt (datetime) --

              The date and time the step was last updated, in UTC format.

        • executionContext (list) --

          The execution context messages for the code review job.

          • (dict) --

            Contains contextual information about the execution of a pentest job, such as errors, warnings, or informational messages.

            • contextType (string) --

              The type of context. Valid values include ERROR, CLIENT_ERROR, WARNING, and INFO.

            • context (string) --

              The context message.

            • timestamp (datetime) --

              The date and time the context was recorded, in UTC format.

        • serviceRole (string) --

          The IAM service role used for the code review job.

        • logConfig (dict) --

          The CloudWatch Logs configuration for the code review job.

          • logGroup (string) --

            The name of the CloudWatch log group.

          • logStream (string) --

            The name of the CloudWatch log stream.

        • errorInformation (dict) --

          Error information if the code review job encountered an error.

          • code (string) --

            The error code. Valid values include CLIENT_ERROR, INTERNAL_ERROR, and STOPPED_BY_USER.

          • message (string) --

            A message describing the error.

        • integratedRepositories (list) --

          The list of integrated repositories associated with the code review job.

          • (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.

        • codeRemediationStrategy (string) --

          The code remediation strategy for the code review job.

        • maxTaskHours (float) --

          The maximum number of billable task hours allowed for this code review job. If the cumulative task hours reach this limit, the job is gracefully stopped.

        • 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.

        • createdAt (datetime) --

          The date and time the code review job was created, in UTC format.

        • updatedAt (datetime) --

          The date and time the code review job was last updated, in UTC format.

    • notFound (list) --

      The list of code review job identifiers that were not found.

      • (string) --

BatchGetCodeReviews (updated) Link ¶
Changes (response)
{'codeReviews': {'reportDestination': {'containerId': 'string',
                                       'documentId': 'string',
                                       'integrationId': 'string',
                                       'parentId': 'string'},
                 'reportFilters': {'annotationNotes': 'boolean',
                                   'complianceReport': 'boolean',
                                   'confidenceLevels': ['FALSE_POSITIVE | '
                                                        'UNCONFIRMED | LOW | '
                                                        'MEDIUM | HIGH'],
                                   'findingTypes': ['string'],
                                   'riskLevels': ['UNKNOWN | INFORMATIONAL | '
                                                  'LOW | MEDIUM | HIGH | '
                                                  'CRITICAL'],
                                   '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'],
                                   'statuses': ['ACTIVE | RESOLVED | ACCEPTED '
                                                '| FALSE_POSITIVE'],
                                   'taskStatuses': ['IN_PROGRESS | ABORTED | '
                                                    'COMPLETED | '
                                                    'INTERNAL_ERROR | '
                                                    'FAILED']}}}

Retrieves information about one or more code reviews in an agent space.

See also: AWS API Documentation

Request Syntax

client.batch_get_code_reviews(
    codeReviewIds=[
        'string',
    ],
    agentSpaceId='string'
)
type codeReviewIds:

list

param codeReviewIds:

[REQUIRED]

The list of code review identifiers to retrieve.

  • (string) --

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the code reviews.

rtype:

dict

returns:

Response Syntax

{
    'codeReviews': [
        {
            'codeReviewId': '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'
                        }
                    },
                ]
            },
            'serviceRole': 'string',
            'logConfig': {
                'logGroup': 'string',
                'logStream': 'string'
            },
            'codeRemediationStrategy': 'AUTOMATIC'|'DISABLED',
            'validationMode': 'DISABLED'|'SIMULATED',
            '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
            },
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'notFound': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Output for the BatchGetCodeReviews operation.

    • codeReviews (list) --

      The list of code reviews that were found.

      • (dict) --

        Represents a code review configuration that defines the parameters for automated security-focused code analysis, including target assets and logging configuration.

        • codeReviewId (string) --

          The unique identifier of the code review.

        • agentSpaceId (string) --

          The unique identifier of the agent space that contains the code review.

        • title (string) --

          The title of the code review.

        • assets (dict) --

          The assets included in the code review.

          • 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.

        • serviceRole (string) --

          The IAM service role used for the code review.

        • logConfig (dict) --

          The CloudWatch Logs configuration for the code review.

          • logGroup (string) --

            The name of the CloudWatch log group.

          • logStream (string) --

            The name of the CloudWatch log stream.

        • codeRemediationStrategy (string) --

          The code remediation strategy for the code review.

        • validationMode (string) --

          The validation mode for the code review. Valid values are SIMULATED and DISABLED.

        • maxTaskHours (float) --

          The maximum number of billable task hours allowed for jobs started from this code review. If a job reaches the configured limit, it is gracefully stopped. If not set, jobs run to completion with no budget cap.

        • 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.

        • createdAt (datetime) --

          The date and time the code review was created, in UTC format.

        • updatedAt (datetime) --

          The date and time the code review was last updated, in UTC format.

    • notFound (list) --

      The list of code review identifiers that were not found.

      • (string) --

BatchGetPentestJobs (updated) Link ¶
Changes (response)
{'pentestJobs': {'reportDestination': {'containerId': 'string',
                                       'documentId': 'string',
                                       'integrationId': 'string',
                                       'parentId': 'string'}}}

Retrieves information about one or more pentest jobs in an agent space.

See also: AWS API Documentation

Request Syntax

client.batch_get_pentest_jobs(
    pentestJobIds=[
        'string',
    ],
    agentSpaceId='string'
)
type pentestJobIds:

list

param pentestJobIds:

[REQUIRED]

The list of pentest job identifiers to retrieve.

  • (string) --

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the pentest jobs.

rtype:

dict

returns:

Response Syntax

{
    'pentestJobs': [
        {
            'pentestJobId': 'string',
            'pentestId': 'string',
            'title': 'string',
            'overview': 'string',
            'status': 'IN_PROGRESS'|'STOPPING'|'STOPPED'|'FAILED'|'COMPLETED',
            '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'
                },
            ],
            'excludePaths': [
                {
                    'uri': 'string'
                },
            ],
            'allowedDomains': [
                {
                    'uri': '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',
            ],
            'steps': [
                {
                    'name': 'PREFLIGHT'|'STATIC_ANALYSIS'|'PENTEST'|'FINALIZING'|'VALIDATION',
                    'status': 'NOT_STARTED'|'IN_PROGRESS'|'COMPLETED'|'FAILED'|'STOPPED',
                    'createdAt': datetime(2015, 1, 1),
                    'updatedAt': datetime(2015, 1, 1)
                },
            ],
            'executionContext': [
                {
                    'contextType': 'ERROR'|'CLIENT_ERROR'|'WARNING'|'INFO',
                    'context': 'string',
                    'timestamp': datetime(2015, 1, 1)
                },
            ],
            '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'
                    },
                ]
            },
            'errorInformation': {
                'code': 'CLIENT_ERROR'|'INTERNAL_ERROR'|'STOPPED_BY_USER',
                'message': 'string'
            },
            'integratedRepositories': [
                {
                    'integrationId': 'string',
                    'providerResourceId': 'string',
                    'branch': 'string'
                },
            ],
            'trustedCaCertificates': [
                {
                    'source': {
                        'inlinePem': 'string',
                        'artifactId': 'string',
                        's3Location': 'string'
                    }
                },
            ],
            'codeRemediationStrategy': 'AUTOMATIC'|'DISABLED',
            'cleanUpStrategy': 'BEST_EFFORT_DELETE'|'RETAIN_ALL',
            'disableManagedSkills': [
                'FINDING_PERSONALIZATION'|'LOGIN_OPTIMIZATION',
            ],
            'maxTaskHours': 123.0,
            'jobType': 'FULL'|'REVALIDATION',
            'selectedFindingIds': [
                'string',
            ],
            'reportDestination': {
                'integrationId': 'string',
                'containerId': 'string',
                'parentId': 'string',
                'documentId': 'string'
            },
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'notFound': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Output for the BatchGetPentestJobs operation.

    • pentestJobs (list) --

      The list of pentest jobs that were found.

      • (dict) --

        Represents a pentest job, which is an execution instance of a pentest. A pentest job progresses through preflight, static analysis, pentest, and finalizing steps.

        • pentestJobId (string) --

          The unique identifier of the pentest job.

        • pentestId (string) --

          The unique identifier of the pentest associated with the job.

        • title (string) --

          The title of the pentest job.

        • overview (string) --

          An overview of the pentest job results.

        • status (string) --

          The current status of the pentest job.

        • endpoints (list) --

          The list of endpoints being tested in the pentest job.

          • (dict) --

            Represents a target endpoint for penetration testing.

            • uri (string) --

              The URI of the endpoint.

        • actors (list) --

          The list of actors used during the pentest job.

          • (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 providing context for the pentest job.

          • (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 analyzed during the pentest job.

          • (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.

        • excludePaths (list) --

          The list of paths excluded from the pentest job.

          • (dict) --

            Represents a target endpoint for penetration testing.

            • uri (string) --

              The URI of the endpoint.

        • allowedDomains (list) --

          The list of domains allowed during the pentest job.

          • (dict) --

            Represents a target endpoint for penetration testing.

            • uri (string) --

              The URI of the endpoint.

        • excludeRiskTypes (list) --

          The list of risk types excluded from the pentest job.

          • (string) --

            Type of security risk.

        • steps (list) --

          The list of steps in the pentest job execution.

          • (dict) --

            Represents a step in the pentest job execution pipeline. Steps include preflight, static analysis, pentest, and finalizing.

            • name (string) --

              The name of the step. Valid values include PREFLIGHT, STATIC_ANALYSIS, PENTEST, VALIDATION, and FINALIZING.

            • status (string) --

              The current status of the step.

            • createdAt (datetime) --

              The date and time the step was created, in UTC format.

            • updatedAt (datetime) --

              The date and time the step was last updated, in UTC format.

        • executionContext (list) --

          The execution context messages for the pentest job.

          • (dict) --

            Contains contextual information about the execution of a pentest job, such as errors, warnings, or informational messages.

            • contextType (string) --

              The type of context. Valid values include ERROR, CLIENT_ERROR, WARNING, and INFO.

            • context (string) --

              The context message.

            • timestamp (datetime) --

              The date and time the context was recorded, in UTC format.

        • serviceRole (string) --

          The IAM service role used for the pentest job.

        • logConfig (dict) --

          The CloudWatch Logs configuration for the pentest job.

          • logGroup (string) --

            The name of the CloudWatch log group.

          • logStream (string) --

            The name of the CloudWatch log stream.

        • vpcConfig (dict) --

          The VPC configuration for the pentest job.

          • 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.

        • networkTrafficConfig (dict) --

          The network traffic configuration for the pentest job.

          • 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.

        • errorInformation (dict) --

          Error information if the pentest job encountered an error.

          • code (string) --

            The error code. Valid values include CLIENT_ERROR, INTERNAL_ERROR, and STOPPED_BY_USER.

          • message (string) --

            A message describing the error.

        • integratedRepositories (list) --

          The list of integrated repositories associated with the pentest job.

          • (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 during the pentest job.

          • (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.

        • codeRemediationStrategy (string) --

          The code remediation strategy for the pentest job.

        • cleanUpStrategy (string) --

          Strategy for cleaning up resources after pentest job completion.

        • disableManagedSkills (list) --

          A list of managed skills disabled for this pentest job. Valid values include FINDING_PERSONALIZATION and LOGIN_OPTIMIZATION.

          • (string) --

            Type of managed skill that can be enabled or disabled for a pentest.

        • maxTaskHours (float) --

          The maximum number of billable task hours allowed for this pentest job. If the cumulative task hours reach this limit, the job is gracefully stopped.

        • jobType (string) --

          The type of the pentest job. Valid values are FULL and REVALIDATION.

        • selectedFindingIds (list) --

          The list of finding identifiers selected for revalidation. Present only when jobType is REVALIDATION.

          • (string) --

        • 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.

        • createdAt (datetime) --

          The date and time the pentest job was created, in UTC format.

        • updatedAt (datetime) --

          The date and time the pentest job was last updated, in UTC format.

    • notFound (list) --

      The list of pentest job identifiers that were not found.

      • (string) --

BatchGetPentests (updated) Link ¶
Changes (response)
{'pentests': {'reportDestination': {'containerId': 'string',
                                    'documentId': 'string',
                                    'integrationId': 'string',
                                    'parentId': 'string'},
              'reportFilters': {'annotationNotes': 'boolean',
                                'complianceReport': 'boolean',
                                'confidenceLevels': ['FALSE_POSITIVE | '
                                                     'UNCONFIRMED | LOW | '
                                                     'MEDIUM | HIGH'],
                                'findingTypes': ['string'],
                                'riskLevels': ['UNKNOWN | INFORMATIONAL | LOW '
                                               '| MEDIUM | HIGH | CRITICAL'],
                                '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'],
                                'statuses': ['ACTIVE | RESOLVED | ACCEPTED | '
                                             'FALSE_POSITIVE'],
                                'taskStatuses': ['IN_PROGRESS | ABORTED | '
                                                 'COMPLETED | INTERNAL_ERROR | '
                                                 'FAILED']}}}

Retrieves information about one or more pentests in an agent space.

See also: AWS API Documentation

Request Syntax

client.batch_get_pentests(
    pentestIds=[
        'string',
    ],
    agentSpaceId='string'
)
type pentestIds:

list

param pentestIds:

[REQUIRED]

The list of pentest identifiers to retrieve.

  • (string) --

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the pentests.

rtype:

dict

returns:

Response Syntax

{
    'pentests': [
        {
            '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'
                        }
                    },
                ]
            },
            '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
            },
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'notFound': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Output for the BatchGetPentests operation.

    • pentests (list) --

      The list of pentests that were found.

      • (dict) --

        Represents a pentest configuration that defines the parameters for security testing, including target assets, risk type exclusions, and infrastructure settings.

        • pentestId (string) --

          The unique identifier of the pentest.

        • agentSpaceId (string) --

          The unique identifier of the agent space that contains the pentest.

        • title (string) --

          The title of the pentest.

        • 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.

        • 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.

        • vpcConfig (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.

        • networkTrafficConfig (dict) --

          The 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.

        • codeRemediationStrategy (string) --

          The code remediation strategy for the pentest.

        • cleanUpStrategy (string) --

          Strategy for cleaning up resources after pentest job completion.

        • disableManagedSkills (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.

        • maxTaskHours (float) --

          The maximum number of billable task hours allowed for jobs started from this pentest. If a job reaches the configured limit, it is gracefully stopped. If not set, jobs run to completion with no budget cap.

        • 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.

        • 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.

    • notFound (list) --

      The list of pentest identifiers that were not found.

      • (string) --

BatchGetThreatModelJobs (updated) Link ¶
Changes (response)
{'threatModelJobs': {'reportDestination': {'containerId': 'string',
                                           'documentId': 'string',
                                           'integrationId': 'string',
                                           'parentId': 'string'}}}

Retrieves information about one or more threat model jobs in an agent space.

See also: AWS API Documentation

Request Syntax

client.batch_get_threat_model_jobs(
    threatModelJobIds=[
        'string',
    ],
    agentSpaceId='string'
)
type threatModelJobIds:

list

param threatModelJobIds:

[REQUIRED]

The list of threat model job identifiers to retrieve.

  • (string) --

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the threat model jobs.

rtype:

dict

returns:

Response Syntax

{
    'threatModelJobs': [
        {
            'threatModelJobId': 'string',
            'threatModelId': 'string',
            'agentSpaceId': 'string',
            'title': 'string',
            'status': 'IN_PROGRESS'|'STOPPING'|'STOPPED'|'FAILED'|'COMPLETED',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1),
            'executionStartTime': datetime(2015, 1, 1),
            'executionEndTime': datetime(2015, 1, 1),
            'sourceCode': [
                {
                    's3Location': 'string'
                },
            ],
            'integratedRepositories': [
                {
                    'integrationId': 'string',
                    'providerResourceId': 'string',
                    'branch': 'string'
                },
            ],
            'documents': [
                {
                    's3Location': 'string',
                    'artifactId': 'string',
                    'integratedDocument': {
                        'integrationId': 'string',
                        'resourceId': 'string'
                    }
                },
            ],
            'scopeDocs': [
                {
                    's3Location': 'string',
                    'artifactId': 'string',
                    'integratedDocument': {
                        'integrationId': 'string',
                        'resourceId': 'string'
                    }
                },
            ],
            'errorInformation': {
                'code': 'CLIENT_ERROR'|'INTERNAL_ERROR'|'STOPPED_BY_USER',
                'message': 'string'
            },
            'systemOverview': 'string',
            'reportDestination': {
                'integrationId': 'string',
                'containerId': 'string',
                'parentId': 'string',
                'documentId': 'string'
            }
        },
    ],
    'notFound': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Output for the BatchGetThreatModelJobs operation.

    • threatModelJobs (list) --

      The list of threat model jobs that were found.

      • (dict) --

        Represents a threat model job, which is an execution instance of a threat model.

        • threatModelJobId (string) --

          The unique identifier of the threat model job.

        • threatModelId (string) --

          The unique identifier of the threat model associated with the job.

        • agentSpaceId (string) --

          The unique identifier of the agent space.

        • title (string) --

          The title of the threat model job.

        • status (string) --

          The current status of the threat model job.

        • createdAt (datetime) --

          The date and time the threat model job was created, in UTC format.

        • updatedAt (datetime) --

          The date and time the threat model job was last updated, in UTC format.

        • executionStartTime (datetime) --

          The date and time the threat model job execution started, in UTC format.

        • executionEndTime (datetime) --

          The date and time the threat model job execution ended, in UTC format.

        • sourceCode (list) --

          The list of source code repositories used for threat modeling.

          • (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 used for threat modeling.

          • (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.

        • documents (list) --

          The list of documents used for threat modeling.

          • (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.

        • scopeDocs (list) --

          The scoped documents for the agent to focus on during threat modeling.

          • (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.

        • errorInformation (dict) --

          Error information if the threat model job encountered an error.

          • code (string) --

            The error code. Valid values include CLIENT_ERROR, INTERNAL_ERROR, and STOPPED_BY_USER.

          • message (string) --

            A message describing the error.

        • systemOverview (string) --

          The system overview generated during threat modeling.

        • 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.

    • notFound (list) --

      The list of threat model job identifiers that were not found.

      • (string) --

BatchGetThreatModels (updated) Link ¶
Changes (response)
{'threatModels': {'reportDestination': {'containerId': 'string',
                                        'documentId': 'string',
                                        'integrationId': 'string',
                                        'parentId': 'string'}}}

Retrieves information about one or more threat models in an agent space.

See also: AWS API Documentation

Request Syntax

client.batch_get_threat_models(
    threatModelIds=[
        'string',
    ],
    agentSpaceId='string'
)
type threatModelIds:

list

param threatModelIds:

[REQUIRED]

The list of threat model identifiers to retrieve.

  • (string) --

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the threat models.

rtype:

dict

returns:

Response Syntax

{
    'threatModels': [
        {
            'threatModelId': 'string',
            'agentSpaceId': 'string',
            'title': 'string',
            'description': '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'
                        }
                    },
                ]
            },
            'scopeDocs': [
                {
                    's3Location': 'string',
                    'artifactId': 'string',
                    'integratedDocument': {
                        'integrationId': 'string',
                        'resourceId': 'string'
                    }
                },
            ],
            'serviceRole': 'string',
            'logConfig': {
                'logGroup': 'string',
                'logStream': 'string'
            },
            'reportDestination': {
                'integrationId': 'string',
                'containerId': 'string',
                'parentId': 'string',
                'documentId': 'string'
            },
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'notFound': [
        'string',
    ]
}

Response Structure

  • (dict) --

    Output for the BatchGetThreatModels operation.

    • threatModels (list) --

      The list of threat models that were found.

      • (dict) --

        Represents a threat model configuration that defines the parameters for automated threat analysis, including target assets and logging configuration.

        • threatModelId (string) --

          The unique identifier of the threat model.

        • agentSpaceId (string) --

          The unique identifier of the agent space that contains the threat model.

        • title (string) --

          The title of the threat model.

        • description (string) --

          A description of the application or system being threat modeled.

        • assets (dict) --

          The assets included in the threat model.

          • 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.

        • scopeDocs (list) --

          The scoped documents for the agent to focus on during threat modeling.

          • (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.

        • serviceRole (string) --

          The IAM service role used for the threat model.

        • logConfig (dict) --

          The CloudWatch Logs configuration for the threat model.

          • logGroup (string) --

            The name of the CloudWatch log group.

          • logStream (string) --

            The name of the CloudWatch log stream.

        • 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.

        • createdAt (datetime) --

          The date and time the threat model was created, in UTC format.

        • updatedAt (datetime) --

          The date and time the threat model was last updated, in UTC format.

    • notFound (list) --

      The list of threat model identifiers that were not found.

      • (string) --

CreateCodeReview (updated) Link ¶
Changes (both)
{'reportDestination': {'containerId': 'string',
                       'documentId': 'string',
                       'integrationId': 'string',
                       'parentId': 'string'},
 'reportFilters': {'annotationNotes': 'boolean',
                   'complianceReport': 'boolean',
                   'confidenceLevels': ['FALSE_POSITIVE | UNCONFIRMED | LOW | '
                                        'MEDIUM | HIGH'],
                   'findingTypes': ['string'],
                   'riskLevels': ['UNKNOWN | INFORMATIONAL | LOW | MEDIUM | '
                                  'HIGH | CRITICAL'],
                   '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'],
                   'statuses': ['ACTIVE | RESOLVED | ACCEPTED | '
                                'FALSE_POSITIVE'],
                   'taskStatuses': ['IN_PROGRESS | ABORTED | COMPLETED | '
                                    'INTERNAL_ERROR | FAILED']}}

Creates a new code review configuration in an agent space. A code review defines the parameters for automated security-focused code analysis.

See also: AWS API Documentation

Request Syntax

client.create_code_review(
    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'
                }
            },
        ]
    },
    serviceRole='string',
    logConfig={
        'logGroup': 'string',
        'logStream': 'string'
    },
    codeRemediationStrategy='AUTOMATIC'|'DISABLED',
    validationMode='DISABLED'|'SIMULATED',
    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
    }
)
type title:

string

param title:

[REQUIRED]

The title of the code review.

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space to create the code review in.

type assets:

dict

param assets:

[REQUIRED]

The assets to include in the code review, such as 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.

type serviceRole:

string

param serviceRole:

The IAM service role to use for the code review.

type logConfig:

dict

param logConfig:

The CloudWatch Logs configuration for the code review.

  • logGroup (string) --

    The name of the CloudWatch log group.

  • logStream (string) --

    The name of the CloudWatch log stream.

type codeRemediationStrategy:

string

param codeRemediationStrategy:

The code remediation strategy for the code review. Valid values are AUTOMATIC and DISABLED.

type validationMode:

string

param validationMode:

The validation mode for the code review. Valid values are SIMULATED and DISABLED.

type maxTaskHours:

float

param maxTaskHours:

The maximum number of billable task hours allowed for jobs started from this code review. Must be a positive number. If not set, jobs run to completion with no budget cap.

type reportDestination:

dict

param reportDestination:

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.

type reportFilters:

dict

param reportFilters:

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.

rtype:

dict

returns:

Response Syntax

{
    'codeReviewId': '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'
                }
            },
        ]
    },
    'serviceRole': 'string',
    'logConfig': {
        'logGroup': 'string',
        'logStream': 'string'
    },
    'agentSpaceId': 'string',
    'codeRemediationStrategy': 'AUTOMATIC'|'DISABLED',
    'validationMode': 'DISABLED'|'SIMULATED',
    '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
    }
}

Response Structure

  • (dict) --

    Output for the CreateCodeReview operation.

    • codeReviewId (string) --

      The unique identifier of the created code review.

    • title (string) --

      The title of the code review.

    • createdAt (datetime) --

      The date and time the code review was created, in UTC format.

    • updatedAt (datetime) --

      The date and time the code review was last updated, in UTC format.

    • assets (dict) --

      The assets included in the code review.

      • 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.

    • serviceRole (string) --

      The IAM service role used for the code review.

    • logConfig (dict) --

      The CloudWatch Logs configuration for the code review.

      • 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 code review.

    • codeRemediationStrategy (string) --

      The code remediation strategy for the code review.

    • validationMode (string) --

      The validation mode for the code review.

    • maxTaskHours (float) --

      The maximum number of billable task hours configured for jobs started from this code review. Null if no budget cap is set.

    • 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.

CreatePentest (updated) Link ¶
Changes (both)
{'reportDestination': {'containerId': 'string',
                       'documentId': 'string',
                       'integrationId': 'string',
                       'parentId': 'string'},
 'reportFilters': {'annotationNotes': 'boolean',
                   'complianceReport': 'boolean',
                   'confidenceLevels': ['FALSE_POSITIVE | UNCONFIRMED | LOW | '
                                        'MEDIUM | HIGH'],
                   'findingTypes': ['string'],
                   'riskLevels': ['UNKNOWN | INFORMATIONAL | LOW | MEDIUM | '
                                  'HIGH | CRITICAL'],
                   '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'],
                   'statuses': ['ACTIVE | RESOLVED | ACCEPTED | '
                                'FALSE_POSITIVE'],
                   'taskStatuses': ['IN_PROGRESS | ABORTED | COMPLETED | '
                                    'INTERNAL_ERROR | FAILED']}}

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'
                }
            },
        ]
    },
    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',
    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
    }
)
type title:

string

param title:

[REQUIRED]

The title of the pentest.

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space to create the pentest in.

type assets:

dict

param assets:

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.

type excludeRiskTypes:

list

param excludeRiskTypes:

The list of risk types to exclude from the pentest.

  • (string) --

    Type of security risk.

type serviceRole:

string

param serviceRole:

The IAM service role to use for the pentest.

type logConfig:

dict

param logConfig:

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.

type vpcConfig:

dict

param vpcConfig:

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.

type networkTrafficConfig:

dict

param networkTrafficConfig:

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.

type codeRemediationStrategy:

string

param codeRemediationStrategy:

The code remediation strategy for the pentest. Valid values are AUTOMATIC and DISABLED.

type disableManagedSkills:

list

param disableManagedSkills:

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.

type maxTaskHours:

float

param maxTaskHours:

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.

type reportDestination:

dict

param reportDestination:

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.

type reportFilters:

dict

param reportFilters:

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.

rtype:

dict

returns:

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'
                }
            },
        ]
    },
    '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
    }
}

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.

    • 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.

CreateThreatModel (updated) Link ¶
Changes (response)
{'reportDestination': {'containerId': 'string',
                       'documentId': 'string',
                       'integrationId': 'string',
                       'parentId': 'string'}}

Creates a new threat model configuration in an agent space. A threat model defines the parameters for automated threat analysis.

See also: AWS API Documentation

Request Syntax

client.create_threat_model(
    title='string',
    agentSpaceId='string',
    description='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'
                }
            },
        ]
    },
    scopeDocs=[
        {
            's3Location': 'string',
            'artifactId': 'string',
            'integratedDocument': {
                'integrationId': 'string',
                'resourceId': 'string'
            }
        },
    ],
    serviceRole='string',
    logConfig={
        'logGroup': 'string',
        'logStream': 'string'
    },
    reportDestination={
        'integrationId': 'string',
        'containerId': 'string',
        'parentId': 'string',
        'documentId': 'string'
    }
)
type title:

string

param title:

[REQUIRED]

The title of the threat model.

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space to create the threat model in.

type description:

string

param description:

A description of the application or system being threat modeled.

type assets:

dict

param assets:

The assets to include in the threat model.

  • 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.

type scopeDocs:

list

param scopeDocs:

The scoped documents for the agent to focus on during threat modeling.

  • (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.

type serviceRole:

string

param serviceRole:

[REQUIRED]

The IAM service role to use for the threat model.

type logConfig:

dict

param logConfig:

The CloudWatch Logs configuration for the threat model.

  • logGroup (string) --

    The name of the CloudWatch log group.

  • logStream (string) --

    The name of the CloudWatch log stream.

type reportDestination:

dict

param reportDestination:

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.

rtype:

dict

returns:

Response Syntax

{
    'threatModelId': 'string',
    'title': 'string',
    'agentSpaceId': 'string',
    'description': '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'
                }
            },
        ]
    },
    'scopeDocs': [
        {
            's3Location': 'string',
            'artifactId': 'string',
            'integratedDocument': {
                'integrationId': 'string',
                'resourceId': 'string'
            }
        },
    ],
    'serviceRole': 'string',
    'logConfig': {
        'logGroup': 'string',
        'logStream': 'string'
    },
    'createdAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1),
    'reportDestination': {
        'integrationId': 'string',
        'containerId': 'string',
        'parentId': 'string',
        'documentId': 'string'
    }
}

Response Structure

  • (dict) --

    Output for the CreateThreatModel operation.

    • threatModelId (string) --

      The unique identifier of the created threat model.

    • title (string) --

      The title of the threat model.

    • agentSpaceId (string) --

      The unique identifier of the agent space that contains the threat model.

    • description (string) --

      A description of the application or system being threat modeled.

    • assets (dict) --

      The assets included in the threat model.

      • 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.

    • scopeDocs (list) --

      The scoped documents for the agent to focus on during threat modeling.

      • (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.

    • serviceRole (string) --

      The IAM service role used for the threat model.

    • logConfig (dict) --

      The CloudWatch Logs configuration for the threat model.

      • logGroup (string) --

        The name of the CloudWatch log group.

      • logStream (string) --

        The name of the CloudWatch log stream.

    • createdAt (datetime) --

      The date and time the threat model was created, in UTC format.

    • updatedAt (datetime) --

      The date and time the threat model was last updated, in UTC format.

    • 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.

UpdateCodeReview (updated) Link ¶
Changes (both)
{'reportDestination': {'containerId': 'string',
                       'documentId': 'string',
                       'integrationId': 'string',
                       'parentId': 'string'},
 'reportFilters': {'annotationNotes': 'boolean',
                   'complianceReport': 'boolean',
                   'confidenceLevels': ['FALSE_POSITIVE | UNCONFIRMED | LOW | '
                                        'MEDIUM | HIGH'],
                   'findingTypes': ['string'],
                   'riskLevels': ['UNKNOWN | INFORMATIONAL | LOW | MEDIUM | '
                                  'HIGH | CRITICAL'],
                   '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'],
                   'statuses': ['ACTIVE | RESOLVED | ACCEPTED | '
                                'FALSE_POSITIVE'],
                   'taskStatuses': ['IN_PROGRESS | ABORTED | COMPLETED | '
                                    'INTERNAL_ERROR | FAILED']}}

Updates an existing code review configuration.

See also: AWS API Documentation

Request Syntax

client.update_code_review(
    codeReviewId='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'
                }
            },
        ]
    },
    serviceRole='string',
    logConfig={
        'logGroup': 'string',
        'logStream': 'string'
    },
    codeRemediationStrategy='AUTOMATIC'|'DISABLED',
    validationMode='DISABLED'|'SIMULATED',
    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
    }
)
type codeReviewId:

string

param codeReviewId:

[REQUIRED]

The unique identifier of the code review to update.

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the code review.

type title:

string

param title:

The updated title of the code review.

type assets:

dict

param assets:

The updated assets for the code review.

  • 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.

type serviceRole:

string

param serviceRole:

The updated IAM service role for the code review.

type logConfig:

dict

param logConfig:

The updated CloudWatch Logs configuration for the code review.

  • logGroup (string) --

    The name of the CloudWatch log group.

  • logStream (string) --

    The name of the CloudWatch log stream.

type codeRemediationStrategy:

string

param codeRemediationStrategy:

The updated code remediation strategy for the code review.

type validationMode:

string

param validationMode:

The updated validation mode for the code review. Valid values are SIMULATED and DISABLED.

type maxTaskHours:

float

param maxTaskHours:

The updated maximum number of billable task hours allowed for jobs started from this code review.

type reportDestination:

dict

param reportDestination:

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.

type reportFilters:

dict

param reportFilters:

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.

rtype:

dict

returns:

Response Syntax

{
    'codeReviewId': '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'
                }
            },
        ]
    },
    'serviceRole': 'string',
    'logConfig': {
        'logGroup': 'string',
        'logStream': 'string'
    },
    'agentSpaceId': 'string',
    'codeRemediationStrategy': 'AUTOMATIC'|'DISABLED',
    'validationMode': 'DISABLED'|'SIMULATED',
    '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
    }
}

Response Structure

  • (dict) --

    Output for the UpdateCodeReview operation.

    • codeReviewId (string) --

      The unique identifier of the code review.

    • title (string) --

      The title of the code review.

    • createdAt (datetime) --

      The date and time the code review was created, in UTC format.

    • updatedAt (datetime) --

      The date and time the code review was last updated, in UTC format.

    • assets (dict) --

      The assets included in the code review.

      • 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.

    • serviceRole (string) --

      The IAM service role used for the code review.

    • logConfig (dict) --

      The CloudWatch Logs configuration for the code review.

      • 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 code review.

    • codeRemediationStrategy (string) --

      The code remediation strategy for the code review.

    • validationMode (string) --

      The validation mode for the code review.

    • maxTaskHours (float) --

      The maximum number of billable task hours configured for jobs started from this code review. Null if no budget cap is set.

    • 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.

UpdatePentest (updated) Link ¶
Changes (both)
{'reportDestination': {'containerId': 'string',
                       'documentId': 'string',
                       'integrationId': 'string',
                       'parentId': 'string'},
 'reportFilters': {'annotationNotes': 'boolean',
                   'complianceReport': 'boolean',
                   'confidenceLevels': ['FALSE_POSITIVE | UNCONFIRMED | LOW | '
                                        'MEDIUM | HIGH'],
                   'findingTypes': ['string'],
                   'riskLevels': ['UNKNOWN | INFORMATIONAL | LOW | MEDIUM | '
                                  'HIGH | CRITICAL'],
                   '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'],
                   'statuses': ['ACTIVE | RESOLVED | ACCEPTED | '
                                'FALSE_POSITIVE'],
                   'taskStatuses': ['IN_PROGRESS | ABORTED | COMPLETED | '
                                    'INTERNAL_ERROR | FAILED']}}

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'
                }
            },
        ]
    },
    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',
    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
    }
)
type pentestId:

string

param pentestId:

[REQUIRED]

The unique identifier of the pentest to update.

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the pentest.

type title:

string

param title:

The updated title of the pentest.

type assets:

dict

param assets:

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.

type excludeRiskTypes:

list

param excludeRiskTypes:

The updated list of risk types to exclude from the pentest.

  • (string) --

    Type of security risk.

type serviceRole:

string

param serviceRole:

The updated IAM service role for the pentest.

type logConfig:

dict

param logConfig:

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.

type vpcConfig:

dict

param vpcConfig:

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.

type networkTrafficConfig:

dict

param networkTrafficConfig:

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.

type codeRemediationStrategy:

string

param codeRemediationStrategy:

The updated code remediation strategy for the pentest.

type disableManagedSkills:

list

param disableManagedSkills:

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.

type maxTaskHours:

float

param maxTaskHours:

The updated maximum number of billable task hours allowed for jobs started from this pentest.

type reportDestination:

dict

param reportDestination:

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.

type reportFilters:

dict

param reportFilters:

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.

rtype:

dict

returns:

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'
                }
            },
        ]
    },
    '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
    }
}

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.

    • 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.

UpdateThreatModel (updated) Link ¶
Changes (both)
{'reportDestination': {'containerId': 'string',
                       'documentId': 'string',
                       'integrationId': 'string',
                       'parentId': 'string'}}

Updates an existing threat model configuration.

See also: AWS API Documentation

Request Syntax

client.update_threat_model(
    threatModelId='string',
    agentSpaceId='string',
    title='string',
    description='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'
                }
            },
        ]
    },
    scopeDocs=[
        {
            's3Location': 'string',
            'artifactId': 'string',
            'integratedDocument': {
                'integrationId': 'string',
                'resourceId': 'string'
            }
        },
    ],
    serviceRole='string',
    logConfig={
        'logGroup': 'string',
        'logStream': 'string'
    },
    reportDestination={
        'integrationId': 'string',
        'containerId': 'string',
        'parentId': 'string',
        'documentId': 'string'
    }
)
type threatModelId:

string

param threatModelId:

[REQUIRED]

The unique identifier of the threat model to update.

type agentSpaceId:

string

param agentSpaceId:

[REQUIRED]

The unique identifier of the agent space that contains the threat model.

type title:

string

param title:

The updated title of the threat model.

type description:

string

param description:

The updated description of the application or system being threat modeled.

type assets:

dict

param assets:

The updated assets for the threat model.

  • 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.

type scopeDocs:

list

param scopeDocs:

The updated scoped documents for the agent to focus on during threat modeling.

  • (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.

type serviceRole:

string

param serviceRole:

The updated IAM service role for the threat model.

type logConfig:

dict

param logConfig:

The updated CloudWatch Logs configuration for the threat model.

  • logGroup (string) --

    The name of the CloudWatch log group.

  • logStream (string) --

    The name of the CloudWatch log stream.

type reportDestination:

dict

param reportDestination:

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.

rtype:

dict

returns:

Response Syntax

{
    'threatModelId': 'string',
    'title': 'string',
    'agentSpaceId': 'string',
    'description': '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'
                }
            },
        ]
    },
    'scopeDocs': [
        {
            's3Location': 'string',
            'artifactId': 'string',
            'integratedDocument': {
                'integrationId': 'string',
                'resourceId': 'string'
            }
        },
    ],
    'serviceRole': 'string',
    'logConfig': {
        'logGroup': 'string',
        'logStream': 'string'
    },
    'createdAt': datetime(2015, 1, 1),
    'updatedAt': datetime(2015, 1, 1),
    'reportDestination': {
        'integrationId': 'string',
        'containerId': 'string',
        'parentId': 'string',
        'documentId': 'string'
    }
}

Response Structure

  • (dict) --

    Output for the UpdateThreatModel operation.

    • threatModelId (string) --

      The unique identifier of the threat model.

    • title (string) --

      The title of the threat model.

    • agentSpaceId (string) --

      The unique identifier of the agent space that contains the threat model.

    • description (string) --

      A description of the application or system being threat modeled.

    • assets (dict) --

      The assets included in the threat model.

      • 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.

    • scopeDocs (list) --

      The scoped documents for the agent to focus on during threat modeling.

      • (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.

    • serviceRole (string) --

      The IAM service role used for the threat model.

    • logConfig (dict) --

      The CloudWatch Logs configuration for the threat model.

      • logGroup (string) --

        The name of the CloudWatch log group.

      • logStream (string) --

        The name of the CloudWatch log stream.

    • createdAt (datetime) --

      The date and time the threat model was created, in UTC format.

    • updatedAt (datetime) --

      The date and time the threat model was last updated, in UTC format.

    • 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.