Control: VPC security groups should restrict uses of 'launch-wizard' security groups.
Description
Ensure the launch-wizard security group in your AWS account is not being used.
Usage
Run the control in your terminal:
powerpipe control run aws_compliance.control.vpc_security_group_not_uses_launch_wizard_sg
Snapshot and share results via Turbot Pipes:
powerpipe loginpowerpipe control run aws_compliance.control.vpc_security_group_not_uses_launch_wizard_sg --share
SQL
This control uses a named query:
with associated_sg as ( select distinct (sg ->> 'GroupName') as sg_name from aws_ec2_network_interface, jsonb_array_elements(groups) as sg where (sg ->> 'GroupName') like 'launch-wizard%')select arn as resource, case when a.sg_name is null then 'ok' else 'alarm' end as status, case when a.sg_name is null then title || ' not in use.' else title || ' in use.' end as reason , region, account_idfrom aws_vpc_security_group as s left join associated_sg as a on a.sg_name = s.group_namewhere group_name like 'launch-wizard%';