SecurityAgent / Client / batch_get_pentests

batch_get_pentests

SecurityAgent.Client.batch_get_pentests(**kwargs)

Retrieves multiple pentests in a single request

See also: AWS API Documentation

Request Syntax

response = client.batch_get_pentests(
    pentestIds=[
        'string',
    ],
    agentSpaceId='string'
)
Parameters:
  • pentestIds (list) –

    [REQUIRED]

    List of pentest IDs to retrieve

    • (string) –

  • agentSpaceId (string) –

    [REQUIRED]

    ID of the agent space where the pentest exists

Return type:

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'
                    },
                ],
                'documents': [
                    {
                        's3Location': 'string',
                        'artifactId': 'string'
                    },
                ],
                'sourceCode': [
                    {
                        's3Location': 'string'
                    },
                ],
                'integratedRepositories': [
                    {
                        'integrationId': 'string',
                        'providerResourceId': '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',
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'notFound': [
        'string',
    ]
}

Response Structure

  • (dict) –

    Output for the BatchGetPentests operation

    • pentests (list) –

      List of successfully retrieved pentests

      • (dict) –

        Represents a pentest configuration and execution details

        • pentestId (string) –

          Unique identifier for the pentest

        • agentSpaceId (string) –

          ID of the agent space where the pentest exists

        • title (string) –

          Title or name of the pentest

        • assets (dict) –

          Collection of assets to be tested or used during the pentest

          • endpoints (list) –

            List of web application endpoints to test

            • (dict) –

              Represents a web application endpoint to be tested

              • uri (string) –

                URI of the endpoint to test

          • actors (list) –

            List of actors that interact with the system

            • (dict) –

              Represents an entity that interacts with the system during security testing

              • identifier (string) –

                Unique identifier for the actor (case-insensitive)

              • uris (list) –

                List of URIs accessible with the actor’s credentials

                • (string) –

              • authentication (dict) –

                Authentication information used by the actor to access resources

                • providerType (string) –

                  Provider type for the authentication credentials

                • value (string) –

                  Authentication credential value or reference

              • description (string) –

                Additional description or details about the actor

          • documents (list) –

            List of documents providing context for testing

            • (dict) –

              Information about a document relevant to security testing

              • s3Location (string) –

                S3 storage location of the document

              • artifactId (string) –

                Artifact ID of the document

          • sourceCode (list) –

            List of source code repositories for static analysis

            • (dict) –

              Information about a source code repository for static analysis

              • s3Location (string) –

                S3 storage location of the repository

          • integratedRepositories (list) –

            List of integrated code repositories

            • (dict) –

              Information about an integrated repository

              • integrationId (string) –

                Integration identifier

              • providerResourceId (string) –

                External provider resource identifier, e.g., Github repository identifier

        • excludeRiskTypes (list) –

          A list of risk types excluded from the pentest execution

          • (string) –

            Type of security risk

        • serviceRole (string) –

          Service role ARN for accessing customer resources

        • logConfig (dict) –

          CloudWatch log group and stream prefix where pentest execution logs are stored

          • logGroup (string) –

            Name of the CloudWatch log group

          • logStream (string) –

            Name of the CloudWatch log stream

        • vpcConfig (dict) –

          VPC configuration that the Security Agent accesses

          • vpcArn (string) –

            ARN or ID of the customer VPC

          • securityGroupArns (list) –

            List of security group ARNs or IDs in the customer VPC

            • (string) –

              ARN or ID of a security group

          • subnetArns (list) –

            List of subnet ARNs or IDs in the customer VPC

            • (string) –

              ARN or ID of a subnet

        • networkTrafficConfig (dict) –

          Configuration for network traffic filtering

          • rules (list) –

            Traffic filtering rules

            • (dict) –

              Network traffic filtering rule

              • effect (string) –

                Action to take when the rule matches

              • pattern (string) –

                Pattern to match against

              • networkTrafficRuleType (string) –

                Type of network traffic rule

          • customHeaders (list) –

            Custom headers for requests

            • (dict) –

              Custom headers to be set for network requests

              • name (string) –

                Name of header to set value for

              • value (string) –

                Value to set for header

        • codeRemediationStrategy (string) –

          Strategy for code remediation on findings

        • createdAt (datetime) –

          Timestamp when the pentest was created

        • updatedAt (datetime) –

          Timestamp when the pentest was last updated

    • notFound (list) –

      List of pentest IDs that could not be found

      • (string) –