Critical
CodeBuild
Regional
CodeBuild project environment variables should not contain clear text credentials
PCI DSSNISTISO 27001
Description
Detects clear-text credentials (such as AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, PASSWORD, or TOKEN) stored in CodeBuild project environment variables. Storing sensitive credentials in plaintext poses a significant security risk.
Remediation
To remediate this issue, remove any clear text credentials from the environment variables of your CodeBuild projects.
Steps
- Open the AWS CodeBuild console at https://console.aws.amazon.com/codebuild/.
- Choose the build project you want to modify.
- In the project settings, navigate to the 'Environment' section.
- Review the environment variables and remove any that contain clear text credentials such as 'AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'PASSWORD', 'TOKEN'.
- Consider using AWS Systems Manager Parameter Store or AWS Secrets Manager to securely store and manage credentials.
- Update the project to retrieve credentials from a secure source during the build process.
- Save the changes to the project configuration.
Compliance
PCI DSSNISTISO 27001