Control: EBS snapshots should not be publicly restorable
Description
Manage access to the AWS Cloud by ensuring EBS snapshots are not publicly restorable.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.ebs_snapshot_not_publicly_restorable
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.ebs_snapshot_not_publicly_restorable --share
SQL
This control uses a named query:
select 'arn:' || partition || ':ec2:' || region || ':' || account_id || ':snapshot/' || snapshot_id as resource, case when create_volume_permissions @> '[{"Group": "all", "UserId": null}]' then 'alarm' else 'ok' end as status, case when create_volume_permissions @> '[{"Group": "all", "UserId": null}]' then title || ' is publicly restorable.' else title || ' is not publicly restorable.' end as reason , region, account_idfrom aws_ebs_snapshot;