@mavogel/awscdk-rootmail 0.0.336 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/.codegraph/.gitignore +5 -0
  2. package/.jsii +460 -8
  3. package/CLAUDE.md +1 -1
  4. package/README.md +6 -1
  5. package/docs/plans/2026-08-09-bump-mvc-projen-cdk-nag-v3.md +199 -0
  6. package/integ-tests/integ.rootmail-custom-santa.ts +2 -2
  7. package/integ-tests/integ.rootmail-filter-subject.ts +2 -2
  8. package/integ-tests/integ.rootmail.ts +2 -2
  9. package/lib/hosted-zone-dkim-propagation.js +46 -15
  10. package/lib/hosted-zone-dkim-verification-records.js +47 -12
  11. package/lib/rootmail-autowire-dns.js +47 -15
  12. package/lib/rootmail.js +13 -16
  13. package/lib/ses-receipt-ruleset-activation.js +53 -15
  14. package/lib/ses-receive.js +12 -12
  15. package/node_modules/cdk-nag/.jsii +6331 -2945
  16. package/node_modules/cdk-nag/.jsii.tabl.json +1 -1
  17. package/node_modules/cdk-nag/API.md +490 -1778
  18. package/node_modules/cdk-nag/MIGRATION.md +239 -0
  19. package/node_modules/cdk-nag/README.md +88 -513
  20. package/node_modules/cdk-nag/lib/index.d.ts +0 -3
  21. package/node_modules/cdk-nag/lib/index.js +1 -4
  22. package/node_modules/cdk-nag/lib/nag-logger.d.ts +5 -145
  23. package/node_modules/cdk-nag/lib/nag-logger.js +4 -199
  24. package/node_modules/cdk-nag/lib/nag-pack.d.ts +57 -44
  25. package/node_modules/cdk-nag/lib/nag-pack.js +140 -114
  26. package/node_modules/cdk-nag/lib/nag-rules.d.ts +0 -2
  27. package/node_modules/cdk-nag/lib/nag-rules.js +3 -5
  28. package/node_modules/cdk-nag/lib/packs/aws-solutions.d.ts +4 -15
  29. package/node_modules/cdk-nag/lib/packs/aws-solutions.js +21 -40
  30. package/node_modules/cdk-nag/lib/packs/hipaa-security.d.ts +4 -2
  31. package/node_modules/cdk-nag/lib/packs/hipaa-security.js +31 -37
  32. package/node_modules/cdk-nag/lib/packs/nist-800-53-r4.d.ts +4 -2
  33. package/node_modules/cdk-nag/lib/packs/nist-800-53-r4.js +29 -35
  34. package/node_modules/cdk-nag/lib/packs/nist-800-53-r5.d.ts +4 -2
  35. package/node_modules/cdk-nag/lib/packs/nist-800-53-r5.js +30 -36
  36. package/node_modules/cdk-nag/lib/packs/pci-dss-321.d.ts +4 -2
  37. package/node_modules/cdk-nag/lib/packs/pci-dss-321.js +29 -35
  38. package/node_modules/cdk-nag/lib/packs/serverless.d.ts +4 -2
  39. package/node_modules/cdk-nag/lib/packs/serverless.js +14 -20
  40. package/node_modules/cdk-nag/lib/rules/ec2/EC2IMDSv2Enabled.js +5 -1
  41. package/node_modules/cdk-nag/package.json +5 -5
  42. package/package.json +16 -17
  43. package/node_modules/cdk-nag/lib/ignore-suppression-conditions.d.ts +0 -59
  44. package/node_modules/cdk-nag/lib/ignore-suppression-conditions.js +0 -97
  45. package/node_modules/cdk-nag/lib/models/nag-suppression.d.ts +0 -30
  46. package/node_modules/cdk-nag/lib/models/nag-suppression.js +0 -7
  47. package/node_modules/cdk-nag/lib/nag-suppressions.d.ts +0 -30
  48. package/node_modules/cdk-nag/lib/nag-suppressions.js +0 -96
  49. package/node_modules/cdk-nag/lib/utils/nag-suppression-helper.d.ts +0 -20
  50. package/node_modules/cdk-nag/lib/utils/nag-suppression-helper.js +0 -119
@@ -3,946 +3,55 @@
3
3
 
4
4
  ## Structs <a name="Structs" id="Structs"></a>
5
5
 
6
- ### AnnotationLoggerProps <a name="AnnotationLoggerProps" id="cdk-nag.AnnotationLoggerProps"></a>
7
-
8
- Props for the AnnotationLogger.
9
-
10
- #### Initializer <a name="Initializer" id="cdk-nag.AnnotationLoggerProps.Initializer"></a>
11
-
12
- ```typescript
13
- import { AnnotationLoggerProps } from 'cdk-nag'
14
-
15
- const annotationLoggerProps: AnnotationLoggerProps = { ... }
16
- ```
17
-
18
- #### Properties <a name="Properties" id="Properties"></a>
19
-
20
- | **Name** | **Type** | **Description** |
21
- | --- | --- | --- |
22
- | <code><a href="#cdk-nag.AnnotationLoggerProps.property.logIgnores">logIgnores</a></code> | <code>boolean</code> | Whether or not to log suppressed rule violations as informational messages (default: false). |
23
- | <code><a href="#cdk-nag.AnnotationLoggerProps.property.verbose">verbose</a></code> | <code>boolean</code> | Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages. |
24
-
25
- ---
26
-
27
- ##### `logIgnores`<sup>Optional</sup> <a name="logIgnores" id="cdk-nag.AnnotationLoggerProps.property.logIgnores"></a>
28
-
29
- ```typescript
30
- public readonly logIgnores: boolean;
31
- ```
32
-
33
- - *Type:* boolean
34
-
35
- Whether or not to log suppressed rule violations as informational messages (default: false).
36
-
37
- ---
38
-
39
- ##### `verbose`<sup>Optional</sup> <a name="verbose" id="cdk-nag.AnnotationLoggerProps.property.verbose"></a>
40
-
41
- ```typescript
42
- public readonly verbose: boolean;
43
- ```
44
-
45
- - *Type:* boolean
46
-
47
- Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages.
48
-
49
- ---
50
-
51
- ### NagLoggerBaseData <a name="NagLoggerBaseData" id="cdk-nag.NagLoggerBaseData"></a>
52
-
53
- Shared data for all INagLogger methods.
54
-
55
- #### Initializer <a name="Initializer" id="cdk-nag.NagLoggerBaseData.Initializer"></a>
56
-
57
- ```typescript
58
- import { NagLoggerBaseData } from 'cdk-nag'
59
-
60
- const nagLoggerBaseData: NagLoggerBaseData = { ... }
61
- ```
62
-
63
- #### Properties <a name="Properties" id="Properties"></a>
64
-
65
- | **Name** | **Type** | **Description** |
66
- | --- | --- | --- |
67
- | <code><a href="#cdk-nag.NagLoggerBaseData.property.nagPackName">nagPackName</a></code> | <code>string</code> | *No description.* |
68
- | <code><a href="#cdk-nag.NagLoggerBaseData.property.resource">resource</a></code> | <code>aws-cdk-lib.CfnResource</code> | *No description.* |
69
- | <code><a href="#cdk-nag.NagLoggerBaseData.property.ruleExplanation">ruleExplanation</a></code> | <code>string</code> | *No description.* |
70
- | <code><a href="#cdk-nag.NagLoggerBaseData.property.ruleId">ruleId</a></code> | <code>string</code> | *No description.* |
71
- | <code><a href="#cdk-nag.NagLoggerBaseData.property.ruleInfo">ruleInfo</a></code> | <code>string</code> | *No description.* |
72
- | <code><a href="#cdk-nag.NagLoggerBaseData.property.ruleLevel">ruleLevel</a></code> | <code><a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a></code> | *No description.* |
73
- | <code><a href="#cdk-nag.NagLoggerBaseData.property.ruleOriginalName">ruleOriginalName</a></code> | <code>string</code> | *No description.* |
74
-
75
- ---
76
-
77
- ##### `nagPackName`<sup>Required</sup> <a name="nagPackName" id="cdk-nag.NagLoggerBaseData.property.nagPackName"></a>
78
-
79
- ```typescript
80
- public readonly nagPackName: string;
81
- ```
82
-
83
- - *Type:* string
84
-
85
- ---
86
-
87
- ##### `resource`<sup>Required</sup> <a name="resource" id="cdk-nag.NagLoggerBaseData.property.resource"></a>
88
-
89
- ```typescript
90
- public readonly resource: CfnResource;
91
- ```
92
-
93
- - *Type:* aws-cdk-lib.CfnResource
94
-
95
- ---
96
-
97
- ##### `ruleExplanation`<sup>Required</sup> <a name="ruleExplanation" id="cdk-nag.NagLoggerBaseData.property.ruleExplanation"></a>
98
-
99
- ```typescript
100
- public readonly ruleExplanation: string;
101
- ```
102
-
103
- - *Type:* string
104
-
105
- ---
106
-
107
- ##### `ruleId`<sup>Required</sup> <a name="ruleId" id="cdk-nag.NagLoggerBaseData.property.ruleId"></a>
108
-
109
- ```typescript
110
- public readonly ruleId: string;
111
- ```
112
-
113
- - *Type:* string
114
-
115
- ---
116
-
117
- ##### `ruleInfo`<sup>Required</sup> <a name="ruleInfo" id="cdk-nag.NagLoggerBaseData.property.ruleInfo"></a>
118
-
119
- ```typescript
120
- public readonly ruleInfo: string;
121
- ```
122
-
123
- - *Type:* string
124
-
125
- ---
126
-
127
- ##### `ruleLevel`<sup>Required</sup> <a name="ruleLevel" id="cdk-nag.NagLoggerBaseData.property.ruleLevel"></a>
128
-
129
- ```typescript
130
- public readonly ruleLevel: NagMessageLevel;
131
- ```
132
-
133
- - *Type:* <a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a>
134
-
135
- ---
136
-
137
- ##### `ruleOriginalName`<sup>Required</sup> <a name="ruleOriginalName" id="cdk-nag.NagLoggerBaseData.property.ruleOriginalName"></a>
138
-
139
- ```typescript
140
- public readonly ruleOriginalName: string;
141
- ```
142
-
143
- - *Type:* string
144
-
145
- ---
146
-
147
- ### NagLoggerComplianceData <a name="NagLoggerComplianceData" id="cdk-nag.NagLoggerComplianceData"></a>
148
-
149
- Data for onCompliance method of an INagLogger.
150
-
151
- #### Initializer <a name="Initializer" id="cdk-nag.NagLoggerComplianceData.Initializer"></a>
152
-
153
- ```typescript
154
- import { NagLoggerComplianceData } from 'cdk-nag'
155
-
156
- const nagLoggerComplianceData: NagLoggerComplianceData = { ... }
157
- ```
158
-
159
- #### Properties <a name="Properties" id="Properties"></a>
160
-
161
- | **Name** | **Type** | **Description** |
162
- | --- | --- | --- |
163
- | <code><a href="#cdk-nag.NagLoggerComplianceData.property.nagPackName">nagPackName</a></code> | <code>string</code> | *No description.* |
164
- | <code><a href="#cdk-nag.NagLoggerComplianceData.property.resource">resource</a></code> | <code>aws-cdk-lib.CfnResource</code> | *No description.* |
165
- | <code><a href="#cdk-nag.NagLoggerComplianceData.property.ruleExplanation">ruleExplanation</a></code> | <code>string</code> | *No description.* |
166
- | <code><a href="#cdk-nag.NagLoggerComplianceData.property.ruleId">ruleId</a></code> | <code>string</code> | *No description.* |
167
- | <code><a href="#cdk-nag.NagLoggerComplianceData.property.ruleInfo">ruleInfo</a></code> | <code>string</code> | *No description.* |
168
- | <code><a href="#cdk-nag.NagLoggerComplianceData.property.ruleLevel">ruleLevel</a></code> | <code><a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a></code> | *No description.* |
169
- | <code><a href="#cdk-nag.NagLoggerComplianceData.property.ruleOriginalName">ruleOriginalName</a></code> | <code>string</code> | *No description.* |
170
-
171
- ---
172
-
173
- ##### `nagPackName`<sup>Required</sup> <a name="nagPackName" id="cdk-nag.NagLoggerComplianceData.property.nagPackName"></a>
174
-
175
- ```typescript
176
- public readonly nagPackName: string;
177
- ```
178
-
179
- - *Type:* string
180
-
181
- ---
182
-
183
- ##### `resource`<sup>Required</sup> <a name="resource" id="cdk-nag.NagLoggerComplianceData.property.resource"></a>
184
-
185
- ```typescript
186
- public readonly resource: CfnResource;
187
- ```
188
-
189
- - *Type:* aws-cdk-lib.CfnResource
190
-
191
- ---
192
-
193
- ##### `ruleExplanation`<sup>Required</sup> <a name="ruleExplanation" id="cdk-nag.NagLoggerComplianceData.property.ruleExplanation"></a>
194
-
195
- ```typescript
196
- public readonly ruleExplanation: string;
197
- ```
198
-
199
- - *Type:* string
200
-
201
- ---
202
-
203
- ##### `ruleId`<sup>Required</sup> <a name="ruleId" id="cdk-nag.NagLoggerComplianceData.property.ruleId"></a>
204
-
205
- ```typescript
206
- public readonly ruleId: string;
207
- ```
208
-
209
- - *Type:* string
210
-
211
- ---
212
-
213
- ##### `ruleInfo`<sup>Required</sup> <a name="ruleInfo" id="cdk-nag.NagLoggerComplianceData.property.ruleInfo"></a>
214
-
215
- ```typescript
216
- public readonly ruleInfo: string;
217
- ```
218
-
219
- - *Type:* string
220
-
221
- ---
222
-
223
- ##### `ruleLevel`<sup>Required</sup> <a name="ruleLevel" id="cdk-nag.NagLoggerComplianceData.property.ruleLevel"></a>
224
-
225
- ```typescript
226
- public readonly ruleLevel: NagMessageLevel;
227
- ```
228
-
229
- - *Type:* <a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a>
230
-
231
- ---
232
-
233
- ##### `ruleOriginalName`<sup>Required</sup> <a name="ruleOriginalName" id="cdk-nag.NagLoggerComplianceData.property.ruleOriginalName"></a>
234
-
235
- ```typescript
236
- public readonly ruleOriginalName: string;
237
- ```
238
-
239
- - *Type:* string
240
-
241
- ---
242
-
243
- ### NagLoggerErrorData <a name="NagLoggerErrorData" id="cdk-nag.NagLoggerErrorData"></a>
244
-
245
- Data for onError method of an INagLogger.
246
-
247
- #### Initializer <a name="Initializer" id="cdk-nag.NagLoggerErrorData.Initializer"></a>
248
-
249
- ```typescript
250
- import { NagLoggerErrorData } from 'cdk-nag'
251
-
252
- const nagLoggerErrorData: NagLoggerErrorData = { ... }
253
- ```
254
-
255
- #### Properties <a name="Properties" id="Properties"></a>
256
-
257
- | **Name** | **Type** | **Description** |
258
- | --- | --- | --- |
259
- | <code><a href="#cdk-nag.NagLoggerErrorData.property.nagPackName">nagPackName</a></code> | <code>string</code> | *No description.* |
260
- | <code><a href="#cdk-nag.NagLoggerErrorData.property.resource">resource</a></code> | <code>aws-cdk-lib.CfnResource</code> | *No description.* |
261
- | <code><a href="#cdk-nag.NagLoggerErrorData.property.ruleExplanation">ruleExplanation</a></code> | <code>string</code> | *No description.* |
262
- | <code><a href="#cdk-nag.NagLoggerErrorData.property.ruleId">ruleId</a></code> | <code>string</code> | *No description.* |
263
- | <code><a href="#cdk-nag.NagLoggerErrorData.property.ruleInfo">ruleInfo</a></code> | <code>string</code> | *No description.* |
264
- | <code><a href="#cdk-nag.NagLoggerErrorData.property.ruleLevel">ruleLevel</a></code> | <code><a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a></code> | *No description.* |
265
- | <code><a href="#cdk-nag.NagLoggerErrorData.property.ruleOriginalName">ruleOriginalName</a></code> | <code>string</code> | *No description.* |
266
- | <code><a href="#cdk-nag.NagLoggerErrorData.property.errorMessage">errorMessage</a></code> | <code>string</code> | *No description.* |
267
-
268
- ---
269
-
270
- ##### `nagPackName`<sup>Required</sup> <a name="nagPackName" id="cdk-nag.NagLoggerErrorData.property.nagPackName"></a>
271
-
272
- ```typescript
273
- public readonly nagPackName: string;
274
- ```
275
-
276
- - *Type:* string
277
-
278
- ---
279
-
280
- ##### `resource`<sup>Required</sup> <a name="resource" id="cdk-nag.NagLoggerErrorData.property.resource"></a>
281
-
282
- ```typescript
283
- public readonly resource: CfnResource;
284
- ```
285
-
286
- - *Type:* aws-cdk-lib.CfnResource
287
-
288
- ---
289
-
290
- ##### `ruleExplanation`<sup>Required</sup> <a name="ruleExplanation" id="cdk-nag.NagLoggerErrorData.property.ruleExplanation"></a>
291
-
292
- ```typescript
293
- public readonly ruleExplanation: string;
294
- ```
295
-
296
- - *Type:* string
297
-
298
- ---
299
-
300
- ##### `ruleId`<sup>Required</sup> <a name="ruleId" id="cdk-nag.NagLoggerErrorData.property.ruleId"></a>
301
-
302
- ```typescript
303
- public readonly ruleId: string;
304
- ```
305
-
306
- - *Type:* string
307
-
308
- ---
309
-
310
- ##### `ruleInfo`<sup>Required</sup> <a name="ruleInfo" id="cdk-nag.NagLoggerErrorData.property.ruleInfo"></a>
311
-
312
- ```typescript
313
- public readonly ruleInfo: string;
314
- ```
315
-
316
- - *Type:* string
317
-
318
- ---
319
-
320
- ##### `ruleLevel`<sup>Required</sup> <a name="ruleLevel" id="cdk-nag.NagLoggerErrorData.property.ruleLevel"></a>
321
-
322
- ```typescript
323
- public readonly ruleLevel: NagMessageLevel;
324
- ```
325
-
326
- - *Type:* <a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a>
327
-
328
- ---
329
-
330
- ##### `ruleOriginalName`<sup>Required</sup> <a name="ruleOriginalName" id="cdk-nag.NagLoggerErrorData.property.ruleOriginalName"></a>
331
-
332
- ```typescript
333
- public readonly ruleOriginalName: string;
334
- ```
335
-
336
- - *Type:* string
337
-
338
- ---
339
-
340
- ##### `errorMessage`<sup>Required</sup> <a name="errorMessage" id="cdk-nag.NagLoggerErrorData.property.errorMessage"></a>
341
-
342
- ```typescript
343
- public readonly errorMessage: string;
344
- ```
345
-
346
- - *Type:* string
347
-
348
- ---
349
-
350
- ### NagLoggerNonComplianceData <a name="NagLoggerNonComplianceData" id="cdk-nag.NagLoggerNonComplianceData"></a>
351
-
352
- Data for onNonCompliance method of an INagLogger.
353
-
354
- #### Initializer <a name="Initializer" id="cdk-nag.NagLoggerNonComplianceData.Initializer"></a>
355
-
356
- ```typescript
357
- import { NagLoggerNonComplianceData } from 'cdk-nag'
358
-
359
- const nagLoggerNonComplianceData: NagLoggerNonComplianceData = { ... }
360
- ```
361
-
362
- #### Properties <a name="Properties" id="Properties"></a>
363
-
364
- | **Name** | **Type** | **Description** |
365
- | --- | --- | --- |
366
- | <code><a href="#cdk-nag.NagLoggerNonComplianceData.property.nagPackName">nagPackName</a></code> | <code>string</code> | *No description.* |
367
- | <code><a href="#cdk-nag.NagLoggerNonComplianceData.property.resource">resource</a></code> | <code>aws-cdk-lib.CfnResource</code> | *No description.* |
368
- | <code><a href="#cdk-nag.NagLoggerNonComplianceData.property.ruleExplanation">ruleExplanation</a></code> | <code>string</code> | *No description.* |
369
- | <code><a href="#cdk-nag.NagLoggerNonComplianceData.property.ruleId">ruleId</a></code> | <code>string</code> | *No description.* |
370
- | <code><a href="#cdk-nag.NagLoggerNonComplianceData.property.ruleInfo">ruleInfo</a></code> | <code>string</code> | *No description.* |
371
- | <code><a href="#cdk-nag.NagLoggerNonComplianceData.property.ruleLevel">ruleLevel</a></code> | <code><a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a></code> | *No description.* |
372
- | <code><a href="#cdk-nag.NagLoggerNonComplianceData.property.ruleOriginalName">ruleOriginalName</a></code> | <code>string</code> | *No description.* |
373
- | <code><a href="#cdk-nag.NagLoggerNonComplianceData.property.findingId">findingId</a></code> | <code>string</code> | *No description.* |
374
-
375
- ---
376
-
377
- ##### `nagPackName`<sup>Required</sup> <a name="nagPackName" id="cdk-nag.NagLoggerNonComplianceData.property.nagPackName"></a>
378
-
379
- ```typescript
380
- public readonly nagPackName: string;
381
- ```
382
-
383
- - *Type:* string
384
-
385
- ---
386
-
387
- ##### `resource`<sup>Required</sup> <a name="resource" id="cdk-nag.NagLoggerNonComplianceData.property.resource"></a>
388
-
389
- ```typescript
390
- public readonly resource: CfnResource;
391
- ```
392
-
393
- - *Type:* aws-cdk-lib.CfnResource
394
-
395
- ---
396
-
397
- ##### `ruleExplanation`<sup>Required</sup> <a name="ruleExplanation" id="cdk-nag.NagLoggerNonComplianceData.property.ruleExplanation"></a>
398
-
399
- ```typescript
400
- public readonly ruleExplanation: string;
401
- ```
402
-
403
- - *Type:* string
404
-
405
- ---
406
-
407
- ##### `ruleId`<sup>Required</sup> <a name="ruleId" id="cdk-nag.NagLoggerNonComplianceData.property.ruleId"></a>
408
-
409
- ```typescript
410
- public readonly ruleId: string;
411
- ```
412
-
413
- - *Type:* string
414
-
415
- ---
416
-
417
- ##### `ruleInfo`<sup>Required</sup> <a name="ruleInfo" id="cdk-nag.NagLoggerNonComplianceData.property.ruleInfo"></a>
418
-
419
- ```typescript
420
- public readonly ruleInfo: string;
421
- ```
422
-
423
- - *Type:* string
424
-
425
- ---
426
-
427
- ##### `ruleLevel`<sup>Required</sup> <a name="ruleLevel" id="cdk-nag.NagLoggerNonComplianceData.property.ruleLevel"></a>
428
-
429
- ```typescript
430
- public readonly ruleLevel: NagMessageLevel;
431
- ```
432
-
433
- - *Type:* <a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a>
434
-
435
- ---
436
-
437
- ##### `ruleOriginalName`<sup>Required</sup> <a name="ruleOriginalName" id="cdk-nag.NagLoggerNonComplianceData.property.ruleOriginalName"></a>
438
-
439
- ```typescript
440
- public readonly ruleOriginalName: string;
441
- ```
442
-
443
- - *Type:* string
444
-
445
- ---
446
-
447
- ##### `findingId`<sup>Required</sup> <a name="findingId" id="cdk-nag.NagLoggerNonComplianceData.property.findingId"></a>
448
-
449
- ```typescript
450
- public readonly findingId: string;
451
- ```
452
-
453
- - *Type:* string
454
-
455
- ---
456
-
457
- ### NagLoggerNotApplicableData <a name="NagLoggerNotApplicableData" id="cdk-nag.NagLoggerNotApplicableData"></a>
458
-
459
- Data for onNotApplicable method of an INagLogger.
460
-
461
- #### Initializer <a name="Initializer" id="cdk-nag.NagLoggerNotApplicableData.Initializer"></a>
462
-
463
- ```typescript
464
- import { NagLoggerNotApplicableData } from 'cdk-nag'
465
-
466
- const nagLoggerNotApplicableData: NagLoggerNotApplicableData = { ... }
467
- ```
468
-
469
- #### Properties <a name="Properties" id="Properties"></a>
470
-
471
- | **Name** | **Type** | **Description** |
472
- | --- | --- | --- |
473
- | <code><a href="#cdk-nag.NagLoggerNotApplicableData.property.nagPackName">nagPackName</a></code> | <code>string</code> | *No description.* |
474
- | <code><a href="#cdk-nag.NagLoggerNotApplicableData.property.resource">resource</a></code> | <code>aws-cdk-lib.CfnResource</code> | *No description.* |
475
- | <code><a href="#cdk-nag.NagLoggerNotApplicableData.property.ruleExplanation">ruleExplanation</a></code> | <code>string</code> | *No description.* |
476
- | <code><a href="#cdk-nag.NagLoggerNotApplicableData.property.ruleId">ruleId</a></code> | <code>string</code> | *No description.* |
477
- | <code><a href="#cdk-nag.NagLoggerNotApplicableData.property.ruleInfo">ruleInfo</a></code> | <code>string</code> | *No description.* |
478
- | <code><a href="#cdk-nag.NagLoggerNotApplicableData.property.ruleLevel">ruleLevel</a></code> | <code><a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a></code> | *No description.* |
479
- | <code><a href="#cdk-nag.NagLoggerNotApplicableData.property.ruleOriginalName">ruleOriginalName</a></code> | <code>string</code> | *No description.* |
480
-
481
- ---
482
-
483
- ##### `nagPackName`<sup>Required</sup> <a name="nagPackName" id="cdk-nag.NagLoggerNotApplicableData.property.nagPackName"></a>
484
-
485
- ```typescript
486
- public readonly nagPackName: string;
487
- ```
488
-
489
- - *Type:* string
490
-
491
- ---
492
-
493
- ##### `resource`<sup>Required</sup> <a name="resource" id="cdk-nag.NagLoggerNotApplicableData.property.resource"></a>
494
-
495
- ```typescript
496
- public readonly resource: CfnResource;
497
- ```
498
-
499
- - *Type:* aws-cdk-lib.CfnResource
500
-
501
- ---
502
-
503
- ##### `ruleExplanation`<sup>Required</sup> <a name="ruleExplanation" id="cdk-nag.NagLoggerNotApplicableData.property.ruleExplanation"></a>
504
-
505
- ```typescript
506
- public readonly ruleExplanation: string;
507
- ```
508
-
509
- - *Type:* string
510
-
511
- ---
512
-
513
- ##### `ruleId`<sup>Required</sup> <a name="ruleId" id="cdk-nag.NagLoggerNotApplicableData.property.ruleId"></a>
514
-
515
- ```typescript
516
- public readonly ruleId: string;
517
- ```
518
-
519
- - *Type:* string
520
-
521
- ---
522
-
523
- ##### `ruleInfo`<sup>Required</sup> <a name="ruleInfo" id="cdk-nag.NagLoggerNotApplicableData.property.ruleInfo"></a>
524
-
525
- ```typescript
526
- public readonly ruleInfo: string;
527
- ```
528
-
529
- - *Type:* string
530
-
531
- ---
532
-
533
- ##### `ruleLevel`<sup>Required</sup> <a name="ruleLevel" id="cdk-nag.NagLoggerNotApplicableData.property.ruleLevel"></a>
534
-
535
- ```typescript
536
- public readonly ruleLevel: NagMessageLevel;
537
- ```
538
-
539
- - *Type:* <a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a>
540
-
541
- ---
542
-
543
- ##### `ruleOriginalName`<sup>Required</sup> <a name="ruleOriginalName" id="cdk-nag.NagLoggerNotApplicableData.property.ruleOriginalName"></a>
544
-
545
- ```typescript
546
- public readonly ruleOriginalName: string;
547
- ```
548
-
549
- - *Type:* string
550
-
551
- ---
552
-
553
- ### NagLoggerSuppressedData <a name="NagLoggerSuppressedData" id="cdk-nag.NagLoggerSuppressedData"></a>
554
-
555
- Data for onSuppressed method of an INagLogger.
556
-
557
- #### Initializer <a name="Initializer" id="cdk-nag.NagLoggerSuppressedData.Initializer"></a>
558
-
559
- ```typescript
560
- import { NagLoggerSuppressedData } from 'cdk-nag'
561
-
562
- const nagLoggerSuppressedData: NagLoggerSuppressedData = { ... }
563
- ```
564
-
565
- #### Properties <a name="Properties" id="Properties"></a>
566
-
567
- | **Name** | **Type** | **Description** |
568
- | --- | --- | --- |
569
- | <code><a href="#cdk-nag.NagLoggerSuppressedData.property.nagPackName">nagPackName</a></code> | <code>string</code> | *No description.* |
570
- | <code><a href="#cdk-nag.NagLoggerSuppressedData.property.resource">resource</a></code> | <code>aws-cdk-lib.CfnResource</code> | *No description.* |
571
- | <code><a href="#cdk-nag.NagLoggerSuppressedData.property.ruleExplanation">ruleExplanation</a></code> | <code>string</code> | *No description.* |
572
- | <code><a href="#cdk-nag.NagLoggerSuppressedData.property.ruleId">ruleId</a></code> | <code>string</code> | *No description.* |
573
- | <code><a href="#cdk-nag.NagLoggerSuppressedData.property.ruleInfo">ruleInfo</a></code> | <code>string</code> | *No description.* |
574
- | <code><a href="#cdk-nag.NagLoggerSuppressedData.property.ruleLevel">ruleLevel</a></code> | <code><a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a></code> | *No description.* |
575
- | <code><a href="#cdk-nag.NagLoggerSuppressedData.property.ruleOriginalName">ruleOriginalName</a></code> | <code>string</code> | *No description.* |
576
- | <code><a href="#cdk-nag.NagLoggerSuppressedData.property.findingId">findingId</a></code> | <code>string</code> | *No description.* |
577
- | <code><a href="#cdk-nag.NagLoggerSuppressedData.property.suppressionReason">suppressionReason</a></code> | <code>string</code> | *No description.* |
578
-
579
- ---
580
-
581
- ##### `nagPackName`<sup>Required</sup> <a name="nagPackName" id="cdk-nag.NagLoggerSuppressedData.property.nagPackName"></a>
582
-
583
- ```typescript
584
- public readonly nagPackName: string;
585
- ```
586
-
587
- - *Type:* string
588
-
589
- ---
590
-
591
- ##### `resource`<sup>Required</sup> <a name="resource" id="cdk-nag.NagLoggerSuppressedData.property.resource"></a>
592
-
593
- ```typescript
594
- public readonly resource: CfnResource;
595
- ```
596
-
597
- - *Type:* aws-cdk-lib.CfnResource
598
-
599
- ---
600
-
601
- ##### `ruleExplanation`<sup>Required</sup> <a name="ruleExplanation" id="cdk-nag.NagLoggerSuppressedData.property.ruleExplanation"></a>
602
-
603
- ```typescript
604
- public readonly ruleExplanation: string;
605
- ```
606
-
607
- - *Type:* string
608
-
609
- ---
610
-
611
- ##### `ruleId`<sup>Required</sup> <a name="ruleId" id="cdk-nag.NagLoggerSuppressedData.property.ruleId"></a>
612
-
613
- ```typescript
614
- public readonly ruleId: string;
615
- ```
616
-
617
- - *Type:* string
618
-
619
- ---
620
-
621
- ##### `ruleInfo`<sup>Required</sup> <a name="ruleInfo" id="cdk-nag.NagLoggerSuppressedData.property.ruleInfo"></a>
622
-
623
- ```typescript
624
- public readonly ruleInfo: string;
625
- ```
626
-
627
- - *Type:* string
628
-
629
- ---
630
-
631
- ##### `ruleLevel`<sup>Required</sup> <a name="ruleLevel" id="cdk-nag.NagLoggerSuppressedData.property.ruleLevel"></a>
632
-
633
- ```typescript
634
- public readonly ruleLevel: NagMessageLevel;
635
- ```
636
-
637
- - *Type:* <a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a>
638
-
639
- ---
640
-
641
- ##### `ruleOriginalName`<sup>Required</sup> <a name="ruleOriginalName" id="cdk-nag.NagLoggerSuppressedData.property.ruleOriginalName"></a>
642
-
643
- ```typescript
644
- public readonly ruleOriginalName: string;
645
- ```
646
-
647
- - *Type:* string
648
-
649
- ---
650
-
651
- ##### `findingId`<sup>Required</sup> <a name="findingId" id="cdk-nag.NagLoggerSuppressedData.property.findingId"></a>
652
-
653
- ```typescript
654
- public readonly findingId: string;
655
- ```
656
-
657
- - *Type:* string
658
-
659
- ---
660
-
661
- ##### `suppressionReason`<sup>Required</sup> <a name="suppressionReason" id="cdk-nag.NagLoggerSuppressedData.property.suppressionReason"></a>
662
-
663
- ```typescript
664
- public readonly suppressionReason: string;
665
- ```
666
-
667
- - *Type:* string
668
-
669
- ---
670
-
671
- ### NagLoggerSuppressedErrorData <a name="NagLoggerSuppressedErrorData" id="cdk-nag.NagLoggerSuppressedErrorData"></a>
672
-
673
- Data for onSuppressedError method of an INagLogger.
674
-
675
- #### Initializer <a name="Initializer" id="cdk-nag.NagLoggerSuppressedErrorData.Initializer"></a>
676
-
677
- ```typescript
678
- import { NagLoggerSuppressedErrorData } from 'cdk-nag'
679
-
680
- const nagLoggerSuppressedErrorData: NagLoggerSuppressedErrorData = { ... }
681
- ```
682
-
683
- #### Properties <a name="Properties" id="Properties"></a>
684
-
685
- | **Name** | **Type** | **Description** |
686
- | --- | --- | --- |
687
- | <code><a href="#cdk-nag.NagLoggerSuppressedErrorData.property.nagPackName">nagPackName</a></code> | <code>string</code> | *No description.* |
688
- | <code><a href="#cdk-nag.NagLoggerSuppressedErrorData.property.resource">resource</a></code> | <code>aws-cdk-lib.CfnResource</code> | *No description.* |
689
- | <code><a href="#cdk-nag.NagLoggerSuppressedErrorData.property.ruleExplanation">ruleExplanation</a></code> | <code>string</code> | *No description.* |
690
- | <code><a href="#cdk-nag.NagLoggerSuppressedErrorData.property.ruleId">ruleId</a></code> | <code>string</code> | *No description.* |
691
- | <code><a href="#cdk-nag.NagLoggerSuppressedErrorData.property.ruleInfo">ruleInfo</a></code> | <code>string</code> | *No description.* |
692
- | <code><a href="#cdk-nag.NagLoggerSuppressedErrorData.property.ruleLevel">ruleLevel</a></code> | <code><a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a></code> | *No description.* |
693
- | <code><a href="#cdk-nag.NagLoggerSuppressedErrorData.property.ruleOriginalName">ruleOriginalName</a></code> | <code>string</code> | *No description.* |
694
- | <code><a href="#cdk-nag.NagLoggerSuppressedErrorData.property.errorMessage">errorMessage</a></code> | <code>string</code> | *No description.* |
695
- | <code><a href="#cdk-nag.NagLoggerSuppressedErrorData.property.errorSuppressionReason">errorSuppressionReason</a></code> | <code>string</code> | *No description.* |
696
-
697
- ---
698
-
699
- ##### `nagPackName`<sup>Required</sup> <a name="nagPackName" id="cdk-nag.NagLoggerSuppressedErrorData.property.nagPackName"></a>
700
-
701
- ```typescript
702
- public readonly nagPackName: string;
703
- ```
704
-
705
- - *Type:* string
706
-
707
- ---
708
-
709
- ##### `resource`<sup>Required</sup> <a name="resource" id="cdk-nag.NagLoggerSuppressedErrorData.property.resource"></a>
710
-
711
- ```typescript
712
- public readonly resource: CfnResource;
713
- ```
714
-
715
- - *Type:* aws-cdk-lib.CfnResource
716
-
717
- ---
718
-
719
- ##### `ruleExplanation`<sup>Required</sup> <a name="ruleExplanation" id="cdk-nag.NagLoggerSuppressedErrorData.property.ruleExplanation"></a>
720
-
721
- ```typescript
722
- public readonly ruleExplanation: string;
723
- ```
724
-
725
- - *Type:* string
726
-
727
- ---
728
-
729
- ##### `ruleId`<sup>Required</sup> <a name="ruleId" id="cdk-nag.NagLoggerSuppressedErrorData.property.ruleId"></a>
730
-
731
- ```typescript
732
- public readonly ruleId: string;
733
- ```
734
-
735
- - *Type:* string
736
-
737
- ---
738
-
739
- ##### `ruleInfo`<sup>Required</sup> <a name="ruleInfo" id="cdk-nag.NagLoggerSuppressedErrorData.property.ruleInfo"></a>
740
-
741
- ```typescript
742
- public readonly ruleInfo: string;
743
- ```
744
-
745
- - *Type:* string
746
-
747
- ---
748
-
749
- ##### `ruleLevel`<sup>Required</sup> <a name="ruleLevel" id="cdk-nag.NagLoggerSuppressedErrorData.property.ruleLevel"></a>
750
-
751
- ```typescript
752
- public readonly ruleLevel: NagMessageLevel;
753
- ```
754
-
755
- - *Type:* <a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a>
756
-
757
- ---
758
-
759
- ##### `ruleOriginalName`<sup>Required</sup> <a name="ruleOriginalName" id="cdk-nag.NagLoggerSuppressedErrorData.property.ruleOriginalName"></a>
760
-
761
- ```typescript
762
- public readonly ruleOriginalName: string;
763
- ```
764
-
765
- - *Type:* string
766
-
767
- ---
768
-
769
- ##### `errorMessage`<sup>Required</sup> <a name="errorMessage" id="cdk-nag.NagLoggerSuppressedErrorData.property.errorMessage"></a>
770
-
771
- ```typescript
772
- public readonly errorMessage: string;
773
- ```
774
-
775
- - *Type:* string
776
-
777
- ---
778
-
779
- ##### `errorSuppressionReason`<sup>Required</sup> <a name="errorSuppressionReason" id="cdk-nag.NagLoggerSuppressedErrorData.property.errorSuppressionReason"></a>
780
-
781
- ```typescript
782
- public readonly errorSuppressionReason: string;
783
- ```
784
-
785
- - *Type:* string
786
-
787
- ---
788
-
789
- ### NagPackProps <a name="NagPackProps" id="cdk-nag.NagPackProps"></a>
790
-
791
- Interface for creating a NagPack.
792
-
793
- #### Initializer <a name="Initializer" id="cdk-nag.NagPackProps.Initializer"></a>
794
-
795
- ```typescript
796
- import { NagPackProps } from 'cdk-nag'
797
-
798
- const nagPackProps: NagPackProps = { ... }
799
- ```
800
-
801
- #### Properties <a name="Properties" id="Properties"></a>
802
-
803
- | **Name** | **Type** | **Description** |
804
- | --- | --- | --- |
805
- | <code><a href="#cdk-nag.NagPackProps.property.additionalLoggers">additionalLoggers</a></code> | <code><a href="#cdk-nag.INagLogger">INagLogger</a>[]</code> | Additional NagLoggers for logging rule validation outputs. |
806
- | <code><a href="#cdk-nag.NagPackProps.property.logIgnores">logIgnores</a></code> | <code>boolean</code> | Whether or not to log suppressed rule violations as informational messages (default: false). |
807
- | <code><a href="#cdk-nag.NagPackProps.property.reportFormats">reportFormats</a></code> | <code><a href="#cdk-nag.NagReportFormat">NagReportFormat</a>[]</code> | If reports are enabled, the output formats of compliance reports in the App's output directory (default: only CSV). |
808
- | <code><a href="#cdk-nag.NagPackProps.property.reports">reports</a></code> | <code>boolean</code> | Whether or not to generate compliance reports for applied Stacks in the App's output directory (default: true). |
809
- | <code><a href="#cdk-nag.NagPackProps.property.suppressionIgnoreCondition">suppressionIgnoreCondition</a></code> | <code><a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a></code> | Conditionally prevent rules from being suppressed (default: no user provided condition). |
810
- | <code><a href="#cdk-nag.NagPackProps.property.verbose">verbose</a></code> | <code>boolean</code> | Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages (default: false). |
811
-
812
- ---
813
-
814
- ##### `additionalLoggers`<sup>Optional</sup> <a name="additionalLoggers" id="cdk-nag.NagPackProps.property.additionalLoggers"></a>
815
-
816
- ```typescript
817
- public readonly additionalLoggers: INagLogger[];
818
- ```
819
-
820
- - *Type:* <a href="#cdk-nag.INagLogger">INagLogger</a>[]
821
-
822
- Additional NagLoggers for logging rule validation outputs.
823
-
824
- ---
825
-
826
- ##### `logIgnores`<sup>Optional</sup> <a name="logIgnores" id="cdk-nag.NagPackProps.property.logIgnores"></a>
827
-
828
- ```typescript
829
- public readonly logIgnores: boolean;
830
- ```
831
-
832
- - *Type:* boolean
833
-
834
- Whether or not to log suppressed rule violations as informational messages (default: false).
835
-
836
- ---
837
-
838
- ##### `reportFormats`<sup>Optional</sup> <a name="reportFormats" id="cdk-nag.NagPackProps.property.reportFormats"></a>
839
-
840
- ```typescript
841
- public readonly reportFormats: NagReportFormat[];
842
- ```
843
-
844
- - *Type:* <a href="#cdk-nag.NagReportFormat">NagReportFormat</a>[]
845
-
846
- If reports are enabled, the output formats of compliance reports in the App's output directory (default: only CSV).
847
-
848
- ---
849
-
850
- ##### `reports`<sup>Optional</sup> <a name="reports" id="cdk-nag.NagPackProps.property.reports"></a>
851
-
852
- ```typescript
853
- public readonly reports: boolean;
854
- ```
855
-
856
- - *Type:* boolean
857
-
858
- Whether or not to generate compliance reports for applied Stacks in the App's output directory (default: true).
859
-
860
- ---
861
-
862
- ##### `suppressionIgnoreCondition`<sup>Optional</sup> <a name="suppressionIgnoreCondition" id="cdk-nag.NagPackProps.property.suppressionIgnoreCondition"></a>
863
-
864
- ```typescript
865
- public readonly suppressionIgnoreCondition: INagSuppressionIgnore;
866
- ```
867
-
868
- - *Type:* <a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>
869
-
870
- Conditionally prevent rules from being suppressed (default: no user provided condition).
871
-
872
- ---
873
-
874
- ##### `verbose`<sup>Optional</sup> <a name="verbose" id="cdk-nag.NagPackProps.property.verbose"></a>
875
-
876
- ```typescript
877
- public readonly verbose: boolean;
878
- ```
879
-
880
- - *Type:* boolean
881
-
882
- Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages (default: false).
883
-
884
- ---
885
-
886
- ### NagPackSuppression <a name="NagPackSuppression" id="cdk-nag.NagPackSuppression"></a>
6
+ ### NagPackProps <a name="NagPackProps" id="cdk-nag.NagPackProps"></a>
887
7
 
888
- Interface for creating a rule suppression.
8
+ Interface for creating a NagPack.
889
9
 
890
- #### Initializer <a name="Initializer" id="cdk-nag.NagPackSuppression.Initializer"></a>
10
+ #### Initializer <a name="Initializer" id="cdk-nag.NagPackProps.Initializer"></a>
891
11
 
892
12
  ```typescript
893
- import { NagPackSuppression } from 'cdk-nag'
13
+ import { NagPackProps } from 'cdk-nag'
894
14
 
895
- const nagPackSuppression: NagPackSuppression = { ... }
15
+ const nagPackProps: NagPackProps = { ... }
896
16
  ```
897
17
 
898
18
  #### Properties <a name="Properties" id="Properties"></a>
899
19
 
900
20
  | **Name** | **Type** | **Description** |
901
21
  | --- | --- | --- |
902
- | <code><a href="#cdk-nag.NagPackSuppression.property.id">id</a></code> | <code>string</code> | The id of the rule to ignore. |
903
- | <code><a href="#cdk-nag.NagPackSuppression.property.reason">reason</a></code> | <code>string</code> | The reason to ignore the rule (minimum 10 characters). |
904
- | <code><a href="#cdk-nag.NagPackSuppression.property.appliesTo">appliesTo</a></code> | <code>string \| <a href="#cdk-nag.RegexAppliesTo">RegexAppliesTo</a>[]</code> | Rule specific granular suppressions. |
905
-
906
- ---
907
-
908
- ##### `id`<sup>Required</sup> <a name="id" id="cdk-nag.NagPackSuppression.property.id"></a>
909
-
910
- ```typescript
911
- public readonly id: string;
912
- ```
913
-
914
- - *Type:* string
915
-
916
- The id of the rule to ignore.
22
+ | <code><a href="#cdk-nag.NagPackProps.property.verbose">verbose</a></code> | <code>boolean</code> | Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages (default: false). |
23
+ | <code><a href="#cdk-nag.NagPackProps.property.writeSuppressionsToCloudFormation">writeSuppressionsToCloudFormation</a></code> | <code>boolean</code> | Whether to write acknowledged rules into CfnResource CloudFormation Metadata as `cdk_nag: { rules_to_suppress: [...] }` for backwards compatibility with v2 audit trail tooling (default: false). |
917
24
 
918
25
  ---
919
26
 
920
- ##### `reason`<sup>Required</sup> <a name="reason" id="cdk-nag.NagPackSuppression.property.reason"></a>
27
+ ##### `verbose`<sup>Optional</sup> <a name="verbose" id="cdk-nag.NagPackProps.property.verbose"></a>
921
28
 
922
29
  ```typescript
923
- public readonly reason: string;
30
+ public readonly verbose: boolean;
924
31
  ```
925
32
 
926
- - *Type:* string
33
+ - *Type:* boolean
927
34
 
928
- The reason to ignore the rule (minimum 10 characters).
35
+ Whether or not to enable extended explanatory descriptions on warning, error, and logged ignore messages (default: false).
929
36
 
930
37
  ---
931
38
 
932
- ##### `appliesTo`<sup>Optional</sup> <a name="appliesTo" id="cdk-nag.NagPackSuppression.property.appliesTo"></a>
39
+ ##### `writeSuppressionsToCloudFormation`<sup>Optional</sup> <a name="writeSuppressionsToCloudFormation" id="cdk-nag.NagPackProps.property.writeSuppressionsToCloudFormation"></a>
933
40
 
934
41
  ```typescript
935
- public readonly appliesTo: (string | RegexAppliesTo)[];
42
+ public readonly writeSuppressionsToCloudFormation: boolean;
936
43
  ```
937
44
 
938
- - *Type:* string | <a href="#cdk-nag.RegexAppliesTo">RegexAppliesTo</a>[]
45
+ - *Type:* boolean
939
46
 
940
- Rule specific granular suppressions.
47
+ Whether to write acknowledged rules into CfnResource CloudFormation Metadata as `cdk_nag: { rules_to_suppress: [...] }` for backwards compatibility with v2 audit trail tooling (default: false).
941
48
 
942
49
  ---
943
50
 
944
51
  ### NagReportLine <a name="NagReportLine" id="cdk-nag.NagReportLine"></a>
945
52
 
53
+ A single line in a NagReport.
54
+
946
55
  #### Initializer <a name="Initializer" id="cdk-nag.NagReportLine.Initializer"></a>
947
56
 
948
57
  ```typescript
@@ -956,7 +65,6 @@ const nagReportLine: NagReportLine = { ... }
956
65
  | **Name** | **Type** | **Description** |
957
66
  | --- | --- | --- |
958
67
  | <code><a href="#cdk-nag.NagReportLine.property.compliance">compliance</a></code> | <code>string</code> | *No description.* |
959
- | <code><a href="#cdk-nag.NagReportLine.property.exceptionReason">exceptionReason</a></code> | <code>string</code> | *No description.* |
960
68
  | <code><a href="#cdk-nag.NagReportLine.property.resourceId">resourceId</a></code> | <code>string</code> | *No description.* |
961
69
  | <code><a href="#cdk-nag.NagReportLine.property.ruleId">ruleId</a></code> | <code>string</code> | *No description.* |
962
70
  | <code><a href="#cdk-nag.NagReportLine.property.ruleInfo">ruleInfo</a></code> | <code>string</code> | *No description.* |
@@ -974,16 +82,6 @@ public readonly compliance: string;
974
82
 
975
83
  ---
976
84
 
977
- ##### `exceptionReason`<sup>Required</sup> <a name="exceptionReason" id="cdk-nag.NagReportLine.property.exceptionReason"></a>
978
-
979
- ```typescript
980
- public readonly exceptionReason: string;
981
- ```
982
-
983
- - *Type:* string
984
-
985
- ---
986
-
987
85
  ##### `resourceId`<sup>Required</sup> <a name="resourceId" id="cdk-nag.NagReportLine.property.resourceId"></a>
988
86
 
989
87
  ```typescript
@@ -1024,38 +122,10 @@ public readonly ruleLevel: string;
1024
122
 
1025
123
  ---
1026
124
 
1027
- ### NagReportLoggerProps <a name="NagReportLoggerProps" id="cdk-nag.NagReportLoggerProps"></a>
1028
-
1029
- Props for the NagReportLogger.
1030
-
1031
- #### Initializer <a name="Initializer" id="cdk-nag.NagReportLoggerProps.Initializer"></a>
1032
-
1033
- ```typescript
1034
- import { NagReportLoggerProps } from 'cdk-nag'
1035
-
1036
- const nagReportLoggerProps: NagReportLoggerProps = { ... }
1037
- ```
1038
-
1039
- #### Properties <a name="Properties" id="Properties"></a>
1040
-
1041
- | **Name** | **Type** | **Description** |
1042
- | --- | --- | --- |
1043
- | <code><a href="#cdk-nag.NagReportLoggerProps.property.formats">formats</a></code> | <code><a href="#cdk-nag.NagReportFormat">NagReportFormat</a>[]</code> | *No description.* |
1044
-
1045
- ---
1046
-
1047
- ##### `formats`<sup>Required</sup> <a name="formats" id="cdk-nag.NagReportLoggerProps.property.formats"></a>
1048
-
1049
- ```typescript
1050
- public readonly formats: NagReportFormat[];
1051
- ```
1052
-
1053
- - *Type:* <a href="#cdk-nag.NagReportFormat">NagReportFormat</a>[]
1054
-
1055
- ---
1056
-
1057
125
  ### NagReportSchema <a name="NagReportSchema" id="cdk-nag.NagReportSchema"></a>
1058
126
 
127
+ Schema for the NagReport output.
128
+
1059
129
  #### Initializer <a name="Initializer" id="cdk-nag.NagReportSchema.Initializer"></a>
1060
130
 
1061
131
  ```typescript
@@ -1066,294 +136,23 @@ const nagReportSchema: NagReportSchema = { ... }
1066
136
 
1067
137
  #### Properties <a name="Properties" id="Properties"></a>
1068
138
 
1069
- | **Name** | **Type** | **Description** |
1070
- | --- | --- | --- |
1071
- | <code><a href="#cdk-nag.NagReportSchema.property.lines">lines</a></code> | <code><a href="#cdk-nag.NagReportLine">NagReportLine</a>[]</code> | *No description.* |
1072
-
1073
- ---
1074
-
1075
- ##### `lines`<sup>Required</sup> <a name="lines" id="cdk-nag.NagReportSchema.property.lines"></a>
1076
-
1077
- ```typescript
1078
- public readonly lines: NagReportLine[];
1079
- ```
1080
-
1081
- - *Type:* <a href="#cdk-nag.NagReportLine">NagReportLine</a>[]
1082
-
1083
- ---
1084
-
1085
- ### RegexAppliesTo <a name="RegexAppliesTo" id="cdk-nag.RegexAppliesTo"></a>
1086
-
1087
- A regular expression to apply to matching findings.
1088
-
1089
- #### Initializer <a name="Initializer" id="cdk-nag.RegexAppliesTo.Initializer"></a>
1090
-
1091
- ```typescript
1092
- import { RegexAppliesTo } from 'cdk-nag'
1093
-
1094
- const regexAppliesTo: RegexAppliesTo = { ... }
1095
- ```
1096
-
1097
- #### Properties <a name="Properties" id="Properties"></a>
1098
-
1099
- | **Name** | **Type** | **Description** |
1100
- | --- | --- | --- |
1101
- | <code><a href="#cdk-nag.RegexAppliesTo.property.regex">regex</a></code> | <code>string</code> | An ECMA-262 regex string. |
1102
-
1103
- ---
1104
-
1105
- ##### `regex`<sup>Required</sup> <a name="regex" id="cdk-nag.RegexAppliesTo.property.regex"></a>
1106
-
1107
- ```typescript
1108
- public readonly regex: string;
1109
- ```
1110
-
1111
- - *Type:* string
1112
-
1113
- An ECMA-262 regex string.
1114
-
1115
- ---
1116
-
1117
- ### SuppressionIgnoreInput <a name="SuppressionIgnoreInput" id="cdk-nag.SuppressionIgnoreInput"></a>
1118
-
1119
- Information about the NagRule and the relevant NagSuppression for the INagSuppressionIgnore.
1120
-
1121
- #### Initializer <a name="Initializer" id="cdk-nag.SuppressionIgnoreInput.Initializer"></a>
1122
-
1123
- ```typescript
1124
- import { SuppressionIgnoreInput } from 'cdk-nag'
1125
-
1126
- const suppressionIgnoreInput: SuppressionIgnoreInput = { ... }
1127
- ```
1128
-
1129
- #### Properties <a name="Properties" id="Properties"></a>
1130
-
1131
- | **Name** | **Type** | **Description** |
1132
- | --- | --- | --- |
1133
- | <code><a href="#cdk-nag.SuppressionIgnoreInput.property.findingId">findingId</a></code> | <code>string</code> | *No description.* |
1134
- | <code><a href="#cdk-nag.SuppressionIgnoreInput.property.reason">reason</a></code> | <code>string</code> | *No description.* |
1135
- | <code><a href="#cdk-nag.SuppressionIgnoreInput.property.resource">resource</a></code> | <code>aws-cdk-lib.CfnResource</code> | *No description.* |
1136
- | <code><a href="#cdk-nag.SuppressionIgnoreInput.property.ruleId">ruleId</a></code> | <code>string</code> | *No description.* |
1137
- | <code><a href="#cdk-nag.SuppressionIgnoreInput.property.ruleLevel">ruleLevel</a></code> | <code><a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a></code> | *No description.* |
1138
-
1139
- ---
1140
-
1141
- ##### `findingId`<sup>Required</sup> <a name="findingId" id="cdk-nag.SuppressionIgnoreInput.property.findingId"></a>
1142
-
1143
- ```typescript
1144
- public readonly findingId: string;
1145
- ```
1146
-
1147
- - *Type:* string
1148
-
1149
- ---
1150
-
1151
- ##### `reason`<sup>Required</sup> <a name="reason" id="cdk-nag.SuppressionIgnoreInput.property.reason"></a>
1152
-
1153
- ```typescript
1154
- public readonly reason: string;
1155
- ```
1156
-
1157
- - *Type:* string
1158
-
1159
- ---
1160
-
1161
- ##### `resource`<sup>Required</sup> <a name="resource" id="cdk-nag.SuppressionIgnoreInput.property.resource"></a>
1162
-
1163
- ```typescript
1164
- public readonly resource: CfnResource;
1165
- ```
1166
-
1167
- - *Type:* aws-cdk-lib.CfnResource
1168
-
1169
- ---
1170
-
1171
- ##### `ruleId`<sup>Required</sup> <a name="ruleId" id="cdk-nag.SuppressionIgnoreInput.property.ruleId"></a>
1172
-
1173
- ```typescript
1174
- public readonly ruleId: string;
1175
- ```
1176
-
1177
- - *Type:* string
1178
-
1179
- ---
1180
-
1181
- ##### `ruleLevel`<sup>Required</sup> <a name="ruleLevel" id="cdk-nag.SuppressionIgnoreInput.property.ruleLevel"></a>
1182
-
1183
- ```typescript
1184
- public readonly ruleLevel: NagMessageLevel;
1185
- ```
1186
-
1187
- - *Type:* <a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a>
1188
-
1189
- ---
1190
-
1191
- ## Classes <a name="Classes" id="Classes"></a>
1192
-
1193
- ### AnnotationLogger <a name="AnnotationLogger" id="cdk-nag.AnnotationLogger"></a>
1194
-
1195
- - *Implements:* <a href="#cdk-nag.INagLogger">INagLogger</a>
1196
-
1197
- A NagLogger that outputs to the CDK Annotations system.
1198
-
1199
- #### Initializers <a name="Initializers" id="cdk-nag.AnnotationLogger.Initializer"></a>
1200
-
1201
- ```typescript
1202
- import { AnnotationLogger } from 'cdk-nag'
1203
-
1204
- new AnnotationLogger(props?: AnnotationLoggerProps)
1205
- ```
1206
-
1207
- | **Name** | **Type** | **Description** |
1208
- | --- | --- | --- |
1209
- | <code><a href="#cdk-nag.AnnotationLogger.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.AnnotationLoggerProps">AnnotationLoggerProps</a></code> | *No description.* |
1210
-
1211
- ---
1212
-
1213
- ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.AnnotationLogger.Initializer.parameter.props"></a>
1214
-
1215
- - *Type:* <a href="#cdk-nag.AnnotationLoggerProps">AnnotationLoggerProps</a>
1216
-
1217
- ---
1218
-
1219
- #### Methods <a name="Methods" id="Methods"></a>
1220
-
1221
- | **Name** | **Description** |
1222
- | --- | --- |
1223
- | <code><a href="#cdk-nag.AnnotationLogger.onCompliance">onCompliance</a></code> | Called when a CfnResource passes the compliance check for a given rule. |
1224
- | <code><a href="#cdk-nag.AnnotationLogger.onError">onError</a></code> | Called when a rule throws an error during while validating a CfnResource for compliance. |
1225
- | <code><a href="#cdk-nag.AnnotationLogger.onNonCompliance">onNonCompliance</a></code> | Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user. |
1226
- | <code><a href="#cdk-nag.AnnotationLogger.onNotApplicable">onNotApplicable</a></code> | Called when a rule does not apply to the given CfnResource. |
1227
- | <code><a href="#cdk-nag.AnnotationLogger.onSuppressed">onSuppressed</a></code> | Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user. |
1228
- | <code><a href="#cdk-nag.AnnotationLogger.onSuppressedError">onSuppressedError</a></code> | Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed. |
1229
-
1230
- ---
1231
-
1232
- ##### `onCompliance` <a name="onCompliance" id="cdk-nag.AnnotationLogger.onCompliance"></a>
1233
-
1234
- ```typescript
1235
- public onCompliance(_data: NagLoggerComplianceData): void
1236
- ```
1237
-
1238
- Called when a CfnResource passes the compliance check for a given rule.
1239
-
1240
- ###### `_data`<sup>Required</sup> <a name="_data" id="cdk-nag.AnnotationLogger.onCompliance.parameter._data"></a>
1241
-
1242
- - *Type:* <a href="#cdk-nag.NagLoggerComplianceData">NagLoggerComplianceData</a>
1243
-
1244
- ---
1245
-
1246
- ##### `onError` <a name="onError" id="cdk-nag.AnnotationLogger.onError"></a>
1247
-
1248
- ```typescript
1249
- public onError(data: NagLoggerErrorData): void
1250
- ```
1251
-
1252
- Called when a rule throws an error during while validating a CfnResource for compliance.
1253
-
1254
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.AnnotationLogger.onError.parameter.data"></a>
1255
-
1256
- - *Type:* <a href="#cdk-nag.NagLoggerErrorData">NagLoggerErrorData</a>
1257
-
1258
- ---
1259
-
1260
- ##### `onNonCompliance` <a name="onNonCompliance" id="cdk-nag.AnnotationLogger.onNonCompliance"></a>
1261
-
1262
- ```typescript
1263
- public onNonCompliance(data: NagLoggerNonComplianceData): void
1264
- ```
1265
-
1266
- Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user.
1267
-
1268
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.AnnotationLogger.onNonCompliance.parameter.data"></a>
1269
-
1270
- - *Type:* <a href="#cdk-nag.NagLoggerNonComplianceData">NagLoggerNonComplianceData</a>
1271
-
1272
- ---
1273
-
1274
- ##### `onNotApplicable` <a name="onNotApplicable" id="cdk-nag.AnnotationLogger.onNotApplicable"></a>
1275
-
1276
- ```typescript
1277
- public onNotApplicable(_data: NagLoggerNotApplicableData): void
1278
- ```
1279
-
1280
- Called when a rule does not apply to the given CfnResource.
1281
-
1282
- ###### `_data`<sup>Required</sup> <a name="_data" id="cdk-nag.AnnotationLogger.onNotApplicable.parameter._data"></a>
1283
-
1284
- - *Type:* <a href="#cdk-nag.NagLoggerNotApplicableData">NagLoggerNotApplicableData</a>
1285
-
1286
- ---
1287
-
1288
- ##### `onSuppressed` <a name="onSuppressed" id="cdk-nag.AnnotationLogger.onSuppressed"></a>
1289
-
1290
- ```typescript
1291
- public onSuppressed(data: NagLoggerSuppressedData): void
1292
- ```
1293
-
1294
- Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user.
1295
-
1296
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.AnnotationLogger.onSuppressed.parameter.data"></a>
1297
-
1298
- - *Type:* <a href="#cdk-nag.NagLoggerSuppressedData">NagLoggerSuppressedData</a>
1299
-
1300
- ---
1301
-
1302
- ##### `onSuppressedError` <a name="onSuppressedError" id="cdk-nag.AnnotationLogger.onSuppressedError"></a>
1303
-
1304
- ```typescript
1305
- public onSuppressedError(data: NagLoggerSuppressedErrorData): void
1306
- ```
1307
-
1308
- Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed.
1309
-
1310
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.AnnotationLogger.onSuppressedError.parameter.data"></a>
1311
-
1312
- - *Type:* <a href="#cdk-nag.NagLoggerSuppressedErrorData">NagLoggerSuppressedErrorData</a>
1313
-
1314
- ---
1315
-
1316
-
1317
- #### Properties <a name="Properties" id="Properties"></a>
1318
-
1319
- | **Name** | **Type** | **Description** |
1320
- | --- | --- | --- |
1321
- | <code><a href="#cdk-nag.AnnotationLogger.property.logIgnores">logIgnores</a></code> | <code>boolean</code> | *No description.* |
1322
- | <code><a href="#cdk-nag.AnnotationLogger.property.verbose">verbose</a></code> | <code>boolean</code> | *No description.* |
1323
- | <code><a href="#cdk-nag.AnnotationLogger.property.suppressionId">suppressionId</a></code> | <code>string</code> | *No description.* |
1324
-
1325
- ---
1326
-
1327
- ##### `logIgnores`<sup>Required</sup> <a name="logIgnores" id="cdk-nag.AnnotationLogger.property.logIgnores"></a>
1328
-
1329
- ```typescript
1330
- public readonly logIgnores: boolean;
1331
- ```
1332
-
1333
- - *Type:* boolean
1334
-
1335
- ---
1336
-
1337
- ##### `verbose`<sup>Required</sup> <a name="verbose" id="cdk-nag.AnnotationLogger.property.verbose"></a>
1338
-
1339
- ```typescript
1340
- public readonly verbose: boolean;
1341
- ```
1342
-
1343
- - *Type:* boolean
139
+ | **Name** | **Type** | **Description** |
140
+ | --- | --- | --- |
141
+ | <code><a href="#cdk-nag.NagReportSchema.property.lines">lines</a></code> | <code><a href="#cdk-nag.NagReportLine">NagReportLine</a>[]</code> | *No description.* |
1344
142
 
1345
143
  ---
1346
144
 
1347
- ##### `suppressionId`<sup>Required</sup> <a name="suppressionId" id="cdk-nag.AnnotationLogger.property.suppressionId"></a>
145
+ ##### `lines`<sup>Required</sup> <a name="lines" id="cdk-nag.NagReportSchema.property.lines"></a>
1348
146
 
1349
147
  ```typescript
1350
- public readonly suppressionId: string;
148
+ public readonly lines: NagReportLine[];
1351
149
  ```
1352
150
 
1353
- - *Type:* string
151
+ - *Type:* <a href="#cdk-nag.NagReportLine">NagReportLine</a>[]
1354
152
 
1355
153
  ---
1356
154
 
155
+ ## Classes <a name="Classes" id="Classes"></a>
1357
156
 
1358
157
  ### AwsSolutionsChecks <a name="AwsSolutionsChecks" id="cdk-nag.AwsSolutionsChecks"></a>
1359
158
 
@@ -1364,15 +163,22 @@ Check Best practices based on AWS Solutions Security Matrix.
1364
163
  ```typescript
1365
164
  import { AwsSolutionsChecks } from 'cdk-nag'
1366
165
 
1367
- new AwsSolutionsChecks(props?: NagPackProps)
166
+ new AwsSolutionsChecks(scope?: IConstruct, props?: NagPackProps)
1368
167
  ```
1369
168
 
1370
169
  | **Name** | **Type** | **Description** |
1371
170
  | --- | --- | --- |
171
+ | <code><a href="#cdk-nag.AwsSolutionsChecks.Initializer.parameter.scope">scope</a></code> | <code>constructs.IConstruct</code> | *No description.* |
1372
172
  | <code><a href="#cdk-nag.AwsSolutionsChecks.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
1373
173
 
1374
174
  ---
1375
175
 
176
+ ##### `scope`<sup>Optional</sup> <a name="scope" id="cdk-nag.AwsSolutionsChecks.Initializer.parameter.scope"></a>
177
+
178
+ - *Type:* constructs.IConstruct
179
+
180
+ ---
181
+
1376
182
  ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.AwsSolutionsChecks.Initializer.parameter.props"></a>
1377
183
 
1378
184
  - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
@@ -1383,19 +189,41 @@ new AwsSolutionsChecks(props?: NagPackProps)
1383
189
 
1384
190
  | **Name** | **Description** |
1385
191
  | --- | --- |
1386
- | <code><a href="#cdk-nag.AwsSolutionsChecks.visit">visit</a></code> | All aspects can visit an IConstruct. |
192
+ | <code><a href="#cdk-nag.AwsSolutionsChecks.validate">validate</a></code> | Entry point called by the CDK validation framework. |
193
+ | <code><a href="#cdk-nag.AwsSolutionsChecks.validateScope">validateScope</a></code> | Validate a construct tree directly. |
1387
194
 
1388
195
  ---
1389
196
 
1390
- ##### `visit` <a name="visit" id="cdk-nag.AwsSolutionsChecks.visit"></a>
197
+ ##### `validate` <a name="validate" id="cdk-nag.AwsSolutionsChecks.validate"></a>
1391
198
 
1392
199
  ```typescript
1393
- public visit(node: IConstruct): void
200
+ public validate(context: IPolicyValidationContext): PolicyValidationPluginReport
1394
201
  ```
1395
202
 
1396
- All aspects can visit an IConstruct.
203
+ Entry point called by the CDK validation framework.
204
+
205
+ Requires `appConstruct` to be present on the context (CDK core change).
206
+ For testing or direct invocation, use `validateScope(scope)`.
1397
207
 
1398
- ###### `node`<sup>Required</sup> <a name="node" id="cdk-nag.AwsSolutionsChecks.visit.parameter.node"></a>
208
+ ###### `context`<sup>Required</sup> <a name="context" id="cdk-nag.AwsSolutionsChecks.validate.parameter.context"></a>
209
+
210
+ - *Type:* aws-cdk-lib.IPolicyValidationContext
211
+
212
+ ---
213
+
214
+ ##### `validateScope` <a name="validateScope" id="cdk-nag.AwsSolutionsChecks.validateScope"></a>
215
+
216
+ ```typescript
217
+ public validateScope(scope: IConstruct): PolicyValidationPluginReport
218
+ ```
219
+
220
+ Validate a construct tree directly.
221
+
222
+ This is the primary entry point
223
+ for testing and for CDK versions that do not yet provide `appConstruct` on
224
+ `IPolicyValidationContext`.
225
+
226
+ ###### `scope`<sup>Required</sup> <a name="scope" id="cdk-nag.AwsSolutionsChecks.validateScope.parameter.scope"></a>
1399
227
 
1400
228
  - *Type:* constructs.IConstruct
1401
229
 
@@ -1406,7 +234,22 @@ All aspects can visit an IConstruct.
1406
234
 
1407
235
  | **Name** | **Type** | **Description** |
1408
236
  | --- | --- | --- |
237
+ | <code><a href="#cdk-nag.AwsSolutionsChecks.property.name">name</a></code> | <code>string</code> | The name of the plugin that will be displayed in the validation report. |
1409
238
  | <code><a href="#cdk-nag.AwsSolutionsChecks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
239
+ | <code><a href="#cdk-nag.AwsSolutionsChecks.property.ruleIds">ruleIds</a></code> | <code>string[]</code> | The list of rule IDs that the plugin will evaluate. |
240
+ | <code><a href="#cdk-nag.AwsSolutionsChecks.property.version">version</a></code> | <code>string</code> | The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`. |
241
+
242
+ ---
243
+
244
+ ##### `name`<sup>Required</sup> <a name="name" id="cdk-nag.AwsSolutionsChecks.property.name"></a>
245
+
246
+ ```typescript
247
+ public readonly name: string;
248
+ ```
249
+
250
+ - *Type:* string
251
+
252
+ The name of the plugin that will be displayed in the validation report.
1410
253
 
1411
254
  ---
1412
255
 
@@ -1420,6 +263,33 @@ public readonly readPackName: string;
1420
263
 
1421
264
  ---
1422
265
 
266
+ ##### `ruleIds`<sup>Optional</sup> <a name="ruleIds" id="cdk-nag.AwsSolutionsChecks.property.ruleIds"></a>
267
+
268
+ ```typescript
269
+ public readonly ruleIds: string[];
270
+ ```
271
+
272
+ - *Type:* string[]
273
+
274
+ The list of rule IDs that the plugin will evaluate.
275
+
276
+ Used for analytics
277
+ purposes.
278
+
279
+ ---
280
+
281
+ ##### `version`<sup>Optional</sup> <a name="version" id="cdk-nag.AwsSolutionsChecks.property.version"></a>
282
+
283
+ ```typescript
284
+ public readonly version: string;
285
+ ```
286
+
287
+ - *Type:* string
288
+
289
+ The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`.
290
+
291
+ ---
292
+
1423
293
 
1424
294
  ### HIPAASecurityChecks <a name="HIPAASecurityChecks" id="cdk-nag.HIPAASecurityChecks"></a>
1425
295
 
@@ -1432,15 +302,22 @@ Based on the HIPAA Security AWS operational best practices: https://docs.aws.ama
1432
302
  ```typescript
1433
303
  import { HIPAASecurityChecks } from 'cdk-nag'
1434
304
 
1435
- new HIPAASecurityChecks(props?: NagPackProps)
305
+ new HIPAASecurityChecks(scope?: IConstruct, props?: NagPackProps)
1436
306
  ```
1437
307
 
1438
308
  | **Name** | **Type** | **Description** |
1439
309
  | --- | --- | --- |
310
+ | <code><a href="#cdk-nag.HIPAASecurityChecks.Initializer.parameter.scope">scope</a></code> | <code>constructs.IConstruct</code> | *No description.* |
1440
311
  | <code><a href="#cdk-nag.HIPAASecurityChecks.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
1441
312
 
1442
313
  ---
1443
314
 
315
+ ##### `scope`<sup>Optional</sup> <a name="scope" id="cdk-nag.HIPAASecurityChecks.Initializer.parameter.scope"></a>
316
+
317
+ - *Type:* constructs.IConstruct
318
+
319
+ ---
320
+
1444
321
  ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.HIPAASecurityChecks.Initializer.parameter.props"></a>
1445
322
 
1446
323
  - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
@@ -1451,264 +328,247 @@ new HIPAASecurityChecks(props?: NagPackProps)
1451
328
 
1452
329
  | **Name** | **Description** |
1453
330
  | --- | --- |
1454
- | <code><a href="#cdk-nag.HIPAASecurityChecks.visit">visit</a></code> | All aspects can visit an IConstruct. |
331
+ | <code><a href="#cdk-nag.HIPAASecurityChecks.validate">validate</a></code> | Entry point called by the CDK validation framework. |
332
+ | <code><a href="#cdk-nag.HIPAASecurityChecks.validateScope">validateScope</a></code> | Validate a construct tree directly. |
1455
333
 
1456
334
  ---
1457
335
 
1458
- ##### `visit` <a name="visit" id="cdk-nag.HIPAASecurityChecks.visit"></a>
336
+ ##### `validate` <a name="validate" id="cdk-nag.HIPAASecurityChecks.validate"></a>
1459
337
 
1460
338
  ```typescript
1461
- public visit(node: IConstruct): void
339
+ public validate(context: IPolicyValidationContext): PolicyValidationPluginReport
1462
340
  ```
1463
341
 
1464
- All aspects can visit an IConstruct.
1465
-
1466
- ###### `node`<sup>Required</sup> <a name="node" id="cdk-nag.HIPAASecurityChecks.visit.parameter.node"></a>
1467
-
1468
- - *Type:* constructs.IConstruct
1469
-
1470
- ---
342
+ Entry point called by the CDK validation framework.
1471
343
 
344
+ Requires `appConstruct` to be present on the context (CDK core change).
345
+ For testing or direct invocation, use `validateScope(scope)`.
1472
346
 
1473
- #### Properties <a name="Properties" id="Properties"></a>
347
+ ###### `context`<sup>Required</sup> <a name="context" id="cdk-nag.HIPAASecurityChecks.validate.parameter.context"></a>
1474
348
 
1475
- | **Name** | **Type** | **Description** |
1476
- | --- | --- | --- |
1477
- | <code><a href="#cdk-nag.HIPAASecurityChecks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
349
+ - *Type:* aws-cdk-lib.IPolicyValidationContext
1478
350
 
1479
351
  ---
1480
352
 
1481
- ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.HIPAASecurityChecks.property.readPackName"></a>
353
+ ##### `validateScope` <a name="validateScope" id="cdk-nag.HIPAASecurityChecks.validateScope"></a>
1482
354
 
1483
355
  ```typescript
1484
- public readonly readPackName: string;
356
+ public validateScope(scope: IConstruct): PolicyValidationPluginReport
1485
357
  ```
1486
358
 
1487
- - *Type:* string
1488
-
1489
- ---
1490
-
359
+ Validate a construct tree directly.
1491
360
 
1492
- ### NagPack <a name="NagPack" id="cdk-nag.NagPack"></a>
361
+ This is the primary entry point
362
+ for testing and for CDK versions that do not yet provide `appConstruct` on
363
+ `IPolicyValidationContext`.
1493
364
 
1494
- - *Implements:* aws-cdk-lib.IAspect
365
+ ###### `scope`<sup>Required</sup> <a name="scope" id="cdk-nag.HIPAASecurityChecks.validateScope.parameter.scope"></a>
1495
366
 
1496
- Base class for all rule packs.
367
+ - *Type:* constructs.IConstruct
1497
368
 
1498
- #### Initializers <a name="Initializers" id="cdk-nag.NagPack.Initializer"></a>
369
+ ---
1499
370
 
1500
- ```typescript
1501
- import { NagPack } from 'cdk-nag'
1502
371
 
1503
- new NagPack(props?: NagPackProps)
1504
- ```
372
+ #### Properties <a name="Properties" id="Properties"></a>
1505
373
 
1506
374
  | **Name** | **Type** | **Description** |
1507
375
  | --- | --- | --- |
1508
- | <code><a href="#cdk-nag.NagPack.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
376
+ | <code><a href="#cdk-nag.HIPAASecurityChecks.property.name">name</a></code> | <code>string</code> | The name of the plugin that will be displayed in the validation report. |
377
+ | <code><a href="#cdk-nag.HIPAASecurityChecks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
378
+ | <code><a href="#cdk-nag.HIPAASecurityChecks.property.ruleIds">ruleIds</a></code> | <code>string[]</code> | The list of rule IDs that the plugin will evaluate. |
379
+ | <code><a href="#cdk-nag.HIPAASecurityChecks.property.version">version</a></code> | <code>string</code> | The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`. |
1509
380
 
1510
381
  ---
1511
382
 
1512
- ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.NagPack.Initializer.parameter.props"></a>
1513
-
1514
- - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
383
+ ##### `name`<sup>Required</sup> <a name="name" id="cdk-nag.HIPAASecurityChecks.property.name"></a>
1515
384
 
1516
- ---
385
+ ```typescript
386
+ public readonly name: string;
387
+ ```
1517
388
 
1518
- #### Methods <a name="Methods" id="Methods"></a>
389
+ - *Type:* string
1519
390
 
1520
- | **Name** | **Description** |
1521
- | --- | --- |
1522
- | <code><a href="#cdk-nag.NagPack.visit">visit</a></code> | All aspects can visit an IConstruct. |
391
+ The name of the plugin that will be displayed in the validation report.
1523
392
 
1524
393
  ---
1525
394
 
1526
- ##### `visit` <a name="visit" id="cdk-nag.NagPack.visit"></a>
395
+ ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.HIPAASecurityChecks.property.readPackName"></a>
1527
396
 
1528
397
  ```typescript
1529
- public visit(node: IConstruct): void
398
+ public readonly readPackName: string;
1530
399
  ```
1531
400
 
1532
- All aspects can visit an IConstruct.
401
+ - *Type:* string
1533
402
 
1534
- ###### `node`<sup>Required</sup> <a name="node" id="cdk-nag.NagPack.visit.parameter.node"></a>
403
+ ---
1535
404
 
1536
- - *Type:* constructs.IConstruct
405
+ ##### `ruleIds`<sup>Optional</sup> <a name="ruleIds" id="cdk-nag.HIPAASecurityChecks.property.ruleIds"></a>
1537
406
 
1538
- ---
407
+ ```typescript
408
+ public readonly ruleIds: string[];
409
+ ```
1539
410
 
411
+ - *Type:* string[]
1540
412
 
1541
- #### Properties <a name="Properties" id="Properties"></a>
413
+ The list of rule IDs that the plugin will evaluate.
1542
414
 
1543
- | **Name** | **Type** | **Description** |
1544
- | --- | --- | --- |
1545
- | <code><a href="#cdk-nag.NagPack.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
415
+ Used for analytics
416
+ purposes.
1546
417
 
1547
418
  ---
1548
419
 
1549
- ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.NagPack.property.readPackName"></a>
420
+ ##### `version`<sup>Optional</sup> <a name="version" id="cdk-nag.HIPAASecurityChecks.property.version"></a>
1550
421
 
1551
422
  ```typescript
1552
- public readonly readPackName: string;
423
+ public readonly version: string;
1553
424
  ```
1554
425
 
1555
426
  - *Type:* string
1556
427
 
428
+ The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`.
429
+
1557
430
  ---
1558
431
 
1559
432
 
1560
- ### NagReportLogger <a name="NagReportLogger" id="cdk-nag.NagReportLogger"></a>
433
+ ### NagPack <a name="NagPack" id="cdk-nag.NagPack"></a>
434
+
435
+ - *Implements:* aws-cdk-lib.IPolicyValidationPlugin
1561
436
 
1562
- - *Implements:* <a href="#cdk-nag.INagLogger">INagLogger</a>
437
+ Base class for all rule packs.
1563
438
 
1564
- A NagLogger that creates compliance reports.
439
+ Implements IPolicyValidationPlugin so that
440
+ packs are registered via `Validations.of(app).addPlugins(new MyPack(app))`
441
+ instead of `Aspects.of(app).add(...)`.
1565
442
 
1566
- #### Initializers <a name="Initializers" id="cdk-nag.NagReportLogger.Initializer"></a>
443
+ #### Initializers <a name="Initializers" id="cdk-nag.NagPack.Initializer"></a>
1567
444
 
1568
445
  ```typescript
1569
- import { NagReportLogger } from 'cdk-nag'
446
+ import { NagPack } from 'cdk-nag'
1570
447
 
1571
- new NagReportLogger(props: NagReportLoggerProps)
448
+ new NagPack(scope?: IConstruct, props?: NagPackProps)
1572
449
  ```
1573
450
 
1574
451
  | **Name** | **Type** | **Description** |
1575
452
  | --- | --- | --- |
1576
- | <code><a href="#cdk-nag.NagReportLogger.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagReportLoggerProps">NagReportLoggerProps</a></code> | *No description.* |
453
+ | <code><a href="#cdk-nag.NagPack.Initializer.parameter.scope">scope</a></code> | <code>constructs.IConstruct</code> | *No description.* |
454
+ | <code><a href="#cdk-nag.NagPack.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
1577
455
 
1578
456
  ---
1579
457
 
1580
- ##### `props`<sup>Required</sup> <a name="props" id="cdk-nag.NagReportLogger.Initializer.parameter.props"></a>
458
+ ##### `scope`<sup>Optional</sup> <a name="scope" id="cdk-nag.NagPack.Initializer.parameter.scope"></a>
1581
459
 
1582
- - *Type:* <a href="#cdk-nag.NagReportLoggerProps">NagReportLoggerProps</a>
460
+ - *Type:* constructs.IConstruct
1583
461
 
1584
462
  ---
1585
463
 
1586
- #### Methods <a name="Methods" id="Methods"></a>
464
+ ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.NagPack.Initializer.parameter.props"></a>
1587
465
 
1588
- | **Name** | **Description** |
1589
- | --- | --- |
1590
- | <code><a href="#cdk-nag.NagReportLogger.getFormatStacks">getFormatStacks</a></code> | *No description.* |
1591
- | <code><a href="#cdk-nag.NagReportLogger.onCompliance">onCompliance</a></code> | Called when a CfnResource passes the compliance check for a given rule. |
1592
- | <code><a href="#cdk-nag.NagReportLogger.onError">onError</a></code> | Called when a rule throws an error during while validating a CfnResource for compliance. |
1593
- | <code><a href="#cdk-nag.NagReportLogger.onNonCompliance">onNonCompliance</a></code> | Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user. |
1594
- | <code><a href="#cdk-nag.NagReportLogger.onNotApplicable">onNotApplicable</a></code> | Called when a rule does not apply to the given CfnResource. |
1595
- | <code><a href="#cdk-nag.NagReportLogger.onSuppressed">onSuppressed</a></code> | Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user. |
1596
- | <code><a href="#cdk-nag.NagReportLogger.onSuppressedError">onSuppressedError</a></code> | Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed. |
466
+ - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
1597
467
 
1598
468
  ---
1599
469
 
1600
- ##### `getFormatStacks` <a name="getFormatStacks" id="cdk-nag.NagReportLogger.getFormatStacks"></a>
1601
-
1602
- ```typescript
1603
- public getFormatStacks(format: NagReportFormat): string[]
1604
- ```
1605
-
1606
- ###### `format`<sup>Required</sup> <a name="format" id="cdk-nag.NagReportLogger.getFormatStacks.parameter.format"></a>
470
+ #### Methods <a name="Methods" id="Methods"></a>
1607
471
 
1608
- - *Type:* <a href="#cdk-nag.NagReportFormat">NagReportFormat</a>
472
+ | **Name** | **Description** |
473
+ | --- | --- |
474
+ | <code><a href="#cdk-nag.NagPack.validate">validate</a></code> | Entry point called by the CDK validation framework. |
475
+ | <code><a href="#cdk-nag.NagPack.validateScope">validateScope</a></code> | Validate a construct tree directly. |
1609
476
 
1610
477
  ---
1611
478
 
1612
- ##### `onCompliance` <a name="onCompliance" id="cdk-nag.NagReportLogger.onCompliance"></a>
479
+ ##### `validate` <a name="validate" id="cdk-nag.NagPack.validate"></a>
1613
480
 
1614
481
  ```typescript
1615
- public onCompliance(data: NagLoggerComplianceData): void
482
+ public validate(context: IPolicyValidationContext): PolicyValidationPluginReport
1616
483
  ```
1617
484
 
1618
- Called when a CfnResource passes the compliance check for a given rule.
485
+ Entry point called by the CDK validation framework.
486
+
487
+ Requires `appConstruct` to be present on the context (CDK core change).
488
+ For testing or direct invocation, use `validateScope(scope)`.
1619
489
 
1620
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.NagReportLogger.onCompliance.parameter.data"></a>
490
+ ###### `context`<sup>Required</sup> <a name="context" id="cdk-nag.NagPack.validate.parameter.context"></a>
1621
491
 
1622
- - *Type:* <a href="#cdk-nag.NagLoggerComplianceData">NagLoggerComplianceData</a>
492
+ - *Type:* aws-cdk-lib.IPolicyValidationContext
1623
493
 
1624
494
  ---
1625
495
 
1626
- ##### `onError` <a name="onError" id="cdk-nag.NagReportLogger.onError"></a>
496
+ ##### `validateScope` <a name="validateScope" id="cdk-nag.NagPack.validateScope"></a>
1627
497
 
1628
498
  ```typescript
1629
- public onError(data: NagLoggerErrorData): void
499
+ public validateScope(scope: IConstruct): PolicyValidationPluginReport
1630
500
  ```
1631
501
 
1632
- Called when a rule throws an error during while validating a CfnResource for compliance.
502
+ Validate a construct tree directly.
1633
503
 
1634
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.NagReportLogger.onError.parameter.data"></a>
504
+ This is the primary entry point
505
+ for testing and for CDK versions that do not yet provide `appConstruct` on
506
+ `IPolicyValidationContext`.
1635
507
 
1636
- - *Type:* <a href="#cdk-nag.NagLoggerErrorData">NagLoggerErrorData</a>
1637
-
1638
- ---
508
+ ###### `scope`<sup>Required</sup> <a name="scope" id="cdk-nag.NagPack.validateScope.parameter.scope"></a>
1639
509
 
1640
- ##### `onNonCompliance` <a name="onNonCompliance" id="cdk-nag.NagReportLogger.onNonCompliance"></a>
510
+ - *Type:* constructs.IConstruct
1641
511
 
1642
- ```typescript
1643
- public onNonCompliance(data: NagLoggerNonComplianceData): void
1644
- ```
512
+ ---
1645
513
 
1646
- Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user.
1647
514
 
1648
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.NagReportLogger.onNonCompliance.parameter.data"></a>
515
+ #### Properties <a name="Properties" id="Properties"></a>
1649
516
 
1650
- - *Type:* <a href="#cdk-nag.NagLoggerNonComplianceData">NagLoggerNonComplianceData</a>
517
+ | **Name** | **Type** | **Description** |
518
+ | --- | --- | --- |
519
+ | <code><a href="#cdk-nag.NagPack.property.name">name</a></code> | <code>string</code> | The name of the plugin that will be displayed in the validation report. |
520
+ | <code><a href="#cdk-nag.NagPack.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
521
+ | <code><a href="#cdk-nag.NagPack.property.ruleIds">ruleIds</a></code> | <code>string[]</code> | The list of rule IDs that the plugin will evaluate. |
522
+ | <code><a href="#cdk-nag.NagPack.property.version">version</a></code> | <code>string</code> | The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`. |
1651
523
 
1652
524
  ---
1653
525
 
1654
- ##### `onNotApplicable` <a name="onNotApplicable" id="cdk-nag.NagReportLogger.onNotApplicable"></a>
526
+ ##### `name`<sup>Required</sup> <a name="name" id="cdk-nag.NagPack.property.name"></a>
1655
527
 
1656
528
  ```typescript
1657
- public onNotApplicable(data: NagLoggerNotApplicableData): void
529
+ public readonly name: string;
1658
530
  ```
1659
531
 
1660
- Called when a rule does not apply to the given CfnResource.
1661
-
1662
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.NagReportLogger.onNotApplicable.parameter.data"></a>
532
+ - *Type:* string
1663
533
 
1664
- - *Type:* <a href="#cdk-nag.NagLoggerNotApplicableData">NagLoggerNotApplicableData</a>
534
+ The name of the plugin that will be displayed in the validation report.
1665
535
 
1666
536
  ---
1667
537
 
1668
- ##### `onSuppressed` <a name="onSuppressed" id="cdk-nag.NagReportLogger.onSuppressed"></a>
538
+ ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.NagPack.property.readPackName"></a>
1669
539
 
1670
540
  ```typescript
1671
- public onSuppressed(data: NagLoggerSuppressedData): void
541
+ public readonly readPackName: string;
1672
542
  ```
1673
543
 
1674
- Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user.
1675
-
1676
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.NagReportLogger.onSuppressed.parameter.data"></a>
1677
-
1678
- - *Type:* <a href="#cdk-nag.NagLoggerSuppressedData">NagLoggerSuppressedData</a>
544
+ - *Type:* string
1679
545
 
1680
546
  ---
1681
547
 
1682
- ##### `onSuppressedError` <a name="onSuppressedError" id="cdk-nag.NagReportLogger.onSuppressedError"></a>
548
+ ##### `ruleIds`<sup>Optional</sup> <a name="ruleIds" id="cdk-nag.NagPack.property.ruleIds"></a>
1683
549
 
1684
550
  ```typescript
1685
- public onSuppressedError(data: NagLoggerSuppressedErrorData): void
551
+ public readonly ruleIds: string[];
1686
552
  ```
1687
553
 
1688
- Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed.
1689
-
1690
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.NagReportLogger.onSuppressedError.parameter.data"></a>
554
+ - *Type:* string[]
1691
555
 
1692
- - *Type:* <a href="#cdk-nag.NagLoggerSuppressedErrorData">NagLoggerSuppressedErrorData</a>
556
+ The list of rule IDs that the plugin will evaluate.
1693
557
 
1694
- ---
1695
-
1696
-
1697
- #### Properties <a name="Properties" id="Properties"></a>
1698
-
1699
- | **Name** | **Type** | **Description** |
1700
- | --- | --- | --- |
1701
- | <code><a href="#cdk-nag.NagReportLogger.property.formats">formats</a></code> | <code><a href="#cdk-nag.NagReportFormat">NagReportFormat</a>[]</code> | *No description.* |
558
+ Used for analytics
559
+ purposes.
1702
560
 
1703
561
  ---
1704
562
 
1705
- ##### `formats`<sup>Required</sup> <a name="formats" id="cdk-nag.NagReportLogger.property.formats"></a>
563
+ ##### `version`<sup>Optional</sup> <a name="version" id="cdk-nag.NagPack.property.version"></a>
1706
564
 
1707
565
  ```typescript
1708
- public readonly formats: NagReportFormat[];
566
+ public readonly version: string;
1709
567
  ```
1710
568
 
1711
- - *Type:* <a href="#cdk-nag.NagReportFormat">NagReportFormat</a>[]
569
+ - *Type:* string
570
+
571
+ The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`.
1712
572
 
1713
573
  ---
1714
574
 
@@ -1821,211 +681,142 @@ The value to attempt to resolve.
1821
681
 
1822
682
 
1823
683
 
1824
- ### NagSuppressions <a name="NagSuppressions" id="cdk-nag.NagSuppressions"></a>
684
+ ### NIST80053R4Checks <a name="NIST80053R4Checks" id="cdk-nag.NIST80053R4Checks"></a>
685
+
686
+ Check for NIST 800-53 rev 4 compliance.
1825
687
 
1826
- Helper class with methods to add cdk-nag suppressions to cdk resources.
688
+ Based on the NIST 800-53 rev 4 AWS operational best practices: https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-nist-800-53_rev_4.html
1827
689
 
1828
- #### Initializers <a name="Initializers" id="cdk-nag.NagSuppressions.Initializer"></a>
690
+ #### Initializers <a name="Initializers" id="cdk-nag.NIST80053R4Checks.Initializer"></a>
1829
691
 
1830
692
  ```typescript
1831
- import { NagSuppressions } from 'cdk-nag'
693
+ import { NIST80053R4Checks } from 'cdk-nag'
1832
694
 
1833
- new NagSuppressions()
695
+ new NIST80053R4Checks(scope?: IConstruct, props?: NagPackProps)
1834
696
  ```
1835
697
 
1836
698
  | **Name** | **Type** | **Description** |
1837
699
  | --- | --- | --- |
700
+ | <code><a href="#cdk-nag.NIST80053R4Checks.Initializer.parameter.scope">scope</a></code> | <code>constructs.IConstruct</code> | *No description.* |
701
+ | <code><a href="#cdk-nag.NIST80053R4Checks.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
1838
702
 
1839
703
  ---
1840
704
 
705
+ ##### `scope`<sup>Optional</sup> <a name="scope" id="cdk-nag.NIST80053R4Checks.Initializer.parameter.scope"></a>
1841
706
 
1842
- #### Static Functions <a name="Static Functions" id="Static Functions"></a>
1843
-
1844
- | **Name** | **Description** |
1845
- | --- | --- |
1846
- | <code><a href="#cdk-nag.NagSuppressions.addResourceSuppressions">addResourceSuppressions</a></code> | Add cdk-nag suppressions to a CfnResource and optionally its children. |
1847
- | <code><a href="#cdk-nag.NagSuppressions.addResourceSuppressionsByPath">addResourceSuppressionsByPath</a></code> | Add cdk-nag suppressions to a CfnResource and optionally its children via its path. |
1848
- | <code><a href="#cdk-nag.NagSuppressions.addStackSuppressions">addStackSuppressions</a></code> | Apply cdk-nag suppressions to a Stack and optionally nested stacks. |
1849
-
1850
- ---
1851
-
1852
- ##### `addResourceSuppressions` <a name="addResourceSuppressions" id="cdk-nag.NagSuppressions.addResourceSuppressions"></a>
1853
-
1854
- ```typescript
1855
- import { NagSuppressions } from 'cdk-nag'
1856
-
1857
- NagSuppressions.addResourceSuppressions(construct: IConstruct | IConstruct[], suppressions: NagPackSuppression[], applyToChildren?: boolean)
1858
- ```
1859
-
1860
- Add cdk-nag suppressions to a CfnResource and optionally its children.
1861
-
1862
- ###### `construct`<sup>Required</sup> <a name="construct" id="cdk-nag.NagSuppressions.addResourceSuppressions.parameter.construct"></a>
1863
-
1864
- - *Type:* constructs.IConstruct | constructs.IConstruct[]
1865
-
1866
- The IConstruct(s) to apply the suppression to.
707
+ - *Type:* constructs.IConstruct
1867
708
 
1868
709
  ---
1869
710
 
1870
- ###### `suppressions`<sup>Required</sup> <a name="suppressions" id="cdk-nag.NagSuppressions.addResourceSuppressions.parameter.suppressions"></a>
1871
-
1872
- - *Type:* <a href="#cdk-nag.NagPackSuppression">NagPackSuppression</a>[]
711
+ ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.NIST80053R4Checks.Initializer.parameter.props"></a>
1873
712
 
1874
- A list of suppressions to apply to the resource.
713
+ - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
1875
714
 
1876
715
  ---
1877
716
 
1878
- ###### `applyToChildren`<sup>Optional</sup> <a name="applyToChildren" id="cdk-nag.NagSuppressions.addResourceSuppressions.parameter.applyToChildren"></a>
1879
-
1880
- - *Type:* boolean
717
+ #### Methods <a name="Methods" id="Methods"></a>
1881
718
 
1882
- Apply the suppressions to children CfnResources (default:false).
719
+ | **Name** | **Description** |
720
+ | --- | --- |
721
+ | <code><a href="#cdk-nag.NIST80053R4Checks.validate">validate</a></code> | Entry point called by the CDK validation framework. |
722
+ | <code><a href="#cdk-nag.NIST80053R4Checks.validateScope">validateScope</a></code> | Validate a construct tree directly. |
1883
723
 
1884
724
  ---
1885
725
 
1886
- ##### `addResourceSuppressionsByPath` <a name="addResourceSuppressionsByPath" id="cdk-nag.NagSuppressions.addResourceSuppressionsByPath"></a>
726
+ ##### `validate` <a name="validate" id="cdk-nag.NIST80053R4Checks.validate"></a>
1887
727
 
1888
728
  ```typescript
1889
- import { NagSuppressions } from 'cdk-nag'
1890
-
1891
- NagSuppressions.addResourceSuppressionsByPath(stack: Stack, path: string | string[], suppressions: NagPackSuppression[], applyToChildren?: boolean)
729
+ public validate(context: IPolicyValidationContext): PolicyValidationPluginReport
1892
730
  ```
1893
731
 
1894
- Add cdk-nag suppressions to a CfnResource and optionally its children via its path.
1895
-
1896
- ###### `stack`<sup>Required</sup> <a name="stack" id="cdk-nag.NagSuppressions.addResourceSuppressionsByPath.parameter.stack"></a>
1897
-
1898
- - *Type:* aws-cdk-lib.Stack
1899
-
1900
- The Stack the construct belongs to.
1901
-
1902
- ---
1903
-
1904
- ###### `path`<sup>Required</sup> <a name="path" id="cdk-nag.NagSuppressions.addResourceSuppressionsByPath.parameter.path"></a>
1905
-
1906
- - *Type:* string | string[]
1907
-
1908
- The path(s) to the construct in the provided stack.
1909
-
1910
- ---
1911
-
1912
- ###### `suppressions`<sup>Required</sup> <a name="suppressions" id="cdk-nag.NagSuppressions.addResourceSuppressionsByPath.parameter.suppressions"></a>
1913
-
1914
- - *Type:* <a href="#cdk-nag.NagPackSuppression">NagPackSuppression</a>[]
1915
-
1916
- A list of suppressions to apply to the resource.
1917
-
1918
- ---
732
+ Entry point called by the CDK validation framework.
1919
733
 
1920
- ###### `applyToChildren`<sup>Optional</sup> <a name="applyToChildren" id="cdk-nag.NagSuppressions.addResourceSuppressionsByPath.parameter.applyToChildren"></a>
734
+ Requires `appConstruct` to be present on the context (CDK core change).
735
+ For testing or direct invocation, use `validateScope(scope)`.
1921
736
 
1922
- - *Type:* boolean
737
+ ###### `context`<sup>Required</sup> <a name="context" id="cdk-nag.NIST80053R4Checks.validate.parameter.context"></a>
1923
738
 
1924
- Apply the suppressions to children CfnResources (default:false).
739
+ - *Type:* aws-cdk-lib.IPolicyValidationContext
1925
740
 
1926
741
  ---
1927
742
 
1928
- ##### `addStackSuppressions` <a name="addStackSuppressions" id="cdk-nag.NagSuppressions.addStackSuppressions"></a>
743
+ ##### `validateScope` <a name="validateScope" id="cdk-nag.NIST80053R4Checks.validateScope"></a>
1929
744
 
1930
745
  ```typescript
1931
- import { NagSuppressions } from 'cdk-nag'
1932
-
1933
- NagSuppressions.addStackSuppressions(stack: Stack, suppressions: NagPackSuppression[], applyToNestedStacks?: boolean)
746
+ public validateScope(scope: IConstruct): PolicyValidationPluginReport
1934
747
  ```
1935
748
 
1936
- Apply cdk-nag suppressions to a Stack and optionally nested stacks.
1937
-
1938
- ###### `stack`<sup>Required</sup> <a name="stack" id="cdk-nag.NagSuppressions.addStackSuppressions.parameter.stack"></a>
1939
-
1940
- - *Type:* aws-cdk-lib.Stack
1941
-
1942
- The Stack to apply the suppression to.
1943
-
1944
- ---
1945
-
1946
- ###### `suppressions`<sup>Required</sup> <a name="suppressions" id="cdk-nag.NagSuppressions.addStackSuppressions.parameter.suppressions"></a>
749
+ Validate a construct tree directly.
1947
750
 
1948
- - *Type:* <a href="#cdk-nag.NagPackSuppression">NagPackSuppression</a>[]
751
+ This is the primary entry point
752
+ for testing and for CDK versions that do not yet provide `appConstruct` on
753
+ `IPolicyValidationContext`.
1949
754
 
1950
- A list of suppressions to apply to the stack.
755
+ ###### `scope`<sup>Required</sup> <a name="scope" id="cdk-nag.NIST80053R4Checks.validateScope.parameter.scope"></a>
1951
756
 
1952
- ---
1953
-
1954
- ###### `applyToNestedStacks`<sup>Optional</sup> <a name="applyToNestedStacks" id="cdk-nag.NagSuppressions.addStackSuppressions.parameter.applyToNestedStacks"></a>
1955
-
1956
- - *Type:* boolean
1957
-
1958
- Apply the suppressions to children stacks (default:false).
757
+ - *Type:* constructs.IConstruct
1959
758
 
1960
759
  ---
1961
760
 
1962
761
 
1963
-
1964
- ### NIST80053R4Checks <a name="NIST80053R4Checks" id="cdk-nag.NIST80053R4Checks"></a>
1965
-
1966
- Check for NIST 800-53 rev 4 compliance.
1967
-
1968
- Based on the NIST 800-53 rev 4 AWS operational best practices: https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-nist-800-53_rev_4.html
1969
-
1970
- #### Initializers <a name="Initializers" id="cdk-nag.NIST80053R4Checks.Initializer"></a>
1971
-
1972
- ```typescript
1973
- import { NIST80053R4Checks } from 'cdk-nag'
1974
-
1975
- new NIST80053R4Checks(props?: NagPackProps)
1976
- ```
762
+ #### Properties <a name="Properties" id="Properties"></a>
1977
763
 
1978
764
  | **Name** | **Type** | **Description** |
1979
765
  | --- | --- | --- |
1980
- | <code><a href="#cdk-nag.NIST80053R4Checks.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
766
+ | <code><a href="#cdk-nag.NIST80053R4Checks.property.name">name</a></code> | <code>string</code> | The name of the plugin that will be displayed in the validation report. |
767
+ | <code><a href="#cdk-nag.NIST80053R4Checks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
768
+ | <code><a href="#cdk-nag.NIST80053R4Checks.property.ruleIds">ruleIds</a></code> | <code>string[]</code> | The list of rule IDs that the plugin will evaluate. |
769
+ | <code><a href="#cdk-nag.NIST80053R4Checks.property.version">version</a></code> | <code>string</code> | The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`. |
1981
770
 
1982
771
  ---
1983
772
 
1984
- ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.NIST80053R4Checks.Initializer.parameter.props"></a>
1985
-
1986
- - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
773
+ ##### `name`<sup>Required</sup> <a name="name" id="cdk-nag.NIST80053R4Checks.property.name"></a>
1987
774
 
1988
- ---
775
+ ```typescript
776
+ public readonly name: string;
777
+ ```
1989
778
 
1990
- #### Methods <a name="Methods" id="Methods"></a>
779
+ - *Type:* string
1991
780
 
1992
- | **Name** | **Description** |
1993
- | --- | --- |
1994
- | <code><a href="#cdk-nag.NIST80053R4Checks.visit">visit</a></code> | All aspects can visit an IConstruct. |
781
+ The name of the plugin that will be displayed in the validation report.
1995
782
 
1996
783
  ---
1997
784
 
1998
- ##### `visit` <a name="visit" id="cdk-nag.NIST80053R4Checks.visit"></a>
785
+ ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.NIST80053R4Checks.property.readPackName"></a>
1999
786
 
2000
787
  ```typescript
2001
- public visit(node: IConstruct): void
788
+ public readonly readPackName: string;
2002
789
  ```
2003
790
 
2004
- All aspects can visit an IConstruct.
791
+ - *Type:* string
2005
792
 
2006
- ###### `node`<sup>Required</sup> <a name="node" id="cdk-nag.NIST80053R4Checks.visit.parameter.node"></a>
793
+ ---
2007
794
 
2008
- - *Type:* constructs.IConstruct
795
+ ##### `ruleIds`<sup>Optional</sup> <a name="ruleIds" id="cdk-nag.NIST80053R4Checks.property.ruleIds"></a>
2009
796
 
2010
- ---
797
+ ```typescript
798
+ public readonly ruleIds: string[];
799
+ ```
2011
800
 
801
+ - *Type:* string[]
2012
802
 
2013
- #### Properties <a name="Properties" id="Properties"></a>
803
+ The list of rule IDs that the plugin will evaluate.
2014
804
 
2015
- | **Name** | **Type** | **Description** |
2016
- | --- | --- | --- |
2017
- | <code><a href="#cdk-nag.NIST80053R4Checks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
805
+ Used for analytics
806
+ purposes.
2018
807
 
2019
808
  ---
2020
809
 
2021
- ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.NIST80053R4Checks.property.readPackName"></a>
810
+ ##### `version`<sup>Optional</sup> <a name="version" id="cdk-nag.NIST80053R4Checks.property.version"></a>
2022
811
 
2023
812
  ```typescript
2024
- public readonly readPackName: string;
813
+ public readonly version: string;
2025
814
  ```
2026
815
 
2027
816
  - *Type:* string
2028
817
 
818
+ The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`.
819
+
2029
820
  ---
2030
821
 
2031
822
 
@@ -2040,15 +831,22 @@ Based on the NIST 800-53 rev 5 AWS operational best practices: https://docs.aws.
2040
831
  ```typescript
2041
832
  import { NIST80053R5Checks } from 'cdk-nag'
2042
833
 
2043
- new NIST80053R5Checks(props?: NagPackProps)
834
+ new NIST80053R5Checks(scope?: IConstruct, props?: NagPackProps)
2044
835
  ```
2045
836
 
2046
837
  | **Name** | **Type** | **Description** |
2047
838
  | --- | --- | --- |
839
+ | <code><a href="#cdk-nag.NIST80053R5Checks.Initializer.parameter.scope">scope</a></code> | <code>constructs.IConstruct</code> | *No description.* |
2048
840
  | <code><a href="#cdk-nag.NIST80053R5Checks.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
2049
841
 
2050
842
  ---
2051
843
 
844
+ ##### `scope`<sup>Optional</sup> <a name="scope" id="cdk-nag.NIST80053R5Checks.Initializer.parameter.scope"></a>
845
+
846
+ - *Type:* constructs.IConstruct
847
+
848
+ ---
849
+
2052
850
  ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.NIST80053R5Checks.Initializer.parameter.props"></a>
2053
851
 
2054
852
  - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
@@ -2059,129 +857,134 @@ new NIST80053R5Checks(props?: NagPackProps)
2059
857
 
2060
858
  | **Name** | **Description** |
2061
859
  | --- | --- |
2062
- | <code><a href="#cdk-nag.NIST80053R5Checks.visit">visit</a></code> | All aspects can visit an IConstruct. |
860
+ | <code><a href="#cdk-nag.NIST80053R5Checks.validate">validate</a></code> | Entry point called by the CDK validation framework. |
861
+ | <code><a href="#cdk-nag.NIST80053R5Checks.validateScope">validateScope</a></code> | Validate a construct tree directly. |
2063
862
 
2064
863
  ---
2065
864
 
2066
- ##### `visit` <a name="visit" id="cdk-nag.NIST80053R5Checks.visit"></a>
865
+ ##### `validate` <a name="validate" id="cdk-nag.NIST80053R5Checks.validate"></a>
2067
866
 
2068
867
  ```typescript
2069
- public visit(node: IConstruct): void
868
+ public validate(context: IPolicyValidationContext): PolicyValidationPluginReport
2070
869
  ```
2071
870
 
2072
- All aspects can visit an IConstruct.
2073
-
2074
- ###### `node`<sup>Required</sup> <a name="node" id="cdk-nag.NIST80053R5Checks.visit.parameter.node"></a>
2075
-
2076
- - *Type:* constructs.IConstruct
2077
-
2078
- ---
871
+ Entry point called by the CDK validation framework.
2079
872
 
873
+ Requires `appConstruct` to be present on the context (CDK core change).
874
+ For testing or direct invocation, use `validateScope(scope)`.
2080
875
 
2081
- #### Properties <a name="Properties" id="Properties"></a>
876
+ ###### `context`<sup>Required</sup> <a name="context" id="cdk-nag.NIST80053R5Checks.validate.parameter.context"></a>
2082
877
 
2083
- | **Name** | **Type** | **Description** |
2084
- | --- | --- | --- |
2085
- | <code><a href="#cdk-nag.NIST80053R5Checks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
878
+ - *Type:* aws-cdk-lib.IPolicyValidationContext
2086
879
 
2087
880
  ---
2088
881
 
2089
- ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.NIST80053R5Checks.property.readPackName"></a>
882
+ ##### `validateScope` <a name="validateScope" id="cdk-nag.NIST80053R5Checks.validateScope"></a>
2090
883
 
2091
884
  ```typescript
2092
- public readonly readPackName: string;
885
+ public validateScope(scope: IConstruct): PolicyValidationPluginReport
2093
886
  ```
2094
887
 
2095
- - *Type:* string
2096
-
2097
- ---
888
+ Validate a construct tree directly.
2098
889
 
890
+ This is the primary entry point
891
+ for testing and for CDK versions that do not yet provide `appConstruct` on
892
+ `IPolicyValidationContext`.
2099
893
 
2100
- ### PCIDSS321Checks <a name="PCIDSS321Checks" id="cdk-nag.PCIDSS321Checks"></a>
894
+ ###### `scope`<sup>Required</sup> <a name="scope" id="cdk-nag.NIST80053R5Checks.validateScope.parameter.scope"></a>
2101
895
 
2102
- Check for PCI DSS 3.2.1 compliance. Based on the PCI DSS 3.2.1 AWS operational best practices: https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-pci-dss.html.
896
+ - *Type:* constructs.IConstruct
2103
897
 
2104
- #### Initializers <a name="Initializers" id="cdk-nag.PCIDSS321Checks.Initializer"></a>
898
+ ---
2105
899
 
2106
- ```typescript
2107
- import { PCIDSS321Checks } from 'cdk-nag'
2108
900
 
2109
- new PCIDSS321Checks(props?: NagPackProps)
2110
- ```
901
+ #### Properties <a name="Properties" id="Properties"></a>
2111
902
 
2112
903
  | **Name** | **Type** | **Description** |
2113
904
  | --- | --- | --- |
2114
- | <code><a href="#cdk-nag.PCIDSS321Checks.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
905
+ | <code><a href="#cdk-nag.NIST80053R5Checks.property.name">name</a></code> | <code>string</code> | The name of the plugin that will be displayed in the validation report. |
906
+ | <code><a href="#cdk-nag.NIST80053R5Checks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
907
+ | <code><a href="#cdk-nag.NIST80053R5Checks.property.ruleIds">ruleIds</a></code> | <code>string[]</code> | The list of rule IDs that the plugin will evaluate. |
908
+ | <code><a href="#cdk-nag.NIST80053R5Checks.property.version">version</a></code> | <code>string</code> | The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`. |
2115
909
 
2116
910
  ---
2117
911
 
2118
- ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.PCIDSS321Checks.Initializer.parameter.props"></a>
2119
-
2120
- - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
912
+ ##### `name`<sup>Required</sup> <a name="name" id="cdk-nag.NIST80053R5Checks.property.name"></a>
2121
913
 
2122
- ---
914
+ ```typescript
915
+ public readonly name: string;
916
+ ```
2123
917
 
2124
- #### Methods <a name="Methods" id="Methods"></a>
918
+ - *Type:* string
2125
919
 
2126
- | **Name** | **Description** |
2127
- | --- | --- |
2128
- | <code><a href="#cdk-nag.PCIDSS321Checks.visit">visit</a></code> | All aspects can visit an IConstruct. |
920
+ The name of the plugin that will be displayed in the validation report.
2129
921
 
2130
922
  ---
2131
923
 
2132
- ##### `visit` <a name="visit" id="cdk-nag.PCIDSS321Checks.visit"></a>
924
+ ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.NIST80053R5Checks.property.readPackName"></a>
2133
925
 
2134
926
  ```typescript
2135
- public visit(node: IConstruct): void
927
+ public readonly readPackName: string;
2136
928
  ```
2137
929
 
2138
- All aspects can visit an IConstruct.
930
+ - *Type:* string
2139
931
 
2140
- ###### `node`<sup>Required</sup> <a name="node" id="cdk-nag.PCIDSS321Checks.visit.parameter.node"></a>
932
+ ---
2141
933
 
2142
- - *Type:* constructs.IConstruct
934
+ ##### `ruleIds`<sup>Optional</sup> <a name="ruleIds" id="cdk-nag.NIST80053R5Checks.property.ruleIds"></a>
2143
935
 
2144
- ---
936
+ ```typescript
937
+ public readonly ruleIds: string[];
938
+ ```
2145
939
 
940
+ - *Type:* string[]
2146
941
 
2147
- #### Properties <a name="Properties" id="Properties"></a>
942
+ The list of rule IDs that the plugin will evaluate.
2148
943
 
2149
- | **Name** | **Type** | **Description** |
2150
- | --- | --- | --- |
2151
- | <code><a href="#cdk-nag.PCIDSS321Checks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
944
+ Used for analytics
945
+ purposes.
2152
946
 
2153
947
  ---
2154
948
 
2155
- ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.PCIDSS321Checks.property.readPackName"></a>
949
+ ##### `version`<sup>Optional</sup> <a name="version" id="cdk-nag.NIST80053R5Checks.property.version"></a>
2156
950
 
2157
951
  ```typescript
2158
- public readonly readPackName: string;
952
+ public readonly version: string;
2159
953
  ```
2160
954
 
2161
955
  - *Type:* string
2162
956
 
957
+ The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`.
958
+
2163
959
  ---
2164
960
 
2165
961
 
2166
- ### ServerlessChecks <a name="ServerlessChecks" id="cdk-nag.ServerlessChecks"></a>
962
+ ### PCIDSS321Checks <a name="PCIDSS321Checks" id="cdk-nag.PCIDSS321Checks"></a>
2167
963
 
2168
- Serverless Checks are a compilation of rules to validate infrastructure-as-code template against recommended practices.
964
+ Check for PCI DSS 3.2.1 compliance. Based on the PCI DSS 3.2.1 AWS operational best practices: https://docs.aws.amazon.com/config/latest/developerguide/operational-best-practices-for-pci-dss.html.
2169
965
 
2170
- #### Initializers <a name="Initializers" id="cdk-nag.ServerlessChecks.Initializer"></a>
966
+ #### Initializers <a name="Initializers" id="cdk-nag.PCIDSS321Checks.Initializer"></a>
2171
967
 
2172
968
  ```typescript
2173
- import { ServerlessChecks } from 'cdk-nag'
969
+ import { PCIDSS321Checks } from 'cdk-nag'
2174
970
 
2175
- new ServerlessChecks(props?: NagPackProps)
971
+ new PCIDSS321Checks(scope?: IConstruct, props?: NagPackProps)
2176
972
  ```
2177
973
 
2178
974
  | **Name** | **Type** | **Description** |
2179
975
  | --- | --- | --- |
2180
- | <code><a href="#cdk-nag.ServerlessChecks.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
976
+ | <code><a href="#cdk-nag.PCIDSS321Checks.Initializer.parameter.scope">scope</a></code> | <code>constructs.IConstruct</code> | *No description.* |
977
+ | <code><a href="#cdk-nag.PCIDSS321Checks.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
2181
978
 
2182
979
  ---
2183
980
 
2184
- ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.ServerlessChecks.Initializer.parameter.props"></a>
981
+ ##### `scope`<sup>Optional</sup> <a name="scope" id="cdk-nag.PCIDSS321Checks.Initializer.parameter.scope"></a>
982
+
983
+ - *Type:* constructs.IConstruct
984
+
985
+ ---
986
+
987
+ ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.PCIDSS321Checks.Initializer.parameter.props"></a>
2185
988
 
2186
989
  - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
2187
990
 
@@ -2191,19 +994,41 @@ new ServerlessChecks(props?: NagPackProps)
2191
994
 
2192
995
  | **Name** | **Description** |
2193
996
  | --- | --- |
2194
- | <code><a href="#cdk-nag.ServerlessChecks.visit">visit</a></code> | All aspects can visit an IConstruct. |
997
+ | <code><a href="#cdk-nag.PCIDSS321Checks.validate">validate</a></code> | Entry point called by the CDK validation framework. |
998
+ | <code><a href="#cdk-nag.PCIDSS321Checks.validateScope">validateScope</a></code> | Validate a construct tree directly. |
2195
999
 
2196
1000
  ---
2197
1001
 
2198
- ##### `visit` <a name="visit" id="cdk-nag.ServerlessChecks.visit"></a>
1002
+ ##### `validate` <a name="validate" id="cdk-nag.PCIDSS321Checks.validate"></a>
2199
1003
 
2200
1004
  ```typescript
2201
- public visit(node: IConstruct): void
1005
+ public validate(context: IPolicyValidationContext): PolicyValidationPluginReport
2202
1006
  ```
2203
1007
 
2204
- All aspects can visit an IConstruct.
1008
+ Entry point called by the CDK validation framework.
1009
+
1010
+ Requires `appConstruct` to be present on the context (CDK core change).
1011
+ For testing or direct invocation, use `validateScope(scope)`.
1012
+
1013
+ ###### `context`<sup>Required</sup> <a name="context" id="cdk-nag.PCIDSS321Checks.validate.parameter.context"></a>
1014
+
1015
+ - *Type:* aws-cdk-lib.IPolicyValidationContext
1016
+
1017
+ ---
1018
+
1019
+ ##### `validateScope` <a name="validateScope" id="cdk-nag.PCIDSS321Checks.validateScope"></a>
1020
+
1021
+ ```typescript
1022
+ public validateScope(scope: IConstruct): PolicyValidationPluginReport
1023
+ ```
2205
1024
 
2206
- ###### `node`<sup>Required</sup> <a name="node" id="cdk-nag.ServerlessChecks.visit.parameter.node"></a>
1025
+ Validate a construct tree directly.
1026
+
1027
+ This is the primary entry point
1028
+ for testing and for CDK versions that do not yet provide `appConstruct` on
1029
+ `IPolicyValidationContext`.
1030
+
1031
+ ###### `scope`<sup>Required</sup> <a name="scope" id="cdk-nag.PCIDSS321Checks.validateScope.parameter.scope"></a>
2207
1032
 
2208
1033
  - *Type:* constructs.IConstruct
2209
1034
 
@@ -2214,93 +1039,91 @@ All aspects can visit an IConstruct.
2214
1039
 
2215
1040
  | **Name** | **Type** | **Description** |
2216
1041
  | --- | --- | --- |
2217
- | <code><a href="#cdk-nag.ServerlessChecks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
1042
+ | <code><a href="#cdk-nag.PCIDSS321Checks.property.name">name</a></code> | <code>string</code> | The name of the plugin that will be displayed in the validation report. |
1043
+ | <code><a href="#cdk-nag.PCIDSS321Checks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
1044
+ | <code><a href="#cdk-nag.PCIDSS321Checks.property.ruleIds">ruleIds</a></code> | <code>string[]</code> | The list of rule IDs that the plugin will evaluate. |
1045
+ | <code><a href="#cdk-nag.PCIDSS321Checks.property.version">version</a></code> | <code>string</code> | The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`. |
2218
1046
 
2219
1047
  ---
2220
1048
 
2221
- ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.ServerlessChecks.property.readPackName"></a>
1049
+ ##### `name`<sup>Required</sup> <a name="name" id="cdk-nag.PCIDSS321Checks.property.name"></a>
2222
1050
 
2223
1051
  ```typescript
2224
- public readonly readPackName: string;
1052
+ public readonly name: string;
2225
1053
  ```
2226
1054
 
2227
1055
  - *Type:* string
2228
1056
 
2229
- ---
2230
-
1057
+ The name of the plugin that will be displayed in the validation report.
2231
1058
 
2232
- ### SuppressionIgnoreAlways <a name="SuppressionIgnoreAlways" id="cdk-nag.SuppressionIgnoreAlways"></a>
2233
-
2234
- - *Implements:* <a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>
2235
-
2236
- Always ignore the suppression.
1059
+ ---
2237
1060
 
2238
- #### Initializers <a name="Initializers" id="cdk-nag.SuppressionIgnoreAlways.Initializer"></a>
1061
+ ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.PCIDSS321Checks.property.readPackName"></a>
2239
1062
 
2240
1063
  ```typescript
2241
- import { SuppressionIgnoreAlways } from 'cdk-nag'
2242
-
2243
- new SuppressionIgnoreAlways(triggerMessage: string)
1064
+ public readonly readPackName: string;
2244
1065
  ```
2245
1066
 
2246
- | **Name** | **Type** | **Description** |
2247
- | --- | --- | --- |
2248
- | <code><a href="#cdk-nag.SuppressionIgnoreAlways.Initializer.parameter.triggerMessage">triggerMessage</a></code> | <code>string</code> | *No description.* |
1067
+ - *Type:* string
2249
1068
 
2250
1069
  ---
2251
1070
 
2252
- ##### `triggerMessage`<sup>Required</sup> <a name="triggerMessage" id="cdk-nag.SuppressionIgnoreAlways.Initializer.parameter.triggerMessage"></a>
1071
+ ##### `ruleIds`<sup>Optional</sup> <a name="ruleIds" id="cdk-nag.PCIDSS321Checks.property.ruleIds"></a>
2253
1072
 
2254
- - *Type:* string
1073
+ ```typescript
1074
+ public readonly ruleIds: string[];
1075
+ ```
2255
1076
 
2256
- ---
1077
+ - *Type:* string[]
2257
1078
 
2258
- #### Methods <a name="Methods" id="Methods"></a>
1079
+ The list of rule IDs that the plugin will evaluate.
2259
1080
 
2260
- | **Name** | **Description** |
2261
- | --- | --- |
2262
- | <code><a href="#cdk-nag.SuppressionIgnoreAlways.createMessage">createMessage</a></code> | *No description.* |
1081
+ Used for analytics
1082
+ purposes.
2263
1083
 
2264
1084
  ---
2265
1085
 
2266
- ##### `createMessage` <a name="createMessage" id="cdk-nag.SuppressionIgnoreAlways.createMessage"></a>
1086
+ ##### `version`<sup>Optional</sup> <a name="version" id="cdk-nag.PCIDSS321Checks.property.version"></a>
2267
1087
 
2268
1088
  ```typescript
2269
- public createMessage(_input: SuppressionIgnoreInput): string
1089
+ public readonly version: string;
2270
1090
  ```
2271
1091
 
2272
- ###### `_input`<sup>Required</sup> <a name="_input" id="cdk-nag.SuppressionIgnoreAlways.createMessage.parameter._input"></a>
1092
+ - *Type:* string
2273
1093
 
2274
- - *Type:* <a href="#cdk-nag.SuppressionIgnoreInput">SuppressionIgnoreInput</a>
1094
+ The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`.
2275
1095
 
2276
1096
  ---
2277
1097
 
2278
1098
 
1099
+ ### ServerlessChecks <a name="ServerlessChecks" id="cdk-nag.ServerlessChecks"></a>
2279
1100
 
1101
+ Serverless Checks are a compilation of rules to validate infrastructure-as-code template against recommended practices.
2280
1102
 
2281
- ### SuppressionIgnoreAnd <a name="SuppressionIgnoreAnd" id="cdk-nag.SuppressionIgnoreAnd"></a>
2282
-
2283
- - *Implements:* <a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>
2284
-
2285
- Ignore the suppression if all of the given INagSuppressionIgnore return a non-empty message.
2286
-
2287
- #### Initializers <a name="Initializers" id="cdk-nag.SuppressionIgnoreAnd.Initializer"></a>
1103
+ #### Initializers <a name="Initializers" id="cdk-nag.ServerlessChecks.Initializer"></a>
2288
1104
 
2289
1105
  ```typescript
2290
- import { SuppressionIgnoreAnd } from 'cdk-nag'
1106
+ import { ServerlessChecks } from 'cdk-nag'
2291
1107
 
2292
- new SuppressionIgnoreAnd(SuppressionIgnoreAnds: ...INagSuppressionIgnore[])
1108
+ new ServerlessChecks(scope?: IConstruct, props?: NagPackProps)
2293
1109
  ```
2294
1110
 
2295
1111
  | **Name** | **Type** | **Description** |
2296
1112
  | --- | --- | --- |
2297
- | <code><a href="#cdk-nag.SuppressionIgnoreAnd.Initializer.parameter.SuppressionIgnoreAnds">SuppressionIgnoreAnds</a></code> | <code>...<a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>[]</code> | *No description.* |
1113
+ | <code><a href="#cdk-nag.ServerlessChecks.Initializer.parameter.scope">scope</a></code> | <code>constructs.IConstruct</code> | *No description.* |
1114
+ | <code><a href="#cdk-nag.ServerlessChecks.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nag.NagPackProps">NagPackProps</a></code> | *No description.* |
1115
+
1116
+ ---
1117
+
1118
+ ##### `scope`<sup>Optional</sup> <a name="scope" id="cdk-nag.ServerlessChecks.Initializer.parameter.scope"></a>
1119
+
1120
+ - *Type:* constructs.IConstruct
2298
1121
 
2299
1122
  ---
2300
1123
 
2301
- ##### `SuppressionIgnoreAnds`<sup>Required</sup> <a name="SuppressionIgnoreAnds" id="cdk-nag.SuppressionIgnoreAnd.Initializer.parameter.SuppressionIgnoreAnds"></a>
1124
+ ##### `props`<sup>Optional</sup> <a name="props" id="cdk-nag.ServerlessChecks.Initializer.parameter.props"></a>
2302
1125
 
2303
- - *Type:* ...<a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>[]
1126
+ - *Type:* <a href="#cdk-nag.NagPackProps">NagPackProps</a>
2304
1127
 
2305
1128
  ---
2306
1129
 
@@ -2308,132 +1131,127 @@ new SuppressionIgnoreAnd(SuppressionIgnoreAnds: ...INagSuppressionIgnore[])
2308
1131
 
2309
1132
  | **Name** | **Description** |
2310
1133
  | --- | --- |
2311
- | <code><a href="#cdk-nag.SuppressionIgnoreAnd.createMessage">createMessage</a></code> | *No description.* |
1134
+ | <code><a href="#cdk-nag.ServerlessChecks.validate">validate</a></code> | Entry point called by the CDK validation framework. |
1135
+ | <code><a href="#cdk-nag.ServerlessChecks.validateScope">validateScope</a></code> | Validate a construct tree directly. |
2312
1136
 
2313
1137
  ---
2314
1138
 
2315
- ##### `createMessage` <a name="createMessage" id="cdk-nag.SuppressionIgnoreAnd.createMessage"></a>
1139
+ ##### `validate` <a name="validate" id="cdk-nag.ServerlessChecks.validate"></a>
2316
1140
 
2317
1141
  ```typescript
2318
- public createMessage(input: SuppressionIgnoreInput): string
1142
+ public validate(context: IPolicyValidationContext): PolicyValidationPluginReport
2319
1143
  ```
2320
1144
 
2321
- ###### `input`<sup>Required</sup> <a name="input" id="cdk-nag.SuppressionIgnoreAnd.createMessage.parameter.input"></a>
1145
+ Entry point called by the CDK validation framework.
2322
1146
 
2323
- - *Type:* <a href="#cdk-nag.SuppressionIgnoreInput">SuppressionIgnoreInput</a>
1147
+ Requires `appConstruct` to be present on the context (CDK core change).
1148
+ For testing or direct invocation, use `validateScope(scope)`.
1149
+
1150
+ ###### `context`<sup>Required</sup> <a name="context" id="cdk-nag.ServerlessChecks.validate.parameter.context"></a>
1151
+
1152
+ - *Type:* aws-cdk-lib.IPolicyValidationContext
2324
1153
 
2325
1154
  ---
2326
1155
 
1156
+ ##### `validateScope` <a name="validateScope" id="cdk-nag.ServerlessChecks.validateScope"></a>
2327
1157
 
1158
+ ```typescript
1159
+ public validateScope(scope: IConstruct): PolicyValidationPluginReport
1160
+ ```
2328
1161
 
1162
+ Validate a construct tree directly.
2329
1163
 
2330
- ### SuppressionIgnoreErrors <a name="SuppressionIgnoreErrors" id="cdk-nag.SuppressionIgnoreErrors"></a>
1164
+ This is the primary entry point
1165
+ for testing and for CDK versions that do not yet provide `appConstruct` on
1166
+ `IPolicyValidationContext`.
2331
1167
 
2332
- - *Implements:* <a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>
1168
+ ###### `scope`<sup>Required</sup> <a name="scope" id="cdk-nag.ServerlessChecks.validateScope.parameter.scope"></a>
2333
1169
 
2334
- Ignore Suppressions for Rules with a NagMessageLevel.ERROR.
1170
+ - *Type:* constructs.IConstruct
2335
1171
 
2336
- #### Initializers <a name="Initializers" id="cdk-nag.SuppressionIgnoreErrors.Initializer"></a>
1172
+ ---
2337
1173
 
2338
- ```typescript
2339
- import { SuppressionIgnoreErrors } from 'cdk-nag'
2340
1174
 
2341
- new SuppressionIgnoreErrors()
2342
- ```
1175
+ #### Properties <a name="Properties" id="Properties"></a>
2343
1176
 
2344
1177
  | **Name** | **Type** | **Description** |
2345
1178
  | --- | --- | --- |
1179
+ | <code><a href="#cdk-nag.ServerlessChecks.property.name">name</a></code> | <code>string</code> | The name of the plugin that will be displayed in the validation report. |
1180
+ | <code><a href="#cdk-nag.ServerlessChecks.property.readPackName">readPackName</a></code> | <code>string</code> | *No description.* |
1181
+ | <code><a href="#cdk-nag.ServerlessChecks.property.ruleIds">ruleIds</a></code> | <code>string[]</code> | The list of rule IDs that the plugin will evaluate. |
1182
+ | <code><a href="#cdk-nag.ServerlessChecks.property.version">version</a></code> | <code>string</code> | The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`. |
2346
1183
 
2347
1184
  ---
2348
1185
 
2349
- #### Methods <a name="Methods" id="Methods"></a>
2350
-
2351
- | **Name** | **Description** |
2352
- | --- | --- |
2353
- | <code><a href="#cdk-nag.SuppressionIgnoreErrors.createMessage">createMessage</a></code> | *No description.* |
2354
-
2355
- ---
2356
-
2357
- ##### `createMessage` <a name="createMessage" id="cdk-nag.SuppressionIgnoreErrors.createMessage"></a>
1186
+ ##### `name`<sup>Required</sup> <a name="name" id="cdk-nag.ServerlessChecks.property.name"></a>
2358
1187
 
2359
1188
  ```typescript
2360
- public createMessage(input: SuppressionIgnoreInput): string
1189
+ public readonly name: string;
2361
1190
  ```
2362
1191
 
2363
- ###### `input`<sup>Required</sup> <a name="input" id="cdk-nag.SuppressionIgnoreErrors.createMessage.parameter.input"></a>
1192
+ - *Type:* string
2364
1193
 
2365
- - *Type:* <a href="#cdk-nag.SuppressionIgnoreInput">SuppressionIgnoreInput</a>
1194
+ The name of the plugin that will be displayed in the validation report.
2366
1195
 
2367
1196
  ---
2368
1197
 
1198
+ ##### `readPackName`<sup>Required</sup> <a name="readPackName" id="cdk-nag.ServerlessChecks.property.readPackName"></a>
2369
1199
 
1200
+ ```typescript
1201
+ public readonly readPackName: string;
1202
+ ```
2370
1203
 
1204
+ - *Type:* string
2371
1205
 
2372
- ### SuppressionIgnoreNever <a name="SuppressionIgnoreNever" id="cdk-nag.SuppressionIgnoreNever"></a>
2373
-
2374
- - *Implements:* <a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>
2375
-
2376
- Don't ignore the suppression.
1206
+ ---
2377
1207
 
2378
- #### Initializers <a name="Initializers" id="cdk-nag.SuppressionIgnoreNever.Initializer"></a>
1208
+ ##### `ruleIds`<sup>Optional</sup> <a name="ruleIds" id="cdk-nag.ServerlessChecks.property.ruleIds"></a>
2379
1209
 
2380
1210
  ```typescript
2381
- import { SuppressionIgnoreNever } from 'cdk-nag'
2382
-
2383
- new SuppressionIgnoreNever()
1211
+ public readonly ruleIds: string[];
2384
1212
  ```
2385
1213
 
2386
- | **Name** | **Type** | **Description** |
2387
- | --- | --- | --- |
2388
-
2389
- ---
1214
+ - *Type:* string[]
2390
1215
 
2391
- #### Methods <a name="Methods" id="Methods"></a>
1216
+ The list of rule IDs that the plugin will evaluate.
2392
1217
 
2393
- | **Name** | **Description** |
2394
- | --- | --- |
2395
- | <code><a href="#cdk-nag.SuppressionIgnoreNever.createMessage">createMessage</a></code> | *No description.* |
1218
+ Used for analytics
1219
+ purposes.
2396
1220
 
2397
1221
  ---
2398
1222
 
2399
- ##### `createMessage` <a name="createMessage" id="cdk-nag.SuppressionIgnoreNever.createMessage"></a>
1223
+ ##### `version`<sup>Optional</sup> <a name="version" id="cdk-nag.ServerlessChecks.property.version"></a>
2400
1224
 
2401
1225
  ```typescript
2402
- public createMessage(_input: SuppressionIgnoreInput): string
1226
+ public readonly version: string;
2403
1227
  ```
2404
1228
 
2405
- ###### `_input`<sup>Required</sup> <a name="_input" id="cdk-nag.SuppressionIgnoreNever.createMessage.parameter._input"></a>
1229
+ - *Type:* string
2406
1230
 
2407
- - *Type:* <a href="#cdk-nag.SuppressionIgnoreInput">SuppressionIgnoreInput</a>
1231
+ The version of the plugin, following the Semantic Versioning specification (see https://semver.org/). This version is used for analytics purposes, to measure the usage of different plugins and different versions. The value of this property should be kept in sync with the actual version of the software package. If the version is not provided or is not a valid semantic version, it will be reported as `0.0.0`.
2408
1232
 
2409
1233
  ---
2410
1234
 
2411
1235
 
1236
+ ### WriteNagSuppressionsToCloudFormationAspect <a name="WriteNagSuppressionsToCloudFormationAspect" id="cdk-nag.WriteNagSuppressionsToCloudFormationAspect"></a>
2412
1237
 
1238
+ - *Implements:* aws-cdk-lib.IAspect
2413
1239
 
2414
- ### SuppressionIgnoreOr <a name="SuppressionIgnoreOr" id="cdk-nag.SuppressionIgnoreOr"></a>
2415
-
2416
- - *Implements:* <a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>
1240
+ An IAspect that reads acknowledged rules from construct metadata and writes them into the CfnResource's CloudFormation Metadata for audit trail persistence in the synthesized template.
2417
1241
 
2418
- Ignore the suppression if any of the given INagSuppressionIgnore return a non-empty message.
1242
+ Preserves the v2 `cdk_nag`
1243
+ metadata format.
2419
1244
 
2420
- #### Initializers <a name="Initializers" id="cdk-nag.SuppressionIgnoreOr.Initializer"></a>
1245
+ #### Initializers <a name="Initializers" id="cdk-nag.WriteNagSuppressionsToCloudFormationAspect.Initializer"></a>
2421
1246
 
2422
1247
  ```typescript
2423
- import { SuppressionIgnoreOr } from 'cdk-nag'
1248
+ import { WriteNagSuppressionsToCloudFormationAspect } from 'cdk-nag'
2424
1249
 
2425
- new SuppressionIgnoreOr(orSuppressionIgnores: ...INagSuppressionIgnore[])
1250
+ new WriteNagSuppressionsToCloudFormationAspect()
2426
1251
  ```
2427
1252
 
2428
1253
  | **Name** | **Type** | **Description** |
2429
1254
  | --- | --- | --- |
2430
- | <code><a href="#cdk-nag.SuppressionIgnoreOr.Initializer.parameter.orSuppressionIgnores">orSuppressionIgnores</a></code> | <code>...<a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>[]</code> | *No description.* |
2431
-
2432
- ---
2433
-
2434
- ##### `orSuppressionIgnores`<sup>Required</sup> <a name="orSuppressionIgnores" id="cdk-nag.SuppressionIgnoreOr.Initializer.parameter.orSuppressionIgnores"></a>
2435
-
2436
- - *Type:* ...<a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>[]
2437
1255
 
2438
1256
  ---
2439
1257
 
@@ -2441,19 +1259,21 @@ new SuppressionIgnoreOr(orSuppressionIgnores: ...INagSuppressionIgnore[])
2441
1259
 
2442
1260
  | **Name** | **Description** |
2443
1261
  | --- | --- |
2444
- | <code><a href="#cdk-nag.SuppressionIgnoreOr.createMessage">createMessage</a></code> | *No description.* |
1262
+ | <code><a href="#cdk-nag.WriteNagSuppressionsToCloudFormationAspect.visit">visit</a></code> | All aspects can visit an IConstruct. |
2445
1263
 
2446
1264
  ---
2447
1265
 
2448
- ##### `createMessage` <a name="createMessage" id="cdk-nag.SuppressionIgnoreOr.createMessage"></a>
1266
+ ##### `visit` <a name="visit" id="cdk-nag.WriteNagSuppressionsToCloudFormationAspect.visit"></a>
2449
1267
 
2450
1268
  ```typescript
2451
- public createMessage(input: SuppressionIgnoreInput): string
1269
+ public visit(node: IConstruct): void
2452
1270
  ```
2453
1271
 
2454
- ###### `input`<sup>Required</sup> <a name="input" id="cdk-nag.SuppressionIgnoreOr.createMessage.parameter.input"></a>
1272
+ All aspects can visit an IConstruct.
1273
+
1274
+ ###### `node`<sup>Required</sup> <a name="node" id="cdk-nag.WriteNagSuppressionsToCloudFormationAspect.visit.parameter.node"></a>
2455
1275
 
2456
- - *Type:* <a href="#cdk-nag.SuppressionIgnoreInput">SuppressionIgnoreInput</a>
1276
+ - *Type:* constructs.IConstruct
2457
1277
 
2458
1278
  ---
2459
1279
 
@@ -2500,7 +1320,6 @@ The CfnResource to check.
2500
1320
  | <code><a href="#cdk-nag.IApplyRule.property.info">info</a></code> | <code>string</code> | Why the rule was triggered. |
2501
1321
  | <code><a href="#cdk-nag.IApplyRule.property.level">level</a></code> | <code><a href="#cdk-nag.NagMessageLevel">NagMessageLevel</a></code> | The annotations message level to apply to the rule if triggered. |
2502
1322
  | <code><a href="#cdk-nag.IApplyRule.property.node">node</a></code> | <code>aws-cdk-lib.CfnResource</code> | The CfnResource to check. |
2503
- | <code><a href="#cdk-nag.IApplyRule.property.ignoreSuppressionCondition">ignoreSuppressionCondition</a></code> | <code><a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a></code> | A condition in which a suppression should be ignored. |
2504
1323
  | <code><a href="#cdk-nag.IApplyRule.property.ruleSuffixOverride">ruleSuffixOverride</a></code> | <code>string</code> | Override for the suffix of the Rule ID for this rule. |
2505
1324
 
2506
1325
  ---
@@ -2553,18 +1372,6 @@ The CfnResource to check.
2553
1372
 
2554
1373
  ---
2555
1374
 
2556
- ##### `ignoreSuppressionCondition`<sup>Optional</sup> <a name="ignoreSuppressionCondition" id="cdk-nag.IApplyRule.property.ignoreSuppressionCondition"></a>
2557
-
2558
- ```typescript
2559
- public readonly ignoreSuppressionCondition: INagSuppressionIgnore;
2560
- ```
2561
-
2562
- - *Type:* <a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>
2563
-
2564
- A condition in which a suppression should be ignored.
2565
-
2566
- ---
2567
-
2568
1375
  ##### `ruleSuffixOverride`<sup>Optional</sup> <a name="ruleSuffixOverride" id="cdk-nag.IApplyRule.property.ruleSuffixOverride"></a>
2569
1376
 
2570
1377
  ```typescript
@@ -2577,137 +1384,48 @@ Override for the suffix of the Rule ID for this rule.
2577
1384
 
2578
1385
  ---
2579
1386
 
2580
- ### INagLogger <a name="INagLogger" id="cdk-nag.INagLogger"></a>
2581
-
2582
- - *Implemented By:* <a href="#cdk-nag.AnnotationLogger">AnnotationLogger</a>, <a href="#cdk-nag.NagReportLogger">NagReportLogger</a>, <a href="#cdk-nag.INagLogger">INagLogger</a>
2583
-
2584
- Interface for creating NagSuppression Ignores.
2585
-
2586
- #### Methods <a name="Methods" id="Methods"></a>
2587
-
2588
- | **Name** | **Description** |
2589
- | --- | --- |
2590
- | <code><a href="#cdk-nag.INagLogger.onCompliance">onCompliance</a></code> | Called when a CfnResource passes the compliance check for a given rule. |
2591
- | <code><a href="#cdk-nag.INagLogger.onError">onError</a></code> | Called when a rule throws an error during while validating a CfnResource for compliance. |
2592
- | <code><a href="#cdk-nag.INagLogger.onNonCompliance">onNonCompliance</a></code> | Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user. |
2593
- | <code><a href="#cdk-nag.INagLogger.onNotApplicable">onNotApplicable</a></code> | Called when a rule does not apply to the given CfnResource. |
2594
- | <code><a href="#cdk-nag.INagLogger.onSuppressed">onSuppressed</a></code> | Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user. |
2595
- | <code><a href="#cdk-nag.INagLogger.onSuppressedError">onSuppressedError</a></code> | Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed. |
2596
-
2597
- ---
2598
-
2599
- ##### `onCompliance` <a name="onCompliance" id="cdk-nag.INagLogger.onCompliance"></a>
2600
-
2601
- ```typescript
2602
- public onCompliance(data: NagLoggerComplianceData): void
2603
- ```
2604
-
2605
- Called when a CfnResource passes the compliance check for a given rule.
2606
-
2607
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.INagLogger.onCompliance.parameter.data"></a>
2608
-
2609
- - *Type:* <a href="#cdk-nag.NagLoggerComplianceData">NagLoggerComplianceData</a>
2610
-
2611
- ---
2612
-
2613
- ##### `onError` <a name="onError" id="cdk-nag.INagLogger.onError"></a>
2614
-
2615
- ```typescript
2616
- public onError(data: NagLoggerErrorData): void
2617
- ```
2618
-
2619
- Called when a rule throws an error during while validating a CfnResource for compliance.
2620
-
2621
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.INagLogger.onError.parameter.data"></a>
2622
-
2623
- - *Type:* <a href="#cdk-nag.NagLoggerErrorData">NagLoggerErrorData</a>
2624
-
2625
- ---
2626
-
2627
- ##### `onNonCompliance` <a name="onNonCompliance" id="cdk-nag.INagLogger.onNonCompliance"></a>
2628
-
2629
- ```typescript
2630
- public onNonCompliance(data: NagLoggerNonComplianceData): void
2631
- ```
2632
-
2633
- Called when a CfnResource does not pass the compliance check for a given rule and the the rule violation is not suppressed by the user.
2634
-
2635
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.INagLogger.onNonCompliance.parameter.data"></a>
2636
-
2637
- - *Type:* <a href="#cdk-nag.NagLoggerNonComplianceData">NagLoggerNonComplianceData</a>
2638
-
2639
- ---
2640
-
2641
- ##### `onNotApplicable` <a name="onNotApplicable" id="cdk-nag.INagLogger.onNotApplicable"></a>
2642
-
2643
- ```typescript
2644
- public onNotApplicable(data: NagLoggerNotApplicableData): void
2645
- ```
2646
-
2647
- Called when a rule does not apply to the given CfnResource.
1387
+ ### INagValidationContext <a name="INagValidationContext" id="cdk-nag.INagValidationContext"></a>
2648
1388
 
2649
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.INagLogger.onNotApplicable.parameter.data"></a>
1389
+ - *Extends:* aws-cdk-lib.IPolicyValidationContext
2650
1390
 
2651
- - *Type:* <a href="#cdk-nag.NagLoggerNotApplicableData">NagLoggerNotApplicableData</a>
2652
-
2653
- ---
1391
+ - *Implemented By:* <a href="#cdk-nag.INagValidationContext">INagValidationContext</a>
2654
1392
 
2655
- ##### `onSuppressed` <a name="onSuppressed" id="cdk-nag.INagLogger.onSuppressed"></a>
1393
+ Extended validation context that includes the construct tree.
2656
1394
 
2657
- ```typescript
2658
- public onSuppressed(data: NagLoggerSuppressedData): void
2659
- ```
1395
+ Requires CDK core change to populate `appConstruct` during plugin validation.
2660
1396
 
2661
- Called when a CfnResource does not pass the compliance check for a given rule and the rule violation is suppressed by the user.
2662
1397
 
2663
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.INagLogger.onSuppressed.parameter.data"></a>
1398
+ #### Properties <a name="Properties" id="Properties"></a>
2664
1399
 
2665
- - *Type:* <a href="#cdk-nag.NagLoggerSuppressedData">NagLoggerSuppressedData</a>
1400
+ | **Name** | **Type** | **Description** |
1401
+ | --- | --- | --- |
1402
+ | <code><a href="#cdk-nag.INagValidationContext.property.templatePaths">templatePaths</a></code> | <code>string[]</code> | The absolute path of all templates to be processed. |
1403
+ | <code><a href="#cdk-nag.INagValidationContext.property.appConstruct">appConstruct</a></code> | <code>constructs.IConstruct</code> | *No description.* |
2666
1404
 
2667
1405
  ---
2668
1406
 
2669
- ##### `onSuppressedError` <a name="onSuppressedError" id="cdk-nag.INagLogger.onSuppressedError"></a>
1407
+ ##### `templatePaths`<sup>Required</sup> <a name="templatePaths" id="cdk-nag.INagValidationContext.property.templatePaths"></a>
2670
1408
 
2671
1409
  ```typescript
2672
- public onSuppressedError(data: NagLoggerSuppressedErrorData): void
1410
+ public readonly templatePaths: string[];
2673
1411
  ```
2674
1412
 
2675
- Called when a rule throws an error during while validating a CfnResource for compliance and the error is suppressed.
2676
-
2677
- ###### `data`<sup>Required</sup> <a name="data" id="cdk-nag.INagLogger.onSuppressedError.parameter.data"></a>
2678
-
2679
- - *Type:* <a href="#cdk-nag.NagLoggerSuppressedErrorData">NagLoggerSuppressedErrorData</a>
2680
-
2681
- ---
2682
-
2683
-
2684
- ### INagSuppressionIgnore <a name="INagSuppressionIgnore" id="cdk-nag.INagSuppressionIgnore"></a>
2685
-
2686
- - *Implemented By:* <a href="#cdk-nag.SuppressionIgnoreAlways">SuppressionIgnoreAlways</a>, <a href="#cdk-nag.SuppressionIgnoreAnd">SuppressionIgnoreAnd</a>, <a href="#cdk-nag.SuppressionIgnoreErrors">SuppressionIgnoreErrors</a>, <a href="#cdk-nag.SuppressionIgnoreNever">SuppressionIgnoreNever</a>, <a href="#cdk-nag.SuppressionIgnoreOr">SuppressionIgnoreOr</a>, <a href="#cdk-nag.INagSuppressionIgnore">INagSuppressionIgnore</a>
1413
+ - *Type:* string[]
2687
1414
 
2688
- Interface for creating NagSuppression Ignores.
2689
-
2690
- #### Methods <a name="Methods" id="Methods"></a>
2691
-
2692
- | **Name** | **Description** |
2693
- | --- | --- |
2694
- | <code><a href="#cdk-nag.INagSuppressionIgnore.createMessage">createMessage</a></code> | *No description.* |
1415
+ The absolute path of all templates to be processed.
2695
1416
 
2696
1417
  ---
2697
1418
 
2698
- ##### `createMessage` <a name="createMessage" id="cdk-nag.INagSuppressionIgnore.createMessage"></a>
1419
+ ##### `appConstruct`<sup>Required</sup> <a name="appConstruct" id="cdk-nag.INagValidationContext.property.appConstruct"></a>
2699
1420
 
2700
1421
  ```typescript
2701
- public createMessage(input: SuppressionIgnoreInput): string
1422
+ public readonly appConstruct: IConstruct;
2702
1423
  ```
2703
1424
 
2704
- ###### `input`<sup>Required</sup> <a name="input" id="cdk-nag.INagSuppressionIgnore.createMessage.parameter.input"></a>
2705
-
2706
- - *Type:* <a href="#cdk-nag.SuppressionIgnoreInput">SuppressionIgnoreInput</a>
1425
+ - *Type:* constructs.IConstruct
2707
1426
 
2708
1427
  ---
2709
1428
 
2710
-
2711
1429
  ## Enums <a name="Enums" id="Enums"></a>
2712
1430
 
2713
1431
  ### NagMessageLevel <a name="NagMessageLevel" id="cdk-nag.NagMessageLevel"></a>
@@ -2799,16 +1517,10 @@ Additional states a rule can be in post compliance validation.
2799
1517
 
2800
1518
  | **Name** | **Description** |
2801
1519
  | --- | --- |
2802
- | <code><a href="#cdk-nag.NagRulePostValidationStates.SUPPRESSED">SUPPRESSED</a></code> | *No description.* |
2803
1520
  | <code><a href="#cdk-nag.NagRulePostValidationStates.UNKNOWN">UNKNOWN</a></code> | *No description.* |
2804
1521
 
2805
1522
  ---
2806
1523
 
2807
- ##### `SUPPRESSED` <a name="SUPPRESSED" id="cdk-nag.NagRulePostValidationStates.SUPPRESSED"></a>
2808
-
2809
- ---
2810
-
2811
-
2812
1524
  ##### `UNKNOWN` <a name="UNKNOWN" id="cdk-nag.NagRulePostValidationStates.UNKNOWN"></a>
2813
1525
 
2814
1526
  ---