@digitraffic/common 2022.12.22-2 → 2022.12.22-3
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.
@@ -110,10 +110,10 @@ class StackCheckingAspect {
|
|
110
110
|
checkBucket(node) {
|
111
111
|
if (node instanceof aws_s3_1.CfnBucket) {
|
112
112
|
const c = node.publicAccessBlockConfiguration;
|
113
|
-
if (!c.blockPublicAcls ||
|
113
|
+
if (c && (!c.blockPublicAcls ||
|
114
114
|
!c.blockPublicPolicy ||
|
115
115
|
!c.ignorePublicAcls ||
|
116
|
-
!c.restrictPublicBuckets) {
|
116
|
+
!c.restrictPublicBuckets)) {
|
117
117
|
this.addAnnotation(node, ResourceType.bucketPublicity, "Check bucket publicity");
|
118
118
|
}
|
119
119
|
}
|
package/package.json
CHANGED
@@ -181,14 +181,14 @@ export class StackCheckingAspect implements IAspect {
|
|
181
181
|
private checkBucket(node: IConstruct) {
|
182
182
|
if (node instanceof CfnBucket) {
|
183
183
|
const c =
|
184
|
-
node.publicAccessBlockConfiguration as CfnBucket.PublicAccessBlockConfigurationProperty;
|
184
|
+
node.publicAccessBlockConfiguration as CfnBucket.PublicAccessBlockConfigurationProperty | undefined;
|
185
185
|
|
186
|
-
if (
|
186
|
+
if (c && (
|
187
187
|
!c.blockPublicAcls ||
|
188
188
|
!c.blockPublicPolicy ||
|
189
189
|
!c.ignorePublicAcls ||
|
190
190
|
!c.restrictPublicBuckets
|
191
|
-
) {
|
191
|
+
)) {
|
192
192
|
this.addAnnotation(
|
193
193
|
node,
|
194
194
|
ResourceType.bucketPublicity,
|