turbot/steampipe-mod-aws-compliance

Control: 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.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.codebuild_report_group_export_encryption_at_rest_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.codebuild_report_group_export_encryption_at_rest_enabled --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_id
from
aws_codebuild_report_group;

Tags