Check ID:
Provider: AWS
Service:
Severity: MEDIUM
Categories:
Resource type:
codebuild_report_group_export_encryptedProvider: AWS
Service:
codebuildSeverity: MEDIUM
Categories:
encryptionResource type:
AwsCodeBuildProjectWhat this check verifies
CodeBuild report groups with export typeS3 are evaluated to confirm their exported test results are encrypted at rest with a KMS key.
Report groups configured with NO_EXPORT are out of scope.
Risk
Unencrypted S3 exports leave report data in plaintext, weakening confidentiality. If a bucket is misconfigured, compromised, or accessed by insiders, attackers can harvest test outputs for secrets, tokens, build paths, and system details, enabling credential theft and lateral movement.Recommendation
Enable at-rest encryption for report exports using KMS (prefer customer managed keys). Apply least privilege: restrict key usage to the CodeBuild role and required principals, enable rotation, and audit key usage. Combine with S3 bucket policies for defense in depth.Remediation
- CLI
- Terraform
- Native IaC
- Dashboard steps
References
- https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html#codebuild-7
- https://www.pulumi.com/registry/packages/aws/api-docs/codebuild/reportgroup/
- https://docs.aws.amazon.com/codebuild/latest/userguide/report-group-export-settings.html
- https://docs.aws.amazon.com/codebuild/latest/userguide/security-encryption.html
- https://docs.aws.amazon.com/securityhub/latest/userguide/codebuild-controls.html
- https://docs.amazonaws.cn/en_us/codebuild/latest/userguide/report-group-export-settings.html
- https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group-create-console.html
- https://docs.aws.amazon.com/codebuild/latest/userguide/update-report-group-console.html
- https://docs.aws.amazon.com/codebuild/latest/userguide/report-group-create.html
- https://docs.amazonaws.cn/en_us/codebuild/latest/userguide/test-report-group-create-console.html
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_report_group_export_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