Control: 7 CodeBuild report group exports should be encrypted at rest
Description
This control checks whether the test results of an AWS CodeBuild report group that are exported to an Amazon Simple Storage Service (Amazon S3) bucket are encrypted at rest. The control fails if the report group export isn't encrypted at rest.
Data at rest refers to data that's stored in persistent, non-volatile storage for any duration. Encrypting data at rest helps you protect its confidentiality, which reduces the risk that an unauthorized user can access it.
Remediation
To encrypt the report group export to S3, see Update a report group in the AWS CodeBuild User Guide.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.foundational_security_codebuild_7
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.foundational_security_codebuild_7 --share
SQL
This control uses a named query:
select arn as resource, case when not (export_config -> 'S3Destination' -> 'EncryptionDisabled')::bool then 'ok' else 'alarm' end as status, case when not (export_config -> 'S3Destination' -> 'EncryptionDisabled')::bool then title || ' export encryption at rest enabled.' else title || ' export encryption at rest disabled.' end as reason , region, account_idfrom aws_codebuild_report_group;