Ensure that Privileged Mode is disabled for your Amazon CodeBuild project environments. Configuring CodeBuild project environments with Privileged Mode can potentially allow unauthorized access to sensitive resources and increase the risk of malicious code execution.
excellence
Adhering to AWS cloud security best practices is vital in preventing unwanted privilege escalation, which may otherwise result in tampering or loss of critical cloud resources. As a precautionary measure, it is recommended to disable the Privileged Mode at the CodeBuild project environment level, except when building Docker containers where using the feature is required.
Some builds require Privileged Mode. Amazon CodeBuild project environments that are using Docker containers are allowed to use the Privileged Mode.
Audit
To determine if the Privileged Mode is disabled for Amazon CodeBuild project environments, perform the following actions:
Remediation / Resolution
To disable Privileged Mode for your Amazon CodeBuild build project environments, perform the following actions:
References
- AWS Documentation
- AWS CodeBuild FAQs
- AWS CodeBuild concepts
- Change a build project's settings in AWS CodeBuild
- Change a build project's settings (console)
- Change a build project's settings (AWS CLI)
- AWS Command Line Interface (CLI) Documentation
- list-projects
- batch-get-projects
- update-project