Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
codebuild_project_logging_enabledProvider: AWS
Service:
codebuildSeverity: MEDIUM
Categories:
loggingResource type:
AwsCodeBuildProjectWhat this check verifies
CodeBuild projects are assessed for logging configuration to Amazon CloudWatch Logs or S3, identifying when at least one destination isenabled for build logs and events.
Risk
Absence of build logging creates blind spots for integrity and accountability. Attackers or misconfigurations can alter artifacts, exfiltrate data, or misuse credentials with little trace, hindering forensics and incident response. Missing telemetry impedes correlation with other alerts, risking source code and secret confidentiality.Recommendation
Enable a log destination for every project-CloudWatch Logs or S3 (preferably both). Enforce defense in depth: encrypt logs, set retention, and restrict access on a least-privilege basis. Centralize and monitor logs, alert on anomalies, and avoid sensitive data in output. Use immutable retention to preserve auditability.Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console-logs
- https://codefresh.io/learn/devops-tools/aws-codebuild-the-basics-and-a-quick-tutorial/
- https://asecure.cloud/a/cfgrule_codebuild-project-logging-enabled/
- https://support.icompaas.com/support/solutions/articles/62000233680-ensure-that-codebuild-projects-have-s3-or-cloudwatch-logging-enabled
- https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-4
Where this check fires
This check runs on every scheduled scan against your AWS account. Findings appear at Cloud Security → Findings filterable byCheck ID = codebuild_project_logging_enabled. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to AWS checks