cdk-real-drift 0.11.0 → 0.11.1
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 +13 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5410,6 +5410,7 @@ function cloneDeepWithSymbols(v) {
|
|
|
5410
5410
|
}
|
|
5411
5411
|
const isPolicyStatementArray = (arr) => arr.length > 0 && arr.every((el) => isNestedObject(el) && "Effect" in el);
|
|
5412
5412
|
const isInlinePolicyArray = (arr) => arr.length > 0 && arr.every((el) => isNestedObject(el) && "PolicyDocument" in el);
|
|
5413
|
+
const isKeyValueTagList = (arr) => arr.length > 0 && identityField(arr) === "Key" && arr.every((el) => isNestedObject(el) && "Value" in el);
|
|
5413
5414
|
function isPolicySubsetOf(sub, sup) {
|
|
5414
5415
|
for (const [k, v] of Object.entries(sub)) {
|
|
5415
5416
|
if (!(k in sup)) return false;
|
|
@@ -6242,13 +6243,17 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
6242
6243
|
}) ?? false)) continue;
|
|
6243
6244
|
const transformExpr = schema.propertyTransforms?.[d.path] ?? schema.propertyTransforms?.[d.path.replace(/\.\d+(?=\.|$)/g, ".*")];
|
|
6244
6245
|
if (transformExpr !== void 0 && matchesPropertyTransform(transformExpr, d.stateValue, resolveParentObject(declared, d.path), declared, d.awsValue, d.path.split(".").at(-1) ?? d.path)) continue;
|
|
6246
|
+
const tagListWhole = !unorderedObjArray && Array.isArray(v) && isKeyValueTagList(v) && d.path.startsWith(`${k}.`);
|
|
6245
6247
|
const unorderedExtra = unorderedObjArray && Array.isArray(declaredVal) && declaredRemapSource ? {
|
|
6246
6248
|
path: remapSortedIndexToDeclared(d.path, k, declaredVal, declaredRemapSource),
|
|
6247
6249
|
wholeArrayRevert: {
|
|
6248
6250
|
path: k,
|
|
6249
6251
|
value: v
|
|
6250
6252
|
}
|
|
6251
|
-
} : {
|
|
6253
|
+
} : tagListWhole ? { wholeArrayRevert: {
|
|
6254
|
+
path: k,
|
|
6255
|
+
value: v
|
|
6256
|
+
} } : {};
|
|
6252
6257
|
findings.push({
|
|
6253
6258
|
tier: "declared",
|
|
6254
6259
|
logicalId,
|
|
@@ -7369,12 +7374,18 @@ async function enumerateEventBusChildren(ctx) {
|
|
|
7369
7374
|
liveRules
|
|
7370
7375
|
});
|
|
7371
7376
|
}
|
|
7377
|
+
const OPENSEARCH_SERVICE_CLIENT_PREFIXES = ["AWSElasticsearch-", "AmazonOpenSearchService-"];
|
|
7378
|
+
function isOpenSearchServiceClient(name) {
|
|
7379
|
+
if (name === void 0) return false;
|
|
7380
|
+
return OPENSEARCH_SERVICE_CLIENT_PREFIXES.some((p) => name.startsWith(p));
|
|
7381
|
+
}
|
|
7372
7382
|
function diffUserPoolChildren(input) {
|
|
7373
7383
|
const { userPoolId, declaredClientIds, liveClients } = input;
|
|
7374
7384
|
const declared = new Set(declaredClientIds);
|
|
7375
7385
|
const added = [];
|
|
7376
7386
|
for (const c of liveClients) {
|
|
7377
7387
|
if (declared.has(c.id)) continue;
|
|
7388
|
+
if (isOpenSearchServiceClient(c.name ?? c.label)) continue;
|
|
7378
7389
|
added.push({
|
|
7379
7390
|
resourceType: "AWS::Cognito::UserPoolClient",
|
|
7380
7391
|
identifier: `${userPoolId}|${c.id}`,
|
|
@@ -7527,6 +7538,7 @@ async function enumerateUserPoolChildren(ctx) {
|
|
|
7527
7538
|
declaredClientIds,
|
|
7528
7539
|
liveClients: (await pageUserPoolClients(client, userPoolId)).filter((c) => typeof c.ClientId === "string").map((c) => ({
|
|
7529
7540
|
id: c.ClientId,
|
|
7541
|
+
name: c.ClientName,
|
|
7530
7542
|
label: c.ClientName ?? c.ClientId
|
|
7531
7543
|
}))
|
|
7532
7544
|
});
|