cdk-real-drift 0.2.40 → 0.2.41

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 CHANGED
@@ -2254,7 +2254,7 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
2254
2254
  "AWS::KinesisAnalyticsV2::Application": new Set(["ApplicationMaintenanceConfiguration"]),
2255
2255
  "AWS::ElasticBeanstalk::ConfigurationTemplate": new Set(["PlatformArn"]),
2256
2256
  "AWS::ElasticBeanstalk::Environment": new Set(["PlatformArn"]),
2257
- "AWS::ElasticLoadBalancing::LoadBalancer": new Set(["AvailabilityZones", "Policies"]),
2257
+ "AWS::ElasticLoadBalancing::LoadBalancer": new Set(["AvailabilityZones"]),
2258
2258
  "AWS::AutoScaling::AutoScalingGroup": new Set(["AvailabilityZones", "AvailabilityZoneIds"]),
2259
2259
  "AWS::ApiGateway::Authorizer": new Set(["AuthType"]),
2260
2260
  "AWS::RDS::DBCluster": new Set([
@@ -3875,6 +3875,12 @@ function dynamoGsiWarmThroughputAtDefault(resourceType, path, value, live) {
3875
3875
  if (!isNestedObject(gsi)) return false;
3876
3876
  return deepEqual(value, warmThroughputDefault(gsi.ProvisionedThroughput));
3877
3877
  }
3878
+ const CLB_DEFAULT_SSL_POLICY_NAME = "ELBSecurityPolicy-2016-08";
3879
+ function clbDefaultSslPoliciesAtDefault(resourceType, key, value) {
3880
+ if (resourceType !== "AWS::ElasticLoadBalancing::LoadBalancer" || key !== "Policies") return false;
3881
+ if (!Array.isArray(value) || value.length === 0) return false;
3882
+ return value.every((el) => isNestedObject(el) && el["PolicyType"] === "SSLNegotiationPolicyType" && el["PolicyName"] === CLB_DEFAULT_SSL_POLICY_NAME);
3883
+ }
3878
3884
  const CFN_RANDOM_SUFFIX = /-[0-9A-Za-z]{12,}$/;
3879
3885
  function stripInjectedJsonStringDefaults(declared, live, defaults) {
3880
3886
  const stripObject = (d, l) => {
@@ -4536,7 +4542,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4536
4542
  }
4537
4543
  continue;
4538
4544
  }
4539
- if (k in schema.defaults && matchesKnownDefault(v, schema.defaults[k]) || k in knownDef && matchesKnownDefault(v, knownDef[k]) || KNOWN_DEFAULT_ONE_OF[resourceType]?.[k]?.some((d) => matchesKnownDefault(v, d)) || VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS[resourceType]?.has(k) && !isTrivialEmpty(v)) {
4545
+ if (k in schema.defaults && matchesKnownDefault(v, schema.defaults[k]) || k in knownDef && matchesKnownDefault(v, knownDef[k]) || KNOWN_DEFAULT_ONE_OF[resourceType]?.[k]?.some((d) => matchesKnownDefault(v, d)) || VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS[resourceType]?.has(k) && !isTrivialEmpty(v) || clbDefaultSslPoliciesAtDefault(resourceType, k, v)) {
4540
4546
  findings.push({
4541
4547
  tier: "atDefault",
4542
4548
  logicalId,