@@ -10,7 +10,7 @@ const findResourcesByPattern = (construct: IConstruct, patterns: Array<string>):
1010 const search = ( node : IConstruct ) : void => {
1111 if ( node instanceof CfnResource ) {
1212 for ( const pattern of patterns ) {
13- if ( node . logicalId . includes ( pattern ) && ! seen . has ( node . logicalId ) ) {
13+ if ( node . node . id . includes ( pattern ) && ! seen . has ( node . logicalId ) ) {
1414 matches . push ( node )
1515 seen . add ( node . logicalId )
1616 break
@@ -63,23 +63,9 @@ export const applyCfnGuardSuppressions = (stack: Stack): void => {
6363 // Suppress all cfn-guard checks for all Lambda functions (including implicit CDK-generated ones)
6464 const allLambdas = findResourcesByType ( stack , "AWS::Lambda::Function" )
6565 addSuppressions ( allLambdas , [ "LAMBDA_DLQ_CHECK" , "LAMBDA_INSIDE_VPC" , "LAMBDA_CONCURRENCY_CHECK" ] )
66-
67- // Suppress S3 bucket guard checks
68- const bucketResources = findResourcesByPattern ( stack , [ "Bucket" , "Docs" , "Storage" ] )
69- addSuppressions (
70- bucketResources ,
71- [
72- "S3_BUCKET_REPLICATION_ENABLED" ,
73- "S3_BUCKET_LOGGING_ENABLED" ,
74- "S3_BUCKET_DEFAULT_LOCK_ENABLED"
75- ]
76- )
77-
78- // Suppress S3 policy guard checks
79- const policyResources = findResourcesByPattern ( stack , [ "Policy" , "BucketPolicy" ] )
80- addSuppressions ( policyResources , [ "S3_BUCKET_SSL_REQUESTS_ONLY" ] )
81-
82- // Suppress API Gateway stage guard checks
83- const stageResources = findResourcesByPattern ( stack , [ "Stage" , "DeploymentStage" ] )
84- addSuppressions ( stageResources , [ "API_GW_CACHE_ENABLED_AND_ENCRYPTED" ] )
66+ const permissionResources = findResourcesByPattern ( stack , [
67+ "ApiPermission.Test.EpsAssistMeStackApisEpsAssistApiGateway1E1CF19C.POST..slack.events" ,
68+ "AllowBucketNotificationsToEpsAssistMeStackFunctionsSyncKnowledgeBaseFunctionepsamSyncKnowledgeBaseFunction94D011F3"
69+ ] )
70+ addSuppressions ( permissionResources , [ "LAMBDA_FUNCTION_PUBLIC_ACCESS_PROHIBITED" ] )
8571}
0 commit comments