Skip to main content

pentests

Creates, updates, deletes, gets or lists a pentests resource.

Overview

Namepentests
TypeResource
Idaws.securityagent.pentests

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
not_foundarrayThe list of pentest identifiers that were not found.
pentestsarrayThe list of pentests that were found.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
batch_get_pentestsselectregionRetrieves information about one or more pentests in an agent space.
list_pentestsselectregionReturns a paginated list of pentest summaries for the specified agent space.
create_pentestinsertregion, title, agentSpaceIdCreates a new pentest configuration in an agent space. A pentest defines the security test parameters, including target assets, risk type exclusions, and logging configuration.
update_pentestupdateregion, pentestId, agentSpaceIdUpdates an existing pentest configuration.
batch_delete_pentestsexecregion, pentestIds, agentSpaceIdDeletes one or more pentests from an agent space.
start_pentest_jobexecregion, agentSpaceId, pentestIdStarts a new pentest job for a pentest configuration. The job executes the security tests defined in the pentest.
stop_pentest_jobexecregion, agentSpaceId, pentestJobIdStops a running pentest job. The job transitions to a stopping state and then to stopped after cleanup completes.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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

SELECT
not_found,
pentests
FROM aws.securityagent.pentests
WHERE region = '{{ region }}' -- required
;

INSERT examples

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.

INSERT INTO aws.securityagent.pentests (
title,
agentSpaceId,
assets,
excludeRiskTypes,
serviceRole,
logConfig,
vpcConfig,
networkTrafficConfig,
codeRemediationStrategy,
disableManagedSkills,
maxTaskHours,
region
)
SELECT
'{{ title }}' /* required */,
'{{ agentSpaceId }}' /* required */,
'{{ assets }}',
'{{ excludeRiskTypes }}',
'{{ serviceRole }}',
'{{ logConfig }}',
'{{ vpcConfig }}',
'{{ networkTrafficConfig }}',
'{{ codeRemediationStrategy }}',
'{{ disableManagedSkills }}',
{{ maxTaskHours }},
'{{ region }}'
RETURNING
agent_space_id,
assets,
created_at,
exclude_risk_types,
log_config,
pentest_id,
service_role,
title_,
updated_at
;

UPDATE examples

Updates an existing pentest configuration.

UPDATE aws.securityagent.pentests
SET
pentestId = '{{ pentestId }}',
agentSpaceId = '{{ agentSpaceId }}',
title = '{{ title }}',
assets = '{{ assets }}',
excludeRiskTypes = '{{ excludeRiskTypes }}',
serviceRole = '{{ serviceRole }}',
logConfig = '{{ logConfig }}',
vpcConfig = '{{ vpcConfig }}',
networkTrafficConfig = '{{ networkTrafficConfig }}',
codeRemediationStrategy = '{{ codeRemediationStrategy }}',
disableManagedSkills = '{{ disableManagedSkills }}',
maxTaskHours = {{ maxTaskHours }}
WHERE
region = '{{ region }}' --required
AND pentestId = '{{ pentestId }}' --required
AND agentSpaceId = '{{ agentSpaceId }}' --required
RETURNING
agent_space_id,
assets,
created_at,
exclude_risk_types,
log_config,
pentest_id,
service_role,
title_,
updated_at;

Lifecycle Methods

Deletes one or more pentests from an agent space.

EXEC aws.securityagent.pentests.batch_delete_pentests
@region='{{ region }}' --required
@@json=
'{
"pentestIds": "{{ pentestIds }}",
"agentSpaceId": "{{ agentSpaceId }}"
}'
;