SecurityAgent / Client / start_pentest_job
start_pentest_job¶
- SecurityAgent.Client.start_pentest_job(**kwargs)¶
Starts a new pentest job for a pentest configuration. The job executes the security tests defined in the pentest.
See also: AWS API Documentation
Request Syntax
response = client.start_pentest_job( agentSpaceId='string', pentestId='string', jobType='FULL'|'REVALIDATION'|'CICD', selectedFindingIds=[ 'string', ], scopeChanges=[ { 'integrationId': 'string', 'providerResourceId': 'string', 'baseCommitSha': 'string', 'headCommitSha': 'string', 'triggerRunId': 'string' }, ] )
- Parameters:
agentSpaceId (string) –
[REQUIRED]
The unique identifier of the agent space.
pentestId (string) –
[REQUIRED]
The unique identifier of the pentest to start a job for.
jobType (string) – The type of pentest job to start. Valid values are FULL, REVALIDATION, and CICD. When set to REVALIDATION, the selectedFindingIds parameter is required. When set to CICD, the scopeChanges parameter defines the code changes to test.
selectedFindingIds (list) –
The list of finding identifiers to revalidate. Required when jobType is REVALIDATION. Each finding must belong to the same agent space and pentest.
(string) –
scopeChanges (list) –
The code changes that define the scope of a CI/CD pentest job. Provide this when starting a job with jobType CICD to test only the changes in the current pipeline run.
(dict) –
A code change in a CI/CD pipeline run that defines what a CI/CD pentest job tests. Each scope change identifies an integrated repository and the commit range for the change.
integrationId (string) – [REQUIRED]
The identifier of the integration for the source-code provider that hosts the repository.
providerResourceId (string) – [REQUIRED]
The provider-specific identifier of the repository the change belongs to.
baseCommitSha (string) –
The commit SHA that the change is compared against. When omitted, the change is evaluated against the head commit alone.
headCommitSha (string) – [REQUIRED]
The commit SHA at the tip of the change to be tested.
triggerRunId (string) –
The identifier of the CI/CD pipeline run that triggered this pentest job.
- Return type:
dict
- Returns:
Response Syntax
{ 'title': 'string', 'status': 'IN_PROGRESS'|'STOPPING'|'STOPPED'|'FAILED'|'COMPLETED', 'createdAt': datetime(2015, 1, 1), 'updatedAt': datetime(2015, 1, 1), 'pentestId': 'string', 'pentestJobId': 'string', 'agentSpaceId': 'string' }
Response Structure
(dict) –
Output for the StartPentestJob operation.
title (string) –
The title of the pentest job.
status (string) –
The current status of the pentest job.
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.
pentestId (string) –
The unique identifier of the pentest.
pentestJobId (string) –
The unique identifier of the started pentest job.
agentSpaceId (string) –
The unique identifier of the agent space.