cdk-real-drift 0.2.20 → 0.2.22
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.
- package/dist/cli.js +23 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3560,7 +3560,12 @@ const ELB_ATTRIBUTE_BAGS = {
|
|
|
3560
3560
|
};
|
|
3561
3561
|
const MEANINGFUL_WHEN_OFF = {
|
|
3562
3562
|
"AWS::KMS::Key": { Enabled: () => true },
|
|
3563
|
-
"AWS::SQS::Queue": { SqsManagedSseEnabled: ({ declared, live }) => declared["KmsMasterKeyId"] === void 0 && live["KmsMasterKeyId"] === void 0 }
|
|
3563
|
+
"AWS::SQS::Queue": { SqsManagedSseEnabled: ({ declared, live }) => declared["KmsMasterKeyId"] === void 0 && live["KmsMasterKeyId"] === void 0 },
|
|
3564
|
+
"AWS::EC2::VPC": { EnableDnsSupport: () => true },
|
|
3565
|
+
"AWS::EC2::Instance": { SourceDestCheck: () => true },
|
|
3566
|
+
"AWS::EC2::NetworkInterface": { SourceDestCheck: () => true },
|
|
3567
|
+
"AWS::Cognito::UserPoolClient": { EnableTokenRevocation: () => true },
|
|
3568
|
+
"AWS::CloudWatch::CompositeAlarm": { ActionsEnabled: () => true }
|
|
3564
3569
|
};
|
|
3565
3570
|
const stripCognitoAttrPrefix = (id) => id.replace(/^(custom|dev):/, "");
|
|
3566
3571
|
const IDENTITY_KEYED_SUBSET_ARRAYS = {
|
|
@@ -3931,6 +3936,13 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
3931
3936
|
...freeFormKey && { freeFormKey: true }
|
|
3932
3937
|
});
|
|
3933
3938
|
};
|
|
3939
|
+
const allLeavesAtSchemaDefault = (value, basePath) => {
|
|
3940
|
+
if (isTrivialEmpty(value)) return true;
|
|
3941
|
+
if (Array.isArray(value)) return false;
|
|
3942
|
+
if (isNestedObject(value)) return Object.entries(value).every(([sk, sv]) => allLeavesAtSchemaDefault(sv, `${basePath}.${sk}`));
|
|
3943
|
+
const schemaPath = basePath.replace(/\[[^\]]*\]/g, ".*");
|
|
3944
|
+
return schemaPath in schema.defaultPaths && matchesKnownDefault(value, schema.defaultPaths[schemaPath]) || schemaPath in knownDefPaths && matchesKnownDefault(value, knownDefPaths[schemaPath]);
|
|
3945
|
+
};
|
|
3934
3946
|
for (const [k, v] of Object.entries(declared)) {
|
|
3935
3947
|
if (v === UNRESOLVED || hasUnresolved(v)) {
|
|
3936
3948
|
findings.push({
|
|
@@ -4405,6 +4417,16 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
4405
4417
|
}
|
|
4406
4418
|
continue;
|
|
4407
4419
|
}
|
|
4420
|
+
if (isNestedObject(v) && Object.keys(v).length > 0 && allLeavesAtSchemaDefault(v, k)) {
|
|
4421
|
+
findings.push({
|
|
4422
|
+
tier: "atDefault",
|
|
4423
|
+
logicalId,
|
|
4424
|
+
resourceType,
|
|
4425
|
+
path: k,
|
|
4426
|
+
actual: v
|
|
4427
|
+
});
|
|
4428
|
+
continue;
|
|
4429
|
+
}
|
|
4408
4430
|
findings.push({
|
|
4409
4431
|
tier: "undeclared",
|
|
4410
4432
|
logicalId,
|