Remediating a penetration test finding
When you view the findings for a penetration test, you can ask AWS Continuum to attempt to remediate a finding. For a connected private repository, AWS Continuum opens a pull request (or a merge request, for GitLab) with the proposed fix.
Prerequisites
Before you begin, ensure that you have the following:
-
A completed or in-progress penetration test run
-
A GitHub or GitLab integration, and the repositories of your application added to the penetration test as source repositories. To create an integration, see GitHub or GitLab.
-
Permission to start code remediation, which is the
continuum:StartPentestCodeRemediationaction. For example policies, see Identity-based policy examples for penetration testing. -
Familiarity with the architecture and security requirements of your application
Step 1: Enable or disable automatic remediation
You configure code remediation when you create or modify a penetration test. If you enable automatic remediation, AWS Continuum automatically attempts to remediate a finding when it confirms the finding during the penetration test. You can also start code remediation manually for a finding.
To enable automatic code remediation
-
Open the penetration test for editing, and go to the Additional configuration page.
-
For Code remediation, enable or disable code remediation.
-
Save the penetration test.
Step 2: Select repositories for code remediation
AWS Continuum opens pull requests in the source repositories of the penetration test. Add the repositories that you want to use for code remediation as source repositories.
To select repositories
-
On the Penetration test details page, in Source code and documents, choose your source code provider, for example your GitHub repositories.
-
Select the repositories that you want to use for code remediation.
-
Save the penetration test.
Step 3: Start a penetration test and view findings
Run the penetration test to detect findings. For more information, see Starting a run and Viewing penetration test findings.
Step 4: Start and view code remediation
To start and view code remediation
-
Open the finding.
-
If you enabled automatic code remediation, a code remediation starts once AWS Continuum confirms the finding. To start a code remediation manually, choose Remediate code.
-
In the Code Remediation section of the finding, view the status of the code remediation and the links to the pull requests or merge requests.
The status of a code remediation is In progress, Completed, or Failed. When a code remediation fails, the section shows the reason.
After you merge a fix, revalidate the finding to confirm that the vulnerability is resolved. To revalidate, see Revalidating penetration test findings.