CodeBuild projects should have logging enabled

Description

This control verifies that a CodeBuild project environment has logging enabled, requiring at least one log option, either to S3 or CloudWatch. Enabling logging is essential for potential forensic analysis in the event of a security incident. Correlating unusual activities in CodeBuild projects with threat detections enhances the reliability of those detections.

Remediation

For guidance on configuring logging settings, refer to the Logging and monitoring in AWS CodeBuild section of the AWS CodeBuild User Guide.