cdk-real-drift 0.2.14 → 0.2.15
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 +51 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1581,7 +1581,33 @@ const KNOWN_DEFAULTS = {
|
|
|
1581
1581
|
},
|
|
1582
1582
|
"AWS::Bedrock::Agent": {
|
|
1583
1583
|
AgentCollaboration: "DISABLED",
|
|
1584
|
-
OrchestrationType: "DEFAULT"
|
|
1584
|
+
OrchestrationType: "DEFAULT",
|
|
1585
|
+
IdleSessionTTLInSeconds: 600
|
|
1586
|
+
},
|
|
1587
|
+
"AWS::EC2::VPNGateway": { AmazonSideAsn: 64512 },
|
|
1588
|
+
"AWS::CodeGuruProfiler::ProfilingGroup": { ComputePlatform: "Default" },
|
|
1589
|
+
"AWS::ServiceCatalog::CloudFormationProduct": { ProductType: "CLOUD_FORMATION_TEMPLATE" },
|
|
1590
|
+
"AWS::InternetMonitor::Monitor": { Status: "ACTIVE" },
|
|
1591
|
+
"AWS::RolesAnywhere::Profile": {
|
|
1592
|
+
DurationSeconds: 3600,
|
|
1593
|
+
AttributeMappings: [
|
|
1594
|
+
{
|
|
1595
|
+
CertificateField: "x509Issuer",
|
|
1596
|
+
MappingRules: [{ Specifier: "*" }]
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
CertificateField: "x509SAN",
|
|
1600
|
+
MappingRules: [
|
|
1601
|
+
{ Specifier: "DNS" },
|
|
1602
|
+
{ Specifier: "URI" },
|
|
1603
|
+
{ Specifier: "Name/*" }
|
|
1604
|
+
]
|
|
1605
|
+
},
|
|
1606
|
+
{
|
|
1607
|
+
CertificateField: "x509Subject",
|
|
1608
|
+
MappingRules: [{ Specifier: "*" }]
|
|
1609
|
+
}
|
|
1610
|
+
]
|
|
1585
1611
|
},
|
|
1586
1612
|
"AWS::CodeStarNotifications::NotificationRule": { Status: "ENABLED" },
|
|
1587
1613
|
"AWS::Rbin::Rule": { Status: "available" },
|
|
@@ -1667,6 +1693,7 @@ const KNOWN_DEFAULTS = {
|
|
|
1667
1693
|
"AWS::CodeStarConnections::Connection": { HostArn: "arn:aws:codestar-connections:us-west-2:000000000000:host/00000000-0000-0000-0000-000000000000" }
|
|
1668
1694
|
};
|
|
1669
1695
|
const KNOWN_DEFAULT_PATHS = {
|
|
1696
|
+
"AWS::ServiceCatalog::CloudFormationProduct": { "ProvisioningArtifactParameters.*.Type": "CLOUD_FORMATION_TEMPLATE" },
|
|
1670
1697
|
"AWS::KinesisAnalyticsV2::Application": { "ApplicationConfiguration.ApplicationEncryptionConfiguration": { KeyType: "AWS_OWNED_KEY" } },
|
|
1671
1698
|
"AWS::Lambda::Function": {
|
|
1672
1699
|
"LoggingConfig.LogFormat": "Text",
|
|
@@ -1893,6 +1920,7 @@ const GENERATED_PATHS = {
|
|
|
1893
1920
|
"AWS::XRay::SamplingRule": ["SamplingRule.RuleARN"]
|
|
1894
1921
|
};
|
|
1895
1922
|
const CONTEXT_DEFAULTS = { "AWS::EC2::VPCEndpointService": { SupportedRegions: "regionList" } };
|
|
1923
|
+
const CONTEXT_ARN_DEFAULTS = { "AWS::ResourceExplorer2::View": { Scope: "arn:{partition}:iam::{accountId}:root" } };
|
|
1896
1924
|
const ENGINE_DEFAULTS = {
|
|
1897
1925
|
"AWS::RDS::DBInstance": {
|
|
1898
1926
|
StorageType: (e) => e.startsWith("aurora") ? "aurora" : void 0,
|
|
@@ -1960,7 +1988,8 @@ const GENERATED_NESTED_PATHS = {
|
|
|
1960
1988
|
"AWS::KMS::Key": new Set(["KeyPolicy.Id"]),
|
|
1961
1989
|
"AWS::ECR::Repository": new Set(["LifecyclePolicy.RegistryId"]),
|
|
1962
1990
|
"AWS::Lambda::Function": new Set(["LoggingConfig.LogGroup"]),
|
|
1963
|
-
"AWS::OpenSearchService::Domain": new Set(["EncryptionAtRestOptions.KmsKeyId"])
|
|
1991
|
+
"AWS::OpenSearchService::Domain": new Set(["EncryptionAtRestOptions.KmsKeyId"]),
|
|
1992
|
+
"AWS::ApiGateway::Stage": new Set(["CanarySetting.DeploymentId"])
|
|
1964
1993
|
};
|
|
1965
1994
|
const EB_OPTION_DEFAULTS = {
|
|
1966
1995
|
"aws:autoscaling:asg|Availability Zones": "Any",
|
|
@@ -2128,7 +2157,12 @@ const VALUE_INDEPENDENT_DEFAULT_TOPLEVEL_PATHS = {
|
|
|
2128
2157
|
"AWS::EC2::EIP": new Set(["NetworkBorderGroup"]),
|
|
2129
2158
|
"AWS::EC2::VPCEndpoint": new Set(["ServiceRegion", "DnsOptions"]),
|
|
2130
2159
|
"AWS::EC2::VPCPeeringConnection": new Set(["PeerRegion"]),
|
|
2131
|
-
"AWS::Grafana::Workspace": new Set(["GrafanaVersion"])
|
|
2160
|
+
"AWS::Grafana::Workspace": new Set(["GrafanaVersion"]),
|
|
2161
|
+
"AWS::Bedrock::AgentAlias": new Set(["RoutingConfiguration"]),
|
|
2162
|
+
"AWS::AppSync::ApiKey": new Set(["Expires"]),
|
|
2163
|
+
"AWS::AppConfig::ExtensionAssociation": new Set(["ExtensionVersionNumber"]),
|
|
2164
|
+
"AWS::StepFunctions::StateMachineVersion": new Set(["StateMachineRevisionId"]),
|
|
2165
|
+
"AWS::StepFunctions::StateMachineAlias": new Set(["StateMachineArn"])
|
|
2132
2166
|
};
|
|
2133
2167
|
function isPhysicalIdSegment(value, physicalId) {
|
|
2134
2168
|
if (typeof value !== "string" || physicalId === void 0) return false;
|
|
@@ -4196,6 +4230,20 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
4196
4230
|
continue;
|
|
4197
4231
|
}
|
|
4198
4232
|
}
|
|
4233
|
+
const ctxArnTemplate = CONTEXT_ARN_DEFAULTS[resourceType]?.[k];
|
|
4234
|
+
if (ctxArnTemplate !== void 0 && opts.region !== void 0 && opts.accountId !== void 0 && typeof v === "string") {
|
|
4235
|
+
const partition = opts.region.startsWith("cn-") ? "aws-cn" : opts.region.startsWith("us-gov-") ? "aws-us-gov" : "aws";
|
|
4236
|
+
if (v === ctxArnTemplate.replace("{partition}", partition).replace("{region}", opts.region).replace("{accountId}", opts.accountId)) {
|
|
4237
|
+
findings.push({
|
|
4238
|
+
tier: "atDefault",
|
|
4239
|
+
logicalId,
|
|
4240
|
+
resourceType,
|
|
4241
|
+
path: k,
|
|
4242
|
+
actual: v
|
|
4243
|
+
});
|
|
4244
|
+
continue;
|
|
4245
|
+
}
|
|
4246
|
+
}
|
|
4199
4247
|
const engineDefault = ENGINE_DEFAULTS[resourceType]?.[k];
|
|
4200
4248
|
if (engineDefault !== void 0 && typeof live.Engine === "string") {
|
|
4201
4249
|
const def = engineDefault(live.Engine);
|