Skip to content

Commit

Permalink
Merge pull request #531 from turbot/release/v0.54
Browse files Browse the repository at this point in the history
Release/v0.54
  • Loading branch information
misraved authored Nov 22, 2022
2 parents ffe99a6 + 2767802 commit 861866f
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v0.54 [2022-11-22]

_What's new?_

- New AWS Foundational Security Best Practices control added: ([#529](https://github.com/turbot/steampipe-mod-aws-compliance/pull/529))
- AutoScaling.9 (`steampipe check control.foundational_security_autoscaling_9`)

## v0.53 [2022-11-17]

_Bug fixes_
Expand Down
16 changes: 15 additions & 1 deletion foundational_security/autoscaling.sp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ benchmark "foundational_security_autoscaling" {
control.foundational_security_autoscaling_3,
control.foundational_security_autoscaling_4,
control.foundational_security_autoscaling_5,
control.foundational_security_autoscaling_6
control.foundational_security_autoscaling_6,
control.foundational_security_autoscaling_9
]

tags = merge(local.foundational_security_autoscaling_common_tags, {
Expand Down Expand Up @@ -98,3 +99,16 @@ control "foundational_security_autoscaling_6" {
foundational_security_category = "high_availability"
})
}

control "foundational_security_autoscaling_9" {
title = "9 EC2 Auto Scaling groups should use EC2 launch templates"
description = "This control checks whether an Amazon EC2 Auto Scaling group is created from an EC2 launch template. This control fails if an Amazon EC2 Auto Scaling group is not created with a launch template or if a launch template is not specified in a mixed instances policy."
severity = "medium"
sql = query.autoscaling_group_uses_ec2_launch_template.sql
documentation = file("./foundational_security/docs/foundational_security_autoscaling_9.md")

tags = merge(local.foundational_security_autoscaling_common_tags, {
foundational_security_item_id = "autoscaling_9"
foundational_security_category = "resource_configuration"
})
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Description

This control checks whether an Amazon EC2 Auto Scaling group is created from an EC2 launch template. This control fails if an Amazon EC2 Auto Scaling group is not created with a launch template or if a launch template is not specified in a mixed instances policy.

An EC2 Auto Scaling group can be created from either an EC2 launch template or a launch configuration. However, using a launch template to create an Auto Scaling group ensures that you have access to the latest features and improvements.

## Remediation

To create an Auto Scaling group with an EC2 launch template, see [Create an Auto Scaling group using a launch template](https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-launch-template.html) in the Amazon EC2 Auto Scaling User Guide. For information about how to replace a launch configuration with a launch template, see [Replace a launch configuration with a launch template](https://docs.aws.amazon.com/autoscaling/ec2/userguide/replace-launch-config.html) in the Amazon EC2 User Guide for Windows Instances.
16 changes: 16 additions & 0 deletions query/autoscaling/autoscaling_group_uses_ec2_launch_template.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
select
-- Required Columns
autoscaling_group_arn as resource,
case
when launch_template_id is not null then 'ok'
else 'alarm'
end as status,
case
when launch_template_id is not null then title || ' using an EC2 launch template.'
else title || ' not using an EC2 launch template.'
end as reason,
-- Additional Dimensions
region,
account_id
from
aws_ec2_autoscaling_group;

0 comments on commit 861866f

Please sign in to comment.