turbot/steampipe-mod-aws-compliance

Control: CodeBuild project S3 logs should be encrypted

Description

This control checks if S3 logs for a CodeBuild project are encrypted. The control fails if encryption is deactivated for S3 logs for a CodeBuild project.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.codebuild_project_s3_logs_encryption_enabled

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.codebuild_project_s3_logs_encryption_enabled --share

SQL

This control uses a named query:

select
arn as resource,
case
when not (logs_config -> 'S3Logs' ->> 'EncryptionDisabled')::bool then 'ok'
else 'alarm'
end as status,
case
when not (logs_config -> 'S3Logs' ->> 'EncryptionDisabled')::bool then title || ' S3Logs encryption enabled.'
else title || ' S3Logs encryption disabled.'
end as reason
, region, account_id
from
aws_codebuild_project;

Tags