Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

Commit e201e06

Browse files
committed
fix nag
1 parent 2532002 commit e201e06

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

core/test/unit/cdk-nag/nag-emr-eks.test.ts

+5
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,11 @@ NagSuppressions.addResourceSuppressionsByPath(
495495
[{ id: 'AwsSolutions-L1', reason: 'Runtime set the by the L2 construct, cannot be changed' }],
496496
);
497497

498+
NagSuppressions.addResourceSuppressionsByPath(stack, 'eks-emr-studio/eksemrstudiodataplatformCluster5BF625E0-AlbController/alb-sa/Role/DefaultPolicy/Resource', [{
499+
id: 'AwsSolutions-IAM5',
500+
reason: 'IAM policies defined by L2 constructs',
501+
}]);
502+
498503

499504
test('No unsuppressed Warnings', () => {
500505
const warnings = Annotations.fromStack(stack).findWarning('*', Match.stringLikeRegexp('AwsSolutions-.*'));

core/test/unit/cdk-nag/nag-notebook-platform.test.ts

+16
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,22 @@ NagSuppressions.addResourceSuppressionsByPath(
584584
[{ id: 'AwsSolutions-L1', reason: 'Runtime set the by the L2 construct, cannot be changed' }],
585585
);
586586

587+
NagSuppressions.addResourceSuppressionsByPath(stack, 'eks-emr-studio/data-platform/IamPolicyEbsCsiDriverIAMPolicy/Resource', [{
588+
id: 'AwsSolutions-IAM5',
589+
reason: 'use for the EBS CSI driver',
590+
}]);
591+
592+
NagSuppressions.addResourceSuppressionsByPath(stack, 'eks-emr-studio/data-platformCluster/KubectlHandlerRole/Resource', [{
593+
id: 'AwsSolutions-IAM4',
594+
reason: 'IAM policies defined by custom resources for kubectl lambda L2 construct',
595+
}]);
596+
597+
NagSuppressions.addResourceSuppressionsByPath(stack, 'eks-emr-studio/eksemrstudiodataplatformCluster5BF625E0-AlbController/alb-sa/Role/DefaultPolicy/Resource', [{
598+
id: 'AwsSolutions-IAM5',
599+
reason: 'IAM policies defined by L2 constructs',
600+
}]);
601+
602+
587603
test('No unsuppressed Errors', () => {
588604
const errors = Annotations.fromStack(stack).findError('*', Match.stringLikeRegexp('AwsSolutions-.*'));
589605
console.log(errors);

0 commit comments

Comments
 (0)