Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ec2_ebs_encryption_by_default.guard): Does not do what it says #252

Open
mobri2a opened this issue Dec 19, 2023 · 0 comments
Open

(ec2_ebs_encryption_by_default.guard): Does not do what it says #252

mobri2a opened this issue Dec 19, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mobri2a
Copy link

mobri2a commented Dec 19, 2023

What is the problem?

This rule (ec2_ebs_encryption_by_default.guard does not check it EBS encryption is enabled by default, as this is not something that can be set in a Cloudformation template. See https://repost.aws/knowledge-center/ebs-automatic-encryption

The rule is actually checking if a VOLUME is encrypted, which is done more effectively by rules/aws/amazon_ec2/encrypted_volumes.guard

Remove this rule, as it is redundant and misleading.

Reproduction Steps

Run cfn-guard validate against test data for a volume with all amazon_ec2 rules. Note that both ec2_ebs_encryption_by_default and encrypted_volumes return findings. Dig deeper and realize the Encrypted=true is NOT the same thing as encryption by default.

What did you expect to happen?

Expected the account-level default for EBS encryption to be examined (as in the AWS Config rule), but this is not possible looking at a CloudFormation template.

What actually happened?

Rule actually checks if a volume is encrypted. This is already done more effectively by rules/aws/amazon_ec2/encrypted_volumes.guard

CloudFormation Guard Version

Not applicable

OS

Not applicable

OS Version

No response

Other information

Remove ec2_ebs_encryption_by_default from rules/aws/amazon_ec2

@mobri2a mobri2a added the bug Something isn't working label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant