Severity Framework
Snyk CCSS
Rule category
Data / Access
Is your enviroment affected by this misconfiguration?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsFrameworks
CIS-Controls
CSA-CCM
- Snyk ID SNYK-CC-00298
- credit Snyk Research Team
Description
Objects are not encrypted by default when stored in the S3 bucket. Anyone with access to the destination S3 bucket will be able to read the contents of the object.
How to fix?
Set server_side_encryption
attribute to AES256
or aws:kms
.
Example Configuration
# Example aws_s3_bucket_object
resource "aws_s3_bucket_object" "allowed" {
key = "allowedbucketobject"
bucket = aws_s3_bucket.b1.id
server_side_encryption = "AES256"
}
# Example aws_s3_object
resource "aws_s3_object" "allowed2" {
key = "allowed2object"
bucket = aws_s3_bucket.b1.id
server_side_encryption = "aws:kms"
}