2026/07/27 - AWS Security Agent - 2 updated api methods
Changes AWS Security Agent adds a new task hours field that reflects the active work done for a task.
{'tasks': {'taskHours': 'double'}}
Retrieves information about one or more tasks within a pentest job.
See also: AWS API Documentation
Request Syntax
client.batch_get_pentest_job_tasks(
agentSpaceId='string',
taskIds=[
'string',
]
)
string
[REQUIRED]
The unique identifier of the agent space that contains the tasks.
list
[REQUIRED]
The list of task identifiers to retrieve.
(string) --
dict
Response Syntax
{
'tasks': [
{
'taskId': 'string',
'pentestId': 'string',
'pentestJobId': 'string',
'agentSpaceId': 'string',
'title': 'string',
'description': 'string',
'categories': [
{
'name': 'string',
'isPrimary': True|False
},
],
'riskType': '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',
'targetEndpoint': {
'uri': 'string'
},
'executionStatus': 'IN_PROGRESS'|'ABORTED'|'COMPLETED'|'INTERNAL_ERROR'|'FAILED',
'logsLocation': {
'logType': 'CLOUDWATCH',
'cloudWatchLog': {
'logGroup': 'string',
'logStream': 'string'
}
},
'taskHours': 123.0,
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
},
],
'notFound': [
'string',
]
}
Response Structure
(dict) --
Output for the BatchGetPentestJobTasks operation.
tasks (list) --
The list of tasks that were found.
(dict) --
Represents an individual security test task within a pentest job. Each task targets a specific risk type or endpoint and executes independently.
taskId (string) --
The unique identifier of the task.
pentestId (string) --
The unique identifier of the pentest associated with the task.
pentestJobId (string) --
The unique identifier of the pentest job that contains the task.
agentSpaceId (string) --
The unique identifier of the agent space.
title (string) --
The title of the task.
description (string) --
A description of the task.
categories (list) --
The list of categories assigned to the task.
(dict) --
Represents a category assigned to a security testing task.
name (string) --
The name of the category.
isPrimary (boolean) --
Indicates whether this is the primary category for the task.
riskType (string) --
The type of security risk the task is testing for.
targetEndpoint (dict) --
The target endpoint being tested by the task.
uri (string) --
The URI of the endpoint.
executionStatus (string) --
The current execution status of the task.
logsLocation (dict) --
The location of the task execution logs.
logType (string) --
The type of log storage. Currently, only CLOUDWATCH is supported.
cloudWatchLog (dict) --
The CloudWatch Logs location for the task logs.
logGroup (string) --
The name of the CloudWatch log group.
logStream (string) --
The name of the CloudWatch log stream.
taskHours (float) --
The number of active work hours consumed by the task during execution.
createdAt (datetime) --
The date and time the task was created, in UTC format.
updatedAt (datetime) --
The date and time the task was last updated, in UTC format.
notFound (list) --
The list of task identifiers that were not found.
(string) --
{'taskSummaries': {'taskHours': 'double'}}
Returns a paginated list of task summaries for the specified pentest job, optionally filtered by step name or category.
See also: AWS API Documentation
Request Syntax
client.list_pentest_job_tasks(
agentSpaceId='string',
maxResults=123,
pentestJobId='string',
stepName='PREFLIGHT'|'STATIC_ANALYSIS'|'PENTEST'|'FINALIZING'|'VALIDATION',
categoryName='string',
nextToken='string'
)
string
[REQUIRED]
The unique identifier of the agent space.
integer
The maximum number of results to return in a single call.
string
The unique identifier of the pentest job to list tasks for.
string
Filter tasks by step name. Valid values include PREFLIGHT, STATIC_ANALYSIS, PENTEST, VALIDATION, and FINALIZING.
string
Filter tasks by category name.
string
A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.
dict
Response Syntax
{
'taskSummaries': [
{
'taskId': 'string',
'pentestId': 'string',
'pentestJobId': 'string',
'agentSpaceId': 'string',
'title': 'string',
'riskType': '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',
'executionStatus': 'IN_PROGRESS'|'ABORTED'|'COMPLETED'|'INTERNAL_ERROR'|'FAILED',
'taskHours': 123.0,
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
Output for the ListPentestJobTasks operation.
taskSummaries (list) --
The list of task summaries.
(dict) --
Contains summary information about a task.
taskId (string) --
The unique identifier of the task.
pentestId (string) --
The unique identifier of the pentest associated with the task.
pentestJobId (string) --
The unique identifier of the pentest job that contains the task.
agentSpaceId (string) --
The unique identifier of the agent space.
title (string) --
The title of the task.
riskType (string) --
The type of security risk the task is testing for.
executionStatus (string) --
The current execution status of the task.
taskHours (float) --
The number of active work hours consumed by the task during execution.
createdAt (datetime) --
The date and time the task was created, in UTC format.
updatedAt (datetime) --
The date and time the task was last updated, in UTC format.
nextToken (string) --
A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.