Commit 97ae651 1 parent 947abb0 commit 97ae651 Copy full SHA for 97ae651
File tree 2 files changed +5
-3
lines changed
plugins/cloudtrail/pkg/cloudtrail
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ const (
48
48
PluginName = "cloudtrail"
49
49
PluginDescription = "reads cloudtrail JSON data saved to file in the directory specified in the settings"
50
50
PluginContact = "github.com/falcosecurity/plugins/"
51
- PluginVersion = "0.12.4 "
51
+ PluginVersion = "0.12.5 "
52
52
PluginEventSource = "aws_cloudtrail"
53
53
)
54
54
Original file line number Diff line number Diff line change @@ -271,15 +271,17 @@ func (oCtx *PluginInstance) openS3(input string) error {
271
271
// bucket_name/prefix_name/AWSLogs/Account ID/CloudTrail/region/YYYY/MM/DD/AccountID_CloudTrail_RegionName_YYYYMMDDTHHmmZ_UniqueString.json.gz
272
272
// for organization trails the format is
273
273
// bucket_name/prefix_name/AWSLogs/O-ID/Account ID/CloudTrail/Region/YYYY/MM/DD/AccountID_CloudTrail_RegionName_YYYYMMDDTHHmmZ_UniqueString.json.gz
274
+ // for pre ControlTower organization trails the format is
275
+ // bucket_name/prefix_name/AWSLogs/Account ID/CloudTrail/Region/YYYY/MM/DD/AccountID_CloudTrail_RegionName_YYYYMMDDTHHmmZ_UniqueString.json.gz
274
276
// Reduce the number of pages we have to process using "StartAfter" parameters
275
277
// here, then trim individual filepaths below.
276
278
277
279
intervalPrefix := prefix
278
280
279
281
// For durations, carve out a special case for "Copy S3 URI" in the AWS console, which gives you
280
282
// bucket_name/prefix_name/AWSLogs/<Account ID>/ or bucket_name/prefix_name/AWSLogs/<Org-ID>/<Account ID>/
281
- awsLogsRE := regexp .MustCompile (`AWSLogs/(?:o-[a-z0-9]{10,32}/)?\d{12}/?$` )
282
- awsLogsOrgRE := regexp .MustCompile (`AWSLogs/o-[a-z0-9]{10,32}/?$` )
283
+ awsLogsRE := regexp .MustCompile (`/ AWSLogs/(?:o-[a-z0-9]{10,32}/)?\d{12}/?$` )
284
+ awsLogsOrgRE := regexp .MustCompile (`/ AWSLogs(?: /o-[a-z0-9]{10,32})? /?$` )
283
285
if awsLogsRE .MatchString (prefix ) {
284
286
if (! strings .HasSuffix (intervalPrefix , "/" )) {
285
287
intervalPrefix += "/"
You can’t perform that action at this time.
0 commit comments