@go-to-k/cdkd 0.301.7 → 0.301.9
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/{asg-provider-C14GB-Hy.js → asg-provider-BsUcTrJN.js} +3 -3
- package/dist/{asg-provider-C14GB-Hy.js.map → asg-provider-BsUcTrJN.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-zLKsm0IM.js → deploy-engine-BN6g5voc.js} +734 -527
- package/dist/deploy-engine-BN6g5voc.js.map +1 -0
- package/dist/{iam-policy-targets-LyArt3ew.js → iam-policy-targets-DJmfxbko.js} +5 -2
- package/dist/iam-policy-targets-DJmfxbko.js.map +1 -0
- package/dist/{iam-role-provider-BnStRZFM.js → iam-role-provider-ox_QAXCb.js} +3 -3
- package/dist/{iam-role-provider-BnStRZFM.js.map → iam-role-provider-ox_QAXCb.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{neptune-provider-BlpYIZQP.js → neptune-provider-Dq6PuG9E.js} +3 -3
- package/dist/{neptune-provider-BlpYIZQP.js.map → neptune-provider-Dq6PuG9E.js.map} +1 -1
- package/dist/{program-CiTz5-_D.js → program-bNAjgmlg.js} +5 -5
- package/dist/{program-CiTz5-_D.js.map → program-bNAjgmlg.js.map} +1 -1
- package/dist/{provider-classes-BWo7K01p.js → provider-classes-Dbw16dmt.js} +183 -73
- package/dist/provider-classes-Dbw16dmt.js.map +1 -0
- package/dist/{rds-provider-DagnUCn-.js → rds-provider-iwtmIiPb.js} +3 -3
- package/dist/{rds-provider-DagnUCn-.js.map → rds-provider-iwtmIiPb.js.map} +1 -1
- package/dist/{version-MUc6NbW0.js → version-BWoiT1SX.js} +2 -2
- package/dist/{version-MUc6NbW0.js.map → version-BWoiT1SX.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-zLKsm0IM.js.map +0 -1
- package/dist/iam-policy-targets-LyArt3ew.js.map +0 -1
- package/dist/provider-classes-BWo7K01p.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as getAwsClients, s as __exportAll } from "./aws-clients-B_CEQGE1.js";
|
|
2
2
|
import { A as UNRENDERABLE, B as safeMsg, C as looksLikeCdkdGeneratedName, D as SAFE_MSG_ALTERED_CHAR, E as withoutGeneratedFallbackName, F as displaySafe, H as terminalSafe, I as displayStackName, L as isPasteableIdent, N as displayAwsMessage, O as SECRET_REF_MAX_CODE_POINTS, P as displayIdent, S as getCurrentStackName, T as withStackName, U as truncateCodePoints, a as getLogger, b as generateResourceNameWithFallback, d as installLogLineMaskerSource, f as getLiveRenderer, g as applyDefaultNameForFallback, j as asIsMessage, k as STACK_REF_MAX_CODE_POINTS, o as isStdoutReservedForPayload, r as safeStringify$1, t as describeAwsFailure, u as currentLogLineMasker, v as explicitNamePropertyFor, w as withSkipPrefix, x as getCurrentSkipPrefix, y as generateResourceName, z as plainIdentOr } from "./aws-failure-text-BEQfs6za.js";
|
|
3
|
-
import { $ as protectedReplacementAdvice, $n as markReplayMayCollide, $t as ambientCredentialConfig, A as isQuotableImportValue, An as SHELL_ACTIVE, At as isAuxiliaryMarkOf, B as isTerminalDeleteFailure, Bn as shellBoundedDisplay, Bt as formatLockOperation, Cn as StateError, Ct as RETRY_AUXILIARY_OWNER, Dn as normalizeAwsError, Dt as createdResourceIdentityBeforeFailure, E as assertRegionMatch, Et as createdBeforeFailure, F as resolveExplicitPhysicalId, Fn as isInertUnquoted, Ft as UNREPRODUCIBLE_LOCK_CLAUSE, G as runDeleteAttempt, Gn as isUpdateUnsupportedError, Gt as DEFAULT_STATE_PREFIX, H as observeThenDisableProtection, Hn as withheldTargetClause, Ht as recoveryCommandFlags, In as pasteableCommand, It as buildForceUnlockCommand, J as DELETION_PROTECTION_DOC_POINTER, Jn as isNameCollisionErrorFrom, Kn as hasReplayMayCollide, Kt as injectiveKey, L as ProtectionFlipRegistry, Ln as physicalIdShownBesideCommand, M as quotedRemedyLogicalId, Mn as UNSHOWABLE_VALUE, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nn as commandHole, Ot as hasCreatedBeforeFailure, Pt as replayMadeAnotherResource, Q as pasteableAwsCommand, Qt as ambientClientDefaults, R as compensateProtectionFlip, Rn as plainOrDescribed, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, U as protectionFlipKey, Ut as sanitizeRecoveryValue, Vn as shellQuote, Vt as formatLockOwner, Wt as CUSTOM_RESOURCE_RESPONSE_PREFIX, Xn as isRecreateRetryableError, Yn as isNameCooldownError, Yt as producerRecordKey, Zn as isReplayedNameCollisionFrom, Zt as withPasteableAwsProfile, _t as createMaskedLogSinks,
|
|
3
|
+
import { $ as protectedReplacementAdvice, $n as markReplayMayCollide, $t as ambientCredentialConfig, A as isQuotableImportValue, An as SHELL_ACTIVE, At as isAuxiliaryMarkOf, B as isTerminalDeleteFailure, Bn as shellBoundedDisplay, Bt as formatLockOperation, Cn as StateError, Ct as RETRY_AUXILIARY_OWNER, Dn as normalizeAwsError, Dt as createdResourceIdentityBeforeFailure, E as assertRegionMatch, Et as createdBeforeFailure, F as resolveExplicitPhysicalId, Fn as isInertUnquoted, Ft as UNREPRODUCIBLE_LOCK_CLAUSE, G as runDeleteAttempt, Gn as isUpdateUnsupportedError, Gt as DEFAULT_STATE_PREFIX, H as observeThenDisableProtection, Hn as withheldTargetClause, Ht as recoveryCommandFlags, In as pasteableCommand, It as buildForceUnlockCommand, J as DELETION_PROTECTION_DOC_POINTER, Jn as isNameCollisionErrorFrom, Kn as hasReplayMayCollide, Kt as injectiveKey, L as ProtectionFlipRegistry, Ln as physicalIdShownBesideCommand, M as quotedRemedyLogicalId, Mn as UNSHOWABLE_VALUE, Mt as markCreatedBeforeFailure, N as refusalTypeShown, Nn as commandHole, Ot as hasCreatedBeforeFailure, Pt as replayMadeAnotherResource, Q as pasteableAwsCommand, Qt as ambientClientDefaults, R as compensateProtectionFlip, Rn as plainOrDescribed, St as withDerivedNameMasks, T as RESOURCE_NOT_FOUND, U as protectionFlipKey, Ut as sanitizeRecoveryValue, Vn as shellQuote, Vt as formatLockOwner, Wt as CUSTOM_RESOURCE_RESPONSE_PREFIX, Xn as isRecreateRetryableError, Yn as isNameCooldownError, Yt as producerRecordKey, Zn as isReplayedNameCollisionFrom, Zt as withPasteableAwsProfile, _t as createMaskedLogSinks, at as startInterruptWatch, bn as ResourceUpdateNotSupportedError, bt as maskDeep, cr as isTransientServerError, ct as canonicalizeRoute53QueryName, d as prepareRemovalForUpdate, dr as isMarkedNonRetryable, en as clientDefaultsFor, f as removalWarning, fr as isThrottlingError, ft as logicalIdShown, gt as stateOrphanRecordRemedy, hn as MalformedProducerRecordRefusalError, hr as wrapMaskedAwsError, ht as segmentAfterAnchor, i as holdsSecretDerivedEntry, in as CdkdError, ir as isAmbiguousOutcomeError, it as isInterruptedWaitError, j as normalizeAwsTagsToCfn, jn as SHELL_ACTIVE_WHY, jt as markAuxiliaryFailure, kt as isAuxiliaryFailure, l as withUnchangedSecretPrincipalLists, ln as DynamicReferenceRegionAmbiguousError, lr as retryClassificationText, m as withoutInjectedRemovals, mn as MacroExpansionError, mr as markRedactedCause, mt as resourceTypeShown, nn as AccountIdUnavailableError, nr as formatRetryClassificationSignals, on as CrossAccountSecretRefusalError, or as isIamPropagationError, ot as ElapsedBudgetRegistry, pn as LockError, pr as markNonRetryable, rn as AssetError, rr as isAmbiguousCcHandlerErrorCode, sn as DependencyError, sr as isRetryableTransientError, st as monotonicNowMs, tn as credentialFingerprint, un as IntrinsicResolutionRefusalError, ut as compositeIdSeparatorRefusal, vn as ProvisioningError, vt as createMaskedRetryLogger, w as withoutServerErrorRetries, wn as SynthesisError, wt as carryCreatedBeforeFailure, xt as maskerOrIdentity, yn as ResourceTimeoutError, yt as isSecretDerivedValue, z as deleteWithProtectionCompensation, zn as quotedOrDescribed, zt as formatLockExpiry } from "./iam-policy-targets-DJmfxbko.js";
|
|
4
4
|
import { a as setAssumedRoleCredentials, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, s as ambientRegion, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-DBXBcg0J.js";
|
|
5
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
+
import { t as getCdkdVersion } from "./version-BWoiT1SX.js";
|
|
6
6
|
import { createHash, randomUUID } from "node:crypto";
|
|
7
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
8
8
|
import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketLifecycleConfigurationCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -7429,6 +7429,13 @@ function recordProvenPublicExpression(bag, expression, value) {
|
|
|
7429
7429
|
if (prior === false) return;
|
|
7430
7430
|
proofs.set(expression, prior === void 0 || prior === value ? value : false);
|
|
7431
7431
|
}
|
|
7432
|
+
function sharePublicProofs(view, pass) {
|
|
7433
|
+
provenPublicExpressions.set(view, proofsOf(pass));
|
|
7434
|
+
}
|
|
7435
|
+
function carryPublicProofs(from, to) {
|
|
7436
|
+
for (const [expression, value] of provenPublicExpressions.get(from) ?? []) if (value === false) contradictProvenPublicExpression(to, expression);
|
|
7437
|
+
else recordProvenPublicExpression(to, expression, value);
|
|
7438
|
+
}
|
|
7432
7439
|
function contradictProvenPublicExpression(bag, expression) {
|
|
7433
7440
|
proofsOf(bag).set(expression, false);
|
|
7434
7441
|
}
|
|
@@ -9393,6 +9400,16 @@ function differingStringLeaves(legacy, current, out = []) {
|
|
|
9393
9400
|
}
|
|
9394
9401
|
return out;
|
|
9395
9402
|
}
|
|
9403
|
+
function legacyLeavesWithoutMask(legacy) {
|
|
9404
|
+
if (typeof legacy === "string") return legacy.includes("***") ? void 0 : legacy;
|
|
9405
|
+
if (Array.isArray(legacy)) return legacy.map(legacyLeavesWithoutMask);
|
|
9406
|
+
if (legacy !== null && typeof legacy === "object") {
|
|
9407
|
+
const out = Object.create(null);
|
|
9408
|
+
for (const [key, value] of Object.entries(legacy)) out[key] = legacyLeavesWithoutMask(value);
|
|
9409
|
+
return out;
|
|
9410
|
+
}
|
|
9411
|
+
return legacy;
|
|
9412
|
+
}
|
|
9396
9413
|
function legacyReferenceLeavesOnly(legacy) {
|
|
9397
9414
|
if (typeof legacy === "string") return legacy.includes("{{resolve:") ? legacy : void 0;
|
|
9398
9415
|
if (Array.isArray(legacy)) return legacy.map(legacyReferenceLeavesOnly);
|
|
@@ -9627,6 +9644,562 @@ function repairEmbeddedPhysicalNamesTowards(stored, target, pairs) {
|
|
|
9627
9644
|
return stored;
|
|
9628
9645
|
}
|
|
9629
9646
|
|
|
9647
|
+
//#endregion
|
|
9648
|
+
//#region src/deployment/secret-redaction/mask-errors.ts
|
|
9649
|
+
function maskSecretsInText(text, secrets) {
|
|
9650
|
+
const logOnly = logOnlyValuesOf.get(secrets);
|
|
9651
|
+
const noLogOnly = logOnly === void 0 || logOnly.size === 0;
|
|
9652
|
+
if (secrets.size === 0 && noLogOnly) return text;
|
|
9653
|
+
if (text !== "" && (secrets.has(text) || logOnly?.has(text) === true)) return "***";
|
|
9654
|
+
return maskMatchSpans(text, printingNeedles(noLogOnly ? secrets.keys() : [...secrets.keys(), ...logOnly]), "***");
|
|
9655
|
+
}
|
|
9656
|
+
function maskRecordedSecretsInText(text, secrets) {
|
|
9657
|
+
if (secrets.size === 0) return text;
|
|
9658
|
+
if (text !== "" && secrets.has(text)) return "***";
|
|
9659
|
+
return maskMatchSpans(text, substringNeedles(secrets.keys()), "***");
|
|
9660
|
+
}
|
|
9661
|
+
function substringNeedles(values) {
|
|
9662
|
+
return [...new Set(values)].filter((value) => value.length >= 4);
|
|
9663
|
+
}
|
|
9664
|
+
const ERROR_CAUSE_MASK_MAX_DEPTH = 20;
|
|
9665
|
+
function errorCauseChain(root) {
|
|
9666
|
+
const chain = [];
|
|
9667
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9668
|
+
let current = root;
|
|
9669
|
+
while (current instanceof Error && !seen.has(current) && chain.length < 20) {
|
|
9670
|
+
seen.add(current);
|
|
9671
|
+
chain.push(current);
|
|
9672
|
+
current = current.cause;
|
|
9673
|
+
}
|
|
9674
|
+
return chain;
|
|
9675
|
+
}
|
|
9676
|
+
function readStack(error) {
|
|
9677
|
+
try {
|
|
9678
|
+
const stack = error.stack;
|
|
9679
|
+
return typeof stack === "string" ? stack : void 0;
|
|
9680
|
+
} catch {
|
|
9681
|
+
return;
|
|
9682
|
+
}
|
|
9683
|
+
}
|
|
9684
|
+
function maskDescriptorValue(descriptor, maskText) {
|
|
9685
|
+
if (!("value" in descriptor)) return descriptor;
|
|
9686
|
+
const value = maskErrorFieldValue(descriptor.value, maskText);
|
|
9687
|
+
return value === descriptor.value ? descriptor : {
|
|
9688
|
+
...descriptor,
|
|
9689
|
+
value
|
|
9690
|
+
};
|
|
9691
|
+
}
|
|
9692
|
+
const CLASSIFIER_IDENTIFIER_FIELDS = /* @__PURE__ */ new Set([
|
|
9693
|
+
"name",
|
|
9694
|
+
"code",
|
|
9695
|
+
"Code",
|
|
9696
|
+
"__type",
|
|
9697
|
+
"ccErrorCode",
|
|
9698
|
+
"ccOperation"
|
|
9699
|
+
]);
|
|
9700
|
+
function isAuxiliaryAnchor(key, descriptor) {
|
|
9701
|
+
return key === "logicalId" && descriptor.enumerable === false && descriptor.writable === false && typeof descriptor.value === "string" && descriptor.value.endsWith("/auxiliary");
|
|
9702
|
+
}
|
|
9703
|
+
const CREATED_BEFORE_FAILURE_MARK = Symbol.for("cdkd.createdBeforeFailure");
|
|
9704
|
+
function isCreatedBeforeFailureMark(key, descriptor) {
|
|
9705
|
+
return key === CREATED_BEFORE_FAILURE_MARK && descriptor.enumerable === false && descriptor.writable === false && typeof descriptor.value === "object" && descriptor.value !== null && Object.isFrozen(descriptor.value);
|
|
9706
|
+
}
|
|
9707
|
+
function isPlainContainer(value) {
|
|
9708
|
+
const proto = Object.getPrototypeOf(value);
|
|
9709
|
+
return Array.isArray(value) ? proto === Array.prototype : proto === Object.prototype || proto === null;
|
|
9710
|
+
}
|
|
9711
|
+
function readFieldNode(node) {
|
|
9712
|
+
try {
|
|
9713
|
+
if (!isPlainContainer(node)) return void 0;
|
|
9714
|
+
const entries = [];
|
|
9715
|
+
for (const key of Reflect.ownKeys(node)) {
|
|
9716
|
+
const descriptor = Object.getOwnPropertyDescriptor(node, key);
|
|
9717
|
+
if (descriptor) entries.push([key, descriptor]);
|
|
9718
|
+
}
|
|
9719
|
+
const isArray = Array.isArray(node);
|
|
9720
|
+
return {
|
|
9721
|
+
proto: Object.getPrototypeOf(node),
|
|
9722
|
+
isArray,
|
|
9723
|
+
length: isArray ? Object.getOwnPropertyDescriptor(node, "length") : void 0,
|
|
9724
|
+
extensible: Object.isExtensible(node),
|
|
9725
|
+
entries
|
|
9726
|
+
};
|
|
9727
|
+
} catch {
|
|
9728
|
+
return;
|
|
9729
|
+
}
|
|
9730
|
+
}
|
|
9731
|
+
function maskErrorFieldValue(value, maskText) {
|
|
9732
|
+
if (typeof value === "string") return maskText(value);
|
|
9733
|
+
if (typeof value !== "object" || value === null) return value;
|
|
9734
|
+
try {
|
|
9735
|
+
const nodes = /* @__PURE__ */ new Map();
|
|
9736
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9737
|
+
let changed = false;
|
|
9738
|
+
let frontier = [value];
|
|
9739
|
+
for (let depth = 0; frontier.length > 0 && depth < 20; depth++) {
|
|
9740
|
+
const next = [];
|
|
9741
|
+
for (const node of frontier) {
|
|
9742
|
+
if (seen.has(node)) continue;
|
|
9743
|
+
seen.add(node);
|
|
9744
|
+
const read = readFieldNode(node);
|
|
9745
|
+
if (!read) continue;
|
|
9746
|
+
nodes.set(node, read);
|
|
9747
|
+
for (const [, descriptor] of read.entries) {
|
|
9748
|
+
if (!("value" in descriptor)) continue;
|
|
9749
|
+
const child = descriptor.value;
|
|
9750
|
+
if (typeof child === "string") {
|
|
9751
|
+
if (!changed && maskText(child) !== child) changed = true;
|
|
9752
|
+
} else if (typeof child === "object" && child !== null) next.push(child);
|
|
9753
|
+
}
|
|
9754
|
+
}
|
|
9755
|
+
frontier = next;
|
|
9756
|
+
}
|
|
9757
|
+
if (!changed) return value;
|
|
9758
|
+
const copies = /* @__PURE__ */ new Map();
|
|
9759
|
+
for (const [node, read] of nodes) copies.set(node, read.isArray ? new Array(read.length?.value ?? 0) : Object.create(read.proto));
|
|
9760
|
+
for (const [node, read] of nodes) {
|
|
9761
|
+
const copy = copies.get(node);
|
|
9762
|
+
for (const [key, original] of read.entries) {
|
|
9763
|
+
if (key === "length" && read.isArray) continue;
|
|
9764
|
+
const descriptor = { ...original };
|
|
9765
|
+
if ("value" in descriptor) {
|
|
9766
|
+
const child = descriptor.value;
|
|
9767
|
+
if (typeof child === "string") descriptor.value = maskText(child);
|
|
9768
|
+
else if (typeof child === "object" && child !== null && copies.has(child)) descriptor.value = copies.get(child);
|
|
9769
|
+
}
|
|
9770
|
+
Object.defineProperty(copy, key, descriptor);
|
|
9771
|
+
}
|
|
9772
|
+
if (read.length?.writable === false) Object.defineProperty(copy, "length", { writable: false });
|
|
9773
|
+
if (!read.extensible) Object.preventExtensions(copy);
|
|
9774
|
+
}
|
|
9775
|
+
return copies.get(value) ?? value;
|
|
9776
|
+
} catch {
|
|
9777
|
+
return value;
|
|
9778
|
+
}
|
|
9779
|
+
}
|
|
9780
|
+
function maskSecretsInError(error, secrets, extraMask) {
|
|
9781
|
+
if (!(error instanceof Error) || !hasMaskableValues(secrets) && !extraMask) return error;
|
|
9782
|
+
const maskText = (text) => maskSecretsInText(extraMask ? extraMask(text) : text, secrets);
|
|
9783
|
+
const chain = errorCauseChain(error);
|
|
9784
|
+
let changed = false;
|
|
9785
|
+
const links = chain.map((link) => {
|
|
9786
|
+
const message = maskText(link.message);
|
|
9787
|
+
const stack = readStack(link);
|
|
9788
|
+
const maskedStack = typeof stack === "string" ? maskText(stack) : void 0;
|
|
9789
|
+
const descriptors = {};
|
|
9790
|
+
for (const key of Reflect.ownKeys(link)) {
|
|
9791
|
+
if (key === "message" || key === "cause" || key === "stack") continue;
|
|
9792
|
+
const descriptor = Object.getOwnPropertyDescriptor(link, key);
|
|
9793
|
+
if (!descriptor) continue;
|
|
9794
|
+
descriptors[key] = typeof key === "string" && CLASSIFIER_IDENTIFIER_FIELDS.has(key) && typeof descriptor.value === "string" || isAuxiliaryAnchor(key, descriptor) || isCreatedBeforeFailureMark(key, descriptor) ? descriptor : maskDescriptorValue(descriptor, maskText);
|
|
9795
|
+
if (descriptors[key] !== descriptor) changed = true;
|
|
9796
|
+
}
|
|
9797
|
+
let cause = Object.getOwnPropertyDescriptor(link, "cause");
|
|
9798
|
+
if (cause && !("value" in cause && cause.value instanceof Error)) {
|
|
9799
|
+
const masked = maskDescriptorValue(cause, maskText);
|
|
9800
|
+
if (masked !== cause) changed = true;
|
|
9801
|
+
cause = masked;
|
|
9802
|
+
}
|
|
9803
|
+
if (message !== link.message || maskedStack !== stack) changed = true;
|
|
9804
|
+
return {
|
|
9805
|
+
message,
|
|
9806
|
+
stack: maskedStack,
|
|
9807
|
+
descriptors,
|
|
9808
|
+
cause
|
|
9809
|
+
};
|
|
9810
|
+
});
|
|
9811
|
+
if (!changed) return error;
|
|
9812
|
+
const clones = /* @__PURE__ */ new Map();
|
|
9813
|
+
for (const [i, original] of chain.entries()) {
|
|
9814
|
+
const { message, stack, descriptors } = links[i];
|
|
9815
|
+
const clone = Object.create(Object.getPrototypeOf(original), descriptors);
|
|
9816
|
+
Object.defineProperty(clone, "message", {
|
|
9817
|
+
value: message,
|
|
9818
|
+
writable: true,
|
|
9819
|
+
enumerable: false,
|
|
9820
|
+
configurable: true
|
|
9821
|
+
});
|
|
9822
|
+
if (stack !== void 0) Object.defineProperty(clone, "stack", {
|
|
9823
|
+
value: stack,
|
|
9824
|
+
writable: true,
|
|
9825
|
+
enumerable: false,
|
|
9826
|
+
configurable: true
|
|
9827
|
+
});
|
|
9828
|
+
clones.set(original, clone);
|
|
9829
|
+
}
|
|
9830
|
+
for (const [i, original] of chain.entries()) {
|
|
9831
|
+
const causeDescriptor = links[i].cause;
|
|
9832
|
+
if (!causeDescriptor) continue;
|
|
9833
|
+
const clone = clones.get(original);
|
|
9834
|
+
const causeValue = original.cause;
|
|
9835
|
+
const replacement = causeValue instanceof Error ? clones.get(causeValue) : void 0;
|
|
9836
|
+
Object.defineProperty(clone, "cause", replacement ? {
|
|
9837
|
+
value: replacement,
|
|
9838
|
+
writable: true,
|
|
9839
|
+
enumerable: causeDescriptor.enumerable === true,
|
|
9840
|
+
configurable: true
|
|
9841
|
+
} : causeDescriptor);
|
|
9842
|
+
}
|
|
9843
|
+
return clones.get(error);
|
|
9844
|
+
}
|
|
9845
|
+
function createSecretMasker(secrets) {
|
|
9846
|
+
return (text) => maskSecretsInText(text, secrets);
|
|
9847
|
+
}
|
|
9848
|
+
|
|
9849
|
+
//#endregion
|
|
9850
|
+
//#region src/deployment/secret-redaction/log-only.ts
|
|
9851
|
+
const logOnlyValuesOf = /* @__PURE__ */ new WeakMap();
|
|
9852
|
+
function recordLogOnlyValue(secrets, plaintext) {
|
|
9853
|
+
if (plaintext === "") return;
|
|
9854
|
+
sideSetOf(logOnlyValuesOf, secrets).add(plaintext);
|
|
9855
|
+
}
|
|
9856
|
+
function carryLogOnlyValues(from, to) {
|
|
9857
|
+
const values = logOnlyValuesOf.get(from);
|
|
9858
|
+
if (values === void 0 || values.size === 0) return;
|
|
9859
|
+
const into = sideSetOf(logOnlyValuesOf, to);
|
|
9860
|
+
for (const value of values) into.add(value);
|
|
9861
|
+
}
|
|
9862
|
+
function carryLogOnlyValuesCarriedBy(from, to, value) {
|
|
9863
|
+
const values = logOnlyValuesOf.get(from);
|
|
9864
|
+
if (values === void 0 || values.size === 0) return;
|
|
9865
|
+
const leaves = printedLeavesOf(value);
|
|
9866
|
+
if (leaves.size === 0) return;
|
|
9867
|
+
for (const needle of values) for (const leaf of leaves) if (leaf === needle || needle.length >= 4 && leaf.includes(needle)) {
|
|
9868
|
+
recordLogOnlyValue(to, needle);
|
|
9869
|
+
break;
|
|
9870
|
+
}
|
|
9871
|
+
carryListElementFragments(values, to, value);
|
|
9872
|
+
}
|
|
9873
|
+
function carryListElementFragments(needles, to, value) {
|
|
9874
|
+
if (!Array.isArray(value) || value.length === 0) return;
|
|
9875
|
+
if (!value.every((e) => typeof e === "string" || typeof e === "number" || typeof e === "boolean")) return;
|
|
9876
|
+
const numeric = value.every((element) => typeof element === "number");
|
|
9877
|
+
const joined = value.map((element) => String(element)).join(",");
|
|
9878
|
+
for (const needle of [...needles]) {
|
|
9879
|
+
const pieces = needle.split(",").map((piece) => piece.trim());
|
|
9880
|
+
if (numeric && pieces.every((piece) => piece === "" || Number.isNaN(Number(piece)))) continue;
|
|
9881
|
+
const fragments = fragmentsOfNeedleIn(joined, ",", pieces.map((piece) => numeric ? String(Number(piece)) : piece).join(","));
|
|
9882
|
+
if (fragments.size === 0) continue;
|
|
9883
|
+
recordLogOnlyValue(to, needle);
|
|
9884
|
+
for (const fragment of fragments) recordLogOnlyValue(to, fragment);
|
|
9885
|
+
}
|
|
9886
|
+
}
|
|
9887
|
+
function recordLogOnlySplitFragments(from, to, text, delimiter, printed) {
|
|
9888
|
+
if (delimiter === "") return;
|
|
9889
|
+
const splits = [text.split(delimiter)];
|
|
9890
|
+
if (printed !== void 0 && (printed.length !== splits[0].length || printed.some((piece, i) => piece !== splits[0][i]))) splits.push(printed);
|
|
9891
|
+
for (const bag of from) {
|
|
9892
|
+
if (bag === void 0) continue;
|
|
9893
|
+
for (const needle of [...logOnlyValuesOf.get(bag) ?? []]) for (const pieces of splits) for (const fragment of fragmentsOfNeedleIn(text, delimiter, needle, pieces)) if (fragment !== needle) recordLogOnlyValue(to, fragment);
|
|
9894
|
+
}
|
|
9895
|
+
}
|
|
9896
|
+
function fragmentsOfNeedleIn(text, delimiter, needle, pieces = text.split(delimiter)) {
|
|
9897
|
+
const fragments = /* @__PURE__ */ new Set();
|
|
9898
|
+
if (needle === "") return fragments;
|
|
9899
|
+
const starts = [];
|
|
9900
|
+
if (text === needle) starts.push(0);
|
|
9901
|
+
else if (needle.length >= 4) for (let at = text.indexOf(needle); at !== -1; at = text.indexOf(needle, at + 1)) starts.push(at);
|
|
9902
|
+
if (starts.length === 0) return fragments;
|
|
9903
|
+
const spans = [];
|
|
9904
|
+
let offset = 0;
|
|
9905
|
+
for (const piece of pieces) {
|
|
9906
|
+
spans.push([offset, offset + piece.length]);
|
|
9907
|
+
offset += piece.length + delimiter.length;
|
|
9908
|
+
}
|
|
9909
|
+
for (const start of starts) {
|
|
9910
|
+
const end = start + needle.length;
|
|
9911
|
+
for (const [pieceStart, pieceEnd] of spans) {
|
|
9912
|
+
const from = Math.max(pieceStart, start);
|
|
9913
|
+
const to = Math.min(pieceEnd, end);
|
|
9914
|
+
if (from < to) fragments.add(text.slice(from, to));
|
|
9915
|
+
}
|
|
9916
|
+
}
|
|
9917
|
+
return fragments;
|
|
9918
|
+
}
|
|
9919
|
+
function printedLeavesOf(value) {
|
|
9920
|
+
const leaves = wholeStringLeavesOf(value);
|
|
9921
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9922
|
+
const walk = (node) => {
|
|
9923
|
+
if (typeof node === "number" || typeof node === "boolean") {
|
|
9924
|
+
leaves.add(String(node));
|
|
9925
|
+
return;
|
|
9926
|
+
}
|
|
9927
|
+
if (node === null || typeof node !== "object") return;
|
|
9928
|
+
if (seen.has(node)) return;
|
|
9929
|
+
seen.add(node);
|
|
9930
|
+
for (const child of Array.isArray(node) ? node : Object.values(node)) walk(child);
|
|
9931
|
+
};
|
|
9932
|
+
walk(value);
|
|
9933
|
+
return leaves;
|
|
9934
|
+
}
|
|
9935
|
+
function shareLogOnlyValues(view, target) {
|
|
9936
|
+
logOnlyValuesOf.set(view, sideSetOf(logOnlyValuesOf, target));
|
|
9937
|
+
}
|
|
9938
|
+
function recordLogOnlyParameterValue(secrets, value, splitDelimiters) {
|
|
9939
|
+
const record = (leaf) => {
|
|
9940
|
+
const spelled = typeof leaf === "string" ? leaf : typeof leaf === "number" || typeof leaf === "boolean" ? String(leaf) : void 0;
|
|
9941
|
+
if (spelled === void 0) return;
|
|
9942
|
+
recordLogOnlyValue(secrets, spelled);
|
|
9943
|
+
for (const delimiter of splitDelimiters ?? []) {
|
|
9944
|
+
if (delimiter === "" || !spelled.includes(delimiter)) continue;
|
|
9945
|
+
for (const piece of spelled.split(delimiter)) recordLogOnlyValue(secrets, piece);
|
|
9946
|
+
}
|
|
9947
|
+
};
|
|
9948
|
+
if (Array.isArray(value)) {
|
|
9949
|
+
for (const element of value) record(element);
|
|
9950
|
+
record(value.map((element) => String(element)).join(","));
|
|
9951
|
+
return;
|
|
9952
|
+
}
|
|
9953
|
+
record(value);
|
|
9954
|
+
}
|
|
9955
|
+
function literalSplitDelimitersOf(template, parameters) {
|
|
9956
|
+
const delimiters = /* @__PURE__ */ new Set();
|
|
9957
|
+
if (parameters.size === 0) return delimiters;
|
|
9958
|
+
const reads = (node, seen) => {
|
|
9959
|
+
if (typeof node === "string") {
|
|
9960
|
+
for (const name of parameters) if (node.includes(`\${${name}}`)) return true;
|
|
9961
|
+
return false;
|
|
9962
|
+
}
|
|
9963
|
+
if (node === null || typeof node !== "object" || seen.has(node)) return false;
|
|
9964
|
+
seen.add(node);
|
|
9965
|
+
if (!Array.isArray(node)) {
|
|
9966
|
+
const ref = node["Ref"];
|
|
9967
|
+
if (typeof ref === "string" && parameters.has(ref)) return true;
|
|
9968
|
+
}
|
|
9969
|
+
for (const child of Array.isArray(node) ? node : Object.values(node)) if (reads(child, seen)) return true;
|
|
9970
|
+
return false;
|
|
9971
|
+
};
|
|
9972
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9973
|
+
const walk = (node) => {
|
|
9974
|
+
if (node === null || typeof node !== "object" || seen.has(node)) return;
|
|
9975
|
+
seen.add(node);
|
|
9976
|
+
if (Array.isArray(node)) {
|
|
9977
|
+
for (const child of node) walk(child);
|
|
9978
|
+
return;
|
|
9979
|
+
}
|
|
9980
|
+
for (const [key, child] of Object.entries(node)) {
|
|
9981
|
+
if (key === "Fn::Split" && Array.isArray(child) && typeof child[0] === "string" && reads(child[1], /* @__PURE__ */ new Set())) delimiters.add(child[0]);
|
|
9982
|
+
walk(child);
|
|
9983
|
+
}
|
|
9984
|
+
};
|
|
9985
|
+
walk(template);
|
|
9986
|
+
return delimiters;
|
|
9987
|
+
}
|
|
9988
|
+
function printingCorpusOf(secrets) {
|
|
9989
|
+
const logOnly = logOnlyValuesOf.get(secrets);
|
|
9990
|
+
if (logOnly === void 0 || logOnly.size === 0) return secrets;
|
|
9991
|
+
const corpus = new Map(secrets);
|
|
9992
|
+
for (const needle of logOnly) if (!corpus.has(needle)) corpus.set(needle, "***");
|
|
9993
|
+
return corpus;
|
|
9994
|
+
}
|
|
9995
|
+
function logOnlyValueCount(secrets) {
|
|
9996
|
+
return logOnlyValuesOf.get(secrets)?.size ?? 0;
|
|
9997
|
+
}
|
|
9998
|
+
function unionOfSecretBags(bags) {
|
|
9999
|
+
const union = /* @__PURE__ */ new Map();
|
|
10000
|
+
for (const bag of bags) {
|
|
10001
|
+
if (bag === void 0) continue;
|
|
10002
|
+
for (const [plaintext, expression] of bag) if (!union.has(plaintext)) union.set(plaintext, expression);
|
|
10003
|
+
carryLogOnlyValues(bag, union);
|
|
10004
|
+
}
|
|
10005
|
+
return union;
|
|
10006
|
+
}
|
|
10007
|
+
function createUnionSecretMasker(bags) {
|
|
10008
|
+
const present = bags.filter((bag) => bag !== void 0);
|
|
10009
|
+
let stamp;
|
|
10010
|
+
let needles = /* @__PURE__ */ new Set();
|
|
10011
|
+
let scanned = [];
|
|
10012
|
+
return (text) => {
|
|
10013
|
+
const now = present.map((bag) => `${bag.size}:${logOnlyValueCount(bag)}`).join(",");
|
|
10014
|
+
if (now !== stamp) {
|
|
10015
|
+
needles = /* @__PURE__ */ new Set();
|
|
10016
|
+
for (const bag of present) {
|
|
10017
|
+
for (const plaintext of bag.keys()) needles.add(plaintext);
|
|
10018
|
+
for (const plaintext of logOnlyValuesOf.get(bag) ?? []) needles.add(plaintext);
|
|
10019
|
+
}
|
|
10020
|
+
scanned = printingNeedles(needles);
|
|
10021
|
+
stamp = now;
|
|
10022
|
+
}
|
|
10023
|
+
if (text !== "" && needles.has(text)) return "***";
|
|
10024
|
+
return maskMatchSpans(text, scanned, "***");
|
|
10025
|
+
};
|
|
10026
|
+
}
|
|
10027
|
+
function hasLogOnlyValues(secrets) {
|
|
10028
|
+
if (secrets === void 0) return false;
|
|
10029
|
+
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10030
|
+
return logOnly !== void 0 && logOnly.size > 0;
|
|
10031
|
+
}
|
|
10032
|
+
function hasMaskableValues(secrets) {
|
|
10033
|
+
if (secrets === void 0) return false;
|
|
10034
|
+
if (secrets.size > 0) return true;
|
|
10035
|
+
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10036
|
+
return logOnly !== void 0 && logOnly.size > 0;
|
|
10037
|
+
}
|
|
10038
|
+
|
|
10039
|
+
//#endregion
|
|
10040
|
+
//#region src/deployment/secret-redaction/reference-provenance.ts
|
|
10041
|
+
const passProvenanceOf = /* @__PURE__ */ new WeakMap();
|
|
10042
|
+
const MAX_REFERENCE_VERSIONS = 8;
|
|
10043
|
+
function provenanceTableFor(secrets) {
|
|
10044
|
+
let table = passProvenanceOf.get(secrets);
|
|
10045
|
+
if (table === void 0) {
|
|
10046
|
+
table = /* @__PURE__ */ new Map();
|
|
10047
|
+
passProvenanceOf.set(secrets, table);
|
|
10048
|
+
}
|
|
10049
|
+
return table;
|
|
10050
|
+
}
|
|
10051
|
+
function shareReferenceProvenance(view, pass) {
|
|
10052
|
+
passProvenanceOf.set(view, provenanceTableFor(pass));
|
|
10053
|
+
}
|
|
10054
|
+
function entryFor(secrets, token) {
|
|
10055
|
+
const table = provenanceTableFor(secrets);
|
|
10056
|
+
let entry = table.get(token);
|
|
10057
|
+
if (entry === void 0) {
|
|
10058
|
+
entry = {
|
|
10059
|
+
regions: /* @__PURE__ */ new Set(),
|
|
10060
|
+
regionUnknown: false,
|
|
10061
|
+
versions: /* @__PURE__ */ new Set(),
|
|
10062
|
+
versionUnknown: false,
|
|
10063
|
+
readVersions: /* @__PURE__ */ new Set()
|
|
10064
|
+
};
|
|
10065
|
+
table.set(token, entry);
|
|
10066
|
+
}
|
|
10067
|
+
return entry;
|
|
10068
|
+
}
|
|
10069
|
+
function recordReferenceResolution(secrets, token, resolution) {
|
|
10070
|
+
const entry = entryFor(secrets, token);
|
|
10071
|
+
if (resolution.region === void 0) entry.regionUnknown = true;
|
|
10072
|
+
else entry.regions.add(resolution.region);
|
|
10073
|
+
if (resolution.version === void 0) {
|
|
10074
|
+
entry.versionUnknown = true;
|
|
10075
|
+
return;
|
|
10076
|
+
}
|
|
10077
|
+
entry.versions.add(resolution.version);
|
|
10078
|
+
if (resolution.route === "read") entry.readVersions.add(resolution.version);
|
|
10079
|
+
}
|
|
10080
|
+
function recordReferenceProvenanceEntry(secrets, token, provenance, route) {
|
|
10081
|
+
const entry = entryFor(secrets, token);
|
|
10082
|
+
if (provenance.region === void 0) entry.regionUnknown = true;
|
|
10083
|
+
else entry.regions.add(provenance.region);
|
|
10084
|
+
if (provenance.versions === void 0 || provenance.versions.length === 0) {
|
|
10085
|
+
entry.versionUnknown = true;
|
|
10086
|
+
return;
|
|
10087
|
+
}
|
|
10088
|
+
for (const version of provenance.versions) {
|
|
10089
|
+
entry.versions.add(version);
|
|
10090
|
+
if (route === "read") entry.readVersions.add(version);
|
|
10091
|
+
}
|
|
10092
|
+
if (route === "literal") for (const version of provenance.readVersions ?? []) entry.readVersions.add(version);
|
|
10093
|
+
}
|
|
10094
|
+
function mergeReferenceProvenance(from, to) {
|
|
10095
|
+
const source = passProvenanceOf.get(from);
|
|
10096
|
+
if (source === void 0 || from === to) return;
|
|
10097
|
+
for (const [token, entry] of source) {
|
|
10098
|
+
const target = entryFor(to, token);
|
|
10099
|
+
for (const region of entry.regions) target.regions.add(region);
|
|
10100
|
+
target.regionUnknown ||= entry.regionUnknown;
|
|
10101
|
+
for (const version of entry.versions) target.versions.add(version);
|
|
10102
|
+
target.versionUnknown ||= entry.versionUnknown;
|
|
10103
|
+
for (const version of entry.readVersions) target.readVersions.add(version);
|
|
10104
|
+
}
|
|
10105
|
+
}
|
|
10106
|
+
function hasPassProvenance(secrets) {
|
|
10107
|
+
if (secrets === void 0) return false;
|
|
10108
|
+
const table = passProvenanceOf.get(secrets);
|
|
10109
|
+
return table !== void 0 && table.size > 0;
|
|
10110
|
+
}
|
|
10111
|
+
function passProvenanceFor(secrets, token) {
|
|
10112
|
+
if (secrets === void 0) return void 0;
|
|
10113
|
+
const entry = passProvenanceOf.get(secrets)?.get(token);
|
|
10114
|
+
if (entry === void 0) return void 0;
|
|
10115
|
+
return finalize(entry);
|
|
10116
|
+
}
|
|
10117
|
+
function passReadVersionsFor(secrets, token) {
|
|
10118
|
+
if (secrets === void 0) return void 0;
|
|
10119
|
+
const read = passProvenanceOf.get(secrets)?.get(token)?.readVersions;
|
|
10120
|
+
return read === void 0 || read.size === 0 ? void 0 : read;
|
|
10121
|
+
}
|
|
10122
|
+
function finalize(entry) {
|
|
10123
|
+
const out = {};
|
|
10124
|
+
if (!entry.regionUnknown && entry.regions.size === 1) out.region = [...entry.regions][0];
|
|
10125
|
+
if (!entry.versionUnknown && entry.versions.size > 0 && entry.versions.size <= 8) {
|
|
10126
|
+
out.versions = [...entry.versions].sort();
|
|
10127
|
+
if (entry.readVersions.size > 0) out.readVersions = [...entry.readVersions].sort();
|
|
10128
|
+
}
|
|
10129
|
+
return out;
|
|
10130
|
+
}
|
|
10131
|
+
function snapshotPassProvenance(secrets) {
|
|
10132
|
+
if (secrets === void 0) return void 0;
|
|
10133
|
+
const table = passProvenanceOf.get(secrets);
|
|
10134
|
+
if (table === void 0 || table.size === 0) return void 0;
|
|
10135
|
+
const out = /* @__PURE__ */ new Map();
|
|
10136
|
+
for (const [token, entry] of table) out.set(token, finalize(entry));
|
|
10137
|
+
return out;
|
|
10138
|
+
}
|
|
10139
|
+
|
|
10140
|
+
//#endregion
|
|
10141
|
+
//#region src/deployment/secret-redaction/recording.ts
|
|
10142
|
+
const scopeMaps = /* @__PURE__ */ new WeakSet();
|
|
10143
|
+
var WriteThroughSecrets = class extends Map {
|
|
10144
|
+
pass;
|
|
10145
|
+
constructor(pass) {
|
|
10146
|
+
super();
|
|
10147
|
+
this.pass = pass;
|
|
10148
|
+
}
|
|
10149
|
+
set(plaintext, expression) {
|
|
10150
|
+
super.set(plaintext, expression);
|
|
10151
|
+
this.pass.set(plaintext, expression);
|
|
10152
|
+
return this;
|
|
10153
|
+
}
|
|
10154
|
+
};
|
|
10155
|
+
function openRecordingScope(pass, policy) {
|
|
10156
|
+
const secrets = new WriteThroughSecrets(pass);
|
|
10157
|
+
scopeMaps.add(secrets);
|
|
10158
|
+
shareLogOnlyValues(secrets, pass);
|
|
10159
|
+
for (const [kind, share] of Object.entries(SCOPE_SHARERS)) if (policy[kind] === "carry") share(secrets, pass);
|
|
10160
|
+
return {
|
|
10161
|
+
secrets,
|
|
10162
|
+
pass
|
|
10163
|
+
};
|
|
10164
|
+
}
|
|
10165
|
+
const SCOPE_SHARERS = {
|
|
10166
|
+
pairs: sharePairTable,
|
|
10167
|
+
"mask-only-marks": (scope, pass) => {
|
|
10168
|
+
for (const table of [
|
|
10169
|
+
freshNoEchoValuesOf,
|
|
10170
|
+
containmentValuesOf,
|
|
10171
|
+
noEchoParameterValuesOf
|
|
10172
|
+
]) table.set(scope, sideSetOf(table, pass));
|
|
10173
|
+
},
|
|
10174
|
+
"reference-provenance": shareReferenceProvenance,
|
|
10175
|
+
"physical-name-copies": (scope, pass) => {
|
|
10176
|
+
physicalNameCopiesOf.set(scope, sideSetOf(physicalNameCopiesOf, pass));
|
|
10177
|
+
},
|
|
10178
|
+
"public-proofs": sharePublicProofs
|
|
10179
|
+
};
|
|
10180
|
+
function isRecordingScope(secrets) {
|
|
10181
|
+
return scopeMaps.has(secrets);
|
|
10182
|
+
}
|
|
10183
|
+
function foldRecording(from, to, policy) {
|
|
10184
|
+
if (from === to) return;
|
|
10185
|
+
for (const [plaintext, expression] of from) to.set(plaintext, expression);
|
|
10186
|
+
for (const [kind, carry] of Object.entries(FOLD_CARRIERS)) if (policy[kind] === "carry") carry(from, to);
|
|
10187
|
+
}
|
|
10188
|
+
const FOLD_CARRIERS = {
|
|
10189
|
+
"mask-only-marks": carryMaskOnlyMarks,
|
|
10190
|
+
"reference-provenance": mergeReferenceProvenance,
|
|
10191
|
+
pairs: mergePairTables,
|
|
10192
|
+
"log-only": carryLogOnlyValues,
|
|
10193
|
+
"physical-name-copies": (from, to) => {
|
|
10194
|
+
for (const physicalId of physicalNameCopiesOf.get(from) ?? []) recordPhysicalNameCopy(to, physicalId);
|
|
10195
|
+
},
|
|
10196
|
+
"public-proofs": carryPublicProofs
|
|
10197
|
+
};
|
|
10198
|
+
function recordSecretResolution(secrets, expression, plaintext, options) {
|
|
10199
|
+
secrets.set(plaintext, expression);
|
|
10200
|
+
if (options.pairEvidence) recordResolvedPair(secrets, expression, plaintext);
|
|
10201
|
+
}
|
|
10202
|
+
|
|
9630
10203
|
//#endregion
|
|
9631
10204
|
//#region src/deployment/secret-redaction/context.ts
|
|
9632
10205
|
const RULES_BY_PROVENANCE = {
|
|
@@ -9638,16 +10211,21 @@ const RULES_BY_PROVENANCE = {
|
|
|
9638
10211
|
"state-derived": STATE_DERIVED_RULES
|
|
9639
10212
|
};
|
|
9640
10213
|
function redactForState(bag, context) {
|
|
10214
|
+
refuseScopeAsPass(context.secrets);
|
|
9641
10215
|
if (context.provenance === "value-scan") return redactSecretsForState(bag, context.secrets);
|
|
9642
10216
|
const { secrets, source, provenance } = context;
|
|
9643
|
-
if (!((context.provenance === "template-derived" || context.provenance === "template-sourced") && context.generation === "same-generation") || !isPlainBag(bag)) return redactAtProvenance(bag, secrets, source, provenance, false);
|
|
10217
|
+
if (!((context.provenance === "template-derived" || context.provenance === "template-sourced" || context.provenance === "state-derived") && context.generation === "same-generation") || !isPlainBag(bag)) return redactAtProvenance(bag, secrets, source, provenance, false);
|
|
9644
10218
|
const copy = shallowCopy(bag);
|
|
9645
10219
|
const redacted = redactAtProvenance(copy, secrets, source, provenance, true);
|
|
9646
10220
|
return redacted === copy ? shallowCopy(copy) : redacted;
|
|
9647
10221
|
}
|
|
9648
10222
|
function redactAtProvenance(bag, secrets, source, provenance, sameGeneration) {
|
|
10223
|
+
refuseScopeAsPass(secrets);
|
|
9649
10224
|
return redactSecretsForState(bag, secrets, source, RULES_BY_PROVENANCE[provenance], sameGeneration);
|
|
9650
10225
|
}
|
|
10226
|
+
function refuseScopeAsPass(secrets) {
|
|
10227
|
+
if (isRecordingScope(secrets)) throw new Error("Internal error: a bag was redacted for persistence with a recording scope; pass the scope's pass map instead.");
|
|
10228
|
+
}
|
|
9651
10229
|
function isPlainBag(bag) {
|
|
9652
10230
|
if (Array.isArray(bag)) return true;
|
|
9653
10231
|
if (bag === null || typeof bag !== "object") return false;
|
|
@@ -9763,7 +10341,13 @@ function singleSpanFrame(bag, source) {
|
|
|
9763
10341
|
function positionByEmbeddedSpan(bag, source, secrets, bagIsSameGeneration) {
|
|
9764
10342
|
const frame = singleSpanFrame(bag, source);
|
|
9765
10343
|
if (frame === void 0) {
|
|
9766
|
-
if (dynamicReferenceSpans(source).length >= 2
|
|
10344
|
+
if (dynamicReferenceSpans(source).length >= 2) {
|
|
10345
|
+
if (certifiesRenderedLiteral(bag, source, secrets, bagIsSameGeneration)) return source;
|
|
10346
|
+
if (bagIsSameGeneration) {
|
|
10347
|
+
const mixed = certifiedMixedLiteral(bag, source, secrets);
|
|
10348
|
+
if (mixed !== void 0) return mixed;
|
|
10349
|
+
}
|
|
10350
|
+
}
|
|
9767
10351
|
return redactForState(bag, {
|
|
9768
10352
|
provenance: "value-scan",
|
|
9769
10353
|
secrets
|
|
@@ -9835,6 +10419,71 @@ function certifiesRenderedLiteral(bag, source, secrets, bagIsSameGeneration) {
|
|
|
9835
10419
|
if (!bagIsSameGeneration) return false;
|
|
9836
10420
|
return scanned === renderSpans(source, spans, (i) => spans[i].plaintext.length >= 4 ? survivors[i] : spans[i].plaintext);
|
|
9837
10421
|
}
|
|
10422
|
+
function certifiedMixedLiteral(bag, source, secrets) {
|
|
10423
|
+
if (legacyMixedScan.has(secrets)) return void 0;
|
|
10424
|
+
const answer = certifyMixedLiteral(bag, source, secrets);
|
|
10425
|
+
if (answer !== void 0) mixedAnswered.add(secrets);
|
|
10426
|
+
return answer;
|
|
10427
|
+
}
|
|
10428
|
+
const mixedAnswered = /* @__PURE__ */ new WeakSet();
|
|
10429
|
+
const legacyMixedScan = /* @__PURE__ */ new WeakSet();
|
|
10430
|
+
function mixedLiteralAnswered(secrets) {
|
|
10431
|
+
return mixedAnswered.has(secrets);
|
|
10432
|
+
}
|
|
10433
|
+
function withLegacyMixedScan(secrets, run) {
|
|
10434
|
+
if (legacyMixedScan.has(secrets)) return run();
|
|
10435
|
+
legacyMixedScan.add(secrets);
|
|
10436
|
+
try {
|
|
10437
|
+
return run();
|
|
10438
|
+
} finally {
|
|
10439
|
+
legacyMixedScan.delete(secrets);
|
|
10440
|
+
}
|
|
10441
|
+
}
|
|
10442
|
+
function certifyMixedLiteral(bag, source, secrets) {
|
|
10443
|
+
const spans = dynamicReferenceSpans(source);
|
|
10444
|
+
const parts = [];
|
|
10445
|
+
for (const span of spans) {
|
|
10446
|
+
const token = source.slice(span.start, span.end);
|
|
10447
|
+
const plaintext = resolvedPlaintextOf(secrets, token);
|
|
10448
|
+
if (plaintext !== void 0) {
|
|
10449
|
+
if (plaintext === "" || isSingleDynamicReferenceToken(plaintext)) return void 0;
|
|
10450
|
+
const survivor = secrets.get(plaintext);
|
|
10451
|
+
if (survivor === void 0) return void 0;
|
|
10452
|
+
parts.push({
|
|
10453
|
+
kind: "secret",
|
|
10454
|
+
plaintext,
|
|
10455
|
+
survivor
|
|
10456
|
+
});
|
|
10457
|
+
continue;
|
|
10458
|
+
}
|
|
10459
|
+
const value = provenPublicValue(secrets, token);
|
|
10460
|
+
if (value === void 0 || value === "" || value.includes("{{resolve:")) return void 0;
|
|
10461
|
+
parts.push({
|
|
10462
|
+
kind: "public",
|
|
10463
|
+
value
|
|
10464
|
+
});
|
|
10465
|
+
}
|
|
10466
|
+
const secretParts = parts.filter((p) => p.kind === "secret");
|
|
10467
|
+
const publicParts = parts.filter((p) => p.kind === "public");
|
|
10468
|
+
if (secretParts.length === 0 || publicParts.length === 0) return void 0;
|
|
10469
|
+
const textOf = (secret) => (i) => {
|
|
10470
|
+
const part = parts[i];
|
|
10471
|
+
return part.kind === "secret" ? secret(part) : part.value;
|
|
10472
|
+
};
|
|
10473
|
+
if (renderSpans(source, spans, textOf((p) => p.plaintext)) !== bag) return void 0;
|
|
10474
|
+
if (redactForState(source, {
|
|
10475
|
+
provenance: "value-scan",
|
|
10476
|
+
secrets
|
|
10477
|
+
}) !== source) return void 0;
|
|
10478
|
+
if (redactForState(bag, {
|
|
10479
|
+
provenance: "value-scan",
|
|
10480
|
+
secrets
|
|
10481
|
+
}) !== renderSpans(source, spans, textOf((p) => p.plaintext.length >= 4 ? p.survivor : p.plaintext))) return void 0;
|
|
10482
|
+
return renderSpans(source, spans, (i) => {
|
|
10483
|
+
const part = parts[i];
|
|
10484
|
+
return part.kind === "secret" ? source.slice(spans[i].start, spans[i].end) : part.value;
|
|
10485
|
+
});
|
|
10486
|
+
}
|
|
9838
10487
|
function writeFramedTokenWithinScanBound(bag, secrets, frame, bagIsSameGeneration) {
|
|
9839
10488
|
const scanned = redactForState(bag, {
|
|
9840
10489
|
provenance: "value-scan",
|
|
@@ -9880,100 +10529,6 @@ function positionByIntrinsicFrame(bag, source, secrets, secretExpressions, bagIs
|
|
|
9880
10529
|
}, bagIsSameGeneration);
|
|
9881
10530
|
}
|
|
9882
10531
|
|
|
9883
|
-
//#endregion
|
|
9884
|
-
//#region src/deployment/secret-redaction/reference-provenance.ts
|
|
9885
|
-
const passProvenanceOf = /* @__PURE__ */ new WeakMap();
|
|
9886
|
-
const MAX_REFERENCE_VERSIONS = 8;
|
|
9887
|
-
function entryFor(secrets, token) {
|
|
9888
|
-
let table = passProvenanceOf.get(secrets);
|
|
9889
|
-
if (table === void 0) {
|
|
9890
|
-
table = /* @__PURE__ */ new Map();
|
|
9891
|
-
passProvenanceOf.set(secrets, table);
|
|
9892
|
-
}
|
|
9893
|
-
let entry = table.get(token);
|
|
9894
|
-
if (entry === void 0) {
|
|
9895
|
-
entry = {
|
|
9896
|
-
regions: /* @__PURE__ */ new Set(),
|
|
9897
|
-
regionUnknown: false,
|
|
9898
|
-
versions: /* @__PURE__ */ new Set(),
|
|
9899
|
-
versionUnknown: false,
|
|
9900
|
-
readVersions: /* @__PURE__ */ new Set()
|
|
9901
|
-
};
|
|
9902
|
-
table.set(token, entry);
|
|
9903
|
-
}
|
|
9904
|
-
return entry;
|
|
9905
|
-
}
|
|
9906
|
-
function recordReferenceResolution(secrets, token, resolution) {
|
|
9907
|
-
const entry = entryFor(secrets, token);
|
|
9908
|
-
if (resolution.region === void 0) entry.regionUnknown = true;
|
|
9909
|
-
else entry.regions.add(resolution.region);
|
|
9910
|
-
if (resolution.version === void 0) {
|
|
9911
|
-
entry.versionUnknown = true;
|
|
9912
|
-
return;
|
|
9913
|
-
}
|
|
9914
|
-
entry.versions.add(resolution.version);
|
|
9915
|
-
if (resolution.route === "read") entry.readVersions.add(resolution.version);
|
|
9916
|
-
}
|
|
9917
|
-
function recordReferenceProvenanceEntry(secrets, token, provenance, route) {
|
|
9918
|
-
const entry = entryFor(secrets, token);
|
|
9919
|
-
if (provenance.region === void 0) entry.regionUnknown = true;
|
|
9920
|
-
else entry.regions.add(provenance.region);
|
|
9921
|
-
if (provenance.versions === void 0 || provenance.versions.length === 0) {
|
|
9922
|
-
entry.versionUnknown = true;
|
|
9923
|
-
return;
|
|
9924
|
-
}
|
|
9925
|
-
for (const version of provenance.versions) {
|
|
9926
|
-
entry.versions.add(version);
|
|
9927
|
-
if (route === "read") entry.readVersions.add(version);
|
|
9928
|
-
}
|
|
9929
|
-
if (route === "literal") for (const version of provenance.readVersions ?? []) entry.readVersions.add(version);
|
|
9930
|
-
}
|
|
9931
|
-
function mergeReferenceProvenance(from, to) {
|
|
9932
|
-
const source = passProvenanceOf.get(from);
|
|
9933
|
-
if (source === void 0 || from === to) return;
|
|
9934
|
-
for (const [token, entry] of source) {
|
|
9935
|
-
const target = entryFor(to, token);
|
|
9936
|
-
for (const region of entry.regions) target.regions.add(region);
|
|
9937
|
-
target.regionUnknown ||= entry.regionUnknown;
|
|
9938
|
-
for (const version of entry.versions) target.versions.add(version);
|
|
9939
|
-
target.versionUnknown ||= entry.versionUnknown;
|
|
9940
|
-
for (const version of entry.readVersions) target.readVersions.add(version);
|
|
9941
|
-
}
|
|
9942
|
-
}
|
|
9943
|
-
function hasPassProvenance(secrets) {
|
|
9944
|
-
if (secrets === void 0) return false;
|
|
9945
|
-
const table = passProvenanceOf.get(secrets);
|
|
9946
|
-
return table !== void 0 && table.size > 0;
|
|
9947
|
-
}
|
|
9948
|
-
function passProvenanceFor(secrets, token) {
|
|
9949
|
-
if (secrets === void 0) return void 0;
|
|
9950
|
-
const entry = passProvenanceOf.get(secrets)?.get(token);
|
|
9951
|
-
if (entry === void 0) return void 0;
|
|
9952
|
-
return finalize(entry);
|
|
9953
|
-
}
|
|
9954
|
-
function passReadVersionsFor(secrets, token) {
|
|
9955
|
-
if (secrets === void 0) return void 0;
|
|
9956
|
-
const read = passProvenanceOf.get(secrets)?.get(token)?.readVersions;
|
|
9957
|
-
return read === void 0 || read.size === 0 ? void 0 : read;
|
|
9958
|
-
}
|
|
9959
|
-
function finalize(entry) {
|
|
9960
|
-
const out = {};
|
|
9961
|
-
if (!entry.regionUnknown && entry.regions.size === 1) out.region = [...entry.regions][0];
|
|
9962
|
-
if (!entry.versionUnknown && entry.versions.size > 0 && entry.versions.size <= 8) {
|
|
9963
|
-
out.versions = [...entry.versions].sort();
|
|
9964
|
-
if (entry.readVersions.size > 0) out.readVersions = [...entry.readVersions].sort();
|
|
9965
|
-
}
|
|
9966
|
-
return out;
|
|
9967
|
-
}
|
|
9968
|
-
function snapshotPassProvenance(secrets) {
|
|
9969
|
-
if (secrets === void 0) return void 0;
|
|
9970
|
-
const table = passProvenanceOf.get(secrets);
|
|
9971
|
-
if (table === void 0 || table.size === 0) return void 0;
|
|
9972
|
-
const out = /* @__PURE__ */ new Map();
|
|
9973
|
-
for (const [token, entry] of table) out.set(token, finalize(entry));
|
|
9974
|
-
return out;
|
|
9975
|
-
}
|
|
9976
|
-
|
|
9977
10532
|
//#endregion
|
|
9978
10533
|
//#region src/deployment/secret-redaction/pairs.ts
|
|
9979
10534
|
const resolvedPairsOf = /* @__PURE__ */ new WeakMap();
|
|
@@ -9995,11 +10550,17 @@ function recordResolvedPair(secrets, expression, plaintext) {
|
|
|
9995
10550
|
function mergeResolvedPairs(from, to) {
|
|
9996
10551
|
carryMaskOnlyMarks(from, to);
|
|
9997
10552
|
mergeReferenceProvenance(from, to);
|
|
10553
|
+
mergePairTables(from, to);
|
|
10554
|
+
}
|
|
10555
|
+
function mergePairTables(from, to) {
|
|
9998
10556
|
const pairs = resolvedPairsOf.get(from);
|
|
9999
10557
|
if (pairs === void 0) return;
|
|
10000
10558
|
for (const [expression, plaintext] of pairs) if (typeof plaintext === "string") recordResolvedPair(to, expression, plaintext);
|
|
10001
10559
|
else pairsFor(to).set(expression, CONFLICTING_PLAINTEXT);
|
|
10002
10560
|
}
|
|
10561
|
+
function sharePairTable(view, pass) {
|
|
10562
|
+
resolvedPairsOf.set(view, pairsFor(pass));
|
|
10563
|
+
}
|
|
10003
10564
|
function resolvedPlaintextOf(secrets, expression) {
|
|
10004
10565
|
const recorded = resolvedPairsOf.get(secrets)?.get(expression);
|
|
10005
10566
|
return typeof recorded === "string" ? recorded : void 0;
|
|
@@ -10083,397 +10644,21 @@ function markSameGenerationBag(bag) {
|
|
|
10083
10644
|
function isSameGenerationBag(bag) {
|
|
10084
10645
|
return sameGenerationBags.has(bag);
|
|
10085
10646
|
}
|
|
10086
|
-
|
|
10087
|
-
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10091
|
-
const noLogOnly = logOnly === void 0 || logOnly.size === 0;
|
|
10092
|
-
if (secrets.size === 0 && noLogOnly) return text;
|
|
10093
|
-
if (text !== "" && (secrets.has(text) || logOnly?.has(text) === true)) return "***";
|
|
10094
|
-
return maskMatchSpans(text, printingNeedles(noLogOnly ? secrets.keys() : [...secrets.keys(), ...logOnly]), "***");
|
|
10095
|
-
}
|
|
10096
|
-
function maskRecordedSecretsInText(text, secrets) {
|
|
10097
|
-
if (secrets.size === 0) return text;
|
|
10098
|
-
if (text !== "" && secrets.has(text)) return "***";
|
|
10099
|
-
return maskMatchSpans(text, substringNeedles(secrets.keys()), "***");
|
|
10100
|
-
}
|
|
10101
|
-
function substringNeedles(values) {
|
|
10102
|
-
return [...new Set(values)].filter((value) => value.length >= 4);
|
|
10103
|
-
}
|
|
10104
|
-
const ERROR_CAUSE_MASK_MAX_DEPTH = 20;
|
|
10105
|
-
function errorCauseChain(root) {
|
|
10106
|
-
const chain = [];
|
|
10107
|
-
const seen = /* @__PURE__ */ new Set();
|
|
10108
|
-
let current = root;
|
|
10109
|
-
while (current instanceof Error && !seen.has(current) && chain.length < 20) {
|
|
10110
|
-
seen.add(current);
|
|
10111
|
-
chain.push(current);
|
|
10112
|
-
current = current.cause;
|
|
10113
|
-
}
|
|
10114
|
-
return chain;
|
|
10115
|
-
}
|
|
10116
|
-
function readStack(error) {
|
|
10117
|
-
try {
|
|
10118
|
-
const stack = error.stack;
|
|
10119
|
-
return typeof stack === "string" ? stack : void 0;
|
|
10120
|
-
} catch {
|
|
10121
|
-
return;
|
|
10122
|
-
}
|
|
10123
|
-
}
|
|
10124
|
-
function maskDescriptorValue(descriptor, maskText) {
|
|
10125
|
-
if (!("value" in descriptor)) return descriptor;
|
|
10126
|
-
const value = maskErrorFieldValue(descriptor.value, maskText);
|
|
10127
|
-
return value === descriptor.value ? descriptor : {
|
|
10128
|
-
...descriptor,
|
|
10129
|
-
value
|
|
10130
|
-
};
|
|
10131
|
-
}
|
|
10132
|
-
const CLASSIFIER_IDENTIFIER_FIELDS = /* @__PURE__ */ new Set([
|
|
10133
|
-
"name",
|
|
10134
|
-
"code",
|
|
10135
|
-
"Code",
|
|
10136
|
-
"__type",
|
|
10137
|
-
"ccErrorCode",
|
|
10138
|
-
"ccOperation"
|
|
10139
|
-
]);
|
|
10140
|
-
function isAuxiliaryAnchor(key, descriptor) {
|
|
10141
|
-
return key === "logicalId" && descriptor.enumerable === false && descriptor.writable === false && typeof descriptor.value === "string" && descriptor.value.endsWith("/auxiliary");
|
|
10142
|
-
}
|
|
10143
|
-
const CREATED_BEFORE_FAILURE_MARK = Symbol.for("cdkd.createdBeforeFailure");
|
|
10144
|
-
function isCreatedBeforeFailureMark(key, descriptor) {
|
|
10145
|
-
return key === CREATED_BEFORE_FAILURE_MARK && descriptor.enumerable === false && descriptor.writable === false && typeof descriptor.value === "object" && descriptor.value !== null && Object.isFrozen(descriptor.value);
|
|
10146
|
-
}
|
|
10147
|
-
function isPlainContainer(value) {
|
|
10148
|
-
const proto = Object.getPrototypeOf(value);
|
|
10149
|
-
return Array.isArray(value) ? proto === Array.prototype : proto === Object.prototype || proto === null;
|
|
10150
|
-
}
|
|
10151
|
-
function readFieldNode(node) {
|
|
10152
|
-
try {
|
|
10153
|
-
if (!isPlainContainer(node)) return void 0;
|
|
10154
|
-
const entries = [];
|
|
10155
|
-
for (const key of Reflect.ownKeys(node)) {
|
|
10156
|
-
const descriptor = Object.getOwnPropertyDescriptor(node, key);
|
|
10157
|
-
if (descriptor) entries.push([key, descriptor]);
|
|
10158
|
-
}
|
|
10159
|
-
const isArray = Array.isArray(node);
|
|
10160
|
-
return {
|
|
10161
|
-
proto: Object.getPrototypeOf(node),
|
|
10162
|
-
isArray,
|
|
10163
|
-
length: isArray ? Object.getOwnPropertyDescriptor(node, "length") : void 0,
|
|
10164
|
-
extensible: Object.isExtensible(node),
|
|
10165
|
-
entries
|
|
10166
|
-
};
|
|
10167
|
-
} catch {
|
|
10168
|
-
return;
|
|
10169
|
-
}
|
|
10170
|
-
}
|
|
10171
|
-
function maskErrorFieldValue(value, maskText) {
|
|
10172
|
-
if (typeof value === "string") return maskText(value);
|
|
10173
|
-
if (typeof value !== "object" || value === null) return value;
|
|
10174
|
-
try {
|
|
10175
|
-
const nodes = /* @__PURE__ */ new Map();
|
|
10176
|
-
const seen = /* @__PURE__ */ new Set();
|
|
10177
|
-
let changed = false;
|
|
10178
|
-
let frontier = [value];
|
|
10179
|
-
for (let depth = 0; frontier.length > 0 && depth < 20; depth++) {
|
|
10180
|
-
const next = [];
|
|
10181
|
-
for (const node of frontier) {
|
|
10182
|
-
if (seen.has(node)) continue;
|
|
10183
|
-
seen.add(node);
|
|
10184
|
-
const read = readFieldNode(node);
|
|
10185
|
-
if (!read) continue;
|
|
10186
|
-
nodes.set(node, read);
|
|
10187
|
-
for (const [, descriptor] of read.entries) {
|
|
10188
|
-
if (!("value" in descriptor)) continue;
|
|
10189
|
-
const child = descriptor.value;
|
|
10190
|
-
if (typeof child === "string") {
|
|
10191
|
-
if (!changed && maskText(child) !== child) changed = true;
|
|
10192
|
-
} else if (typeof child === "object" && child !== null) next.push(child);
|
|
10193
|
-
}
|
|
10194
|
-
}
|
|
10195
|
-
frontier = next;
|
|
10196
|
-
}
|
|
10197
|
-
if (!changed) return value;
|
|
10198
|
-
const copies = /* @__PURE__ */ new Map();
|
|
10199
|
-
for (const [node, read] of nodes) copies.set(node, read.isArray ? new Array(read.length?.value ?? 0) : Object.create(read.proto));
|
|
10200
|
-
for (const [node, read] of nodes) {
|
|
10201
|
-
const copy = copies.get(node);
|
|
10202
|
-
for (const [key, original] of read.entries) {
|
|
10203
|
-
if (key === "length" && read.isArray) continue;
|
|
10204
|
-
const descriptor = { ...original };
|
|
10205
|
-
if ("value" in descriptor) {
|
|
10206
|
-
const child = descriptor.value;
|
|
10207
|
-
if (typeof child === "string") descriptor.value = maskText(child);
|
|
10208
|
-
else if (typeof child === "object" && child !== null && copies.has(child)) descriptor.value = copies.get(child);
|
|
10209
|
-
}
|
|
10210
|
-
Object.defineProperty(copy, key, descriptor);
|
|
10211
|
-
}
|
|
10212
|
-
if (read.length?.writable === false) Object.defineProperty(copy, "length", { writable: false });
|
|
10213
|
-
if (!read.extensible) Object.preventExtensions(copy);
|
|
10214
|
-
}
|
|
10215
|
-
return copies.get(value) ?? value;
|
|
10216
|
-
} catch {
|
|
10217
|
-
return value;
|
|
10218
|
-
}
|
|
10219
|
-
}
|
|
10220
|
-
function maskSecretsInError(error, secrets, extraMask) {
|
|
10221
|
-
if (!(error instanceof Error) || !hasMaskableValues(secrets) && !extraMask) return error;
|
|
10222
|
-
const maskText = (text) => maskSecretsInText(extraMask ? extraMask(text) : text, secrets);
|
|
10223
|
-
const chain = errorCauseChain(error);
|
|
10224
|
-
let changed = false;
|
|
10225
|
-
const links = chain.map((link) => {
|
|
10226
|
-
const message = maskText(link.message);
|
|
10227
|
-
const stack = readStack(link);
|
|
10228
|
-
const maskedStack = typeof stack === "string" ? maskText(stack) : void 0;
|
|
10229
|
-
const descriptors = {};
|
|
10230
|
-
for (const key of Reflect.ownKeys(link)) {
|
|
10231
|
-
if (key === "message" || key === "cause" || key === "stack") continue;
|
|
10232
|
-
const descriptor = Object.getOwnPropertyDescriptor(link, key);
|
|
10233
|
-
if (!descriptor) continue;
|
|
10234
|
-
descriptors[key] = typeof key === "string" && CLASSIFIER_IDENTIFIER_FIELDS.has(key) && typeof descriptor.value === "string" || isAuxiliaryAnchor(key, descriptor) || isCreatedBeforeFailureMark(key, descriptor) ? descriptor : maskDescriptorValue(descriptor, maskText);
|
|
10235
|
-
if (descriptors[key] !== descriptor) changed = true;
|
|
10236
|
-
}
|
|
10237
|
-
let cause = Object.getOwnPropertyDescriptor(link, "cause");
|
|
10238
|
-
if (cause && !("value" in cause && cause.value instanceof Error)) {
|
|
10239
|
-
const masked = maskDescriptorValue(cause, maskText);
|
|
10240
|
-
if (masked !== cause) changed = true;
|
|
10241
|
-
cause = masked;
|
|
10242
|
-
}
|
|
10243
|
-
if (message !== link.message || maskedStack !== stack) changed = true;
|
|
10244
|
-
return {
|
|
10245
|
-
message,
|
|
10246
|
-
stack: maskedStack,
|
|
10247
|
-
descriptors,
|
|
10248
|
-
cause
|
|
10249
|
-
};
|
|
10250
|
-
});
|
|
10251
|
-
if (!changed) return error;
|
|
10252
|
-
const clones = /* @__PURE__ */ new Map();
|
|
10253
|
-
for (const [i, original] of chain.entries()) {
|
|
10254
|
-
const { message, stack, descriptors } = links[i];
|
|
10255
|
-
const clone = Object.create(Object.getPrototypeOf(original), descriptors);
|
|
10256
|
-
Object.defineProperty(clone, "message", {
|
|
10257
|
-
value: message,
|
|
10258
|
-
writable: true,
|
|
10259
|
-
enumerable: false,
|
|
10260
|
-
configurable: true
|
|
10261
|
-
});
|
|
10262
|
-
if (stack !== void 0) Object.defineProperty(clone, "stack", {
|
|
10263
|
-
value: stack,
|
|
10264
|
-
writable: true,
|
|
10265
|
-
enumerable: false,
|
|
10266
|
-
configurable: true
|
|
10267
|
-
});
|
|
10268
|
-
clones.set(original, clone);
|
|
10269
|
-
}
|
|
10270
|
-
for (const [i, original] of chain.entries()) {
|
|
10271
|
-
const causeDescriptor = links[i].cause;
|
|
10272
|
-
if (!causeDescriptor) continue;
|
|
10273
|
-
const clone = clones.get(original);
|
|
10274
|
-
const causeValue = original.cause;
|
|
10275
|
-
const replacement = causeValue instanceof Error ? clones.get(causeValue) : void 0;
|
|
10276
|
-
Object.defineProperty(clone, "cause", replacement ? {
|
|
10277
|
-
value: replacement,
|
|
10278
|
-
writable: true,
|
|
10279
|
-
enumerable: causeDescriptor.enumerable === true,
|
|
10280
|
-
configurable: true
|
|
10281
|
-
} : causeDescriptor);
|
|
10282
|
-
}
|
|
10283
|
-
return clones.get(error);
|
|
10284
|
-
}
|
|
10285
|
-
function createSecretMasker(secrets) {
|
|
10286
|
-
return (text) => maskSecretsInText(text, secrets);
|
|
10287
|
-
}
|
|
10288
|
-
|
|
10289
|
-
//#endregion
|
|
10290
|
-
//#region src/deployment/secret-redaction/log-only.ts
|
|
10291
|
-
const logOnlyValuesOf = /* @__PURE__ */ new WeakMap();
|
|
10292
|
-
function recordLogOnlyValue(secrets, plaintext) {
|
|
10293
|
-
if (plaintext === "") return;
|
|
10294
|
-
sideSetOf(logOnlyValuesOf, secrets).add(plaintext);
|
|
10295
|
-
}
|
|
10296
|
-
function carryLogOnlyValues(from, to) {
|
|
10297
|
-
const values = logOnlyValuesOf.get(from);
|
|
10298
|
-
if (values === void 0 || values.size === 0) return;
|
|
10299
|
-
const into = sideSetOf(logOnlyValuesOf, to);
|
|
10300
|
-
for (const value of values) into.add(value);
|
|
10301
|
-
}
|
|
10302
|
-
function carryLogOnlyValuesCarriedBy(from, to, value) {
|
|
10303
|
-
const values = logOnlyValuesOf.get(from);
|
|
10304
|
-
if (values === void 0 || values.size === 0) return;
|
|
10305
|
-
const leaves = printedLeavesOf(value);
|
|
10306
|
-
if (leaves.size === 0) return;
|
|
10307
|
-
for (const needle of values) for (const leaf of leaves) if (leaf === needle || needle.length >= 4 && leaf.includes(needle)) {
|
|
10308
|
-
recordLogOnlyValue(to, needle);
|
|
10309
|
-
break;
|
|
10310
|
-
}
|
|
10311
|
-
carryListElementFragments(values, to, value);
|
|
10312
|
-
}
|
|
10313
|
-
function carryListElementFragments(needles, to, value) {
|
|
10314
|
-
if (!Array.isArray(value) || value.length === 0) return;
|
|
10315
|
-
if (!value.every((e) => typeof e === "string" || typeof e === "number" || typeof e === "boolean")) return;
|
|
10316
|
-
const numeric = value.every((element) => typeof element === "number");
|
|
10317
|
-
const joined = value.map((element) => String(element)).join(",");
|
|
10318
|
-
for (const needle of [...needles]) {
|
|
10319
|
-
const pieces = needle.split(",").map((piece) => piece.trim());
|
|
10320
|
-
if (numeric && pieces.every((piece) => piece === "" || Number.isNaN(Number(piece)))) continue;
|
|
10321
|
-
const fragments = fragmentsOfNeedleIn(joined, ",", pieces.map((piece) => numeric ? String(Number(piece)) : piece).join(","));
|
|
10322
|
-
if (fragments.size === 0) continue;
|
|
10323
|
-
recordLogOnlyValue(to, needle);
|
|
10324
|
-
for (const fragment of fragments) recordLogOnlyValue(to, fragment);
|
|
10325
|
-
}
|
|
10326
|
-
}
|
|
10327
|
-
function recordLogOnlySplitFragments(from, to, text, delimiter, printed) {
|
|
10328
|
-
if (delimiter === "") return;
|
|
10329
|
-
const splits = [text.split(delimiter)];
|
|
10330
|
-
if (printed !== void 0 && (printed.length !== splits[0].length || printed.some((piece, i) => piece !== splits[0][i]))) splits.push(printed);
|
|
10331
|
-
for (const bag of from) {
|
|
10332
|
-
if (bag === void 0) continue;
|
|
10333
|
-
for (const needle of [...logOnlyValuesOf.get(bag) ?? []]) for (const pieces of splits) for (const fragment of fragmentsOfNeedleIn(text, delimiter, needle, pieces)) if (fragment !== needle) recordLogOnlyValue(to, fragment);
|
|
10334
|
-
}
|
|
10335
|
-
}
|
|
10336
|
-
function fragmentsOfNeedleIn(text, delimiter, needle, pieces = text.split(delimiter)) {
|
|
10337
|
-
const fragments = /* @__PURE__ */ new Set();
|
|
10338
|
-
if (needle === "") return fragments;
|
|
10339
|
-
const starts = [];
|
|
10340
|
-
if (text === needle) starts.push(0);
|
|
10341
|
-
else if (needle.length >= 4) for (let at = text.indexOf(needle); at !== -1; at = text.indexOf(needle, at + 1)) starts.push(at);
|
|
10342
|
-
if (starts.length === 0) return fragments;
|
|
10343
|
-
const spans = [];
|
|
10344
|
-
let offset = 0;
|
|
10345
|
-
for (const piece of pieces) {
|
|
10346
|
-
spans.push([offset, offset + piece.length]);
|
|
10347
|
-
offset += piece.length + delimiter.length;
|
|
10348
|
-
}
|
|
10349
|
-
for (const start of starts) {
|
|
10350
|
-
const end = start + needle.length;
|
|
10351
|
-
for (const [pieceStart, pieceEnd] of spans) {
|
|
10352
|
-
const from = Math.max(pieceStart, start);
|
|
10353
|
-
const to = Math.min(pieceEnd, end);
|
|
10354
|
-
if (from < to) fragments.add(text.slice(from, to));
|
|
10355
|
-
}
|
|
10356
|
-
}
|
|
10357
|
-
return fragments;
|
|
10358
|
-
}
|
|
10359
|
-
function printedLeavesOf(value) {
|
|
10360
|
-
const leaves = wholeStringLeavesOf(value);
|
|
10361
|
-
const seen = /* @__PURE__ */ new Set();
|
|
10362
|
-
const walk = (node) => {
|
|
10363
|
-
if (typeof node === "number" || typeof node === "boolean") {
|
|
10364
|
-
leaves.add(String(node));
|
|
10365
|
-
return;
|
|
10366
|
-
}
|
|
10367
|
-
if (node === null || typeof node !== "object") return;
|
|
10368
|
-
if (seen.has(node)) return;
|
|
10369
|
-
seen.add(node);
|
|
10370
|
-
for (const child of Array.isArray(node) ? node : Object.values(node)) walk(child);
|
|
10371
|
-
};
|
|
10372
|
-
walk(value);
|
|
10373
|
-
return leaves;
|
|
10374
|
-
}
|
|
10375
|
-
function shareLogOnlyValues(view, target) {
|
|
10376
|
-
logOnlyValuesOf.set(view, sideSetOf(logOnlyValuesOf, target));
|
|
10377
|
-
}
|
|
10378
|
-
function recordLogOnlyParameterValue(secrets, value, splitDelimiters) {
|
|
10379
|
-
const record = (leaf) => {
|
|
10380
|
-
const spelled = typeof leaf === "string" ? leaf : typeof leaf === "number" || typeof leaf === "boolean" ? String(leaf) : void 0;
|
|
10381
|
-
if (spelled === void 0) return;
|
|
10382
|
-
recordLogOnlyValue(secrets, spelled);
|
|
10383
|
-
for (const delimiter of splitDelimiters ?? []) {
|
|
10384
|
-
if (delimiter === "" || !spelled.includes(delimiter)) continue;
|
|
10385
|
-
for (const piece of spelled.split(delimiter)) recordLogOnlyValue(secrets, piece);
|
|
10386
|
-
}
|
|
10387
|
-
};
|
|
10388
|
-
if (Array.isArray(value)) {
|
|
10389
|
-
for (const element of value) record(element);
|
|
10390
|
-
record(value.map((element) => String(element)).join(","));
|
|
10391
|
-
return;
|
|
10392
|
-
}
|
|
10393
|
-
record(value);
|
|
10394
|
-
}
|
|
10395
|
-
function literalSplitDelimitersOf(template, parameters) {
|
|
10396
|
-
const delimiters = /* @__PURE__ */ new Set();
|
|
10397
|
-
if (parameters.size === 0) return delimiters;
|
|
10398
|
-
const reads = (node, seen) => {
|
|
10399
|
-
if (typeof node === "string") {
|
|
10400
|
-
for (const name of parameters) if (node.includes(`\${${name}}`)) return true;
|
|
10401
|
-
return false;
|
|
10402
|
-
}
|
|
10403
|
-
if (node === null || typeof node !== "object" || seen.has(node)) return false;
|
|
10404
|
-
seen.add(node);
|
|
10405
|
-
if (!Array.isArray(node)) {
|
|
10406
|
-
const ref = node["Ref"];
|
|
10407
|
-
if (typeof ref === "string" && parameters.has(ref)) return true;
|
|
10408
|
-
}
|
|
10409
|
-
for (const child of Array.isArray(node) ? node : Object.values(node)) if (reads(child, seen)) return true;
|
|
10410
|
-
return false;
|
|
10411
|
-
};
|
|
10412
|
-
const seen = /* @__PURE__ */ new Set();
|
|
10413
|
-
const walk = (node) => {
|
|
10414
|
-
if (node === null || typeof node !== "object" || seen.has(node)) return;
|
|
10415
|
-
seen.add(node);
|
|
10416
|
-
if (Array.isArray(node)) {
|
|
10417
|
-
for (const child of node) walk(child);
|
|
10418
|
-
return;
|
|
10419
|
-
}
|
|
10420
|
-
for (const [key, child] of Object.entries(node)) {
|
|
10421
|
-
if (key === "Fn::Split" && Array.isArray(child) && typeof child[0] === "string" && reads(child[1], /* @__PURE__ */ new Set())) delimiters.add(child[0]);
|
|
10422
|
-
walk(child);
|
|
10423
|
-
}
|
|
10424
|
-
};
|
|
10425
|
-
walk(template);
|
|
10426
|
-
return delimiters;
|
|
10647
|
+
const leafCertifiedBags = /* @__PURE__ */ new WeakSet();
|
|
10648
|
+
function markLeafCertifiedBag(bag) {
|
|
10649
|
+
leafCertifiedBags.add(bag);
|
|
10650
|
+
return bag;
|
|
10427
10651
|
}
|
|
10428
|
-
function
|
|
10429
|
-
|
|
10430
|
-
if (logOnly === void 0 || logOnly.size === 0) return secrets;
|
|
10431
|
-
const corpus = new Map(secrets);
|
|
10432
|
-
for (const needle of logOnly) if (!corpus.has(needle)) corpus.set(needle, "***");
|
|
10433
|
-
return corpus;
|
|
10652
|
+
function isLeafCertifiedBag(bag) {
|
|
10653
|
+
return leafCertifiedBags.has(bag);
|
|
10434
10654
|
}
|
|
10435
|
-
function
|
|
10436
|
-
return
|
|
10655
|
+
function redactionClaimOf(bag) {
|
|
10656
|
+
return isSameGenerationBag(bag) || isLeafCertifiedBag(bag) ? "same-generation" : "unproven";
|
|
10437
10657
|
}
|
|
10438
|
-
function
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
for (const [plaintext, expression] of bag) if (!union.has(plaintext)) union.set(plaintext, expression);
|
|
10443
|
-
carryLogOnlyValues(bag, union);
|
|
10444
|
-
}
|
|
10445
|
-
return union;
|
|
10446
|
-
}
|
|
10447
|
-
function createUnionSecretMasker(bags) {
|
|
10448
|
-
const present = bags.filter((bag) => bag !== void 0);
|
|
10449
|
-
let stamp;
|
|
10450
|
-
let needles = /* @__PURE__ */ new Set();
|
|
10451
|
-
let scanned = [];
|
|
10452
|
-
return (text) => {
|
|
10453
|
-
const now = present.map((bag) => `${bag.size}:${logOnlyValueCount(bag)}`).join(",");
|
|
10454
|
-
if (now !== stamp) {
|
|
10455
|
-
needles = /* @__PURE__ */ new Set();
|
|
10456
|
-
for (const bag of present) {
|
|
10457
|
-
for (const plaintext of bag.keys()) needles.add(plaintext);
|
|
10458
|
-
for (const plaintext of logOnlyValuesOf.get(bag) ?? []) needles.add(plaintext);
|
|
10459
|
-
}
|
|
10460
|
-
scanned = printingNeedles(needles);
|
|
10461
|
-
stamp = now;
|
|
10462
|
-
}
|
|
10463
|
-
if (text !== "" && needles.has(text)) return "***";
|
|
10464
|
-
return maskMatchSpans(text, scanned, "***");
|
|
10465
|
-
};
|
|
10466
|
-
}
|
|
10467
|
-
function hasLogOnlyValues(secrets) {
|
|
10468
|
-
if (secrets === void 0) return false;
|
|
10469
|
-
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10470
|
-
return logOnly !== void 0 && logOnly.size > 0;
|
|
10471
|
-
}
|
|
10472
|
-
function hasMaskableValues(secrets) {
|
|
10473
|
-
if (secrets === void 0) return false;
|
|
10474
|
-
if (secrets.size > 0) return true;
|
|
10475
|
-
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10476
|
-
return logOnly !== void 0 && logOnly.size > 0;
|
|
10658
|
+
function carryRedactionMarks(from, to) {
|
|
10659
|
+
if (isSameGenerationBag(from)) markSameGenerationBag(to);
|
|
10660
|
+
if (isLeafCertifiedBag(from)) markLeafCertifiedBag(to);
|
|
10661
|
+
return to;
|
|
10477
10662
|
}
|
|
10478
10663
|
|
|
10479
10664
|
//#endregion
|
|
@@ -22182,10 +22367,7 @@ async function resolveDynamicReferencesWithLogTwin(resolver, value, logTwin, con
|
|
|
22182
22367
|
if (cached) {
|
|
22183
22368
|
if (cached.secret && cached.value && !persistedText) refuseSecretAssembledReference(resolver, fullMatch, tokenLogText, context);
|
|
22184
22369
|
const recorded = context?.recordedSecretValues;
|
|
22185
|
-
if (cached.secret && cached.value && recorded) {
|
|
22186
|
-
recorded.set(cached.value, fullMatch);
|
|
22187
|
-
if (!pinnedGeneration) recordResolvedPair(recorded, fullMatch, cached.value);
|
|
22188
|
-
}
|
|
22370
|
+
if (cached.secret && cached.value && recorded) recordSecretResolution(recorded, fullMatch, cached.value, { pairEvidence: !pinnedGeneration });
|
|
22189
22371
|
if (cached.secret && cached.value) recordProvenanceOfResolution(resolver, context, fullMatch, cached.version);
|
|
22190
22372
|
if (service === "ssm" && !cached.secret && recorded && !resolver.producerRegionGuest) recordProvenPublicExpression(recorded, fullMatch, cached.value);
|
|
22191
22373
|
result = result.replace(fullMatch, () => cached.value);
|
|
@@ -22254,10 +22436,7 @@ async function resolveDynamicReferencesWithLogTwin(resolver, value, logTwin, con
|
|
|
22254
22436
|
});
|
|
22255
22437
|
if (isSecret && resolved) {
|
|
22256
22438
|
const recorded = context?.recordedSecretValues;
|
|
22257
|
-
if (recorded) {
|
|
22258
|
-
recorded.set(resolved, fullMatch);
|
|
22259
|
-
if (!pinnedGeneration) recordResolvedPair(recorded, fullMatch, resolved);
|
|
22260
|
-
}
|
|
22439
|
+
if (recorded) recordSecretResolution(recorded, fullMatch, resolved, { pairEvidence: !pinnedGeneration });
|
|
22261
22440
|
recordProvenanceOfResolution(resolver, context, fullMatch, resolvedVersion);
|
|
22262
22441
|
if (service === "secretsmanager" || service === "ssm-secure") pinSecretVerdict(resolver, fullMatch, true, verdictScope);
|
|
22263
22442
|
}
|
|
@@ -27075,7 +27254,7 @@ var CloudControlProvider = class {
|
|
|
27075
27254
|
const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
|
|
27076
27255
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
27077
27256
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
27078
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
27257
|
+
const { ASGProvider } = await import("./asg-provider-BsUcTrJN.js");
|
|
27079
27258
|
const delegateRegion = ambientRegion();
|
|
27080
27259
|
let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
|
|
27081
27260
|
if (asgProvider === void 0) {
|
|
@@ -27181,7 +27360,7 @@ var CloudControlProvider = class {
|
|
|
27181
27360
|
const family = SDK_DELETE_FAMILIES.get(resourceType);
|
|
27182
27361
|
const cached = this.sdkDeleteDelegates.get(family);
|
|
27183
27362
|
if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
|
|
27184
|
-
const provider = family === "rds" ? new (await (import("./rds-provider-
|
|
27363
|
+
const provider = family === "rds" ? new (await (import("./rds-provider-iwtmIiPb.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-Dq6PuG9E.js"))).NeptuneProvider({ region: ccRegion });
|
|
27185
27364
|
this.sdkDeleteDelegates.set(family, {
|
|
27186
27365
|
region: ccRegion,
|
|
27187
27366
|
provider
|
|
@@ -33799,12 +33978,16 @@ function rememberRecoverableMaskedOutputs(deps, stackName, resolved, redacted) {
|
|
|
33799
33978
|
}
|
|
33800
33979
|
function absorbOutputsPassSecrets(deps) {
|
|
33801
33980
|
const outputsRun = deps.outputsRun();
|
|
33802
|
-
for (const passSecrets of outputsRun.outputsPassSecretMaps)
|
|
33803
|
-
|
|
33804
|
-
|
|
33805
|
-
|
|
33806
|
-
|
|
33807
|
-
|
|
33981
|
+
for (const passSecrets of outputsRun.outputsPassSecretMaps) foldRecording(passSecrets, outputsRun.outputSecrets, OUTPUTS_PASS_FOLD);
|
|
33982
|
+
}
|
|
33983
|
+
const OUTPUTS_PASS_FOLD = {
|
|
33984
|
+
pairs: "carry",
|
|
33985
|
+
"log-only": "withhold",
|
|
33986
|
+
"mask-only-marks": "carry",
|
|
33987
|
+
"reference-provenance": "carry",
|
|
33988
|
+
"physical-name-copies": "carry",
|
|
33989
|
+
"public-proofs": "withhold"
|
|
33990
|
+
};
|
|
33808
33991
|
function redactOutputs(deps, outputs) {
|
|
33809
33992
|
const redacted = redactOutputsBag(deps, outputs);
|
|
33810
33993
|
if (deps.outputsRun().outputsResolvedThisRun.has(outputs)) deps.outputsRun().outputsResolvedThisRun.add(redacted);
|
|
@@ -34864,17 +35047,13 @@ var OutputsRunState = class {
|
|
|
34864
35047
|
outputsResolvedThisRun = /* @__PURE__ */ new WeakSet();
|
|
34865
35048
|
resolvedOutputsBag = void 0;
|
|
34866
35049
|
};
|
|
34867
|
-
|
|
34868
|
-
|
|
34869
|
-
|
|
34870
|
-
|
|
34871
|
-
|
|
34872
|
-
|
|
34873
|
-
|
|
34874
|
-
super.set(plaintext, expression);
|
|
34875
|
-
this.target?.set(plaintext, expression);
|
|
34876
|
-
return this;
|
|
34877
|
-
}
|
|
35050
|
+
const EXPORT_NAME_SCOPE = {
|
|
35051
|
+
pairs: "withhold",
|
|
35052
|
+
"log-only": "carry",
|
|
35053
|
+
"mask-only-marks": "withhold",
|
|
35054
|
+
"reference-provenance": "withhold",
|
|
35055
|
+
"physical-name-copies": "withhold",
|
|
35056
|
+
"public-proofs": "withhold"
|
|
34878
35057
|
};
|
|
34879
35058
|
function handleOutputResolutionFailure(deps, error, outputKey, outputs, secrets, inheritedSecrets) {
|
|
34880
35059
|
const union = unionOfSecretBags([inheritedSecrets, secrets]);
|
|
@@ -34950,8 +35129,7 @@ async function resolveOutputs(run, deps, template, resources, stackName, digestS
|
|
|
34950
35129
|
if (!output.Export?.Name) continue;
|
|
34951
35130
|
const value = outputs[outputKey];
|
|
34952
35131
|
if (value === void 0) continue;
|
|
34953
|
-
const nameSecrets =
|
|
34954
|
-
if (context.recordedSecretValues) shareLogOnlyValues(nameSecrets, context.recordedSecretValues);
|
|
35132
|
+
const nameSecrets = context.recordedSecretValues ? openRecordingScope(context.recordedSecretValues, EXPORT_NAME_SCOPE).secrets : /* @__PURE__ */ new Map();
|
|
34955
35133
|
const nameReads = [];
|
|
34956
35134
|
let exportName;
|
|
34957
35135
|
try {
|
|
@@ -35535,7 +35713,8 @@ function redactRollbackRecord(record, secrets, journaledProps, journaledAttribut
|
|
|
35535
35713
|
properties: redactForState(record.properties, {
|
|
35536
35714
|
provenance: "state-derived",
|
|
35537
35715
|
secrets,
|
|
35538
|
-
source: journaledProps
|
|
35716
|
+
source: journaledProps,
|
|
35717
|
+
generation: redactionClaimOf(record.properties)
|
|
35539
35718
|
})
|
|
35540
35719
|
};
|
|
35541
35720
|
return keepPersistedPlainRecordLeaves(scrubResourceRecord(positioned, secrets, void 0, void 0, { observed: isSameGenerationBag(positioned.observedProperties) ? "same-generation" : "unproven" }), record, {
|
|
@@ -36428,7 +36607,7 @@ function recordAfterRollbackUpdate(restored, result) {
|
|
|
36428
36607
|
return {
|
|
36429
36608
|
...returned === void 0 && idChanged ? withoutAttributes : restored,
|
|
36430
36609
|
...replacedId !== void 0 && { physicalId: replacedId },
|
|
36431
|
-
...result.effectiveProperties && { properties:
|
|
36610
|
+
...result.effectiveProperties && { properties: copyClaimingProviderBag(result.effectiveProperties) },
|
|
36432
36611
|
...returned !== void 0 && { attributes: result.wasReplaced ? { ...returned } : {
|
|
36433
36612
|
...restored.attributes,
|
|
36434
36613
|
...returned
|
|
@@ -36436,7 +36615,11 @@ function recordAfterRollbackUpdate(restored, result) {
|
|
|
36436
36615
|
};
|
|
36437
36616
|
}
|
|
36438
36617
|
function recordedPropertiesAfterReplayCreate(restored, result) {
|
|
36439
|
-
return result.effectiveProperties === void 0 ? restored.properties :
|
|
36618
|
+
return result.effectiveProperties === void 0 ? restored.properties : copyClaimingProviderBag(result.effectiveProperties);
|
|
36619
|
+
}
|
|
36620
|
+
function copyClaimingProviderBag(properties) {
|
|
36621
|
+
const copy = markLeafCertifiedBag({ ...properties });
|
|
36622
|
+
return isSameGenerationBag(properties) ? markSameGenerationBag(copy) : copy;
|
|
36440
36623
|
}
|
|
36441
36624
|
|
|
36442
36625
|
//#endregion
|
|
@@ -40146,7 +40329,7 @@ function redactOperationsForJournal(deps, operations) {
|
|
|
40146
40329
|
provenance: "template-derived",
|
|
40147
40330
|
secrets: ownSecrets,
|
|
40148
40331
|
source: templateProps,
|
|
40149
|
-
generation:
|
|
40332
|
+
generation: redactionClaimOf(properties)
|
|
40150
40333
|
}));
|
|
40151
40334
|
}
|
|
40152
40335
|
if (next.attemptedProperties) {
|
|
@@ -42861,8 +43044,11 @@ function extractAllDependencies(template, logicalId) {
|
|
|
42861
43044
|
const deps = [...parser.extractDependencies(resource)].filter((dep) => !parameterNames.has(dep));
|
|
42862
43045
|
return deps.length > 0 ? deps : void 0;
|
|
42863
43046
|
}
|
|
43047
|
+
function withPropertiesMarksOf(original, rebuilt) {
|
|
43048
|
+
return carryRedactionMarks(original, rebuilt);
|
|
43049
|
+
}
|
|
42864
43050
|
function propertiesToRecord(desiredProperties, result, resourceType, provisionedBy) {
|
|
42865
|
-
if (result.effectiveProperties) return markWrittenFromDeployedTemplate(provisionedBy === "sdk" ? withoutSilentDropProperties(resourceType, result.effectiveProperties) : result.effectiveProperties);
|
|
43051
|
+
if (result.effectiveProperties) return markWrittenFromDeployedTemplate(markLeafCertifiedBag(provisionedBy === "sdk" ? withoutSilentDropProperties(resourceType, result.effectiveProperties) : result.effectiveProperties));
|
|
42866
43052
|
const written = provisionedBy === "sdk" ? withoutSilentDropProperties(resourceType, desiredProperties) : desiredProperties;
|
|
42867
43053
|
return markWrittenFromDeployedTemplate(markSameGenerationBag(written));
|
|
42868
43054
|
}
|
|
@@ -46971,6 +47157,27 @@ async function provisionUpdate(engine, logicalId, change, stateResources, stackN
|
|
|
46971
47157
|
}
|
|
46972
47158
|
}
|
|
46973
47159
|
}
|
|
47160
|
+
if (mixedLiteralAnswered(updateSecrets)) {
|
|
47161
|
+
const legacyMixed = legacyLeavesWithoutMask(withLegacyMixedScan(updateSecrets, () => maskAtCoordinates(redactForState(resolvedProps, {
|
|
47162
|
+
provenance: "template-derived",
|
|
47163
|
+
secrets: updateSecrets,
|
|
47164
|
+
source: desiredProps,
|
|
47165
|
+
generation: "same-generation"
|
|
47166
|
+
}), comparisonCoordinates)));
|
|
47167
|
+
for (const bag of new Set(repairable)) for (const key of Object.keys(bag)) {
|
|
47168
|
+
const repaired = repairPhysicalNameCopyLeaves(bag[key], legacyMixed[key], desiredForSkipCheck[key]);
|
|
47169
|
+
if (repaired !== bag[key]) bag[key] = repaired;
|
|
47170
|
+
}
|
|
47171
|
+
const pairs = differingStringLeaves(legacyMixed, desiredForSkipCheck);
|
|
47172
|
+
for (const field of ["attributes", "observedProperties"]) {
|
|
47173
|
+
const target = currentResource[field];
|
|
47174
|
+
if (target === void 0 || target === null || pairs.length === 0) continue;
|
|
47175
|
+
for (const key of Object.keys(target)) {
|
|
47176
|
+
const repaired = replaceWholeLeaves(target[key], pairs);
|
|
47177
|
+
if (repaired !== target[key]) target[key] = repaired;
|
|
47178
|
+
}
|
|
47179
|
+
}
|
|
47180
|
+
}
|
|
46974
47181
|
const attributes = currentResource.attributes;
|
|
46975
47182
|
if (attributes !== void 0 && attributes !== null && embeddedRewrites.length > 0) for (const key of Object.keys(attributes)) {
|
|
46976
47183
|
const repaired = replaceEmbeddedPhysicalNameRewrites(attributes[key], embeddedRewrites);
|
|
@@ -47954,20 +48161,20 @@ async function executeDeployment(engine, template, currentState, changes, dag, e
|
|
|
47954
48161
|
} else if (survivesParent(record.resourceType)) {
|
|
47955
48162
|
newResources[lost.logicalId] = {
|
|
47956
48163
|
...record,
|
|
47957
|
-
properties: {
|
|
48164
|
+
properties: withPropertiesMarksOf(record.properties, {
|
|
47958
48165
|
...record.properties,
|
|
47959
48166
|
...lost.trimmed
|
|
47960
|
-
}
|
|
48167
|
+
})
|
|
47961
48168
|
};
|
|
47962
48169
|
const lists = Object.keys(lost.trimmed).join(" / ");
|
|
47963
48170
|
engine.logger.warn(safeMsg` ⚠ ${lost.logicalId} (${childType}) lost its attachment to a resource this deploy re-created under the same name, and the deploy failed before attaching it again: its record keeps only the attachments that survived, so the next deploy attaches it again.`.concat(attempted.has(lost.logicalId) ? safeMsg` Its attach may already have landed on `.concat(parentShown, safeMsg`: if ${lost.logicalId}'s ${lists} stops naming it before the next deploy, nothing will detach it, so detach it by hand.`) : ""));
|
|
47964
48171
|
} else {
|
|
47965
48172
|
newResources[lost.logicalId] = {
|
|
47966
48173
|
...record,
|
|
47967
|
-
properties: {
|
|
48174
|
+
properties: withPropertiesMarksOf(record.properties, {
|
|
47968
48175
|
...record.properties,
|
|
47969
48176
|
...lost.trimmed
|
|
47970
|
-
}
|
|
48177
|
+
})
|
|
47971
48178
|
};
|
|
47972
48179
|
engine.logger.warn(safeMsg` ⚠ ${lost.logicalId} (${childType}) was removed from a resource this deploy re-created under the same id, and the deploy failed before writing it again: the next deploy writes it there again (its record keeps only the holders it is still on).`.concat(mayStillBeLive));
|
|
47973
48180
|
}
|
|
@@ -49042,11 +49249,11 @@ var DeployEngine = class {
|
|
|
49042
49249
|
};
|
|
49043
49250
|
function sameGenerationClaimsOf(record) {
|
|
49044
49251
|
return {
|
|
49045
|
-
properties:
|
|
49252
|
+
properties: redactionClaimOf(record.properties),
|
|
49046
49253
|
observed: isSameGenerationBag(record.observedProperties) ? "same-generation" : "unproven"
|
|
49047
49254
|
};
|
|
49048
49255
|
}
|
|
49049
49256
|
|
|
49050
49257
|
//#endregion
|
|
49051
|
-
export { resolvePendingCloudControlRequests as $, repairMalformedOutputsForReadOnly as $a, escapeRegExp$3 as $c, accountArgs as $i, buildFinalSnapshotIdentifier as $n, readbackPathFor as $o, DiffCalculator as $r, applyCrossPrefixScan as $s, namesAnyDeclaredParameter as $t, findServiceTokenRefusals as A, refuseMalformedOrphanRecordsForDestroy as Aa, parseBootstrapMarker as Ac, coerceParameterTypedValue as Ai, AssemblyReader as Al, gray as An, replayWarn as Ao, isCustomResourceType as Ar, inheritNestedStackParameterAssociations as As, removeProtectionTypeList as At, parentSuppliedValues as B, refuseMalformedResourceEntriesForImport as Ba, dockerSpawnEnvWithSensitive as Bc, cfnRefValueFromPhysicalId as Bi, displayAssemblyPath as Bl, journaledOrphanPrintingBag as Bn, sameLambdaFunctionAddress as Bo, UNSPECIFIED_SKIP_REASON as Br, recordMaskOnlyValuesIn as Bs, resolveReplacementOldType as Bt, getPriorAttempts as C, malformedResourcesWarning as Ca, rewriteTemplateAssetReferences as Cc, applyCallerIdentityCredentials as Ci, uploadCfnTemplate as Cl, awaitInFlightSibling as Cn, toFiniteNumber as Co, ProviderRegistry as Cr, withPhysicalNameCopies as Cs, formatResourceLine as Ct, crossStackOutputProvenanceSource as D, refuseDivergentRecordRegionForDestroy as Da, ensureAssetStorage as Dc, classifyReplaySecretRegion as Di, PARTITION_TABLE as Dl, replacedDeleteFailureVerdict as Dn, configIntegerRefusal as Do, waitForLambdaFunctionActive as Dr, isUncertifiedBaselineMaskPosition as Ds, withApiLimit as Dt, computeImplicitDeleteEdges as E, previewableOrphanRecords as Ea, assertAssetBucketRegion as Ec, classifyRecordedSecretRegion as Ei, expectedOwnerParam as El, withStackRecords as En, configBooleanRefusal as Eo, wouldReturnToSdkProvider as Er, dynamicReferenceTokens as Es, lookupEachName as Et, listNestedTemplateRows as F, refuseMalformedOutputsForDestroy as Fa, buildDockerImage as Fc, carriesDynamicReference as Fi, hasPlainPrototype$1 as Fl, noEchoComparisonForTemplate as Fn, templateResourceTypes as Fo, customResourceResponseExpirationWarning as Fr, recordPhysicalNameCopy as Fs, planFailedOps as Ft, keptWholeReasonText as G, refuseMalformedResourcePropertiesForExport as Ga, isMalformedEnvKey as Gc, parameterInputsFor as Gi, clearBucketRegionCache as Gl, secretNamePrintingBags as Gn, maskAtCoordinates as Go, isWaitAbandonedError as Gr, WHOLE_DYNAMIC_REFERENCE_PATTERN as Gs, inheritProducerRegions as Gt, withResourceDeadline as H, refuseMalformedResourceEntriesForOrphan as Ha, formatDockerLoginError as Hc, refStateLookupFromResource as Hi, resolveAssemblyPath as Hl, namingSecretsWithRecordedNoEcho as Hn, TemplateParser as Ho, deleteLeftInPlace as Hr, recordNoEchoParameterFreshValue as Hs, orphanNeedsIdentity as Ht, renderNestedTemplateTreeDefect as I, refuseMalformedResourceAttributesForOrphan as Ia, resolveDockerContextDirectory as Ic, carriesFetchableDynamicReference as Ii, nullPrototypeRecord as Il, noEchoExactEchoLeavesOf as In, describeTypeWithThrottleRetry as Io, CloudControlProvider as Ir, splitGetAttStringForm as Is, planRollback as It, makeSiblingClaimReader as J, refuseMalformedResourcesForDestroy as Ja, redactedCause as Jc, JSON_LISTING_HOLE_VALUE as Ji, stateSecretNameNeedles as Jn, maskedLeafCoordinatesOf as Jo, ec2InstanceProtectionSite as Jr, isLockInfoExpired as Js, redactedDeleteAddressFields as Jt, mergeNoChangeOutputs as K, refuseMalformedResourcePropertiesForOrphan as Ka, partitionSensitiveEnv as Kc, passedParameterClassesOf as Ki, resolveBucketRegion as Kl, secretNamedAttributeNamesOf as Kn, maskReadbackAtCoordinates as Ko, markWaitAbandoned as Kr, isSingleDynamicReferenceToken as Ks, REDACTED_DELETE_ADDRESS_SKIP_REASON as Kt, templateIdentity as L, refuseMalformedResourceEntries as La, describeDockerCapturedOutput as Lc, isNamelessDynamicReferenceError as Li, ownValue as Ll, noEchoParameterNamesOf as Ln, withRetry as Lo, slowCcOperationTimeoutMs as Lr, carriesSecretMask as Ls, recheckFailedPlan as Lt, childTemplateLoader as M, refuseMalformedOrphansForDestroy as Ma, validateAssetBucketName as Mc, parameterTypeMayLoseSecretIdentity as Mi, processStackMessages as Ml, red as Mn, requireConfigObject as Mo, withPrintingSecrets as Mr, recoverMaskedOutput as Ms, demoteSupersededOrphans as Mt, findNestedTemplateTreeDefect as N, refuseMalformedOrphansForOrphan as Na, validateContainerRepoName as Nc, getAccountInfo as Ni, defineOwnKey as Nl, yellow as Nn, requireConfigString as No, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as Nr, physicalNameCopiesOf as Ns, isJournaledOrphan as Nt, inheritedProvenanceForChildDiff as O, refuseMalformedNestedChildOutputs as Oa, getBootstrapMarkerKey as Oc, producerRegionsFromState as Oi, canonicalizeRegion as Ol, bold as On, configStringRefusal as Oo, TemplateNoEchoReresolver as Or, pathCrossesDottedKey as Os, replayFailedOperations as Ot, isAbsoluteAssetPath as P, refuseMalformedOutputs as Pa, buildDenyExternalAccessPolicy as Pc, isImpossibleEmptyStoredAttribute as Pi, hasOwnKey as Pl, noEchoAttributeNamesOf as Pn, prefetchCreateOnlyPropertyPaths as Po, applyCustomResourceResponseExpiration as Pr, recordAttributeIdCopy as Ps, isReplacementOrphan as Pt, pendingRequestCount as Q, repairMalformedOrphansForReadOnly as Qa, warnFinchArgvExposure as Qc, UNREADABLE_RESOURCES_MAP_ROW as Qi, PRE_DELETE_SNAPSHOT_TYPES as Qn, passedNoEchoParametersOf as Qo, reEnableInstanceApiTermination as Qr, CrossPrefixScanCache as Qs, computeParameterTaint as Qt, conditionFingerprint as R, refuseMalformedResourceEntriesForDeploy as Ra, describeDockerExecFailure as Rc, keepsSecretReferenceToken as Ri, absoluteAssemblyPathEscape as Rl, createReadOnlyAttributeHealerFactory as Rn, canonicalLambdaFunctionName as Ro, unchangedBehindSecretReference as Rr, provenPublicValue as Rs, recordUnderIdIsNotOwn as Rt, isTruthyCfnBoolean as S, malformedResourcePropertiesWarning as Sa, loadPublishableAssetManifest as Sc, AWS_CREDENTIAL_ENV_KEYS as Si, findLargeInlineResources as Sl, formatDestructiveChange as Sn, toCfnInteger as So, CC_BROKEN_REASON as Sr, scrubResourceRecord as Ss, sameJournaledOrphans as St, IMPLICIT_DELETE_DEPENDENCIES as T, malformedStateRefusalMessage as Ta, BOOTSTRAP_MARKER_PREFIX as Tc, envCredentialsAreAssumedRole as Ti, decodeListingKey as Tl, getStackRecords as Tn, coerceCfnInteger as To, isCustomResource as Tr, DYNAMIC_REFERENCE_TOKEN_SCAN as Ts, isAccessDeniedError as Tt, diffSecurity as U, refuseMalformedResourcePropertiesForDestroy as Ua, getDockerCmd as Uc, parseWebACLArn as Ui, injectAwsRegion as Ul, orphanRecordsPrintingBag as Un, canonicalCoordinates as Uo, deleteSkipReason as Ur, recordProvenPublicExpression as Us, findNestedStackTypeChanges as Ut, readRecordedConditionVerdicts as V, refuseMalformedResourceEntriesForImportSave as Va, finchSecretArgvRefusal as Vc, isStalePlaceholderArnAttribute as Vi, renderAssemblyPathEscape as Vl, maskEventTextWithBoundBags as Vn, DagBuilder as Vo, deleteIndeterminateGuards as Vr, recordNoEchoAttributeValues as Vs, seedsDeleteFirstGuard as Vt, isSecretBearingReferenceString as W, refuseMalformedResourcePropertiesForDrift as Wa, isDockerClientEnvKey as Wc, withSharedDrainBudget as Wi, injectedAwsRegionValue as Wl, secretNamePrintingBag as Wn, isMarkedCoordinate as Wo, withIndeterminateGuard as Wr, wholeStringLeavesOf as Ws, getCurrentProducerRegions as Wt, DeploymentEventsReader as X, refuseMalformedState as Xa, runDockerForeground as Xc, STATE_RESOURCES_MALFORMED as Xi, extractDeploymentEventError as Xn, noEchoLeavesOf as Xo, observeThenDisableInstanceApiTermination as Xr, rebuildClientForBucketRegion as Xs, updatePartialMessage as Xt, planOrphanAdoption as Y, refuseMalformedResourcesForExport as Ya, redactedDockerCause as Yc, STATE_REGION_DIVERGED as Yi, storedSecretNameNeedles as Yn, noEchoCoordinatesOf as Yo, isTerminationProtectionPropagationError as Yr, S3StateBackend as Ys, redactedDeleteAddressSkip as Yt, DeploymentEventsStore as Z, repairMalformedOrphanRecordsForReadOnly as Za, runDockerStreaming as Zc, UNREADABLE_ORPHANS_CONTAINER_ROW as Zi, ATOMIC_FINAL_SNAPSHOT_TYPES as Zn, noEchoOutputsComparison as Zo, reDisableInstanceApiTermination as Zr, CrossPrefixReadError as Zs, updatePartialReason as Zt, deleteTableWithIndexBusyRetry as _, malformedOrphansWarning as _a, isSensitiveAttributeName as _c, assertFlagRoleArn as _i, warnDeprecatedNoPrefixCliFlag as _l, DEFAULT_RESOURCE_TIMEOUT_MS as _n, isStatefulRecreateTargetSync as _o, refuseMalformedDesiredTags as _r, maskSecretsInText as _s, dropFailedHint as _t, isProtectionValueActive as a, isReadableOrphanRecord as aa, describeRegionValueKind as ac, s3BucketDomainName as ai, synthesisStatusMessage as al, secretBearing as an, unreadableResourceEntries as ao, unsupportedFinalSnapshotError as ar, createUnionSecretMasker as as, dropSettledNestedJournals as at, S3_AUTO_DELETE_OBJECTS_TAG as b, malformedRenderedContainersWarning as ba, buildAssetRedirectMap as bc, isIamRoleArn as bi, CFN_TEMPLATE_URL_LIMIT as bl, constructPathOf as bn, coerceWarmThroughput as bo, definedAttributes as br, snapshotPassProvenance as bs, loadJournaledOrphans as bt, DynamoDBGlobalTableProvider as c, malformedExportNamesWarning as ca, hasReasonlessBaselineRefusal as cc, s3BucketWebsiteUrl as ci, loadCdkJson as cl, carriedExportAliasExposure as cn, findSilentDropProperties as co, reserveStackCreateToken as cr, logOnlyValueCount as cs, recordDisplacedSkips as ct, compensateRemovedDeletionProtection as d, malformedLocalResourceEntriesWarning as da, importableOutputs as dc, refuseUnreadableCdkCrossAccountRefs as di, resolveCaptureObservedState as dl, isWholeDynamicReferenceValue as dn, NO_CC_HANDLERS_REASON as do, isRefusedByName as dr, recordLogOnlyValue as ds, withNestedRevertRun as dt, deployRefusesOrphanRowsReason as ea, crossPrefixDeniedWarning as ec, INTRINSIC_KEYS as ei, stripControlChars as el, reachableDivergentParameters as en, repairMalformedResourceEntriesForReadOnly as eo, ccRoutedFinalSnapshotError as er, readsNoEchoSource as es, keptForReadoption as et, deleteBudgetKey as f, malformedLocalResourcesWarning as fa, isReadableBag as fc, keepHeldTokenProvenance as fi, resolveSkipPrefix as fl, noEchoParameterValueSeed as fn, hasNoCloudControlHandlers as fo, markDeleteStarted as fr, shareLogOnlyValues as fs, collectNestedChildUnaddressed as ft, INDEX_SETTLE_POLL_INTERVAL_MS as g, malformedOrphansRefusalMessage as ga, AssetPublisher as gc, applyRoleArnIfSet as gi, stateBucketExistenceConfirmed as gl, bindingSkippedOutputs as gn, isStatefulRecreateTargetForReplace as go, readTagList as gr, maskSecretsInError as gs, dropFailedCommands as gt, DELETE_INDEX_WAIT_PROCEED_NOTE as h, malformedOrphanRowsKeptWarning as ha, shouldRetainResource as hc, recordedReferenceRegions as hi, resolveUseCdkBootstrapAssets as hl, isExportAliasCollision as hn, MULTI_REGION_RECREATE_BLOCKED_TYPES as ho, planTagDiff as hr, errorCauseChain as hs, deleteJournaledOrphans as ht, PROTECTION_PROPERTY_BY_TYPE as i, hasReadableResources as ia, acceptedCreateOnlyDropsOf as ic, s3BucketArn as ii, Synthesizer as il, exportAliasCollisionScrubWarning as in, unreadableOrphanRecords as io, refusesFinalSnapshot as ir, carryLogOnlyValues as is, displacedPhysicalIdShown as it, serviceTokenBlockingReason as j, refuseMalformedOrphans as ja, readBootstrapMarkerBody as jc, isUnboundTemplateParameter as ji, StageLoadError as jl, green as jn, requireConfigArray as jo, getCurrentResourceSecrets as jr, recordNestedStackParameterExpressions as js, recordAfterRollbackUpdate as jt, deferredServiceTokenWarning as k, refuseMalformedOrphanRecords as ka, isCrossRegionRedirect as kc, regionLessSecretName as ki, derivePartitionAndUrlSuffix as kl, cyan as kn, readConfigString as ko, readsNoEchoDeleteValues as kr, identityKeyFor as ks, replayRollback as kt, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as l, malformedExportSourceWarning as la, hasUnverifiableParameterRefusal as lc, resolveDynamicReferences as li, resolveApp as ll, exportNameNoEchoParameters as ln, unwrittenCreateOnlyReplacement as lo, withCreateTokenLedger as lr, printingCorpusOf as ls, revertNestedChildFromJournal as lt, resolveDynamoDbDeleteBudgetMs as m, malformedOrphanRecordsWarning as ma, orphansCarriedFrom as mc, recordedOutputReferenceRegions as mi, resolveStateBucketWithDefaultAndSource as ml, collectPublishedOutputNames as mn, shownType as mo, DBPROXY_TAG_OPTIONS as mr, createSecretMasker as ms, withNestedStackContext as mt, recordedProtectionEvidence as n, hasReadableOrphans as na, isNotImplemented as nc, poisonRenderedSpellingsCollidingIn as ni, AssetManifestLoader as nl, WITHHELD_NAME_DISPLAY as nn, repairMalformedResourcesForReadOnly as no, effectiveDeletionPolicy as nr, valueAtCoordinate as ns, NESTED_PENDING_PARENT_REASON as nt, perType as o, isReadableResourceEntry as oa, exportNamesCarriedFrom as oc, s3BucketDualStackDomainName as oi, getDefaultStateBucketName as ol, secretBearingStateKeyWarning as on, withheldAccountClause as oo, earliestDefined as or, hasMaskableValues as os, getNestedRevertRun as ot, resolveDynamoDbDeleteBudgetClock as p, malformedOrphanRecordsRefusalMessage as pa, orphansAfterRollback as pc, outputReferenceProvenanceOf as pi, resolveStateBucketWithDefault as pl, collectDeclaredOutputNames as pn, findReplacedReadersOfRecreateTargets as po, DBPROXY_TAGS_WHAT as pr, unionOfSecretBags as ps, getCurrentNestedStackContext as pt, makeCanonicalizePropertiesFn as q, refuseMalformedResourcesForDeploy as qa, redactDockerArgvValues as qc, declaresNoEcho as qi, secretNamedRecordNeedles as qn, maskWholeValue as qo, disableInstanceApiTermination as qr, LockManager as qs, isRedactedRecordedValue as qt, recordedProtectionNote as r, hasReadableOutputs as ra, splitImportedOps as rc, isSettledInstanceState as ri, getDockerImageBySourceHash as rl, displayTextOrWithheld as rn, unpreviewableOrphanRecords as ro, isFinalSnapshotError as rr, liveMatchesUnresolvedTokenFrame as rs, displacedOpClause as rt, readProtection as s, malformedDriftResourcePropertiesWarning as sa, hasReadableExportSet as sc, s3BucketRegionalDomainName as si, getLegacyStateBucketName as sl, secretSafeKeyDisplay as sn, findActionableSilentDrops as so, ledgerForStack as sr, literalSplitDelimitersOf as ss, nestedChildStackName as st, DeployEngine as t, displayLogicalId as ta, isAccessDenied$1 as tc, IntrinsicFunctionResolver as ti, stripForDisplay as tl, resourcesNamingDeclaredParameter as tn, repairMalformedResourcePropertiesForReadOnly as to, createPreDeleteFinalSnapshot as tr, recordedNoEchoValuesOf as ts, recordRetainedForReadoption as tt, beginDeleteWait as u, malformedLocalOutputsWarning as ua, importableOutputKeys as uc, producerLookupOver as ui, resolveAutoAssetStorage as ul, exportNameSecretExposure as un, withoutSilentDropProperties as uo, acquireIdempotencyToken as ur, recordLogOnlyParameterValue as us, revertedNestedRowIds as ut, waitForIndexesSettled as v, malformedOutputsRefusalMessage as va, stringifyValue as vc, assertSendableRoleArn as vi, ssmResolvedValueType as vl, DEFAULT_RESOURCE_WARN_AFTER_MS as vn, renderStatefulReason as vo, tagMapAsList as vr, markSameGenerationBag as vs, isHandledOrphan as vt, markRefusedBeforeApplying as w, malformedScrubResourceEntriesRefusalMessage as wa, AssetModeResolver as wc, callerEnvCredentials as wi, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as wl, destroyStackRecordsView as wn, coerceCfnBoolean as wo, ccBrokenReason as wr, withoutPhysicalNameCopies as ws, chunks as wt, hasCdkAutoDeleteTag as x, malformedResourceEntriesWarning as xa, createAssetRedirectResolver as xc, sendableAssumeRoleCommand as xi, MIGRATE_TMP_PREFIX as xl, findDestructiveChanges as xn, isWarmThroughputDecrease as xo, stringifyIfAssigned as xr, redactForState as xs, makeForeignHolderScan as xt, ECR_AUTO_DELETE_IMAGES_TAG as y, malformedOutputsWarning as ya, WorkGraph as yc, explicitRoleArnOrThrow as yi, CFN_TEMPLATE_BODY_LIMIT as yl, maskingRetryLogger as yn, WARM_THROUGHPUT_MEMBERS as yo, tagPlanWarning as yr, recordReferenceProvenanceEntry as ys, journaledOrphanLines as yt, conditionInputsFrom as z, refuseMalformedResourceEntriesForDestroy as za, describeDockerFailure as zc, AWS_NO_VALUE as zi, describeFileReadFailure as zl, completedReplayEntries as zn, lambdaFunctionNameForMask as zo, RollbackInlinePolicyWriters as zr, recordMaskOnlyValue as zs, replacementNeverSwapped as zt };
|
|
49052
|
-
//# sourceMappingURL=deploy-engine-
|
|
49258
|
+
export { resolvePendingCloudControlRequests as $, repairMalformedOutputsForReadOnly as $a, escapeRegExp$3 as $c, accountArgs as $i, buildFinalSnapshotIdentifier as $n, readbackPathFor as $o, DiffCalculator as $r, applyCrossPrefixScan as $s, namesAnyDeclaredParameter as $t, findServiceTokenRefusals as A, refuseMalformedOrphanRecordsForDestroy as Aa, parseBootstrapMarker as Ac, coerceParameterTypedValue as Ai, AssemblyReader as Al, gray as An, replayWarn as Ao, isCustomResourceType as Ar, inheritNestedStackParameterAssociations as As, removeProtectionTypeList as At, parentSuppliedValues as B, refuseMalformedResourceEntriesForImport as Ba, dockerSpawnEnvWithSensitive as Bc, cfnRefValueFromPhysicalId as Bi, displayAssemblyPath as Bl, journaledOrphanPrintingBag as Bn, sameLambdaFunctionAddress as Bo, UNSPECIFIED_SKIP_REASON as Br, recordMaskOnlyValuesIn as Bs, resolveReplacementOldType as Bt, getPriorAttempts as C, malformedResourcesWarning as Ca, rewriteTemplateAssetReferences as Cc, applyCallerIdentityCredentials as Ci, uploadCfnTemplate as Cl, awaitInFlightSibling as Cn, toFiniteNumber as Co, ProviderRegistry as Cr, withPhysicalNameCopies as Cs, formatResourceLine as Ct, crossStackOutputProvenanceSource as D, refuseDivergentRecordRegionForDestroy as Da, ensureAssetStorage as Dc, classifyReplaySecretRegion as Di, PARTITION_TABLE as Dl, replacedDeleteFailureVerdict as Dn, configIntegerRefusal as Do, waitForLambdaFunctionActive as Dr, isUncertifiedBaselineMaskPosition as Ds, withApiLimit as Dt, computeImplicitDeleteEdges as E, previewableOrphanRecords as Ea, assertAssetBucketRegion as Ec, classifyRecordedSecretRegion as Ei, expectedOwnerParam as El, withStackRecords as En, configBooleanRefusal as Eo, wouldReturnToSdkProvider as Er, dynamicReferenceTokens as Es, lookupEachName as Et, listNestedTemplateRows as F, refuseMalformedOutputsForDestroy as Fa, buildDockerImage as Fc, carriesDynamicReference as Fi, hasPlainPrototype$1 as Fl, noEchoComparisonForTemplate as Fn, templateResourceTypes as Fo, customResourceResponseExpirationWarning as Fr, recordPhysicalNameCopy as Fs, planFailedOps as Ft, keptWholeReasonText as G, refuseMalformedResourcePropertiesForExport as Ga, isMalformedEnvKey as Gc, parameterInputsFor as Gi, clearBucketRegionCache as Gl, secretNamePrintingBags as Gn, maskAtCoordinates as Go, isWaitAbandonedError as Gr, WHOLE_DYNAMIC_REFERENCE_PATTERN as Gs, inheritProducerRegions as Gt, withResourceDeadline as H, refuseMalformedResourceEntriesForOrphan as Ha, formatDockerLoginError as Hc, refStateLookupFromResource as Hi, resolveAssemblyPath as Hl, namingSecretsWithRecordedNoEcho as Hn, TemplateParser as Ho, deleteLeftInPlace as Hr, recordNoEchoParameterFreshValue as Hs, orphanNeedsIdentity as Ht, renderNestedTemplateTreeDefect as I, refuseMalformedResourceAttributesForOrphan as Ia, resolveDockerContextDirectory as Ic, carriesFetchableDynamicReference as Ii, nullPrototypeRecord as Il, noEchoExactEchoLeavesOf as In, describeTypeWithThrottleRetry as Io, CloudControlProvider as Ir, splitGetAttStringForm as Is, planRollback as It, makeSiblingClaimReader as J, refuseMalformedResourcesForDestroy as Ja, redactedCause as Jc, JSON_LISTING_HOLE_VALUE as Ji, stateSecretNameNeedles as Jn, maskedLeafCoordinatesOf as Jo, ec2InstanceProtectionSite as Jr, isLockInfoExpired as Js, redactedDeleteAddressFields as Jt, mergeNoChangeOutputs as K, refuseMalformedResourcePropertiesForOrphan as Ka, partitionSensitiveEnv as Kc, passedParameterClassesOf as Ki, resolveBucketRegion as Kl, secretNamedAttributeNamesOf as Kn, maskReadbackAtCoordinates as Ko, markWaitAbandoned as Kr, isSingleDynamicReferenceToken as Ks, REDACTED_DELETE_ADDRESS_SKIP_REASON as Kt, templateIdentity as L, refuseMalformedResourceEntries as La, describeDockerCapturedOutput as Lc, isNamelessDynamicReferenceError as Li, ownValue as Ll, noEchoParameterNamesOf as Ln, withRetry as Lo, slowCcOperationTimeoutMs as Lr, carriesSecretMask as Ls, recheckFailedPlan as Lt, childTemplateLoader as M, refuseMalformedOrphansForDestroy as Ma, validateAssetBucketName as Mc, parameterTypeMayLoseSecretIdentity as Mi, processStackMessages as Ml, red as Mn, requireConfigObject as Mo, withPrintingSecrets as Mr, recoverMaskedOutput as Ms, demoteSupersededOrphans as Mt, findNestedTemplateTreeDefect as N, refuseMalformedOrphansForOrphan as Na, validateContainerRepoName as Nc, getAccountInfo as Ni, defineOwnKey as Nl, yellow as Nn, requireConfigString as No, CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID as Nr, physicalNameCopiesOf as Ns, isJournaledOrphan as Nt, inheritedProvenanceForChildDiff as O, refuseMalformedNestedChildOutputs as Oa, getBootstrapMarkerKey as Oc, producerRegionsFromState as Oi, canonicalizeRegion as Ol, bold as On, configStringRefusal as Oo, TemplateNoEchoReresolver as Or, pathCrossesDottedKey as Os, replayFailedOperations as Ot, isAbsoluteAssetPath as P, refuseMalformedOutputs as Pa, buildDenyExternalAccessPolicy as Pc, isImpossibleEmptyStoredAttribute as Pi, hasOwnKey as Pl, noEchoAttributeNamesOf as Pn, prefetchCreateOnlyPropertyPaths as Po, applyCustomResourceResponseExpiration as Pr, recordAttributeIdCopy as Ps, isReplacementOrphan as Pt, pendingRequestCount as Q, repairMalformedOrphansForReadOnly as Qa, warnFinchArgvExposure as Qc, UNREADABLE_RESOURCES_MAP_ROW as Qi, PRE_DELETE_SNAPSHOT_TYPES as Qn, passedNoEchoParametersOf as Qo, reEnableInstanceApiTermination as Qr, CrossPrefixScanCache as Qs, computeParameterTaint as Qt, conditionFingerprint as R, refuseMalformedResourceEntriesForDeploy as Ra, describeDockerExecFailure as Rc, keepsSecretReferenceToken as Ri, absoluteAssemblyPathEscape as Rl, createReadOnlyAttributeHealerFactory as Rn, canonicalLambdaFunctionName as Ro, unchangedBehindSecretReference as Rr, provenPublicValue as Rs, recordUnderIdIsNotOwn as Rt, isTruthyCfnBoolean as S, malformedResourcePropertiesWarning as Sa, loadPublishableAssetManifest as Sc, AWS_CREDENTIAL_ENV_KEYS as Si, findLargeInlineResources as Sl, formatDestructiveChange as Sn, toCfnInteger as So, CC_BROKEN_REASON as Sr, scrubResourceRecord as Ss, sameJournaledOrphans as St, IMPLICIT_DELETE_DEPENDENCIES as T, malformedStateRefusalMessage as Ta, BOOTSTRAP_MARKER_PREFIX as Tc, envCredentialsAreAssumedRole as Ti, decodeListingKey as Tl, getStackRecords as Tn, coerceCfnInteger as To, isCustomResource as Tr, DYNAMIC_REFERENCE_TOKEN_SCAN as Ts, isAccessDeniedError as Tt, diffSecurity as U, refuseMalformedResourcePropertiesForDestroy as Ua, getDockerCmd as Uc, parseWebACLArn as Ui, injectAwsRegion as Ul, orphanRecordsPrintingBag as Un, canonicalCoordinates as Uo, deleteSkipReason as Ur, recordProvenPublicExpression as Us, findNestedStackTypeChanges as Ut, readRecordedConditionVerdicts as V, refuseMalformedResourceEntriesForImportSave as Va, finchSecretArgvRefusal as Vc, isStalePlaceholderArnAttribute as Vi, renderAssemblyPathEscape as Vl, maskEventTextWithBoundBags as Vn, DagBuilder as Vo, deleteIndeterminateGuards as Vr, recordNoEchoAttributeValues as Vs, seedsDeleteFirstGuard as Vt, isSecretBearingReferenceString as W, refuseMalformedResourcePropertiesForDrift as Wa, isDockerClientEnvKey as Wc, withSharedDrainBudget as Wi, injectedAwsRegionValue as Wl, secretNamePrintingBag as Wn, isMarkedCoordinate as Wo, withIndeterminateGuard as Wr, wholeStringLeavesOf as Ws, getCurrentProducerRegions as Wt, DeploymentEventsReader as X, refuseMalformedState as Xa, runDockerForeground as Xc, STATE_RESOURCES_MALFORMED as Xi, extractDeploymentEventError as Xn, noEchoLeavesOf as Xo, observeThenDisableInstanceApiTermination as Xr, rebuildClientForBucketRegion as Xs, updatePartialMessage as Xt, planOrphanAdoption as Y, refuseMalformedResourcesForExport as Ya, redactedDockerCause as Yc, STATE_REGION_DIVERGED as Yi, storedSecretNameNeedles as Yn, noEchoCoordinatesOf as Yo, isTerminationProtectionPropagationError as Yr, S3StateBackend as Ys, redactedDeleteAddressSkip as Yt, DeploymentEventsStore as Z, repairMalformedOrphanRecordsForReadOnly as Za, runDockerStreaming as Zc, UNREADABLE_ORPHANS_CONTAINER_ROW as Zi, ATOMIC_FINAL_SNAPSHOT_TYPES as Zn, noEchoOutputsComparison as Zo, reDisableInstanceApiTermination as Zr, CrossPrefixReadError as Zs, updatePartialReason as Zt, deleteTableWithIndexBusyRetry as _, malformedOrphansWarning as _a, isSensitiveAttributeName as _c, assertFlagRoleArn as _i, warnDeprecatedNoPrefixCliFlag as _l, DEFAULT_RESOURCE_TIMEOUT_MS as _n, isStatefulRecreateTargetSync as _o, refuseMalformedDesiredTags as _r, unionOfSecretBags as _s, dropFailedHint as _t, isProtectionValueActive as a, isReadableOrphanRecord as aa, describeRegionValueKind as ac, s3BucketDomainName as ai, synthesisStatusMessage as al, secretBearing as an, unreadableResourceEntries as ao, unsupportedFinalSnapshotError as ar, redactForState as as, dropSettledNestedJournals as at, S3_AUTO_DELETE_OBJECTS_TAG as b, malformedRenderedContainersWarning as ba, buildAssetRedirectMap as bc, isIamRoleArn as bi, CFN_TEMPLATE_URL_LIMIT as bl, constructPathOf as bn, coerceWarmThroughput as bo, definedAttributes as br, maskSecretsInError as bs, loadJournaledOrphans as bt, DynamoDBGlobalTableProvider as c, malformedExportNamesWarning as ca, hasReasonlessBaselineRefusal as cc, s3BucketWebsiteUrl as ci, loadCdkJson as cl, carriedExportAliasExposure as cn, findSilentDropProperties as co, reserveStackCreateToken as cr, carryLogOnlyValues as cs, recordDisplacedSkips as ct, compensateRemovedDeletionProtection as d, malformedLocalResourceEntriesWarning as da, importableOutputs as dc, refuseUnreadableCdkCrossAccountRefs as di, resolveCaptureObservedState as dl, isWholeDynamicReferenceValue as dn, NO_CC_HANDLERS_REASON as do, isRefusedByName as dr, literalSplitDelimitersOf as ds, withNestedRevertRun as dt, deployRefusesOrphanRowsReason as ea, crossPrefixDeniedWarning as ec, INTRINSIC_KEYS as ei, stripControlChars as el, reachableDivergentParameters as en, repairMalformedResourceEntriesForReadOnly as eo, ccRoutedFinalSnapshotError as er, readsNoEchoSource as es, keptForReadoption as et, deleteBudgetKey as f, malformedLocalResourcesWarning as fa, isReadableBag as fc, keepHeldTokenProvenance as fi, resolveSkipPrefix as fl, noEchoParameterValueSeed as fn, hasNoCloudControlHandlers as fo, markDeleteStarted as fr, logOnlyValueCount as fs, collectNestedChildUnaddressed as ft, INDEX_SETTLE_POLL_INTERVAL_MS as g, malformedOrphansRefusalMessage as ga, AssetPublisher as gc, applyRoleArnIfSet as gi, stateBucketExistenceConfirmed as gl, bindingSkippedOutputs as gn, isStatefulRecreateTargetForReplace as go, readTagList as gr, shareLogOnlyValues as gs, dropFailedCommands as gt, DELETE_INDEX_WAIT_PROCEED_NOTE as h, malformedOrphanRowsKeptWarning as ha, shouldRetainResource as hc, recordedReferenceRegions as hi, resolveUseCdkBootstrapAssets as hl, isExportAliasCollision as hn, MULTI_REGION_RECREATE_BLOCKED_TYPES as ho, planTagDiff as hr, recordLogOnlyValue as hs, deleteJournaledOrphans as ht, PROTECTION_PROPERTY_BY_TYPE as i, hasReadableResources as ia, acceptedCreateOnlyDropsOf as ic, s3BucketArn as ii, Synthesizer as il, exportAliasCollisionScrubWarning as in, unreadableOrphanRecords as io, refusesFinalSnapshot as ir, markSameGenerationBag as is, displacedPhysicalIdShown as it, serviceTokenBlockingReason as j, refuseMalformedOrphans as ja, readBootstrapMarkerBody as jc, isUnboundTemplateParameter as ji, StageLoadError as jl, green as jn, requireConfigArray as jo, getCurrentResourceSecrets as jr, recordNestedStackParameterExpressions as js, recordAfterRollbackUpdate as jt, deferredServiceTokenWarning as k, refuseMalformedOrphanRecords as ka, isCrossRegionRedirect as kc, regionLessSecretName as ki, derivePartitionAndUrlSuffix as kl, cyan as kn, readConfigString as ko, readsNoEchoDeleteValues as kr, identityKeyFor as ks, replayRollback as kt, DYNAMODB_DELETE_MIN_RESOURCE_TIMEOUT_MS as l, malformedExportSourceWarning as la, hasUnverifiableParameterRefusal as lc, resolveDynamicReferences as li, resolveApp as ll, exportNameNoEchoParameters as ln, unwrittenCreateOnlyReplacement as lo, withCreateTokenLedger as lr, createUnionSecretMasker as ls, revertNestedChildFromJournal as lt, resolveDynamoDbDeleteBudgetMs as m, malformedOrphanRecordsWarning as ma, orphansCarriedFrom as mc, recordedOutputReferenceRegions as mi, resolveStateBucketWithDefaultAndSource as ml, collectPublishedOutputNames as mn, shownType as mo, DBPROXY_TAG_OPTIONS as mr, recordLogOnlyParameterValue as ms, withNestedStackContext as mt, recordedProtectionEvidence as n, hasReadableOrphans as na, isNotImplemented as nc, poisonRenderedSpellingsCollidingIn as ni, AssetManifestLoader as nl, WITHHELD_NAME_DISPLAY as nn, repairMalformedResourcesForReadOnly as no, effectiveDeletionPolicy as nr, valueAtCoordinate as ns, NESTED_PENDING_PARENT_REASON as nt, perType as o, isReadableResourceEntry as oa, exportNamesCarriedFrom as oc, s3BucketDualStackDomainName as oi, getDefaultStateBucketName as ol, secretBearingStateKeyWarning as on, withheldAccountClause as oo, earliestDefined as or, recordReferenceProvenanceEntry as os, getNestedRevertRun as ot, resolveDynamoDbDeleteBudgetClock as p, malformedOrphanRecordsRefusalMessage as pa, orphansAfterRollback as pc, outputReferenceProvenanceOf as pi, resolveStateBucketWithDefault as pl, collectDeclaredOutputNames as pn, findReplacedReadersOfRecreateTargets as po, DBPROXY_TAGS_WHAT as pr, printingCorpusOf as ps, getCurrentNestedStackContext as pt, makeCanonicalizePropertiesFn as q, refuseMalformedResourcesForDeploy as qa, redactDockerArgvValues as qc, declaresNoEcho as qi, secretNamedRecordNeedles as qn, maskWholeValue as qo, disableInstanceApiTermination as qr, LockManager as qs, isRedactedRecordedValue as qt, recordedProtectionNote as r, hasReadableOutputs as ra, splitImportedOps as rc, isSettledInstanceState as ri, getDockerImageBySourceHash as rl, displayTextOrWithheld as rn, unpreviewableOrphanRecords as ro, isFinalSnapshotError as rr, liveMatchesUnresolvedTokenFrame as rs, displacedOpClause as rt, readProtection as s, malformedDriftResourcePropertiesWarning as sa, hasReadableExportSet as sc, s3BucketRegionalDomainName as si, getLegacyStateBucketName as sl, secretSafeKeyDisplay as sn, findActionableSilentDrops as so, ledgerForStack as sr, snapshotPassProvenance as ss, nestedChildStackName as st, DeployEngine as t, displayLogicalId as ta, isAccessDenied$1 as tc, IntrinsicFunctionResolver as ti, stripForDisplay as tl, resourcesNamingDeclaredParameter as tn, repairMalformedResourcePropertiesForReadOnly as to, createPreDeleteFinalSnapshot as tr, recordedNoEchoValuesOf as ts, recordRetainedForReadoption as tt, beginDeleteWait as u, malformedLocalOutputsWarning as ua, importableOutputKeys as uc, producerLookupOver as ui, resolveAutoAssetStorage as ul, exportNameSecretExposure as un, withoutSilentDropProperties as uo, acquireIdempotencyToken as ur, hasMaskableValues as us, revertedNestedRowIds as ut, waitForIndexesSettled as v, malformedOutputsRefusalMessage as va, stringifyValue as vc, assertSendableRoleArn as vi, ssmResolvedValueType as vl, DEFAULT_RESOURCE_WARN_AFTER_MS as vn, renderStatefulReason as vo, tagMapAsList as vr, createSecretMasker as vs, isHandledOrphan as vt, markRefusedBeforeApplying as w, malformedScrubResourceEntriesRefusalMessage as wa, AssetModeResolver as wc, callerEnvCredentials as wi, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as wl, destroyStackRecordsView as wn, coerceCfnBoolean as wo, ccBrokenReason as wr, withoutPhysicalNameCopies as ws, chunks as wt, hasCdkAutoDeleteTag as x, malformedResourceEntriesWarning as xa, createAssetRedirectResolver as xc, sendableAssumeRoleCommand as xi, MIGRATE_TMP_PREFIX as xl, findDestructiveChanges as xn, isWarmThroughputDecrease as xo, stringifyIfAssigned as xr, maskSecretsInText as xs, makeForeignHolderScan as xt, ECR_AUTO_DELETE_IMAGES_TAG as y, malformedOutputsWarning as ya, WorkGraph as yc, explicitRoleArnOrThrow as yi, CFN_TEMPLATE_BODY_LIMIT as yl, maskingRetryLogger as yn, WARM_THROUGHPUT_MEMBERS as yo, tagPlanWarning as yr, errorCauseChain as ys, journaledOrphanLines as yt, conditionInputsFrom as z, refuseMalformedResourceEntriesForDestroy as za, describeDockerFailure as zc, AWS_NO_VALUE as zi, describeFileReadFailure as zl, completedReplayEntries as zn, lambdaFunctionNameForMask as zo, RollbackInlinePolicyWriters as zr, recordMaskOnlyValue as zs, replacementNeverSwapped as zt };
|
|
49259
|
+
//# sourceMappingURL=deploy-engine-BN6g5voc.js.map
|