startCodeRemediation method

Future<void> startCodeRemediation({
  1. required String agentSpaceId,
  2. required List<String> findingIds,
  3. String? codeReviewJobId,
  4. String? pentestJobId,
})

Initiates code remediation for one or more security findings. This creates pull requests in integrated repositories to fix the identified vulnerabilities.

Parameter agentSpaceId : The unique identifier of the agent space.

Parameter findingIds : The list of finding identifiers to initiate code remediation for.

Parameter codeReviewJobId : The unique identifier of the code review job that produced the findings. Mutually exclusive with pentestJobId.

Parameter pentestJobId : The unique identifier of the pentest job that produced the findings. Mutually exclusive with codeReviewJobId.

Implementation

Future<void> startCodeRemediation({
  required String agentSpaceId,
  required List<String> findingIds,
  String? codeReviewJobId,
  String? pentestJobId,
}) async {
  final $payload = <String, dynamic>{
    'agentSpaceId': agentSpaceId,
    'findingIds': findingIds,
    if (codeReviewJobId != null) 'codeReviewJobId': codeReviewJobId,
    if (pentestJobId != null) 'pentestJobId': pentestJobId,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/StartCodeRemediation',
    exceptionFnMap: _exceptionFns,
  );
}