Not only encrypted EBS volumes are attached to EC2 instances misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC2_AWS_2
Category - Subcategory
Storage - Encryption
Provider
AWS
Severity
LOW
Framework
Terraform, Terraform Plan
Impact
Encrypting your AWS EBS volumes helps protect your data from unauthorized access or tampering. That way, you can ensure that only authorized users can access and modify the contents of your volumes. Such action can help protect against external threats such as hackers or malware, as well as internal threats such as accidental or unauthorized access.
How to Fix
Resource: aws_volume_attachment, aws_instance, aws_ebs_volume
Arguments: volume_id and instance_id of aws_volume_attachment [source,go]
{ "resource "aws_instance" "web" { ami = "ami-21f78e11" availability_zone = "us-west-2a" instance_type = "t2.micro"
tags = { Name = "HelloWorld" }
}
resource "aws_volume_attachment" "ok_attachment1" { device_name = "/dev/sdh3" volume_id = aws_ebs_volume.ok_ebs2.id instance_id = aws_instance.web.id }
resource "aws_ebs_volume" "ok_ebs2" { availability_zone = "" encrypted = true }
", }
Last updated
Was this helpful?
