Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class SecurityControlsPlaybookPrimaryStack extends Stack {
stringValue: `${controlSpec.executes}`,
});
}
const generatorId = `control/${controlSpec.control}`;
const generatorId = `security-control/${controlSpec.control}`;
new Trigger(stack, `${props.securityStandard} ${controlSpec.control}`, {
securityStandard: props.securityStandard,
securityStandardVersion: props.securityStandardVersion,
Expand Down
2 changes: 1 addition & 1 deletion source/playbooks/SC/ssmdocs/SC_AutoScaling.1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EnableAutoScalingGroupELBHealthCheckDocument extends ControlRunbookDocumen
remediationName: 'EnableAutoScalingGroupELBHealthCheck',
scope: RemediationScope.REGIONAL,
resourceIdName: 'AutoScalingGroupName',
resourceIdRegex: String.raw`^arn:(?:aws|aws-cn|aws-us-gov):autoscaling:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:autoScalingGroup:(?:[0-9a-fA-F]{11}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}):autoScalingGroupName\/(.*)$`,
resourceIdRegex: String.raw`^arn:(?:aws|aws-cn|aws-us-gov):autoscaling:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:autoScalingGroup:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}):autoScalingGroupName/(.{1,255})$`,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fix we made in v1.5.1 to the other standards but it didn't get merged forward. I reviewed all the CRs between v1.5.0 and v1.5.1 for anything similar and found nothing.

This does bring up the fact that the regexes in SC are not validated against the regex registry. I'll add an item to do that.

updateDescription: HardCodedString.of('ASG health check type updated to ELB'),
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ exports[`admin stack 1`] = `
],
},
"GeneratorId": [
"control/Example.1",
"security-control/Example.1",
],
"RecordState": [
"ACTIVE",
Expand Down Expand Up @@ -143,7 +143,7 @@ exports[`admin stack 1`] = `
],
},
"GeneratorId": [
"control/Example.3",
"security-control/Example.3",
],
"RecordState": [
"ACTIVE",
Expand Down Expand Up @@ -236,7 +236,7 @@ exports[`admin stack 1`] = `
],
},
"GeneratorId": [
"control/Example.5",
"security-control/Example.5",
],
"RecordState": [
"ACTIVE",
Expand Down Expand Up @@ -1137,7 +1137,7 @@ Default: 30 seconds
"expected_control_id": [
"AutoScaling.1",
],
"parse_id_pattern": "^arn:(?:aws|aws-cn|aws-us-gov):autoscaling:(?:[a-z]{2}(?:-gov)?-[a-z]+-\\d):\\d{12}:autoScalingGroup:(?:[0-9a-fA-F]{11}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}):autoScalingGroupName\\/(.*)$",
"parse_id_pattern": "^arn:(?:aws|aws-cn|aws-us-gov):autoscaling:(?:[a-z]{2}(?:-gov)?-[a-z]+-\\d):\\d{12}:autoScalingGroup:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}):autoScalingGroupName/(.{1,255})$",
},
"Runtime": "python3.8",
"Script": "# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Expand Down