Action Trail Logging For All Regions Disabled
- Query id: c065b98e-1515-4991-9dca-b602bd6a2fbb
- Query name: Action Trail Logging For All Regions Disabled
- Platform: Terraform
- Severity: Medium
- Category: Observability
- URL: Github
Description¶
Action Trail Logging for all regions should be enabled
Documentation
Code samples¶
Code samples with security vulnerabilities¶
Positive test num. 1 - tf file
resource "alicloud_actiontrail_trail" "actiontrail2" {
trail_name = "action-trail"
oss_write_role_arn = "acs:ram::1182725xxxxxxxxxxx"
oss_bucket_name = "bucket_name"
event_rw = "All"
trail_region = "cn-hangzhou"
}
Positive test num. 2 - tf file
resource "alicloud_actiontrail_trail" "actiontrail3" {
trail_name = "action-trail"
oss_write_role_arn = "acs:ram::1182725xxxxxxxxxxx"
oss_bucket_name = "bucket_name"
event_rw = "Read"
trail_region = "cn-hangzhou"
}
Positive test num. 3 - tf file
resource "alicloud_actiontrail_trail" "actiontrail4" {
trail_name = "action-trail"
oss_write_role_arn = "acs:ram::1182725xxxxxxxxxxx"
oss_bucket_name = "bucket_name"
event_rw = "Write"
trail_region = "cn-hangzhou"
}