Check ID:
Provider: AWS
Service:
Severity: LOW
Categories:
Resource type:
codebuild_project_s3_logs_encryptedProvider: AWS
Service:
codebuildSeverity: LOW
Categories:
encryption, loggingResource type:
AwsCodeBuildProjectWhat this check verifies
CodeBuild projects with S3 log delivery are evaluated for encryption at rest on their S3 log objects. Only projects that write logs to S3 are in scope.Risk
Unencrypted build logs jeopardize confidentiality. Logs can include secrets, environment data, and error traces. If the bucket is misconfigured or storage is accessed, attackers can harvest credentials and map the pipeline, enabling lateral movement and build tampering that impacts integrity.Recommendation
Enable encryption at rest for S3 logs on CodeBuild projects. PreferSSE-KMS with customer-managed keys to control access and rotation. Enforce encryption via bucket policy, apply least privilege to log access, and monitor access patterns. If needed, segregate logs and keep them private.
Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/codebuild/latest/userguide/change-project.html#change-project-console-logs
- https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-3
- https://support.icompaas.com/support/solutions/articles/62000233685-ensure-s3-logs-for-codebuild-projects-are-encrypted-at-rest
- https://hub.powerpipe.io/mods/turbot/steampipe-mod-aws-compliance/benchmarks/control.codebuild_project_s3_logs_encryption_enabled
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_s3_logs_encrypted. 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