cdk-real-drift 0.3.12 → 0.3.14

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
@@ -1426,6 +1426,14 @@ const KNOWN_DEFAULTS = {
1426
1426
  IngressConfiguration: { IsPubliclyAccessible: true }
1427
1427
  }
1428
1428
  },
1429
+ "AWS::GuardDuty::Detector": {
1430
+ FindingPublishingFrequency: "SIX_HOURS",
1431
+ DataSources: {
1432
+ MalwareProtection: { ScanEc2InstanceWithFindings: { EbsVolumes: true } },
1433
+ S3Logs: { Enable: true },
1434
+ Kubernetes: { AuditLogs: { Enable: true } }
1435
+ }
1436
+ },
1429
1437
  "AWS::KinesisAnalyticsV2::Application": { ApplicationMode: "STREAMING" },
1430
1438
  "AWS::Events::ApiDestination": { InvocationRateLimitPerSecond: 300 },
1431
1439
  "AWS::ElasticBeanstalk::Application": { ResourceLifecycleConfig: { VersionLifecycleConfig: {
@@ -2633,6 +2641,7 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
2633
2641
  "AWS::ElasticLoadBalancing::LoadBalancer": new Set(["AvailabilityZones"]),
2634
2642
  "AWS::AutoScaling::AutoScalingGroup": new Set(["AvailabilityZones", "AvailabilityZoneIds"]),
2635
2643
  "AWS::ApiGateway::Authorizer": new Set(["AuthType"]),
2644
+ "AWS::GuardDuty::Detector": new Set(["Features"]),
2636
2645
  "AWS::RDS::DBCluster": new Set([
2637
2646
  "KmsKeyId",
2638
2647
  "PerformanceInsightsKmsKeyId",
@@ -3223,7 +3232,10 @@ const UNORDERED_ARRAY_PROPS = {
3223
3232
  "AllowedOAuthScopes",
3224
3233
  "ExplicitAuthFlows",
3225
3234
  "CallbackURLs",
3226
- "LogoutURLs"
3235
+ "LogoutURLs",
3236
+ "ReadAttributes",
3237
+ "WriteAttributes",
3238
+ "SupportedIdentityProviders"
3227
3239
  ]),
3228
3240
  "AWS::WAFv2::IPSet": new Set(["Addresses"]),
3229
3241
  "AWS::Route53::RecordSet": new Set(["ResourceRecords"]),
@@ -4283,7 +4295,10 @@ const CC_ALT_REPRESENTATION = {
4283
4295
  AvailabilityZoneId: "AvailabilityZone",
4284
4296
  AvailabilityZone: "AvailabilityZoneId"
4285
4297
  },
4286
- "AWS::ElasticLoadBalancingV2::LoadBalancer": { SubnetMappings: "Subnets" }
4298
+ "AWS::ElasticLoadBalancingV2::LoadBalancer": {
4299
+ SubnetMappings: "Subnets",
4300
+ Subnets: "SubnetMappings"
4301
+ }
4287
4302
  };
4288
4303
  const SHAPE_ECHO_TWIN = { "AWS::KinesisFirehose::DeliveryStream": { ExtendedS3DestinationConfiguration: "S3DestinationConfiguration" } };
4289
4304
  function twinOverlapEchoes(source, twin) {
@@ -4653,6 +4668,28 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4653
4668
  };
4654
4669
  }
4655
4670
  }
4671
+ if (resourceType === "AWS::CodeBuild::Project") {
4672
+ const name = declared["Name"];
4673
+ if (typeof name === "string") knownDefPaths = {
4674
+ ...knownDefPaths,
4675
+ "Artifacts.Name": name
4676
+ };
4677
+ }
4678
+ if (resourceType === "AWS::SecretsManager::RotationSchedule") {
4679
+ const expr = declared["RotationRules"]?.["ScheduleExpression"];
4680
+ const m = typeof expr === "string" ? /^rate\((\d+)\s+days?\)$/.exec(expr.trim()) : null;
4681
+ if (m) knownDefPaths = {
4682
+ ...knownDefPaths,
4683
+ "RotationRules.AutomaticallyAfterDays": Number(m[1])
4684
+ };
4685
+ }
4686
+ if (resourceType === "AWS::AmazonMQ::Broker") {
4687
+ const engineType = declared["EngineType"];
4688
+ if (typeof engineType === "string" && engineType.toUpperCase() === "ACTIVEMQ") knownDef = {
4689
+ ...knownDef,
4690
+ StorageType: "EFS"
4691
+ };
4692
+ }
4656
4693
  if (resourceType === "AWS::Lambda::EventSourceMapping") {
4657
4694
  const arn = declared["EventSourceArn"];
4658
4695
  const service = typeof arn === "string" ? arn.split(":")[2] : void 0;
@@ -4971,14 +5008,20 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
4971
5008
  if (nvSubsetSpec?.re.test(d.path)) {
4972
5009
  const liveOnly = alignNameValueSubset(d.stateValue, d.awsValue, nvSubsetSpec);
4973
5010
  if (liveOnly) {
4974
- for (const lo of liveOnly) findings.push({
4975
- tier: "undeclared",
4976
- logicalId,
4977
- resourceType,
4978
- path: `${d.path}[${String(lo[nvSubsetSpec.nameField])}]`,
4979
- actual: lo,
4980
- nested: true
4981
- });
5011
+ for (const lo of liveOnly) {
5012
+ const loRec = lo;
5013
+ const loName = String(loRec[nvSubsetSpec.nameField]);
5014
+ const loValue = loRec[nvSubsetSpec.valueField];
5015
+ const isFirehoseRetriesDefault = resourceType === "AWS::KinesisFirehose::DeliveryStream" && loName === "NumberOfRetries" && loValue === "3";
5016
+ findings.push({
5017
+ tier: isFirehoseRetriesDefault ? "atDefault" : "undeclared",
5018
+ logicalId,
5019
+ resourceType,
5020
+ path: `${d.path}[${loName}]`,
5021
+ actual: lo,
5022
+ nested: true
5023
+ });
5024
+ }
4982
5025
  continue;
4983
5026
  }
4984
5027
  }