Remediation
Using Console
- Go to the AWS CodeBuild console.
- Navigate to “Build projects”.
- Select the CodeBuild project where credentials are stored in plaintext.
- Click on “Edit”.
- Navigate to the “Environment” section.
- Find the environment variable containing the plaintext credential.
- Change the variable type from “Plaintext” to “Parameter Store” or “Secrets Manager”, depending on your preference.
- Click “Save”.
Using CLI
<project-name>
with the name of your CodeBuild project and <variable-name>
with the name of the environment variable containing the plaintext credential.
Using Python
You can use Boto3 to achieve this programmatically:'your-project-name'
with the name of your CodeBuild project and 'your-variable-name'
with the name of the environment variable containing the plaintext credential.
This script will update the specified CodeBuild project to use Parameter Store for the specified environment variable containing the plaintext credential.