start_pentest_job
¶
start_pentest_job(
agent_space_id: str,
pentest_id: str,
*,
config_overrides: Optional[SecurityAgentClientConfig] = None,
job_type: Optional[JobType] = None,
selected_finding_ids: Optional[StringList] = None,
scope_changes: Optional[ScopeChangeList] = None,
) -> StartPentestJobOutput
Starts a new pentest job for a pentest configuration. The job executes the security tests defined in the pentest.
Parameters:
-
agent_space_id(str) –The unique identifier of the agent space.
-
pentest_id(str) –The unique identifier of the pentest to start a job for.
-
job_type(Optional[JobType], default:None) –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.
-
selected_finding_ids(Optional[StringList], default:None) –The list of finding identifiers to revalidate. Required when jobType is REVALIDATION. Each finding must belong to the same agent space and pentest.
-
scope_changes(Optional[ScopeChangeList], default:None) –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.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_securityagent/_services/security_agent.py
4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 | |