1- /* eslint-disable max-len */
1+ /* eslint-disable @typescript-eslint/no-unused-vars */
22import { Stack } from "aws-cdk-lib"
33import { NagPackSuppression , NagSuppressions } from "cdk-nag"
44
@@ -33,18 +33,6 @@ export const nagSuppressions = (stack: Stack) => {
3333 ]
3434 )
3535
36- // Suppress API Gateway validation warning
37- safeAddNagSuppression (
38- stack ,
39- "/EpsAssistMeStack/EpsAssistApiGateway/ApiGateway/Resource" ,
40- [
41- {
42- id : "AwsSolutions-APIG2" ,
43- reason : "Validation is handled within Lambda; request validation is intentionally omitted."
44- }
45- ]
46- )
47-
4836 // Suppress API Gateway validation warning for Apis construct
4937 safeAddNagSuppression (
5038 stack ,
@@ -70,12 +58,9 @@ export const nagSuppressions = (stack: Stack) => {
7058 )
7159
7260 // Suppress unauthenticated API route warnings
73- safeAddNagSuppressionGroup (
61+ safeAddNagSuppression (
7462 stack ,
75- [
76- "/EpsAssistMeStack/EpsAssistApiGateway/ApiGateway/Default/slack/ask-eps/POST/Resource" ,
77- "/EpsAssistMeStack/Apis/EpsAssistApiGateway/ApiGateway/Default/slack/ask-eps/POST/Resource"
78- ] ,
63+ "/EpsAssistMeStack/Apis/EpsAssistApiGateway/ApiGateway/Default/slack/ask-eps/POST/Resource" ,
7964 [
8065 {
8166 id : "AwsSolutions-APIG4" ,
@@ -108,18 +93,6 @@ export const nagSuppressions = (stack: Stack) => {
10893 ]
10994 )
11095
111- // Suppress missing WAF on API stage
112- safeAddNagSuppression (
113- stack ,
114- "/EpsAssistMeStack/EpsAssistApiGateway/ApiGateway/DeploymentStage.prod/Resource" ,
115- [
116- {
117- id : "AwsSolutions-APIG3" ,
118- reason : "WAF not in current scope; may be added later."
119- }
120- ]
121- )
122-
12396 // Suppress missing WAF on API stage for Apis construct
12497 safeAddNagSuppression (
12598 stack ,
@@ -286,7 +259,6 @@ export const nagSuppressions = (stack: Stack) => {
286259const safeAddNagSuppression = ( stack : Stack , path : string , suppressions : Array < NagPackSuppression > ) => {
287260 try {
288261 NagSuppressions . addResourceSuppressionsByPath ( stack , path , suppressions )
289- // eslint-disable-next-line @typescript-eslint/no-unused-vars
290262 } catch ( err ) {
291263 console . log ( `Could not find path ${ path } ` )
292264 }
0 commit comments