CloudTrail trail is not configured to log data events for S3 buckets Affecting CloudTrail service in AWS
Severity Framework
Snyk CCSS
Rule category
Logging / Configuration
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
HIPAA
ISO-27001
NIST-800-53
PCI-DSS
SOC-2
- Snyk ID SNYK-CC-00210
- credit Snyk Research Team
Description
Data events provide visibility into the resource operations performed on or within a resource, including S3 object-level API activity. By default, trails do not log data events. Note that data events are often high-volume activities.
How to fix?
Set the event_selector.data_resource.type
attribute to AWS::S3::Object
, and event_selector.data_resource.values
to arn:aws:s3:::<bucket name>/
.
Example Configuration
resource "aws_cloudtrail" "valid_trail" {
name = "valid_trail"
s3_bucket_name = "${aws_s3_bucket.ct_bucket.id}"
event_selector {
data_resource {
type = "AWS::S3::Object"
values = ["${aws_s3_bucket.important_bucket.arn}/"]
}
}
}