@go-to-k/cdkd 0.301.6 → 0.301.8
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-GNiE6dR1.js → asg-provider-BHNhL4VV.js} +3 -3
- package/dist/{asg-provider-GNiE6dR1.js.map → asg-provider-BHNhL4VV.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-D1z0QUsv.js → deploy-engine-6bGIDa7Z.js} +776 -588
- package/dist/deploy-engine-6bGIDa7Z.js.map +1 -0
- package/dist/{iam-policy-targets-BkeM7IXi.js → iam-policy-targets-DJmfxbko.js} +5 -2
- package/dist/iam-policy-targets-DJmfxbko.js.map +1 -0
- package/dist/{iam-role-provider-988BRmqF.js → iam-role-provider-CvfdjJBv.js} +3 -3
- package/dist/{iam-role-provider-988BRmqF.js.map → iam-role-provider-CvfdjJBv.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/{neptune-provider-DUaw7kpj.js → neptune-provider-CrH00sHx.js} +3 -3
- package/dist/{neptune-provider-DUaw7kpj.js.map → neptune-provider-CrH00sHx.js.map} +1 -1
- package/dist/{program-Cqk1ZTsY.js → program-Bji4lco2.js} +21 -10
- package/dist/program-Bji4lco2.js.map +1 -0
- package/dist/{provider-classes-CR4DtD8M.js → provider-classes-D41TJi4B.js} +180 -88
- package/dist/provider-classes-D41TJi4B.js.map +1 -0
- package/dist/{rds-provider-DBW972HG.js → rds-provider-BTabgCz5.js} +3 -3
- package/dist/{rds-provider-DBW972HG.js.map → rds-provider-BTabgCz5.js.map} +1 -1
- package/dist/{version-CnjZ9J4l.js → version-B3HWuj22.js} +2 -2
- package/dist/{version-CnjZ9J4l.js.map → version-B3HWuj22.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-D1z0QUsv.js.map +0 -1
- package/dist/iam-policy-targets-BkeM7IXi.js.map +0 -1
- package/dist/program-Cqk1ZTsY.js.map +0 -1
- package/dist/provider-classes-CR4DtD8M.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, $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
|
|
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-B3HWuj22.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
|
}
|
|
@@ -7748,7 +7755,10 @@ function certifiedExpressionForLeaf(secrets, association, leaf) {
|
|
|
7748
7755
|
function certifiedListForLeaf(secrets, association, bag) {
|
|
7749
7756
|
const certified = bag.map((element) => certifiedExpressionForLeaf(secrets, association, element));
|
|
7750
7757
|
if (certified.every((expression) => expression === void 0)) return void 0;
|
|
7751
|
-
return bag.map((element, i) => certified[i] ??
|
|
7758
|
+
return bag.map((element, i) => certified[i] ?? redactForState(element, {
|
|
7759
|
+
provenance: "value-scan",
|
|
7760
|
+
secrets
|
|
7761
|
+
}));
|
|
7752
7762
|
}
|
|
7753
7763
|
function associationForSource(source, secrets) {
|
|
7754
7764
|
const key = crossStackSourceKey(source);
|
|
@@ -7972,7 +7982,7 @@ const NESTED_STACK_RESOURCE_TYPE$4 = "AWS::CloudFormation::Stack";
|
|
|
7972
7982
|
const nestedStackParameterExpressions = /* @__PURE__ */ new WeakMap();
|
|
7973
7983
|
const renderedParameterSpellings = /* @__PURE__ */ new WeakMap();
|
|
7974
7984
|
const UNFRAMED_SPELLING = Symbol("cdkd.nested-parameter.unframed-spelling");
|
|
7975
|
-
function recordNestedStackParameterExpressions(secrets, resourceType, resolvedProperties, sourceProperties,
|
|
7985
|
+
function recordNestedStackParameterExpressions(secrets, resourceType, resolvedProperties, sourceProperties, provenance = "template-derived") {
|
|
7976
7986
|
if (resourceType !== NESTED_STACK_RESOURCE_TYPE$4) return;
|
|
7977
7987
|
if (secrets.size === 0) return;
|
|
7978
7988
|
if (!isPlainObject$7(resolvedProperties) || !isPlainObject$7(sourceProperties)) return;
|
|
@@ -7981,7 +7991,7 @@ function recordNestedStackParameterExpressions(secrets, resourceType, resolvedPr
|
|
|
7981
7991
|
const resolvedParameters = resolvedProperties["Parameters"];
|
|
7982
7992
|
const sourceParameters = sourceProperties["Parameters"];
|
|
7983
7993
|
if (!isPlainObject$7(resolvedParameters) || !isPlainObject$7(sourceParameters)) return;
|
|
7984
|
-
const positioned =
|
|
7994
|
+
const positioned = redactAtProvenance({ ...resolvedParameters }, secrets, sourceParameters, provenance, true);
|
|
7985
7995
|
let table = nestedStackParameterExpressions.get(secrets);
|
|
7986
7996
|
for (const [name, resolvedValue] of Object.entries(resolvedParameters)) {
|
|
7987
7997
|
const sourceLeaf = sourceParameters[name];
|
|
@@ -8074,7 +8084,10 @@ function recordNestedStackParameterExpressions(secrets, resourceType, resolvedPr
|
|
|
8074
8084
|
if (typeof resolvedValue !== "string") continue;
|
|
8075
8085
|
const spelling = certifiedSpellingOf(name);
|
|
8076
8086
|
if (spelling === void 0) continue;
|
|
8077
|
-
if (
|
|
8087
|
+
if (redactForState(resolvedValue, {
|
|
8088
|
+
provenance: "value-scan",
|
|
8089
|
+
secrets
|
|
8090
|
+
}) !== resolvedValue) continue;
|
|
8078
8091
|
const frame = singleSpanFrame(resolvedValue, spelling);
|
|
8079
8092
|
if (frame === void 0 || resolvedPlaintextOf(secrets, frame.token) !== frame.middle) continue;
|
|
8080
8093
|
if (framesByValue.get(resolvedValue)?.size !== 1) continue;
|
|
@@ -8165,7 +8178,10 @@ function inheritedRenderedSpan(childSecrets, key, text) {
|
|
|
8165
8178
|
if (carriesChildOnlyPlaintext(value, childSecrets, reads.parent)) return void 0;
|
|
8166
8179
|
const spelling = inheritedParameterExpression(reads.parent, name, value);
|
|
8167
8180
|
if (typeof spelling !== "string") return void 0;
|
|
8168
|
-
if (
|
|
8181
|
+
if (redactForState(spelling, {
|
|
8182
|
+
provenance: "value-scan",
|
|
8183
|
+
secrets: childSecrets
|
|
8184
|
+
}) !== spelling) return void 0;
|
|
8169
8185
|
return {
|
|
8170
8186
|
value,
|
|
8171
8187
|
spelling
|
|
@@ -8212,7 +8228,10 @@ function recordInheritedParameterRead(childSecrets, parentSecrets, parameterName
|
|
|
8212
8228
|
parameterReadsFor(childSecrets, parentSecrets)?.names.add(parameterName);
|
|
8213
8229
|
}
|
|
8214
8230
|
function redactInheritedParameterValue(parentSecrets, parameterName, value) {
|
|
8215
|
-
return inheritedParameterExpression(parentSecrets, parameterName, value) ??
|
|
8231
|
+
return inheritedParameterExpression(parentSecrets, parameterName, value) ?? redactForState(value, {
|
|
8232
|
+
provenance: "value-scan",
|
|
8233
|
+
secrets: parentSecrets
|
|
8234
|
+
});
|
|
8216
8235
|
}
|
|
8217
8236
|
function positionByInheritedParameter(bag, source, secrets) {
|
|
8218
8237
|
const keys = Object.keys(source);
|
|
@@ -8224,7 +8243,10 @@ function positionByInheritedParameter(bag, source, secrets) {
|
|
|
8224
8243
|
if (typeof bag !== "string" && !Array.isArray(bag)) return void 0;
|
|
8225
8244
|
if (carriesChildOnlyPlaintext(bag, secrets, reads.parent)) return void 0;
|
|
8226
8245
|
const answer = redactInheritedParameterValue(reads.parent, name, bag);
|
|
8227
|
-
if (!deepEqualJsonValue(
|
|
8246
|
+
if (!deepEqualJsonValue(redactForState(answer, {
|
|
8247
|
+
provenance: "value-scan",
|
|
8248
|
+
secrets
|
|
8249
|
+
}), answer)) return void 0;
|
|
8228
8250
|
return answer;
|
|
8229
8251
|
}
|
|
8230
8252
|
const REREAD_PSEUDO_PARAMETERS = /* @__PURE__ */ new Set([
|
|
@@ -8444,7 +8466,10 @@ function holdsRereadTrigger(node, depth = 0) {
|
|
|
8444
8466
|
}
|
|
8445
8467
|
function rendersReadTo(spelling, parentSecrets, value) {
|
|
8446
8468
|
if (typeof spelling === "string" && typeof value === "string") {
|
|
8447
|
-
if (spelling === value) return
|
|
8469
|
+
if (spelling === value) return redactForState(spelling, {
|
|
8470
|
+
provenance: "value-scan",
|
|
8471
|
+
secrets: parentSecrets
|
|
8472
|
+
}) === spelling;
|
|
8448
8473
|
return rendersLiteralTo(spelling, parentSecrets, value);
|
|
8449
8474
|
}
|
|
8450
8475
|
if (Array.isArray(spelling) && Array.isArray(value) && spelling.length === value.length) return spelling.every((element, i) => rendersReadTo(element, parentSecrets, value[i]));
|
|
@@ -8552,7 +8577,10 @@ function positionByParameterReread(bag, source, secrets) {
|
|
|
8552
8577
|
answer = matching[0].redacted;
|
|
8553
8578
|
}
|
|
8554
8579
|
if (carriesChildOnlyPlaintext(bag, secrets, reads.parent)) return void 0;
|
|
8555
|
-
if (!deepEqualJsonValue(
|
|
8580
|
+
if (!deepEqualJsonValue(redactForState(answer, {
|
|
8581
|
+
provenance: "value-scan",
|
|
8582
|
+
secrets
|
|
8583
|
+
}), answer)) return void 0;
|
|
8556
8584
|
return answer;
|
|
8557
8585
|
}
|
|
8558
8586
|
function carriesChildOnlyPlaintext(value, childSecrets, parentSecrets) {
|
|
@@ -8720,7 +8748,10 @@ function positionByParameterPlaceholders(bag, source, secrets) {
|
|
|
8720
8748
|
if (bag.length < before[0].length + after[0].length) return void 0;
|
|
8721
8749
|
if (!bag.startsWith(before[0]) || !bag.endsWith(after[0])) return void 0;
|
|
8722
8750
|
const middle = bag.slice(before[0].length, bag.length - after[0].length);
|
|
8723
|
-
if (
|
|
8751
|
+
if (redactForState(middle, {
|
|
8752
|
+
provenance: "value-scan",
|
|
8753
|
+
secrets
|
|
8754
|
+
}) !== middle) return void 0;
|
|
8724
8755
|
persisted = before[1] + middle + after[1];
|
|
8725
8756
|
}
|
|
8726
8757
|
const afterStart = bag.length - after[0].length;
|
|
@@ -8734,7 +8765,10 @@ function acceptedPlaceholderRendering(bag, persisted, spans, secrets) {
|
|
|
8734
8765
|
for (const [start, length] of spans) if (at < start + length && end > start && (at < start || end > start + length)) return void 0;
|
|
8735
8766
|
}
|
|
8736
8767
|
}
|
|
8737
|
-
if (
|
|
8768
|
+
if (redactForState(persisted, {
|
|
8769
|
+
provenance: "value-scan",
|
|
8770
|
+
secrets
|
|
8771
|
+
}) !== persisted) return void 0;
|
|
8738
8772
|
return persisted;
|
|
8739
8773
|
}
|
|
8740
8774
|
function positionByRecordedParameterSpans(bag, source, secrets, associations) {
|
|
@@ -8764,7 +8798,10 @@ function positionByRecordedParameterSpans(bag, source, secrets, associations) {
|
|
|
8764
8798
|
const tail = bag.slice(cursor);
|
|
8765
8799
|
gaps.push(tail);
|
|
8766
8800
|
persisted += tail;
|
|
8767
|
-
for (const gap of gaps) if (
|
|
8801
|
+
for (const gap of gaps) if (redactForState(gap, {
|
|
8802
|
+
provenance: "value-scan",
|
|
8803
|
+
secrets
|
|
8804
|
+
}) !== gap) return void 0;
|
|
8768
8805
|
return acceptedPlaceholderRendering(bag, persisted, certified, secrets);
|
|
8769
8806
|
}
|
|
8770
8807
|
|
|
@@ -8874,7 +8911,10 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
|
|
|
8874
8911
|
if (isDynamicReferenceString(source) && typeof bag === "string") {
|
|
8875
8912
|
if (isSingleDynamicReferenceToken(source) && (rules.trustAnyExpression || isKnownSecretExpression(source, secretExpressions))) {
|
|
8876
8913
|
if (!rules.sourceIsSameGeneration && isSingleDynamicReferenceToken(bag)) {
|
|
8877
|
-
if (!spanNamesResolvableService(bag)) return
|
|
8914
|
+
if (!spanNamesResolvableService(bag)) return redactForState(bag, {
|
|
8915
|
+
provenance: "value-scan",
|
|
8916
|
+
secrets
|
|
8917
|
+
});
|
|
8878
8918
|
return secrets.get(bag) ?? bag;
|
|
8879
8919
|
}
|
|
8880
8920
|
return source;
|
|
@@ -8920,7 +8960,10 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
|
|
|
8920
8960
|
const j = partnerIndex[i];
|
|
8921
8961
|
if (j >= 0) return redactByPath(item, source[j], secrets, rules, secretExpressions, bagIsSameGeneration);
|
|
8922
8962
|
if (positionalIsExact) return redactByPath(item, source[i], secrets, rules, secretExpressions, bagIsSameGeneration);
|
|
8923
|
-
return
|
|
8963
|
+
return redactForState(item, {
|
|
8964
|
+
provenance: "value-scan",
|
|
8965
|
+
secrets
|
|
8966
|
+
});
|
|
8924
8967
|
});
|
|
8925
8968
|
}
|
|
8926
8969
|
if (rules.descendArrays && bag.length === source.length) return bag.map((item, i) => redactByPath(item, source[i], secrets, rules, secretExpressions, bagIsSameGeneration));
|
|
@@ -8931,10 +8974,16 @@ function redactByPath(bag, source, secrets, rules, secretExpressions, bagIsSameG
|
|
|
8931
8974
|
}
|
|
8932
8975
|
if (isPlainObject$7(bag) && hasPlainPrototype(bag) && isPlainObject$7(source)) {
|
|
8933
8976
|
const out = Object.create(null);
|
|
8934
|
-
for (const [k, v] of Object.entries(bag)) out[k] = Object.hasOwn(source, k) ? redactByPath(v, source[k], secrets, rules, secretExpressions, bagIsSameGeneration) :
|
|
8977
|
+
for (const [k, v] of Object.entries(bag)) out[k] = Object.hasOwn(source, k) ? redactByPath(v, source[k], secrets, rules, secretExpressions, bagIsSameGeneration) : redactForState(v, {
|
|
8978
|
+
provenance: "value-scan",
|
|
8979
|
+
secrets
|
|
8980
|
+
});
|
|
8935
8981
|
return out;
|
|
8936
8982
|
}
|
|
8937
|
-
return
|
|
8983
|
+
return redactForState(bag, {
|
|
8984
|
+
provenance: "value-scan",
|
|
8985
|
+
secrets
|
|
8986
|
+
});
|
|
8938
8987
|
}
|
|
8939
8988
|
function isReadbackProjectedFromState(rules) {
|
|
8940
8989
|
return rules.trustAnyExpression && !rules.descendArrays && rules.sourceIsSameGeneration;
|
|
@@ -9247,20 +9296,23 @@ function deriveReadbackNeedles(bag, source, secrets, rules) {
|
|
|
9247
9296
|
|
|
9248
9297
|
//#endregion
|
|
9249
9298
|
//#region src/deployment/secret-redaction/redact-state.ts
|
|
9250
|
-
function redactSecretsForState(bag, secrets, source, rules = TEMPLATE_DERIVED_RULES) {
|
|
9251
|
-
return flattenEmbeddedNoEchoLeaves(redactSecretsForStatePasses(bag, secrets, source, rules), secrets);
|
|
9299
|
+
function redactSecretsForState(bag, secrets, source, rules = TEMPLATE_DERIVED_RULES, bagIsSameGeneration = false) {
|
|
9300
|
+
return flattenEmbeddedNoEchoLeaves(redactSecretsForStatePasses(bag, secrets, source, rules, bagIsSameGeneration), secrets);
|
|
9252
9301
|
}
|
|
9253
|
-
function redactSecretsForStatePasses(bag, secrets, source, rules) {
|
|
9302
|
+
function redactSecretsForStatePasses(bag, secrets, source, rules, bagIsSameGeneration) {
|
|
9254
9303
|
if (secrets.size === 0 && source === void 0) return bag;
|
|
9255
9304
|
if (source !== void 0) {
|
|
9256
|
-
const positioned = redactByPath(bag, source, secrets, rules, recordedExpressionsOf(secrets),
|
|
9305
|
+
const positioned = redactByPath(bag, source, secrets, rules, recordedExpressionsOf(secrets), bagIsSameGeneration);
|
|
9257
9306
|
if (!isReadbackProjectedFromState(rules)) return positioned;
|
|
9258
9307
|
const failClosed = rules.failClosedOnUncertifiedPositions === true;
|
|
9259
9308
|
const refused = refuseUncertifiedReadbackPositions(positioned, source, secrets, failClosed);
|
|
9260
9309
|
const derived = deriveReadbackNeedles(bag, source, secrets, rules);
|
|
9261
9310
|
if (derived === void 0) return refused;
|
|
9262
9311
|
const marks = refuseUncertifiedReadbackPositions(positioned, source, secrets, failClosed, void 0, true);
|
|
9263
|
-
return preferPositionDecisions(
|
|
9312
|
+
return preferPositionDecisions(redactForState(bag, {
|
|
9313
|
+
provenance: "value-scan",
|
|
9314
|
+
secrets: derived.certain
|
|
9315
|
+
}), refused, bag, marks, derived.inferred);
|
|
9264
9316
|
}
|
|
9265
9317
|
const regex = buildNeedleRegex(substringNeedlesOf(secrets));
|
|
9266
9318
|
const wholeValueExpr = (s) => s === "" ? void 0 : secrets.get(s);
|
|
@@ -9426,18 +9478,29 @@ function redactOverlappingMatches(value, matches, redacted, expressionFor) {
|
|
|
9426
9478
|
}
|
|
9427
9479
|
return out + value.slice(cursor);
|
|
9428
9480
|
}
|
|
9429
|
-
function scrubResourceRecord(record, secrets, sourceProperties,
|
|
9481
|
+
function scrubResourceRecord(record, secrets, sourceProperties, observedProvenance, claims = {}) {
|
|
9482
|
+
const propertiesClaimed = claims.properties === "same-generation";
|
|
9483
|
+
const observedClaimed = claims.observed === "same-generation";
|
|
9430
9484
|
if (secrets.size === 0 && sourceProperties === void 0 && !record.observedProperties) return record;
|
|
9431
9485
|
const next = { ...record };
|
|
9432
|
-
next.properties =
|
|
9486
|
+
next.properties = sourceProperties === void 0 ? redactForState(record.properties, {
|
|
9487
|
+
provenance: "value-scan",
|
|
9488
|
+
secrets
|
|
9489
|
+
}) : redactAtProvenance(record.properties, secrets, sourceProperties, "template-derived", propertiesClaimed);
|
|
9433
9490
|
if (record.attributes) {
|
|
9434
9491
|
const ownId = record.physicalId;
|
|
9435
9492
|
const ids = [...attributeIdCopiesOf.get(secrets) ?? []];
|
|
9436
9493
|
if (typeof ownId === "string" && ownId !== "") ids.push(ownId);
|
|
9437
9494
|
const attributes = record.attributes;
|
|
9438
|
-
next.attributes = ids.length > 0 ? withPhysicalNameCopies(secrets, ids, () =>
|
|
9495
|
+
next.attributes = ids.length > 0 ? withPhysicalNameCopies(secrets, ids, () => redactForState(attributes, {
|
|
9496
|
+
provenance: "value-scan",
|
|
9497
|
+
secrets
|
|
9498
|
+
})) : redactForState(attributes, {
|
|
9499
|
+
provenance: "value-scan",
|
|
9500
|
+
secrets
|
|
9501
|
+
});
|
|
9439
9502
|
}
|
|
9440
|
-
if (record.observedProperties) next.observedProperties =
|
|
9503
|
+
if (record.observedProperties) next.observedProperties = redactAtProvenance(record.observedProperties, secrets, sourceProperties ?? next.properties, observedProvenance ?? (sourceProperties !== void 0 ? "template-sourced" : secrets.size === 0 && observedClaimed ? "state-baseline" : "state-readback"), observedClaimed);
|
|
9441
9504
|
return next;
|
|
9442
9505
|
}
|
|
9443
9506
|
function withoutPhysicalNameCopies(secrets, run) {
|
|
@@ -9499,7 +9562,10 @@ function embeddedPhysicalNameRewrites(secrets, legacySecrets = secrets) {
|
|
|
9499
9562
|
const pairs = [];
|
|
9500
9563
|
withoutPhysicalNameCopies(legacySecrets, () => {
|
|
9501
9564
|
for (const name of names) {
|
|
9502
|
-
const legacy =
|
|
9565
|
+
const legacy = redactForState(name, {
|
|
9566
|
+
provenance: "value-scan",
|
|
9567
|
+
secrets: legacySecrets
|
|
9568
|
+
});
|
|
9503
9569
|
if (typeof legacy === "string" && legacy !== name && legacy.includes("{{resolve:") && !isSingleDynamicReferenceToken(legacy) && !legacy.includes("***")) pairs.push([legacy, name]);
|
|
9504
9570
|
}
|
|
9505
9571
|
});
|
|
@@ -9568,6 +9634,598 @@ function repairEmbeddedPhysicalNamesTowards(stored, target, pairs) {
|
|
|
9568
9634
|
return stored;
|
|
9569
9635
|
}
|
|
9570
9636
|
|
|
9637
|
+
//#endregion
|
|
9638
|
+
//#region src/deployment/secret-redaction/mask-errors.ts
|
|
9639
|
+
function maskSecretsInText(text, secrets) {
|
|
9640
|
+
const logOnly = logOnlyValuesOf.get(secrets);
|
|
9641
|
+
const noLogOnly = logOnly === void 0 || logOnly.size === 0;
|
|
9642
|
+
if (secrets.size === 0 && noLogOnly) return text;
|
|
9643
|
+
if (text !== "" && (secrets.has(text) || logOnly?.has(text) === true)) return "***";
|
|
9644
|
+
return maskMatchSpans(text, printingNeedles(noLogOnly ? secrets.keys() : [...secrets.keys(), ...logOnly]), "***");
|
|
9645
|
+
}
|
|
9646
|
+
function maskRecordedSecretsInText(text, secrets) {
|
|
9647
|
+
if (secrets.size === 0) return text;
|
|
9648
|
+
if (text !== "" && secrets.has(text)) return "***";
|
|
9649
|
+
return maskMatchSpans(text, substringNeedles(secrets.keys()), "***");
|
|
9650
|
+
}
|
|
9651
|
+
function substringNeedles(values) {
|
|
9652
|
+
return [...new Set(values)].filter((value) => value.length >= 4);
|
|
9653
|
+
}
|
|
9654
|
+
const ERROR_CAUSE_MASK_MAX_DEPTH = 20;
|
|
9655
|
+
function errorCauseChain(root) {
|
|
9656
|
+
const chain = [];
|
|
9657
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9658
|
+
let current = root;
|
|
9659
|
+
while (current instanceof Error && !seen.has(current) && chain.length < 20) {
|
|
9660
|
+
seen.add(current);
|
|
9661
|
+
chain.push(current);
|
|
9662
|
+
current = current.cause;
|
|
9663
|
+
}
|
|
9664
|
+
return chain;
|
|
9665
|
+
}
|
|
9666
|
+
function readStack(error) {
|
|
9667
|
+
try {
|
|
9668
|
+
const stack = error.stack;
|
|
9669
|
+
return typeof stack === "string" ? stack : void 0;
|
|
9670
|
+
} catch {
|
|
9671
|
+
return;
|
|
9672
|
+
}
|
|
9673
|
+
}
|
|
9674
|
+
function maskDescriptorValue(descriptor, maskText) {
|
|
9675
|
+
if (!("value" in descriptor)) return descriptor;
|
|
9676
|
+
const value = maskErrorFieldValue(descriptor.value, maskText);
|
|
9677
|
+
return value === descriptor.value ? descriptor : {
|
|
9678
|
+
...descriptor,
|
|
9679
|
+
value
|
|
9680
|
+
};
|
|
9681
|
+
}
|
|
9682
|
+
const CLASSIFIER_IDENTIFIER_FIELDS = /* @__PURE__ */ new Set([
|
|
9683
|
+
"name",
|
|
9684
|
+
"code",
|
|
9685
|
+
"Code",
|
|
9686
|
+
"__type",
|
|
9687
|
+
"ccErrorCode",
|
|
9688
|
+
"ccOperation"
|
|
9689
|
+
]);
|
|
9690
|
+
function isAuxiliaryAnchor(key, descriptor) {
|
|
9691
|
+
return key === "logicalId" && descriptor.enumerable === false && descriptor.writable === false && typeof descriptor.value === "string" && descriptor.value.endsWith("/auxiliary");
|
|
9692
|
+
}
|
|
9693
|
+
const CREATED_BEFORE_FAILURE_MARK = Symbol.for("cdkd.createdBeforeFailure");
|
|
9694
|
+
function isCreatedBeforeFailureMark(key, descriptor) {
|
|
9695
|
+
return key === CREATED_BEFORE_FAILURE_MARK && descriptor.enumerable === false && descriptor.writable === false && typeof descriptor.value === "object" && descriptor.value !== null && Object.isFrozen(descriptor.value);
|
|
9696
|
+
}
|
|
9697
|
+
function isPlainContainer(value) {
|
|
9698
|
+
const proto = Object.getPrototypeOf(value);
|
|
9699
|
+
return Array.isArray(value) ? proto === Array.prototype : proto === Object.prototype || proto === null;
|
|
9700
|
+
}
|
|
9701
|
+
function readFieldNode(node) {
|
|
9702
|
+
try {
|
|
9703
|
+
if (!isPlainContainer(node)) return void 0;
|
|
9704
|
+
const entries = [];
|
|
9705
|
+
for (const key of Reflect.ownKeys(node)) {
|
|
9706
|
+
const descriptor = Object.getOwnPropertyDescriptor(node, key);
|
|
9707
|
+
if (descriptor) entries.push([key, descriptor]);
|
|
9708
|
+
}
|
|
9709
|
+
const isArray = Array.isArray(node);
|
|
9710
|
+
return {
|
|
9711
|
+
proto: Object.getPrototypeOf(node),
|
|
9712
|
+
isArray,
|
|
9713
|
+
length: isArray ? Object.getOwnPropertyDescriptor(node, "length") : void 0,
|
|
9714
|
+
extensible: Object.isExtensible(node),
|
|
9715
|
+
entries
|
|
9716
|
+
};
|
|
9717
|
+
} catch {
|
|
9718
|
+
return;
|
|
9719
|
+
}
|
|
9720
|
+
}
|
|
9721
|
+
function maskErrorFieldValue(value, maskText) {
|
|
9722
|
+
if (typeof value === "string") return maskText(value);
|
|
9723
|
+
if (typeof value !== "object" || value === null) return value;
|
|
9724
|
+
try {
|
|
9725
|
+
const nodes = /* @__PURE__ */ new Map();
|
|
9726
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9727
|
+
let changed = false;
|
|
9728
|
+
let frontier = [value];
|
|
9729
|
+
for (let depth = 0; frontier.length > 0 && depth < 20; depth++) {
|
|
9730
|
+
const next = [];
|
|
9731
|
+
for (const node of frontier) {
|
|
9732
|
+
if (seen.has(node)) continue;
|
|
9733
|
+
seen.add(node);
|
|
9734
|
+
const read = readFieldNode(node);
|
|
9735
|
+
if (!read) continue;
|
|
9736
|
+
nodes.set(node, read);
|
|
9737
|
+
for (const [, descriptor] of read.entries) {
|
|
9738
|
+
if (!("value" in descriptor)) continue;
|
|
9739
|
+
const child = descriptor.value;
|
|
9740
|
+
if (typeof child === "string") {
|
|
9741
|
+
if (!changed && maskText(child) !== child) changed = true;
|
|
9742
|
+
} else if (typeof child === "object" && child !== null) next.push(child);
|
|
9743
|
+
}
|
|
9744
|
+
}
|
|
9745
|
+
frontier = next;
|
|
9746
|
+
}
|
|
9747
|
+
if (!changed) return value;
|
|
9748
|
+
const copies = /* @__PURE__ */ new Map();
|
|
9749
|
+
for (const [node, read] of nodes) copies.set(node, read.isArray ? new Array(read.length?.value ?? 0) : Object.create(read.proto));
|
|
9750
|
+
for (const [node, read] of nodes) {
|
|
9751
|
+
const copy = copies.get(node);
|
|
9752
|
+
for (const [key, original] of read.entries) {
|
|
9753
|
+
if (key === "length" && read.isArray) continue;
|
|
9754
|
+
const descriptor = { ...original };
|
|
9755
|
+
if ("value" in descriptor) {
|
|
9756
|
+
const child = descriptor.value;
|
|
9757
|
+
if (typeof child === "string") descriptor.value = maskText(child);
|
|
9758
|
+
else if (typeof child === "object" && child !== null && copies.has(child)) descriptor.value = copies.get(child);
|
|
9759
|
+
}
|
|
9760
|
+
Object.defineProperty(copy, key, descriptor);
|
|
9761
|
+
}
|
|
9762
|
+
if (read.length?.writable === false) Object.defineProperty(copy, "length", { writable: false });
|
|
9763
|
+
if (!read.extensible) Object.preventExtensions(copy);
|
|
9764
|
+
}
|
|
9765
|
+
return copies.get(value) ?? value;
|
|
9766
|
+
} catch {
|
|
9767
|
+
return value;
|
|
9768
|
+
}
|
|
9769
|
+
}
|
|
9770
|
+
function maskSecretsInError(error, secrets, extraMask) {
|
|
9771
|
+
if (!(error instanceof Error) || !hasMaskableValues(secrets) && !extraMask) return error;
|
|
9772
|
+
const maskText = (text) => maskSecretsInText(extraMask ? extraMask(text) : text, secrets);
|
|
9773
|
+
const chain = errorCauseChain(error);
|
|
9774
|
+
let changed = false;
|
|
9775
|
+
const links = chain.map((link) => {
|
|
9776
|
+
const message = maskText(link.message);
|
|
9777
|
+
const stack = readStack(link);
|
|
9778
|
+
const maskedStack = typeof stack === "string" ? maskText(stack) : void 0;
|
|
9779
|
+
const descriptors = {};
|
|
9780
|
+
for (const key of Reflect.ownKeys(link)) {
|
|
9781
|
+
if (key === "message" || key === "cause" || key === "stack") continue;
|
|
9782
|
+
const descriptor = Object.getOwnPropertyDescriptor(link, key);
|
|
9783
|
+
if (!descriptor) continue;
|
|
9784
|
+
descriptors[key] = typeof key === "string" && CLASSIFIER_IDENTIFIER_FIELDS.has(key) && typeof descriptor.value === "string" || isAuxiliaryAnchor(key, descriptor) || isCreatedBeforeFailureMark(key, descriptor) ? descriptor : maskDescriptorValue(descriptor, maskText);
|
|
9785
|
+
if (descriptors[key] !== descriptor) changed = true;
|
|
9786
|
+
}
|
|
9787
|
+
let cause = Object.getOwnPropertyDescriptor(link, "cause");
|
|
9788
|
+
if (cause && !("value" in cause && cause.value instanceof Error)) {
|
|
9789
|
+
const masked = maskDescriptorValue(cause, maskText);
|
|
9790
|
+
if (masked !== cause) changed = true;
|
|
9791
|
+
cause = masked;
|
|
9792
|
+
}
|
|
9793
|
+
if (message !== link.message || maskedStack !== stack) changed = true;
|
|
9794
|
+
return {
|
|
9795
|
+
message,
|
|
9796
|
+
stack: maskedStack,
|
|
9797
|
+
descriptors,
|
|
9798
|
+
cause
|
|
9799
|
+
};
|
|
9800
|
+
});
|
|
9801
|
+
if (!changed) return error;
|
|
9802
|
+
const clones = /* @__PURE__ */ new Map();
|
|
9803
|
+
for (const [i, original] of chain.entries()) {
|
|
9804
|
+
const { message, stack, descriptors } = links[i];
|
|
9805
|
+
const clone = Object.create(Object.getPrototypeOf(original), descriptors);
|
|
9806
|
+
Object.defineProperty(clone, "message", {
|
|
9807
|
+
value: message,
|
|
9808
|
+
writable: true,
|
|
9809
|
+
enumerable: false,
|
|
9810
|
+
configurable: true
|
|
9811
|
+
});
|
|
9812
|
+
if (stack !== void 0) Object.defineProperty(clone, "stack", {
|
|
9813
|
+
value: stack,
|
|
9814
|
+
writable: true,
|
|
9815
|
+
enumerable: false,
|
|
9816
|
+
configurable: true
|
|
9817
|
+
});
|
|
9818
|
+
clones.set(original, clone);
|
|
9819
|
+
}
|
|
9820
|
+
for (const [i, original] of chain.entries()) {
|
|
9821
|
+
const causeDescriptor = links[i].cause;
|
|
9822
|
+
if (!causeDescriptor) continue;
|
|
9823
|
+
const clone = clones.get(original);
|
|
9824
|
+
const causeValue = original.cause;
|
|
9825
|
+
const replacement = causeValue instanceof Error ? clones.get(causeValue) : void 0;
|
|
9826
|
+
Object.defineProperty(clone, "cause", replacement ? {
|
|
9827
|
+
value: replacement,
|
|
9828
|
+
writable: true,
|
|
9829
|
+
enumerable: causeDescriptor.enumerable === true,
|
|
9830
|
+
configurable: true
|
|
9831
|
+
} : causeDescriptor);
|
|
9832
|
+
}
|
|
9833
|
+
return clones.get(error);
|
|
9834
|
+
}
|
|
9835
|
+
function createSecretMasker(secrets) {
|
|
9836
|
+
return (text) => maskSecretsInText(text, secrets);
|
|
9837
|
+
}
|
|
9838
|
+
|
|
9839
|
+
//#endregion
|
|
9840
|
+
//#region src/deployment/secret-redaction/log-only.ts
|
|
9841
|
+
const logOnlyValuesOf = /* @__PURE__ */ new WeakMap();
|
|
9842
|
+
function recordLogOnlyValue(secrets, plaintext) {
|
|
9843
|
+
if (plaintext === "") return;
|
|
9844
|
+
sideSetOf(logOnlyValuesOf, secrets).add(plaintext);
|
|
9845
|
+
}
|
|
9846
|
+
function carryLogOnlyValues(from, to) {
|
|
9847
|
+
const values = logOnlyValuesOf.get(from);
|
|
9848
|
+
if (values === void 0 || values.size === 0) return;
|
|
9849
|
+
const into = sideSetOf(logOnlyValuesOf, to);
|
|
9850
|
+
for (const value of values) into.add(value);
|
|
9851
|
+
}
|
|
9852
|
+
function carryLogOnlyValuesCarriedBy(from, to, value) {
|
|
9853
|
+
const values = logOnlyValuesOf.get(from);
|
|
9854
|
+
if (values === void 0 || values.size === 0) return;
|
|
9855
|
+
const leaves = printedLeavesOf(value);
|
|
9856
|
+
if (leaves.size === 0) return;
|
|
9857
|
+
for (const needle of values) for (const leaf of leaves) if (leaf === needle || needle.length >= 4 && leaf.includes(needle)) {
|
|
9858
|
+
recordLogOnlyValue(to, needle);
|
|
9859
|
+
break;
|
|
9860
|
+
}
|
|
9861
|
+
carryListElementFragments(values, to, value);
|
|
9862
|
+
}
|
|
9863
|
+
function carryListElementFragments(needles, to, value) {
|
|
9864
|
+
if (!Array.isArray(value) || value.length === 0) return;
|
|
9865
|
+
if (!value.every((e) => typeof e === "string" || typeof e === "number" || typeof e === "boolean")) return;
|
|
9866
|
+
const numeric = value.every((element) => typeof element === "number");
|
|
9867
|
+
const joined = value.map((element) => String(element)).join(",");
|
|
9868
|
+
for (const needle of [...needles]) {
|
|
9869
|
+
const pieces = needle.split(",").map((piece) => piece.trim());
|
|
9870
|
+
if (numeric && pieces.every((piece) => piece === "" || Number.isNaN(Number(piece)))) continue;
|
|
9871
|
+
const fragments = fragmentsOfNeedleIn(joined, ",", pieces.map((piece) => numeric ? String(Number(piece)) : piece).join(","));
|
|
9872
|
+
if (fragments.size === 0) continue;
|
|
9873
|
+
recordLogOnlyValue(to, needle);
|
|
9874
|
+
for (const fragment of fragments) recordLogOnlyValue(to, fragment);
|
|
9875
|
+
}
|
|
9876
|
+
}
|
|
9877
|
+
function recordLogOnlySplitFragments(from, to, text, delimiter, printed) {
|
|
9878
|
+
if (delimiter === "") return;
|
|
9879
|
+
const splits = [text.split(delimiter)];
|
|
9880
|
+
if (printed !== void 0 && (printed.length !== splits[0].length || printed.some((piece, i) => piece !== splits[0][i]))) splits.push(printed);
|
|
9881
|
+
for (const bag of from) {
|
|
9882
|
+
if (bag === void 0) continue;
|
|
9883
|
+
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);
|
|
9884
|
+
}
|
|
9885
|
+
}
|
|
9886
|
+
function fragmentsOfNeedleIn(text, delimiter, needle, pieces = text.split(delimiter)) {
|
|
9887
|
+
const fragments = /* @__PURE__ */ new Set();
|
|
9888
|
+
if (needle === "") return fragments;
|
|
9889
|
+
const starts = [];
|
|
9890
|
+
if (text === needle) starts.push(0);
|
|
9891
|
+
else if (needle.length >= 4) for (let at = text.indexOf(needle); at !== -1; at = text.indexOf(needle, at + 1)) starts.push(at);
|
|
9892
|
+
if (starts.length === 0) return fragments;
|
|
9893
|
+
const spans = [];
|
|
9894
|
+
let offset = 0;
|
|
9895
|
+
for (const piece of pieces) {
|
|
9896
|
+
spans.push([offset, offset + piece.length]);
|
|
9897
|
+
offset += piece.length + delimiter.length;
|
|
9898
|
+
}
|
|
9899
|
+
for (const start of starts) {
|
|
9900
|
+
const end = start + needle.length;
|
|
9901
|
+
for (const [pieceStart, pieceEnd] of spans) {
|
|
9902
|
+
const from = Math.max(pieceStart, start);
|
|
9903
|
+
const to = Math.min(pieceEnd, end);
|
|
9904
|
+
if (from < to) fragments.add(text.slice(from, to));
|
|
9905
|
+
}
|
|
9906
|
+
}
|
|
9907
|
+
return fragments;
|
|
9908
|
+
}
|
|
9909
|
+
function printedLeavesOf(value) {
|
|
9910
|
+
const leaves = wholeStringLeavesOf(value);
|
|
9911
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9912
|
+
const walk = (node) => {
|
|
9913
|
+
if (typeof node === "number" || typeof node === "boolean") {
|
|
9914
|
+
leaves.add(String(node));
|
|
9915
|
+
return;
|
|
9916
|
+
}
|
|
9917
|
+
if (node === null || typeof node !== "object") return;
|
|
9918
|
+
if (seen.has(node)) return;
|
|
9919
|
+
seen.add(node);
|
|
9920
|
+
for (const child of Array.isArray(node) ? node : Object.values(node)) walk(child);
|
|
9921
|
+
};
|
|
9922
|
+
walk(value);
|
|
9923
|
+
return leaves;
|
|
9924
|
+
}
|
|
9925
|
+
function shareLogOnlyValues(view, target) {
|
|
9926
|
+
logOnlyValuesOf.set(view, sideSetOf(logOnlyValuesOf, target));
|
|
9927
|
+
}
|
|
9928
|
+
function recordLogOnlyParameterValue(secrets, value, splitDelimiters) {
|
|
9929
|
+
const record = (leaf) => {
|
|
9930
|
+
const spelled = typeof leaf === "string" ? leaf : typeof leaf === "number" || typeof leaf === "boolean" ? String(leaf) : void 0;
|
|
9931
|
+
if (spelled === void 0) return;
|
|
9932
|
+
recordLogOnlyValue(secrets, spelled);
|
|
9933
|
+
for (const delimiter of splitDelimiters ?? []) {
|
|
9934
|
+
if (delimiter === "" || !spelled.includes(delimiter)) continue;
|
|
9935
|
+
for (const piece of spelled.split(delimiter)) recordLogOnlyValue(secrets, piece);
|
|
9936
|
+
}
|
|
9937
|
+
};
|
|
9938
|
+
if (Array.isArray(value)) {
|
|
9939
|
+
for (const element of value) record(element);
|
|
9940
|
+
record(value.map((element) => String(element)).join(","));
|
|
9941
|
+
return;
|
|
9942
|
+
}
|
|
9943
|
+
record(value);
|
|
9944
|
+
}
|
|
9945
|
+
function literalSplitDelimitersOf(template, parameters) {
|
|
9946
|
+
const delimiters = /* @__PURE__ */ new Set();
|
|
9947
|
+
if (parameters.size === 0) return delimiters;
|
|
9948
|
+
const reads = (node, seen) => {
|
|
9949
|
+
if (typeof node === "string") {
|
|
9950
|
+
for (const name of parameters) if (node.includes(`\${${name}}`)) return true;
|
|
9951
|
+
return false;
|
|
9952
|
+
}
|
|
9953
|
+
if (node === null || typeof node !== "object" || seen.has(node)) return false;
|
|
9954
|
+
seen.add(node);
|
|
9955
|
+
if (!Array.isArray(node)) {
|
|
9956
|
+
const ref = node["Ref"];
|
|
9957
|
+
if (typeof ref === "string" && parameters.has(ref)) return true;
|
|
9958
|
+
}
|
|
9959
|
+
for (const child of Array.isArray(node) ? node : Object.values(node)) if (reads(child, seen)) return true;
|
|
9960
|
+
return false;
|
|
9961
|
+
};
|
|
9962
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9963
|
+
const walk = (node) => {
|
|
9964
|
+
if (node === null || typeof node !== "object" || seen.has(node)) return;
|
|
9965
|
+
seen.add(node);
|
|
9966
|
+
if (Array.isArray(node)) {
|
|
9967
|
+
for (const child of node) walk(child);
|
|
9968
|
+
return;
|
|
9969
|
+
}
|
|
9970
|
+
for (const [key, child] of Object.entries(node)) {
|
|
9971
|
+
if (key === "Fn::Split" && Array.isArray(child) && typeof child[0] === "string" && reads(child[1], /* @__PURE__ */ new Set())) delimiters.add(child[0]);
|
|
9972
|
+
walk(child);
|
|
9973
|
+
}
|
|
9974
|
+
};
|
|
9975
|
+
walk(template);
|
|
9976
|
+
return delimiters;
|
|
9977
|
+
}
|
|
9978
|
+
function printingCorpusOf(secrets) {
|
|
9979
|
+
const logOnly = logOnlyValuesOf.get(secrets);
|
|
9980
|
+
if (logOnly === void 0 || logOnly.size === 0) return secrets;
|
|
9981
|
+
const corpus = new Map(secrets);
|
|
9982
|
+
for (const needle of logOnly) if (!corpus.has(needle)) corpus.set(needle, "***");
|
|
9983
|
+
return corpus;
|
|
9984
|
+
}
|
|
9985
|
+
function logOnlyValueCount(secrets) {
|
|
9986
|
+
return logOnlyValuesOf.get(secrets)?.size ?? 0;
|
|
9987
|
+
}
|
|
9988
|
+
function unionOfSecretBags(bags) {
|
|
9989
|
+
const union = /* @__PURE__ */ new Map();
|
|
9990
|
+
for (const bag of bags) {
|
|
9991
|
+
if (bag === void 0) continue;
|
|
9992
|
+
for (const [plaintext, expression] of bag) if (!union.has(plaintext)) union.set(plaintext, expression);
|
|
9993
|
+
carryLogOnlyValues(bag, union);
|
|
9994
|
+
}
|
|
9995
|
+
return union;
|
|
9996
|
+
}
|
|
9997
|
+
function createUnionSecretMasker(bags) {
|
|
9998
|
+
const present = bags.filter((bag) => bag !== void 0);
|
|
9999
|
+
let stamp;
|
|
10000
|
+
let needles = /* @__PURE__ */ new Set();
|
|
10001
|
+
let scanned = [];
|
|
10002
|
+
return (text) => {
|
|
10003
|
+
const now = present.map((bag) => `${bag.size}:${logOnlyValueCount(bag)}`).join(",");
|
|
10004
|
+
if (now !== stamp) {
|
|
10005
|
+
needles = /* @__PURE__ */ new Set();
|
|
10006
|
+
for (const bag of present) {
|
|
10007
|
+
for (const plaintext of bag.keys()) needles.add(plaintext);
|
|
10008
|
+
for (const plaintext of logOnlyValuesOf.get(bag) ?? []) needles.add(plaintext);
|
|
10009
|
+
}
|
|
10010
|
+
scanned = printingNeedles(needles);
|
|
10011
|
+
stamp = now;
|
|
10012
|
+
}
|
|
10013
|
+
if (text !== "" && needles.has(text)) return "***";
|
|
10014
|
+
return maskMatchSpans(text, scanned, "***");
|
|
10015
|
+
};
|
|
10016
|
+
}
|
|
10017
|
+
function hasLogOnlyValues(secrets) {
|
|
10018
|
+
if (secrets === void 0) return false;
|
|
10019
|
+
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10020
|
+
return logOnly !== void 0 && logOnly.size > 0;
|
|
10021
|
+
}
|
|
10022
|
+
function hasMaskableValues(secrets) {
|
|
10023
|
+
if (secrets === void 0) return false;
|
|
10024
|
+
if (secrets.size > 0) return true;
|
|
10025
|
+
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10026
|
+
return logOnly !== void 0 && logOnly.size > 0;
|
|
10027
|
+
}
|
|
10028
|
+
|
|
10029
|
+
//#endregion
|
|
10030
|
+
//#region src/deployment/secret-redaction/reference-provenance.ts
|
|
10031
|
+
const passProvenanceOf = /* @__PURE__ */ new WeakMap();
|
|
10032
|
+
const MAX_REFERENCE_VERSIONS = 8;
|
|
10033
|
+
function provenanceTableFor(secrets) {
|
|
10034
|
+
let table = passProvenanceOf.get(secrets);
|
|
10035
|
+
if (table === void 0) {
|
|
10036
|
+
table = /* @__PURE__ */ new Map();
|
|
10037
|
+
passProvenanceOf.set(secrets, table);
|
|
10038
|
+
}
|
|
10039
|
+
return table;
|
|
10040
|
+
}
|
|
10041
|
+
function shareReferenceProvenance(view, pass) {
|
|
10042
|
+
passProvenanceOf.set(view, provenanceTableFor(pass));
|
|
10043
|
+
}
|
|
10044
|
+
function entryFor(secrets, token) {
|
|
10045
|
+
const table = provenanceTableFor(secrets);
|
|
10046
|
+
let entry = table.get(token);
|
|
10047
|
+
if (entry === void 0) {
|
|
10048
|
+
entry = {
|
|
10049
|
+
regions: /* @__PURE__ */ new Set(),
|
|
10050
|
+
regionUnknown: false,
|
|
10051
|
+
versions: /* @__PURE__ */ new Set(),
|
|
10052
|
+
versionUnknown: false,
|
|
10053
|
+
readVersions: /* @__PURE__ */ new Set()
|
|
10054
|
+
};
|
|
10055
|
+
table.set(token, entry);
|
|
10056
|
+
}
|
|
10057
|
+
return entry;
|
|
10058
|
+
}
|
|
10059
|
+
function recordReferenceResolution(secrets, token, resolution) {
|
|
10060
|
+
const entry = entryFor(secrets, token);
|
|
10061
|
+
if (resolution.region === void 0) entry.regionUnknown = true;
|
|
10062
|
+
else entry.regions.add(resolution.region);
|
|
10063
|
+
if (resolution.version === void 0) {
|
|
10064
|
+
entry.versionUnknown = true;
|
|
10065
|
+
return;
|
|
10066
|
+
}
|
|
10067
|
+
entry.versions.add(resolution.version);
|
|
10068
|
+
if (resolution.route === "read") entry.readVersions.add(resolution.version);
|
|
10069
|
+
}
|
|
10070
|
+
function recordReferenceProvenanceEntry(secrets, token, provenance, route) {
|
|
10071
|
+
const entry = entryFor(secrets, token);
|
|
10072
|
+
if (provenance.region === void 0) entry.regionUnknown = true;
|
|
10073
|
+
else entry.regions.add(provenance.region);
|
|
10074
|
+
if (provenance.versions === void 0 || provenance.versions.length === 0) {
|
|
10075
|
+
entry.versionUnknown = true;
|
|
10076
|
+
return;
|
|
10077
|
+
}
|
|
10078
|
+
for (const version of provenance.versions) {
|
|
10079
|
+
entry.versions.add(version);
|
|
10080
|
+
if (route === "read") entry.readVersions.add(version);
|
|
10081
|
+
}
|
|
10082
|
+
if (route === "literal") for (const version of provenance.readVersions ?? []) entry.readVersions.add(version);
|
|
10083
|
+
}
|
|
10084
|
+
function mergeReferenceProvenance(from, to) {
|
|
10085
|
+
const source = passProvenanceOf.get(from);
|
|
10086
|
+
if (source === void 0 || from === to) return;
|
|
10087
|
+
for (const [token, entry] of source) {
|
|
10088
|
+
const target = entryFor(to, token);
|
|
10089
|
+
for (const region of entry.regions) target.regions.add(region);
|
|
10090
|
+
target.regionUnknown ||= entry.regionUnknown;
|
|
10091
|
+
for (const version of entry.versions) target.versions.add(version);
|
|
10092
|
+
target.versionUnknown ||= entry.versionUnknown;
|
|
10093
|
+
for (const version of entry.readVersions) target.readVersions.add(version);
|
|
10094
|
+
}
|
|
10095
|
+
}
|
|
10096
|
+
function hasPassProvenance(secrets) {
|
|
10097
|
+
if (secrets === void 0) return false;
|
|
10098
|
+
const table = passProvenanceOf.get(secrets);
|
|
10099
|
+
return table !== void 0 && table.size > 0;
|
|
10100
|
+
}
|
|
10101
|
+
function passProvenanceFor(secrets, token) {
|
|
10102
|
+
if (secrets === void 0) return void 0;
|
|
10103
|
+
const entry = passProvenanceOf.get(secrets)?.get(token);
|
|
10104
|
+
if (entry === void 0) return void 0;
|
|
10105
|
+
return finalize(entry);
|
|
10106
|
+
}
|
|
10107
|
+
function passReadVersionsFor(secrets, token) {
|
|
10108
|
+
if (secrets === void 0) return void 0;
|
|
10109
|
+
const read = passProvenanceOf.get(secrets)?.get(token)?.readVersions;
|
|
10110
|
+
return read === void 0 || read.size === 0 ? void 0 : read;
|
|
10111
|
+
}
|
|
10112
|
+
function finalize(entry) {
|
|
10113
|
+
const out = {};
|
|
10114
|
+
if (!entry.regionUnknown && entry.regions.size === 1) out.region = [...entry.regions][0];
|
|
10115
|
+
if (!entry.versionUnknown && entry.versions.size > 0 && entry.versions.size <= 8) {
|
|
10116
|
+
out.versions = [...entry.versions].sort();
|
|
10117
|
+
if (entry.readVersions.size > 0) out.readVersions = [...entry.readVersions].sort();
|
|
10118
|
+
}
|
|
10119
|
+
return out;
|
|
10120
|
+
}
|
|
10121
|
+
function snapshotPassProvenance(secrets) {
|
|
10122
|
+
if (secrets === void 0) return void 0;
|
|
10123
|
+
const table = passProvenanceOf.get(secrets);
|
|
10124
|
+
if (table === void 0 || table.size === 0) return void 0;
|
|
10125
|
+
const out = /* @__PURE__ */ new Map();
|
|
10126
|
+
for (const [token, entry] of table) out.set(token, finalize(entry));
|
|
10127
|
+
return out;
|
|
10128
|
+
}
|
|
10129
|
+
|
|
10130
|
+
//#endregion
|
|
10131
|
+
//#region src/deployment/secret-redaction/recording.ts
|
|
10132
|
+
const scopeMaps = /* @__PURE__ */ new WeakSet();
|
|
10133
|
+
var WriteThroughSecrets = class extends Map {
|
|
10134
|
+
pass;
|
|
10135
|
+
constructor(pass) {
|
|
10136
|
+
super();
|
|
10137
|
+
this.pass = pass;
|
|
10138
|
+
}
|
|
10139
|
+
set(plaintext, expression) {
|
|
10140
|
+
super.set(plaintext, expression);
|
|
10141
|
+
this.pass.set(plaintext, expression);
|
|
10142
|
+
return this;
|
|
10143
|
+
}
|
|
10144
|
+
};
|
|
10145
|
+
function openRecordingScope(pass, policy) {
|
|
10146
|
+
const secrets = new WriteThroughSecrets(pass);
|
|
10147
|
+
scopeMaps.add(secrets);
|
|
10148
|
+
shareLogOnlyValues(secrets, pass);
|
|
10149
|
+
for (const [kind, share] of Object.entries(SCOPE_SHARERS)) if (policy[kind] === "carry") share(secrets, pass);
|
|
10150
|
+
return {
|
|
10151
|
+
secrets,
|
|
10152
|
+
pass
|
|
10153
|
+
};
|
|
10154
|
+
}
|
|
10155
|
+
const SCOPE_SHARERS = {
|
|
10156
|
+
pairs: sharePairTable,
|
|
10157
|
+
"mask-only-marks": (scope, pass) => {
|
|
10158
|
+
for (const table of [
|
|
10159
|
+
freshNoEchoValuesOf,
|
|
10160
|
+
containmentValuesOf,
|
|
10161
|
+
noEchoParameterValuesOf
|
|
10162
|
+
]) table.set(scope, sideSetOf(table, pass));
|
|
10163
|
+
},
|
|
10164
|
+
"reference-provenance": shareReferenceProvenance,
|
|
10165
|
+
"physical-name-copies": (scope, pass) => {
|
|
10166
|
+
physicalNameCopiesOf.set(scope, sideSetOf(physicalNameCopiesOf, pass));
|
|
10167
|
+
},
|
|
10168
|
+
"public-proofs": sharePublicProofs
|
|
10169
|
+
};
|
|
10170
|
+
function isRecordingScope(secrets) {
|
|
10171
|
+
return scopeMaps.has(secrets);
|
|
10172
|
+
}
|
|
10173
|
+
function foldRecording(from, to, policy) {
|
|
10174
|
+
if (from === to) return;
|
|
10175
|
+
for (const [plaintext, expression] of from) to.set(plaintext, expression);
|
|
10176
|
+
for (const [kind, carry] of Object.entries(FOLD_CARRIERS)) if (policy[kind] === "carry") carry(from, to);
|
|
10177
|
+
}
|
|
10178
|
+
const FOLD_CARRIERS = {
|
|
10179
|
+
"mask-only-marks": carryMaskOnlyMarks,
|
|
10180
|
+
"reference-provenance": mergeReferenceProvenance,
|
|
10181
|
+
pairs: mergePairTables,
|
|
10182
|
+
"log-only": carryLogOnlyValues,
|
|
10183
|
+
"physical-name-copies": (from, to) => {
|
|
10184
|
+
for (const physicalId of physicalNameCopiesOf.get(from) ?? []) recordPhysicalNameCopy(to, physicalId);
|
|
10185
|
+
},
|
|
10186
|
+
"public-proofs": carryPublicProofs
|
|
10187
|
+
};
|
|
10188
|
+
function recordSecretResolution(secrets, expression, plaintext, options) {
|
|
10189
|
+
secrets.set(plaintext, expression);
|
|
10190
|
+
if (options.pairEvidence) recordResolvedPair(secrets, expression, plaintext);
|
|
10191
|
+
}
|
|
10192
|
+
|
|
10193
|
+
//#endregion
|
|
10194
|
+
//#region src/deployment/secret-redaction/context.ts
|
|
10195
|
+
const RULES_BY_PROVENANCE = {
|
|
10196
|
+
"template-derived": TEMPLATE_DERIVED_RULES,
|
|
10197
|
+
"template-sourced": TEMPLATE_SOURCED_RULES,
|
|
10198
|
+
"state-readback": STATE_SOURCED_READBACK_RULES,
|
|
10199
|
+
"state-baseline": STATE_SOURCED_BASELINE_RULES,
|
|
10200
|
+
"state-cross-generation": STATE_SOURCED_CROSS_GENERATION_RULES,
|
|
10201
|
+
"state-derived": STATE_DERIVED_RULES
|
|
10202
|
+
};
|
|
10203
|
+
function redactForState(bag, context) {
|
|
10204
|
+
refuseScopeAsPass(context.secrets);
|
|
10205
|
+
if (context.provenance === "value-scan") return redactSecretsForState(bag, context.secrets);
|
|
10206
|
+
const { secrets, source, provenance } = context;
|
|
10207
|
+
if (!((context.provenance === "template-derived" || context.provenance === "template-sourced") && context.generation === "same-generation") || !isPlainBag(bag)) return redactAtProvenance(bag, secrets, source, provenance, false);
|
|
10208
|
+
const copy = shallowCopy(bag);
|
|
10209
|
+
const redacted = redactAtProvenance(copy, secrets, source, provenance, true);
|
|
10210
|
+
return redacted === copy ? shallowCopy(copy) : redacted;
|
|
10211
|
+
}
|
|
10212
|
+
function redactAtProvenance(bag, secrets, source, provenance, sameGeneration) {
|
|
10213
|
+
refuseScopeAsPass(secrets);
|
|
10214
|
+
return redactSecretsForState(bag, secrets, source, RULES_BY_PROVENANCE[provenance], sameGeneration);
|
|
10215
|
+
}
|
|
10216
|
+
function refuseScopeAsPass(secrets) {
|
|
10217
|
+
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.");
|
|
10218
|
+
}
|
|
10219
|
+
function isPlainBag(bag) {
|
|
10220
|
+
if (Array.isArray(bag)) return true;
|
|
10221
|
+
if (bag === null || typeof bag !== "object") return false;
|
|
10222
|
+
const proto = Object.getPrototypeOf(bag);
|
|
10223
|
+
return proto === Object.prototype || proto === null;
|
|
10224
|
+
}
|
|
10225
|
+
function shallowCopy(bag) {
|
|
10226
|
+
return Array.isArray(bag) ? [...bag] : { ...bag };
|
|
10227
|
+
}
|
|
10228
|
+
|
|
9571
10229
|
//#endregion
|
|
9572
10230
|
//#region src/deployment/secret-redaction/positions.ts
|
|
9573
10231
|
const SKELETON_WILDCARD = `${DYNAMIC_REFERENCE_INNER_CHAR}*`;
|
|
@@ -9674,10 +10332,16 @@ function positionByEmbeddedSpan(bag, source, secrets, bagIsSameGeneration) {
|
|
|
9674
10332
|
const frame = singleSpanFrame(bag, source);
|
|
9675
10333
|
if (frame === void 0) {
|
|
9676
10334
|
if (dynamicReferenceSpans(source).length >= 2 && certifiesRenderedLiteral(bag, source, secrets, bagIsSameGeneration)) return source;
|
|
9677
|
-
return
|
|
10335
|
+
return redactForState(bag, {
|
|
10336
|
+
provenance: "value-scan",
|
|
10337
|
+
secrets
|
|
10338
|
+
});
|
|
9678
10339
|
}
|
|
9679
10340
|
const recorded = resolvedPlaintextOf(secrets, frame.token);
|
|
9680
|
-
if (recorded === void 0 || recorded !== frame.middle) return
|
|
10341
|
+
if (recorded === void 0 || recorded !== frame.middle) return redactForState(bag, {
|
|
10342
|
+
provenance: "value-scan",
|
|
10343
|
+
secrets
|
|
10344
|
+
});
|
|
9681
10345
|
return writeFramedTokenWithinScanBound(bag, secrets, frame, bagIsSameGeneration);
|
|
9682
10346
|
}
|
|
9683
10347
|
function pairedSpans(source, secrets) {
|
|
@@ -9717,7 +10381,10 @@ function renderedLiteralSpans(spelling, secrets, value) {
|
|
|
9717
10381
|
const spans = pairedSpans(spelling, secrets);
|
|
9718
10382
|
if (spans === void 0) return void 0;
|
|
9719
10383
|
if (renderSpans(spelling, spans, (i) => spans[i].plaintext) !== value) return void 0;
|
|
9720
|
-
return
|
|
10384
|
+
return redactForState(spelling, {
|
|
10385
|
+
provenance: "value-scan",
|
|
10386
|
+
secrets
|
|
10387
|
+
}) === spelling ? spans : void 0;
|
|
9721
10388
|
}
|
|
9722
10389
|
function certifiesRenderedLiteral(bag, source, secrets, bagIsSameGeneration) {
|
|
9723
10390
|
const spans = renderedLiteralSpans(source, secrets, bag);
|
|
@@ -9728,13 +10395,19 @@ function certifiesRenderedLiteral(bag, source, secrets, bagIsSameGeneration) {
|
|
|
9728
10395
|
if (survivor === void 0) return false;
|
|
9729
10396
|
survivors.push(survivor);
|
|
9730
10397
|
}
|
|
9731
|
-
const scanned =
|
|
10398
|
+
const scanned = redactForState(bag, {
|
|
10399
|
+
provenance: "value-scan",
|
|
10400
|
+
secrets
|
|
10401
|
+
});
|
|
9732
10402
|
if (scanned === renderSpans(source, spans, (i) => survivors[i])) return true;
|
|
9733
10403
|
if (!bagIsSameGeneration) return false;
|
|
9734
10404
|
return scanned === renderSpans(source, spans, (i) => spans[i].plaintext.length >= 4 ? survivors[i] : spans[i].plaintext);
|
|
9735
10405
|
}
|
|
9736
10406
|
function writeFramedTokenWithinScanBound(bag, secrets, frame, bagIsSameGeneration) {
|
|
9737
|
-
const scanned =
|
|
10407
|
+
const scanned = redactForState(bag, {
|
|
10408
|
+
provenance: "value-scan",
|
|
10409
|
+
secrets
|
|
10410
|
+
});
|
|
9738
10411
|
const { token, prefix, suffix, middle } = frame;
|
|
9739
10412
|
const survivor = secrets.get(middle);
|
|
9740
10413
|
if (survivor === void 0) return scanned;
|
|
@@ -9775,100 +10448,6 @@ function positionByIntrinsicFrame(bag, source, secrets, secretExpressions, bagIs
|
|
|
9775
10448
|
}, bagIsSameGeneration);
|
|
9776
10449
|
}
|
|
9777
10450
|
|
|
9778
|
-
//#endregion
|
|
9779
|
-
//#region src/deployment/secret-redaction/reference-provenance.ts
|
|
9780
|
-
const passProvenanceOf = /* @__PURE__ */ new WeakMap();
|
|
9781
|
-
const MAX_REFERENCE_VERSIONS = 8;
|
|
9782
|
-
function entryFor(secrets, token) {
|
|
9783
|
-
let table = passProvenanceOf.get(secrets);
|
|
9784
|
-
if (table === void 0) {
|
|
9785
|
-
table = /* @__PURE__ */ new Map();
|
|
9786
|
-
passProvenanceOf.set(secrets, table);
|
|
9787
|
-
}
|
|
9788
|
-
let entry = table.get(token);
|
|
9789
|
-
if (entry === void 0) {
|
|
9790
|
-
entry = {
|
|
9791
|
-
regions: /* @__PURE__ */ new Set(),
|
|
9792
|
-
regionUnknown: false,
|
|
9793
|
-
versions: /* @__PURE__ */ new Set(),
|
|
9794
|
-
versionUnknown: false,
|
|
9795
|
-
readVersions: /* @__PURE__ */ new Set()
|
|
9796
|
-
};
|
|
9797
|
-
table.set(token, entry);
|
|
9798
|
-
}
|
|
9799
|
-
return entry;
|
|
9800
|
-
}
|
|
9801
|
-
function recordReferenceResolution(secrets, token, resolution) {
|
|
9802
|
-
const entry = entryFor(secrets, token);
|
|
9803
|
-
if (resolution.region === void 0) entry.regionUnknown = true;
|
|
9804
|
-
else entry.regions.add(resolution.region);
|
|
9805
|
-
if (resolution.version === void 0) {
|
|
9806
|
-
entry.versionUnknown = true;
|
|
9807
|
-
return;
|
|
9808
|
-
}
|
|
9809
|
-
entry.versions.add(resolution.version);
|
|
9810
|
-
if (resolution.route === "read") entry.readVersions.add(resolution.version);
|
|
9811
|
-
}
|
|
9812
|
-
function recordReferenceProvenanceEntry(secrets, token, provenance, route) {
|
|
9813
|
-
const entry = entryFor(secrets, token);
|
|
9814
|
-
if (provenance.region === void 0) entry.regionUnknown = true;
|
|
9815
|
-
else entry.regions.add(provenance.region);
|
|
9816
|
-
if (provenance.versions === void 0 || provenance.versions.length === 0) {
|
|
9817
|
-
entry.versionUnknown = true;
|
|
9818
|
-
return;
|
|
9819
|
-
}
|
|
9820
|
-
for (const version of provenance.versions) {
|
|
9821
|
-
entry.versions.add(version);
|
|
9822
|
-
if (route === "read") entry.readVersions.add(version);
|
|
9823
|
-
}
|
|
9824
|
-
if (route === "literal") for (const version of provenance.readVersions ?? []) entry.readVersions.add(version);
|
|
9825
|
-
}
|
|
9826
|
-
function mergeReferenceProvenance(from, to) {
|
|
9827
|
-
const source = passProvenanceOf.get(from);
|
|
9828
|
-
if (source === void 0 || from === to) return;
|
|
9829
|
-
for (const [token, entry] of source) {
|
|
9830
|
-
const target = entryFor(to, token);
|
|
9831
|
-
for (const region of entry.regions) target.regions.add(region);
|
|
9832
|
-
target.regionUnknown ||= entry.regionUnknown;
|
|
9833
|
-
for (const version of entry.versions) target.versions.add(version);
|
|
9834
|
-
target.versionUnknown ||= entry.versionUnknown;
|
|
9835
|
-
for (const version of entry.readVersions) target.readVersions.add(version);
|
|
9836
|
-
}
|
|
9837
|
-
}
|
|
9838
|
-
function hasPassProvenance(secrets) {
|
|
9839
|
-
if (secrets === void 0) return false;
|
|
9840
|
-
const table = passProvenanceOf.get(secrets);
|
|
9841
|
-
return table !== void 0 && table.size > 0;
|
|
9842
|
-
}
|
|
9843
|
-
function passProvenanceFor(secrets, token) {
|
|
9844
|
-
if (secrets === void 0) return void 0;
|
|
9845
|
-
const entry = passProvenanceOf.get(secrets)?.get(token);
|
|
9846
|
-
if (entry === void 0) return void 0;
|
|
9847
|
-
return finalize(entry);
|
|
9848
|
-
}
|
|
9849
|
-
function passReadVersionsFor(secrets, token) {
|
|
9850
|
-
if (secrets === void 0) return void 0;
|
|
9851
|
-
const read = passProvenanceOf.get(secrets)?.get(token)?.readVersions;
|
|
9852
|
-
return read === void 0 || read.size === 0 ? void 0 : read;
|
|
9853
|
-
}
|
|
9854
|
-
function finalize(entry) {
|
|
9855
|
-
const out = {};
|
|
9856
|
-
if (!entry.regionUnknown && entry.regions.size === 1) out.region = [...entry.regions][0];
|
|
9857
|
-
if (!entry.versionUnknown && entry.versions.size > 0 && entry.versions.size <= 8) {
|
|
9858
|
-
out.versions = [...entry.versions].sort();
|
|
9859
|
-
if (entry.readVersions.size > 0) out.readVersions = [...entry.readVersions].sort();
|
|
9860
|
-
}
|
|
9861
|
-
return out;
|
|
9862
|
-
}
|
|
9863
|
-
function snapshotPassProvenance(secrets) {
|
|
9864
|
-
if (secrets === void 0) return void 0;
|
|
9865
|
-
const table = passProvenanceOf.get(secrets);
|
|
9866
|
-
if (table === void 0 || table.size === 0) return void 0;
|
|
9867
|
-
const out = /* @__PURE__ */ new Map();
|
|
9868
|
-
for (const [token, entry] of table) out.set(token, finalize(entry));
|
|
9869
|
-
return out;
|
|
9870
|
-
}
|
|
9871
|
-
|
|
9872
10451
|
//#endregion
|
|
9873
10452
|
//#region src/deployment/secret-redaction/pairs.ts
|
|
9874
10453
|
const resolvedPairsOf = /* @__PURE__ */ new WeakMap();
|
|
@@ -9890,11 +10469,17 @@ function recordResolvedPair(secrets, expression, plaintext) {
|
|
|
9890
10469
|
function mergeResolvedPairs(from, to) {
|
|
9891
10470
|
carryMaskOnlyMarks(from, to);
|
|
9892
10471
|
mergeReferenceProvenance(from, to);
|
|
10472
|
+
mergePairTables(from, to);
|
|
10473
|
+
}
|
|
10474
|
+
function mergePairTables(from, to) {
|
|
9893
10475
|
const pairs = resolvedPairsOf.get(from);
|
|
9894
10476
|
if (pairs === void 0) return;
|
|
9895
10477
|
for (const [expression, plaintext] of pairs) if (typeof plaintext === "string") recordResolvedPair(to, expression, plaintext);
|
|
9896
10478
|
else pairsFor(to).set(expression, CONFLICTING_PLAINTEXT);
|
|
9897
10479
|
}
|
|
10480
|
+
function sharePairTable(view, pass) {
|
|
10481
|
+
resolvedPairsOf.set(view, pairsFor(pass));
|
|
10482
|
+
}
|
|
9898
10483
|
function resolvedPlaintextOf(secrets, expression) {
|
|
9899
10484
|
const recorded = resolvedPairsOf.get(secrets)?.get(expression);
|
|
9900
10485
|
return typeof recorded === "string" ? recorded : void 0;
|
|
@@ -9979,398 +10564,6 @@ function isSameGenerationBag(bag) {
|
|
|
9979
10564
|
return sameGenerationBags.has(bag);
|
|
9980
10565
|
}
|
|
9981
10566
|
|
|
9982
|
-
//#endregion
|
|
9983
|
-
//#region src/deployment/secret-redaction/mask-errors.ts
|
|
9984
|
-
function maskSecretsInText(text, secrets) {
|
|
9985
|
-
const logOnly = logOnlyValuesOf.get(secrets);
|
|
9986
|
-
const noLogOnly = logOnly === void 0 || logOnly.size === 0;
|
|
9987
|
-
if (secrets.size === 0 && noLogOnly) return text;
|
|
9988
|
-
if (text !== "" && (secrets.has(text) || logOnly?.has(text) === true)) return "***";
|
|
9989
|
-
return maskMatchSpans(text, printingNeedles(noLogOnly ? secrets.keys() : [...secrets.keys(), ...logOnly]), "***");
|
|
9990
|
-
}
|
|
9991
|
-
function maskRecordedSecretsInText(text, secrets) {
|
|
9992
|
-
if (secrets.size === 0) return text;
|
|
9993
|
-
if (text !== "" && secrets.has(text)) return "***";
|
|
9994
|
-
return maskMatchSpans(text, substringNeedles(secrets.keys()), "***");
|
|
9995
|
-
}
|
|
9996
|
-
function substringNeedles(values) {
|
|
9997
|
-
return [...new Set(values)].filter((value) => value.length >= 4);
|
|
9998
|
-
}
|
|
9999
|
-
const ERROR_CAUSE_MASK_MAX_DEPTH = 20;
|
|
10000
|
-
function errorCauseChain(root) {
|
|
10001
|
-
const chain = [];
|
|
10002
|
-
const seen = /* @__PURE__ */ new Set();
|
|
10003
|
-
let current = root;
|
|
10004
|
-
while (current instanceof Error && !seen.has(current) && chain.length < 20) {
|
|
10005
|
-
seen.add(current);
|
|
10006
|
-
chain.push(current);
|
|
10007
|
-
current = current.cause;
|
|
10008
|
-
}
|
|
10009
|
-
return chain;
|
|
10010
|
-
}
|
|
10011
|
-
function readStack(error) {
|
|
10012
|
-
try {
|
|
10013
|
-
const stack = error.stack;
|
|
10014
|
-
return typeof stack === "string" ? stack : void 0;
|
|
10015
|
-
} catch {
|
|
10016
|
-
return;
|
|
10017
|
-
}
|
|
10018
|
-
}
|
|
10019
|
-
function maskDescriptorValue(descriptor, maskText) {
|
|
10020
|
-
if (!("value" in descriptor)) return descriptor;
|
|
10021
|
-
const value = maskErrorFieldValue(descriptor.value, maskText);
|
|
10022
|
-
return value === descriptor.value ? descriptor : {
|
|
10023
|
-
...descriptor,
|
|
10024
|
-
value
|
|
10025
|
-
};
|
|
10026
|
-
}
|
|
10027
|
-
const CLASSIFIER_IDENTIFIER_FIELDS = /* @__PURE__ */ new Set([
|
|
10028
|
-
"name",
|
|
10029
|
-
"code",
|
|
10030
|
-
"Code",
|
|
10031
|
-
"__type",
|
|
10032
|
-
"ccErrorCode",
|
|
10033
|
-
"ccOperation"
|
|
10034
|
-
]);
|
|
10035
|
-
function isAuxiliaryAnchor(key, descriptor) {
|
|
10036
|
-
return key === "logicalId" && descriptor.enumerable === false && descriptor.writable === false && typeof descriptor.value === "string" && descriptor.value.endsWith("/auxiliary");
|
|
10037
|
-
}
|
|
10038
|
-
const CREATED_BEFORE_FAILURE_MARK = Symbol.for("cdkd.createdBeforeFailure");
|
|
10039
|
-
function isCreatedBeforeFailureMark(key, descriptor) {
|
|
10040
|
-
return key === CREATED_BEFORE_FAILURE_MARK && descriptor.enumerable === false && descriptor.writable === false && typeof descriptor.value === "object" && descriptor.value !== null && Object.isFrozen(descriptor.value);
|
|
10041
|
-
}
|
|
10042
|
-
function isPlainContainer(value) {
|
|
10043
|
-
const proto = Object.getPrototypeOf(value);
|
|
10044
|
-
return Array.isArray(value) ? proto === Array.prototype : proto === Object.prototype || proto === null;
|
|
10045
|
-
}
|
|
10046
|
-
function readFieldNode(node) {
|
|
10047
|
-
try {
|
|
10048
|
-
if (!isPlainContainer(node)) return void 0;
|
|
10049
|
-
const entries = [];
|
|
10050
|
-
for (const key of Reflect.ownKeys(node)) {
|
|
10051
|
-
const descriptor = Object.getOwnPropertyDescriptor(node, key);
|
|
10052
|
-
if (descriptor) entries.push([key, descriptor]);
|
|
10053
|
-
}
|
|
10054
|
-
const isArray = Array.isArray(node);
|
|
10055
|
-
return {
|
|
10056
|
-
proto: Object.getPrototypeOf(node),
|
|
10057
|
-
isArray,
|
|
10058
|
-
length: isArray ? Object.getOwnPropertyDescriptor(node, "length") : void 0,
|
|
10059
|
-
extensible: Object.isExtensible(node),
|
|
10060
|
-
entries
|
|
10061
|
-
};
|
|
10062
|
-
} catch {
|
|
10063
|
-
return;
|
|
10064
|
-
}
|
|
10065
|
-
}
|
|
10066
|
-
function maskErrorFieldValue(value, maskText) {
|
|
10067
|
-
if (typeof value === "string") return maskText(value);
|
|
10068
|
-
if (typeof value !== "object" || value === null) return value;
|
|
10069
|
-
try {
|
|
10070
|
-
const nodes = /* @__PURE__ */ new Map();
|
|
10071
|
-
const seen = /* @__PURE__ */ new Set();
|
|
10072
|
-
let changed = false;
|
|
10073
|
-
let frontier = [value];
|
|
10074
|
-
for (let depth = 0; frontier.length > 0 && depth < 20; depth++) {
|
|
10075
|
-
const next = [];
|
|
10076
|
-
for (const node of frontier) {
|
|
10077
|
-
if (seen.has(node)) continue;
|
|
10078
|
-
seen.add(node);
|
|
10079
|
-
const read = readFieldNode(node);
|
|
10080
|
-
if (!read) continue;
|
|
10081
|
-
nodes.set(node, read);
|
|
10082
|
-
for (const [, descriptor] of read.entries) {
|
|
10083
|
-
if (!("value" in descriptor)) continue;
|
|
10084
|
-
const child = descriptor.value;
|
|
10085
|
-
if (typeof child === "string") {
|
|
10086
|
-
if (!changed && maskText(child) !== child) changed = true;
|
|
10087
|
-
} else if (typeof child === "object" && child !== null) next.push(child);
|
|
10088
|
-
}
|
|
10089
|
-
}
|
|
10090
|
-
frontier = next;
|
|
10091
|
-
}
|
|
10092
|
-
if (!changed) return value;
|
|
10093
|
-
const copies = /* @__PURE__ */ new Map();
|
|
10094
|
-
for (const [node, read] of nodes) copies.set(node, read.isArray ? new Array(read.length?.value ?? 0) : Object.create(read.proto));
|
|
10095
|
-
for (const [node, read] of nodes) {
|
|
10096
|
-
const copy = copies.get(node);
|
|
10097
|
-
for (const [key, original] of read.entries) {
|
|
10098
|
-
if (key === "length" && read.isArray) continue;
|
|
10099
|
-
const descriptor = { ...original };
|
|
10100
|
-
if ("value" in descriptor) {
|
|
10101
|
-
const child = descriptor.value;
|
|
10102
|
-
if (typeof child === "string") descriptor.value = maskText(child);
|
|
10103
|
-
else if (typeof child === "object" && child !== null && copies.has(child)) descriptor.value = copies.get(child);
|
|
10104
|
-
}
|
|
10105
|
-
Object.defineProperty(copy, key, descriptor);
|
|
10106
|
-
}
|
|
10107
|
-
if (read.length?.writable === false) Object.defineProperty(copy, "length", { writable: false });
|
|
10108
|
-
if (!read.extensible) Object.preventExtensions(copy);
|
|
10109
|
-
}
|
|
10110
|
-
return copies.get(value) ?? value;
|
|
10111
|
-
} catch {
|
|
10112
|
-
return value;
|
|
10113
|
-
}
|
|
10114
|
-
}
|
|
10115
|
-
function maskSecretsInError(error, secrets, extraMask) {
|
|
10116
|
-
if (!(error instanceof Error) || !hasMaskableValues(secrets) && !extraMask) return error;
|
|
10117
|
-
const maskText = (text) => maskSecretsInText(extraMask ? extraMask(text) : text, secrets);
|
|
10118
|
-
const chain = errorCauseChain(error);
|
|
10119
|
-
let changed = false;
|
|
10120
|
-
const links = chain.map((link) => {
|
|
10121
|
-
const message = maskText(link.message);
|
|
10122
|
-
const stack = readStack(link);
|
|
10123
|
-
const maskedStack = typeof stack === "string" ? maskText(stack) : void 0;
|
|
10124
|
-
const descriptors = {};
|
|
10125
|
-
for (const key of Reflect.ownKeys(link)) {
|
|
10126
|
-
if (key === "message" || key === "cause" || key === "stack") continue;
|
|
10127
|
-
const descriptor = Object.getOwnPropertyDescriptor(link, key);
|
|
10128
|
-
if (!descriptor) continue;
|
|
10129
|
-
descriptors[key] = typeof key === "string" && CLASSIFIER_IDENTIFIER_FIELDS.has(key) && typeof descriptor.value === "string" || isAuxiliaryAnchor(key, descriptor) || isCreatedBeforeFailureMark(key, descriptor) ? descriptor : maskDescriptorValue(descriptor, maskText);
|
|
10130
|
-
if (descriptors[key] !== descriptor) changed = true;
|
|
10131
|
-
}
|
|
10132
|
-
let cause = Object.getOwnPropertyDescriptor(link, "cause");
|
|
10133
|
-
if (cause && !("value" in cause && cause.value instanceof Error)) {
|
|
10134
|
-
const masked = maskDescriptorValue(cause, maskText);
|
|
10135
|
-
if (masked !== cause) changed = true;
|
|
10136
|
-
cause = masked;
|
|
10137
|
-
}
|
|
10138
|
-
if (message !== link.message || maskedStack !== stack) changed = true;
|
|
10139
|
-
return {
|
|
10140
|
-
message,
|
|
10141
|
-
stack: maskedStack,
|
|
10142
|
-
descriptors,
|
|
10143
|
-
cause
|
|
10144
|
-
};
|
|
10145
|
-
});
|
|
10146
|
-
if (!changed) return error;
|
|
10147
|
-
const clones = /* @__PURE__ */ new Map();
|
|
10148
|
-
for (const [i, original] of chain.entries()) {
|
|
10149
|
-
const { message, stack, descriptors } = links[i];
|
|
10150
|
-
const clone = Object.create(Object.getPrototypeOf(original), descriptors);
|
|
10151
|
-
Object.defineProperty(clone, "message", {
|
|
10152
|
-
value: message,
|
|
10153
|
-
writable: true,
|
|
10154
|
-
enumerable: false,
|
|
10155
|
-
configurable: true
|
|
10156
|
-
});
|
|
10157
|
-
if (stack !== void 0) Object.defineProperty(clone, "stack", {
|
|
10158
|
-
value: stack,
|
|
10159
|
-
writable: true,
|
|
10160
|
-
enumerable: false,
|
|
10161
|
-
configurable: true
|
|
10162
|
-
});
|
|
10163
|
-
clones.set(original, clone);
|
|
10164
|
-
}
|
|
10165
|
-
for (const [i, original] of chain.entries()) {
|
|
10166
|
-
const causeDescriptor = links[i].cause;
|
|
10167
|
-
if (!causeDescriptor) continue;
|
|
10168
|
-
const clone = clones.get(original);
|
|
10169
|
-
const causeValue = original.cause;
|
|
10170
|
-
const replacement = causeValue instanceof Error ? clones.get(causeValue) : void 0;
|
|
10171
|
-
Object.defineProperty(clone, "cause", replacement ? {
|
|
10172
|
-
value: replacement,
|
|
10173
|
-
writable: true,
|
|
10174
|
-
enumerable: causeDescriptor.enumerable === true,
|
|
10175
|
-
configurable: true
|
|
10176
|
-
} : causeDescriptor);
|
|
10177
|
-
}
|
|
10178
|
-
return clones.get(error);
|
|
10179
|
-
}
|
|
10180
|
-
function createSecretMasker(secrets) {
|
|
10181
|
-
return (text) => maskSecretsInText(text, secrets);
|
|
10182
|
-
}
|
|
10183
|
-
|
|
10184
|
-
//#endregion
|
|
10185
|
-
//#region src/deployment/secret-redaction/log-only.ts
|
|
10186
|
-
const logOnlyValuesOf = /* @__PURE__ */ new WeakMap();
|
|
10187
|
-
function recordLogOnlyValue(secrets, plaintext) {
|
|
10188
|
-
if (plaintext === "") return;
|
|
10189
|
-
sideSetOf(logOnlyValuesOf, secrets).add(plaintext);
|
|
10190
|
-
}
|
|
10191
|
-
function carryLogOnlyValues(from, to) {
|
|
10192
|
-
const values = logOnlyValuesOf.get(from);
|
|
10193
|
-
if (values === void 0 || values.size === 0) return;
|
|
10194
|
-
const into = sideSetOf(logOnlyValuesOf, to);
|
|
10195
|
-
for (const value of values) into.add(value);
|
|
10196
|
-
}
|
|
10197
|
-
function carryLogOnlyValuesCarriedBy(from, to, value) {
|
|
10198
|
-
const values = logOnlyValuesOf.get(from);
|
|
10199
|
-
if (values === void 0 || values.size === 0) return;
|
|
10200
|
-
const leaves = printedLeavesOf(value);
|
|
10201
|
-
if (leaves.size === 0) return;
|
|
10202
|
-
for (const needle of values) for (const leaf of leaves) if (leaf === needle || needle.length >= 4 && leaf.includes(needle)) {
|
|
10203
|
-
recordLogOnlyValue(to, needle);
|
|
10204
|
-
break;
|
|
10205
|
-
}
|
|
10206
|
-
carryListElementFragments(values, to, value);
|
|
10207
|
-
}
|
|
10208
|
-
function carryListElementFragments(needles, to, value) {
|
|
10209
|
-
if (!Array.isArray(value) || value.length === 0) return;
|
|
10210
|
-
if (!value.every((e) => typeof e === "string" || typeof e === "number" || typeof e === "boolean")) return;
|
|
10211
|
-
const numeric = value.every((element) => typeof element === "number");
|
|
10212
|
-
const joined = value.map((element) => String(element)).join(",");
|
|
10213
|
-
for (const needle of [...needles]) {
|
|
10214
|
-
const pieces = needle.split(",").map((piece) => piece.trim());
|
|
10215
|
-
if (numeric && pieces.every((piece) => piece === "" || Number.isNaN(Number(piece)))) continue;
|
|
10216
|
-
const fragments = fragmentsOfNeedleIn(joined, ",", pieces.map((piece) => numeric ? String(Number(piece)) : piece).join(","));
|
|
10217
|
-
if (fragments.size === 0) continue;
|
|
10218
|
-
recordLogOnlyValue(to, needle);
|
|
10219
|
-
for (const fragment of fragments) recordLogOnlyValue(to, fragment);
|
|
10220
|
-
}
|
|
10221
|
-
}
|
|
10222
|
-
function recordLogOnlySplitFragments(from, to, text, delimiter, printed) {
|
|
10223
|
-
if (delimiter === "") return;
|
|
10224
|
-
const splits = [text.split(delimiter)];
|
|
10225
|
-
if (printed !== void 0 && (printed.length !== splits[0].length || printed.some((piece, i) => piece !== splits[0][i]))) splits.push(printed);
|
|
10226
|
-
for (const bag of from) {
|
|
10227
|
-
if (bag === void 0) continue;
|
|
10228
|
-
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);
|
|
10229
|
-
}
|
|
10230
|
-
}
|
|
10231
|
-
function fragmentsOfNeedleIn(text, delimiter, needle, pieces = text.split(delimiter)) {
|
|
10232
|
-
const fragments = /* @__PURE__ */ new Set();
|
|
10233
|
-
if (needle === "") return fragments;
|
|
10234
|
-
const starts = [];
|
|
10235
|
-
if (text === needle) starts.push(0);
|
|
10236
|
-
else if (needle.length >= 4) for (let at = text.indexOf(needle); at !== -1; at = text.indexOf(needle, at + 1)) starts.push(at);
|
|
10237
|
-
if (starts.length === 0) return fragments;
|
|
10238
|
-
const spans = [];
|
|
10239
|
-
let offset = 0;
|
|
10240
|
-
for (const piece of pieces) {
|
|
10241
|
-
spans.push([offset, offset + piece.length]);
|
|
10242
|
-
offset += piece.length + delimiter.length;
|
|
10243
|
-
}
|
|
10244
|
-
for (const start of starts) {
|
|
10245
|
-
const end = start + needle.length;
|
|
10246
|
-
for (const [pieceStart, pieceEnd] of spans) {
|
|
10247
|
-
const from = Math.max(pieceStart, start);
|
|
10248
|
-
const to = Math.min(pieceEnd, end);
|
|
10249
|
-
if (from < to) fragments.add(text.slice(from, to));
|
|
10250
|
-
}
|
|
10251
|
-
}
|
|
10252
|
-
return fragments;
|
|
10253
|
-
}
|
|
10254
|
-
function printedLeavesOf(value) {
|
|
10255
|
-
const leaves = wholeStringLeavesOf(value);
|
|
10256
|
-
const seen = /* @__PURE__ */ new Set();
|
|
10257
|
-
const walk = (node) => {
|
|
10258
|
-
if (typeof node === "number" || typeof node === "boolean") {
|
|
10259
|
-
leaves.add(String(node));
|
|
10260
|
-
return;
|
|
10261
|
-
}
|
|
10262
|
-
if (node === null || typeof node !== "object") return;
|
|
10263
|
-
if (seen.has(node)) return;
|
|
10264
|
-
seen.add(node);
|
|
10265
|
-
for (const child of Array.isArray(node) ? node : Object.values(node)) walk(child);
|
|
10266
|
-
};
|
|
10267
|
-
walk(value);
|
|
10268
|
-
return leaves;
|
|
10269
|
-
}
|
|
10270
|
-
function shareLogOnlyValues(view, target) {
|
|
10271
|
-
logOnlyValuesOf.set(view, sideSetOf(logOnlyValuesOf, target));
|
|
10272
|
-
}
|
|
10273
|
-
function recordLogOnlyParameterValue(secrets, value, splitDelimiters) {
|
|
10274
|
-
const record = (leaf) => {
|
|
10275
|
-
const spelled = typeof leaf === "string" ? leaf : typeof leaf === "number" || typeof leaf === "boolean" ? String(leaf) : void 0;
|
|
10276
|
-
if (spelled === void 0) return;
|
|
10277
|
-
recordLogOnlyValue(secrets, spelled);
|
|
10278
|
-
for (const delimiter of splitDelimiters ?? []) {
|
|
10279
|
-
if (delimiter === "" || !spelled.includes(delimiter)) continue;
|
|
10280
|
-
for (const piece of spelled.split(delimiter)) recordLogOnlyValue(secrets, piece);
|
|
10281
|
-
}
|
|
10282
|
-
};
|
|
10283
|
-
if (Array.isArray(value)) {
|
|
10284
|
-
for (const element of value) record(element);
|
|
10285
|
-
record(value.map((element) => String(element)).join(","));
|
|
10286
|
-
return;
|
|
10287
|
-
}
|
|
10288
|
-
record(value);
|
|
10289
|
-
}
|
|
10290
|
-
function literalSplitDelimitersOf(template, parameters) {
|
|
10291
|
-
const delimiters = /* @__PURE__ */ new Set();
|
|
10292
|
-
if (parameters.size === 0) return delimiters;
|
|
10293
|
-
const reads = (node, seen) => {
|
|
10294
|
-
if (typeof node === "string") {
|
|
10295
|
-
for (const name of parameters) if (node.includes(`\${${name}}`)) return true;
|
|
10296
|
-
return false;
|
|
10297
|
-
}
|
|
10298
|
-
if (node === null || typeof node !== "object" || seen.has(node)) return false;
|
|
10299
|
-
seen.add(node);
|
|
10300
|
-
if (!Array.isArray(node)) {
|
|
10301
|
-
const ref = node["Ref"];
|
|
10302
|
-
if (typeof ref === "string" && parameters.has(ref)) return true;
|
|
10303
|
-
}
|
|
10304
|
-
for (const child of Array.isArray(node) ? node : Object.values(node)) if (reads(child, seen)) return true;
|
|
10305
|
-
return false;
|
|
10306
|
-
};
|
|
10307
|
-
const seen = /* @__PURE__ */ new Set();
|
|
10308
|
-
const walk = (node) => {
|
|
10309
|
-
if (node === null || typeof node !== "object" || seen.has(node)) return;
|
|
10310
|
-
seen.add(node);
|
|
10311
|
-
if (Array.isArray(node)) {
|
|
10312
|
-
for (const child of node) walk(child);
|
|
10313
|
-
return;
|
|
10314
|
-
}
|
|
10315
|
-
for (const [key, child] of Object.entries(node)) {
|
|
10316
|
-
if (key === "Fn::Split" && Array.isArray(child) && typeof child[0] === "string" && reads(child[1], /* @__PURE__ */ new Set())) delimiters.add(child[0]);
|
|
10317
|
-
walk(child);
|
|
10318
|
-
}
|
|
10319
|
-
};
|
|
10320
|
-
walk(template);
|
|
10321
|
-
return delimiters;
|
|
10322
|
-
}
|
|
10323
|
-
function printingCorpusOf(secrets) {
|
|
10324
|
-
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10325
|
-
if (logOnly === void 0 || logOnly.size === 0) return secrets;
|
|
10326
|
-
const corpus = new Map(secrets);
|
|
10327
|
-
for (const needle of logOnly) if (!corpus.has(needle)) corpus.set(needle, "***");
|
|
10328
|
-
return corpus;
|
|
10329
|
-
}
|
|
10330
|
-
function logOnlyValueCount(secrets) {
|
|
10331
|
-
return logOnlyValuesOf.get(secrets)?.size ?? 0;
|
|
10332
|
-
}
|
|
10333
|
-
function unionOfSecretBags(bags) {
|
|
10334
|
-
const union = /* @__PURE__ */ new Map();
|
|
10335
|
-
for (const bag of bags) {
|
|
10336
|
-
if (bag === void 0) continue;
|
|
10337
|
-
for (const [plaintext, expression] of bag) if (!union.has(plaintext)) union.set(plaintext, expression);
|
|
10338
|
-
carryLogOnlyValues(bag, union);
|
|
10339
|
-
}
|
|
10340
|
-
return union;
|
|
10341
|
-
}
|
|
10342
|
-
function createUnionSecretMasker(bags) {
|
|
10343
|
-
const present = bags.filter((bag) => bag !== void 0);
|
|
10344
|
-
let stamp;
|
|
10345
|
-
let needles = /* @__PURE__ */ new Set();
|
|
10346
|
-
let scanned = [];
|
|
10347
|
-
return (text) => {
|
|
10348
|
-
const now = present.map((bag) => `${bag.size}:${logOnlyValueCount(bag)}`).join(",");
|
|
10349
|
-
if (now !== stamp) {
|
|
10350
|
-
needles = /* @__PURE__ */ new Set();
|
|
10351
|
-
for (const bag of present) {
|
|
10352
|
-
for (const plaintext of bag.keys()) needles.add(plaintext);
|
|
10353
|
-
for (const plaintext of logOnlyValuesOf.get(bag) ?? []) needles.add(plaintext);
|
|
10354
|
-
}
|
|
10355
|
-
scanned = printingNeedles(needles);
|
|
10356
|
-
stamp = now;
|
|
10357
|
-
}
|
|
10358
|
-
if (text !== "" && needles.has(text)) return "***";
|
|
10359
|
-
return maskMatchSpans(text, scanned, "***");
|
|
10360
|
-
};
|
|
10361
|
-
}
|
|
10362
|
-
function hasLogOnlyValues(secrets) {
|
|
10363
|
-
if (secrets === void 0) return false;
|
|
10364
|
-
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10365
|
-
return logOnly !== void 0 && logOnly.size > 0;
|
|
10366
|
-
}
|
|
10367
|
-
function hasMaskableValues(secrets) {
|
|
10368
|
-
if (secrets === void 0) return false;
|
|
10369
|
-
if (secrets.size > 0) return true;
|
|
10370
|
-
const logOnly = logOnlyValuesOf.get(secrets);
|
|
10371
|
-
return logOnly !== void 0 && logOnly.size > 0;
|
|
10372
|
-
}
|
|
10373
|
-
|
|
10374
10567
|
//#endregion
|
|
10375
10568
|
//#region src/deployment/secret-redaction/unresolved-token-frame.ts
|
|
10376
10569
|
function liveMatchesUnresolvedTokenFrame(send, live, unresolvedTokens, secrets) {
|
|
@@ -10409,34 +10602,6 @@ function wildcardOverlapsResolvedPlaintext(send, wildcards, secrets) {
|
|
|
10409
10602
|
return false;
|
|
10410
10603
|
}
|
|
10411
10604
|
|
|
10412
|
-
//#endregion
|
|
10413
|
-
//#region src/deployment/secret-redaction/context.ts
|
|
10414
|
-
const RULES_BY_PROVENANCE = {
|
|
10415
|
-
"template-derived": TEMPLATE_DERIVED_RULES,
|
|
10416
|
-
"template-sourced": TEMPLATE_SOURCED_RULES,
|
|
10417
|
-
"state-readback": STATE_SOURCED_READBACK_RULES,
|
|
10418
|
-
"state-baseline": STATE_SOURCED_BASELINE_RULES,
|
|
10419
|
-
"state-cross-generation": STATE_SOURCED_CROSS_GENERATION_RULES,
|
|
10420
|
-
"state-derived": STATE_DERIVED_RULES
|
|
10421
|
-
};
|
|
10422
|
-
function redactForState(bag, context) {
|
|
10423
|
-
if (context.provenance === "value-scan") return redactSecretsForState(bag, context.secrets);
|
|
10424
|
-
const rules = RULES_BY_PROVENANCE[context.provenance];
|
|
10425
|
-
if (context.provenance !== "template-derived" || context.generation !== "same-generation" || !isPlainBag(bag)) return redactSecretsForState(bag, context.secrets, context.source, rules);
|
|
10426
|
-
const marked = markSameGenerationBag(shallowCopy(bag));
|
|
10427
|
-
const redacted = redactSecretsForState(marked, context.secrets, context.source, rules);
|
|
10428
|
-
return redacted === marked ? shallowCopy(marked) : redacted;
|
|
10429
|
-
}
|
|
10430
|
-
function isPlainBag(bag) {
|
|
10431
|
-
if (Array.isArray(bag)) return true;
|
|
10432
|
-
if (bag === null || typeof bag !== "object") return false;
|
|
10433
|
-
const proto = Object.getPrototypeOf(bag);
|
|
10434
|
-
return proto === Object.prototype || proto === null;
|
|
10435
|
-
}
|
|
10436
|
-
function shallowCopy(bag) {
|
|
10437
|
-
return Array.isArray(bag) ? [...bag] : { ...bag };
|
|
10438
|
-
}
|
|
10439
|
-
|
|
10440
10605
|
//#endregion
|
|
10441
10606
|
//#region src/deployment/secret-redaction/noecho-leaves.ts
|
|
10442
10607
|
const SUB_VARIABLE$2 = /\$\{([^}!][^}]*)\}/g;
|
|
@@ -22105,10 +22270,7 @@ async function resolveDynamicReferencesWithLogTwin(resolver, value, logTwin, con
|
|
|
22105
22270
|
if (cached) {
|
|
22106
22271
|
if (cached.secret && cached.value && !persistedText) refuseSecretAssembledReference(resolver, fullMatch, tokenLogText, context);
|
|
22107
22272
|
const recorded = context?.recordedSecretValues;
|
|
22108
|
-
if (cached.secret && cached.value && recorded) {
|
|
22109
|
-
recorded.set(cached.value, fullMatch);
|
|
22110
|
-
if (!pinnedGeneration) recordResolvedPair(recorded, fullMatch, cached.value);
|
|
22111
|
-
}
|
|
22273
|
+
if (cached.secret && cached.value && recorded) recordSecretResolution(recorded, fullMatch, cached.value, { pairEvidence: !pinnedGeneration });
|
|
22112
22274
|
if (cached.secret && cached.value) recordProvenanceOfResolution(resolver, context, fullMatch, cached.version);
|
|
22113
22275
|
if (service === "ssm" && !cached.secret && recorded && !resolver.producerRegionGuest) recordProvenPublicExpression(recorded, fullMatch, cached.value);
|
|
22114
22276
|
result = result.replace(fullMatch, () => cached.value);
|
|
@@ -22177,10 +22339,7 @@ async function resolveDynamicReferencesWithLogTwin(resolver, value, logTwin, con
|
|
|
22177
22339
|
});
|
|
22178
22340
|
if (isSecret && resolved) {
|
|
22179
22341
|
const recorded = context?.recordedSecretValues;
|
|
22180
|
-
if (recorded) {
|
|
22181
|
-
recorded.set(resolved, fullMatch);
|
|
22182
|
-
if (!pinnedGeneration) recordResolvedPair(recorded, fullMatch, resolved);
|
|
22183
|
-
}
|
|
22342
|
+
if (recorded) recordSecretResolution(recorded, fullMatch, resolved, { pairEvidence: !pinnedGeneration });
|
|
22184
22343
|
recordProvenanceOfResolution(resolver, context, fullMatch, resolvedVersion);
|
|
22185
22344
|
if (service === "secretsmanager" || service === "ssm-secure") pinSecretVerdict(resolver, fullMatch, true, verdictScope);
|
|
22186
22345
|
}
|
|
@@ -26998,7 +27157,7 @@ var CloudControlProvider = class {
|
|
|
26998
27157
|
const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
|
|
26999
27158
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
27000
27159
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
27001
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
27160
|
+
const { ASGProvider } = await import("./asg-provider-BHNhL4VV.js");
|
|
27002
27161
|
const delegateRegion = ambientRegion();
|
|
27003
27162
|
let asgProvider = this.asgDeleteDelegates.get(delegateRegion);
|
|
27004
27163
|
if (asgProvider === void 0) {
|
|
@@ -27104,7 +27263,7 @@ var CloudControlProvider = class {
|
|
|
27104
27263
|
const family = SDK_DELETE_FAMILIES.get(resourceType);
|
|
27105
27264
|
const cached = this.sdkDeleteDelegates.get(family);
|
|
27106
27265
|
if (cached !== void 0 && cached.region === ccRegion) return cached.provider;
|
|
27107
|
-
const provider = family === "rds" ? new (await (import("./rds-provider-
|
|
27266
|
+
const provider = family === "rds" ? new (await (import("./rds-provider-BTabgCz5.js"))).RDSProvider({ region: ccRegion }) : new (await (import("./neptune-provider-CrH00sHx.js"))).NeptuneProvider({ region: ccRegion });
|
|
27108
27267
|
this.sdkDeleteDelegates.set(family, {
|
|
27109
27268
|
region: ccRegion,
|
|
27110
27269
|
provider
|
|
@@ -33722,12 +33881,16 @@ function rememberRecoverableMaskedOutputs(deps, stackName, resolved, redacted) {
|
|
|
33722
33881
|
}
|
|
33723
33882
|
function absorbOutputsPassSecrets(deps) {
|
|
33724
33883
|
const outputsRun = deps.outputsRun();
|
|
33725
|
-
for (const passSecrets of outputsRun.outputsPassSecretMaps)
|
|
33726
|
-
|
|
33727
|
-
|
|
33728
|
-
|
|
33729
|
-
|
|
33730
|
-
|
|
33884
|
+
for (const passSecrets of outputsRun.outputsPassSecretMaps) foldRecording(passSecrets, outputsRun.outputSecrets, OUTPUTS_PASS_FOLD);
|
|
33885
|
+
}
|
|
33886
|
+
const OUTPUTS_PASS_FOLD = {
|
|
33887
|
+
pairs: "carry",
|
|
33888
|
+
"log-only": "withhold",
|
|
33889
|
+
"mask-only-marks": "carry",
|
|
33890
|
+
"reference-provenance": "carry",
|
|
33891
|
+
"physical-name-copies": "carry",
|
|
33892
|
+
"public-proofs": "withhold"
|
|
33893
|
+
};
|
|
33731
33894
|
function redactOutputs(deps, outputs) {
|
|
33732
33895
|
const redacted = redactOutputsBag(deps, outputs);
|
|
33733
33896
|
if (deps.outputsRun().outputsResolvedThisRun.has(outputs)) deps.outputsRun().outputsResolvedThisRun.add(redacted);
|
|
@@ -33740,7 +33903,8 @@ function redactOutputsBag(deps, outputs) {
|
|
|
33740
33903
|
return maskOutputsByPosition(deps.noEchoRun(), deps.noEchoDeps(), redactForState(outputs, outputsRun.outputsSourceUsable ? {
|
|
33741
33904
|
provenance: "template-sourced",
|
|
33742
33905
|
secrets: outputsRun.outputSecrets,
|
|
33743
|
-
source: outputsRun.outputsTemplateSource
|
|
33906
|
+
source: outputsRun.outputsTemplateSource,
|
|
33907
|
+
generation: isSameGenerationBag(outputs) ? "same-generation" : "unproven"
|
|
33744
33908
|
} : {
|
|
33745
33909
|
provenance: "value-scan",
|
|
33746
33910
|
secrets: outputsRun.outputSecrets
|
|
@@ -34786,17 +34950,13 @@ var OutputsRunState = class {
|
|
|
34786
34950
|
outputsResolvedThisRun = /* @__PURE__ */ new WeakSet();
|
|
34787
34951
|
resolvedOutputsBag = void 0;
|
|
34788
34952
|
};
|
|
34789
|
-
|
|
34790
|
-
|
|
34791
|
-
|
|
34792
|
-
|
|
34793
|
-
|
|
34794
|
-
|
|
34795
|
-
|
|
34796
|
-
super.set(plaintext, expression);
|
|
34797
|
-
this.target?.set(plaintext, expression);
|
|
34798
|
-
return this;
|
|
34799
|
-
}
|
|
34953
|
+
const EXPORT_NAME_SCOPE = {
|
|
34954
|
+
pairs: "withhold",
|
|
34955
|
+
"log-only": "carry",
|
|
34956
|
+
"mask-only-marks": "withhold",
|
|
34957
|
+
"reference-provenance": "withhold",
|
|
34958
|
+
"physical-name-copies": "withhold",
|
|
34959
|
+
"public-proofs": "withhold"
|
|
34800
34960
|
};
|
|
34801
34961
|
function handleOutputResolutionFailure(deps, error, outputKey, outputs, secrets, inheritedSecrets) {
|
|
34802
34962
|
const union = unionOfSecretBags([inheritedSecrets, secrets]);
|
|
@@ -34872,8 +35032,7 @@ async function resolveOutputs(run, deps, template, resources, stackName, digestS
|
|
|
34872
35032
|
if (!output.Export?.Name) continue;
|
|
34873
35033
|
const value = outputs[outputKey];
|
|
34874
35034
|
if (value === void 0) continue;
|
|
34875
|
-
const nameSecrets =
|
|
34876
|
-
if (context.recordedSecretValues) shareLogOnlyValues(nameSecrets, context.recordedSecretValues);
|
|
35035
|
+
const nameSecrets = context.recordedSecretValues ? openRecordingScope(context.recordedSecretValues, EXPORT_NAME_SCOPE).secrets : /* @__PURE__ */ new Map();
|
|
34877
35036
|
const nameReads = [];
|
|
34878
35037
|
let exportName;
|
|
34879
35038
|
try {
|
|
@@ -35460,7 +35619,7 @@ function redactRollbackRecord(record, secrets, journaledProps, journaledAttribut
|
|
|
35460
35619
|
source: journaledProps
|
|
35461
35620
|
})
|
|
35462
35621
|
};
|
|
35463
|
-
return keepPersistedPlainRecordLeaves(scrubResourceRecord(positioned, secrets), record, {
|
|
35622
|
+
return keepPersistedPlainRecordLeaves(scrubResourceRecord(positioned, secrets, void 0, void 0, { observed: isSameGenerationBag(positioned.observedProperties) ? "same-generation" : "unproven" }), record, {
|
|
35464
35623
|
properties: journaledProps,
|
|
35465
35624
|
attributes: journaledAttributes
|
|
35466
35625
|
});
|
|
@@ -36592,7 +36751,7 @@ async function replayRevert(s) {
|
|
|
36592
36751
|
refuseMaskedReplayBaseline(desiredProps, op.logicalId, noEcho.inert);
|
|
36593
36752
|
logger.info(` Rollback: Restoring ${safe(op.logicalId)} (${safe(op.resourceType)}) to previous state`);
|
|
36594
36753
|
const currentProps = noEcho.onPreviousSide(await resolveReplayProps(current.properties, resolver, secrets, ctx, op.logicalId, current));
|
|
36595
|
-
recordNestedStackParameterExpressions(secrets, op.resourceType, desiredProps, previousState.properties,
|
|
36754
|
+
recordNestedStackParameterExpressions(secrets, op.resourceType, desiredProps, previousState.properties, "state-derived");
|
|
36596
36755
|
opMasker.addNamed({
|
|
36597
36756
|
resourceType: op.resourceType,
|
|
36598
36757
|
properties: desiredProps,
|
|
@@ -36688,7 +36847,7 @@ async function replayReverseReplacement(s) {
|
|
|
36688
36847
|
logicalId: op.logicalId,
|
|
36689
36848
|
physicalIds: [prev.physicalId]
|
|
36690
36849
|
});
|
|
36691
|
-
recordNestedStackParameterExpressions(secrets, oldType, resolvedPrevProps, prev.properties,
|
|
36850
|
+
recordNestedStackParameterExpressions(secrets, oldType, resolvedPrevProps, prev.properties, "state-derived");
|
|
36692
36851
|
const deleteFirstBlocked = op.oldDeletedBeforeCreate === true && !rollbackRetainsNewResource(current) ? deleteFirstBlocker(op) : void 0;
|
|
36693
36852
|
if (deleteFirstBlocked !== void 0) logger.warn(mask(safeMsg` Rollback: not deleting the new ${shownLogicalId(op.logicalId)} first: its old properties ` + safeMsg`name the resource ${shownLogicalId(deleteFirstBlocked.logicalId)} had before the same deploy ` + "replaced or deleted it, which this rollback may not be able to restore under that id — re-creating the old resource first, which keeps the new one if that fails"));
|
|
36694
36853
|
const reverseDeleteFirst = op.oldDeletedBeforeCreate === true && !rollbackRetainsNewResource(current) && deleteFirstBlocked === void 0;
|
|
@@ -37338,7 +37497,7 @@ async function replayFailedOperationsUnbound(failedOps, stateResources, stackNam
|
|
|
37338
37497
|
const desiredProps = noEcho.desired;
|
|
37339
37498
|
refuseMaskedReplayBaseline(desiredProps, op.logicalId, noEcho.inert);
|
|
37340
37499
|
const attemptedProps = noEcho.onPreviousSide(await resolveReplayProps(op.attemptedProperties ?? current.properties, resolver, secrets, ctx, op.logicalId, op.attemptedProperties === void 0 ? current : void 0));
|
|
37341
|
-
recordNestedStackParameterExpressions(secrets, op.resourceType, desiredProps, prev.properties,
|
|
37500
|
+
recordNestedStackParameterExpressions(secrets, op.resourceType, desiredProps, prev.properties, "state-derived");
|
|
37342
37501
|
opMasker.addNamed({
|
|
37343
37502
|
resourceType: op.resourceType,
|
|
37344
37503
|
properties: desiredProps,
|
|
@@ -40059,13 +40218,35 @@ function redactOperationsForJournal(deps, operations) {
|
|
|
40059
40218
|
if ((!secrets || secrets.size === 0) && !op.previousState && sources === void 0) return op;
|
|
40060
40219
|
const ownSecrets = secrets ?? /* @__PURE__ */ new Map();
|
|
40061
40220
|
const next = { ...op };
|
|
40062
|
-
if (next.properties)
|
|
40063
|
-
|
|
40221
|
+
if (next.properties) {
|
|
40222
|
+
const properties = next.properties;
|
|
40223
|
+
next.properties = byPosition(templateProps === void 0 ? redactForState(properties, {
|
|
40224
|
+
provenance: "value-scan",
|
|
40225
|
+
secrets: ownSecrets
|
|
40226
|
+
}) : redactForState(properties, {
|
|
40227
|
+
provenance: "template-derived",
|
|
40228
|
+
secrets: ownSecrets,
|
|
40229
|
+
source: templateProps,
|
|
40230
|
+
generation: isSameGenerationBag(properties) ? "same-generation" : "unproven"
|
|
40231
|
+
}));
|
|
40232
|
+
}
|
|
40233
|
+
if (next.attemptedProperties) {
|
|
40234
|
+
const attempted = next.attemptedProperties;
|
|
40235
|
+
next.attemptedProperties = byPosition(templateProps === void 0 ? redactForState(attempted, {
|
|
40236
|
+
provenance: "value-scan",
|
|
40237
|
+
secrets: ownSecrets
|
|
40238
|
+
}) : redactForState(attempted, {
|
|
40239
|
+
provenance: "template-derived",
|
|
40240
|
+
secrets: ownSecrets,
|
|
40241
|
+
source: templateProps,
|
|
40242
|
+
generation: "same-generation"
|
|
40243
|
+
}));
|
|
40244
|
+
}
|
|
40064
40245
|
if (next.previousState) {
|
|
40065
40246
|
const previous = next.previousState;
|
|
40066
40247
|
const adopted = adoptedOrphanRecords.get(deps.owner);
|
|
40067
40248
|
const loaded = adopted?.has(op.logicalId) ? adopted.get(op.logicalId) : previous;
|
|
40068
|
-
next.previousState = applyNoEchoPersist(deps.noEchoRun(), deps.noEchoDeps(), op.logicalId, previous, keepPersistedPlainRecordLeaves(scrubResourceRecord(previous, ownSecrets, void 0,
|
|
40249
|
+
next.previousState = applyNoEchoPersist(deps.noEchoRun(), deps.noEchoDeps(), op.logicalId, previous, keepPersistedPlainRecordLeaves(scrubResourceRecord(previous, ownSecrets, void 0, "state-readback", { observed: isSameGenerationBag(previous.observedProperties) ? "same-generation" : "unproven" }), previous, loaded ?? {}), void 0, {}, void 0, true);
|
|
40069
40250
|
}
|
|
40070
40251
|
return next;
|
|
40071
40252
|
});
|
|
@@ -48779,7 +48960,8 @@ var DeployEngine = class {
|
|
|
48779
48960
|
for (const [logicalId, record] of Object.entries(state.resources)) {
|
|
48780
48961
|
const secrets = this.secretsRun.perResourceSecrets.get(logicalId);
|
|
48781
48962
|
const templateProps = this.secretsRun.perResourceTemplateProps.get(logicalId);
|
|
48782
|
-
const
|
|
48963
|
+
const healed = this.attributeHealer.withHealedAttributes(logicalId, record);
|
|
48964
|
+
const scrubbed = scrubResourceRecord(healed, secrets ?? /* @__PURE__ */ new Map(), templateProps, void 0, sameGenerationClaimsOf(healed));
|
|
48783
48965
|
const noEchoScrubbed = applyNoEchoPersist(this.noEchoRun, this.noEchoDeps(), logicalId, record, withNoEchoExactEchoes(this.noEchoRun, logicalId, scrubbed), templateProps, state.resources, secrets);
|
|
48784
48966
|
resources[logicalId] = withReferenceProvenance(withConstructPath(withMaskedPropertyFingerprints(noEchoScrubbed, record.properties, templateProps, secrets, this.secretsRun.fingerprintNoEchoValues, this.secretsRun.perResourceInputFingerprints.get(logicalId)), constructPathOf(this.noEchoRun.constructPathTemplate, logicalId)), this.referenceProvenanceToPersist(logicalId, record, noEchoScrubbed, secrets));
|
|
48785
48967
|
}
|
|
@@ -48788,7 +48970,7 @@ var DeployEngine = class {
|
|
|
48788
48970
|
const orphanTemplateProps = sameResource ? this.secretsRun.perResourceTemplateProps.get(entry.logicalId) : void 0;
|
|
48789
48971
|
return {
|
|
48790
48972
|
...entry,
|
|
48791
|
-
state: withMaskedPropertyFingerprints(applyNoEchoPersist(this.noEchoRun, this.noEchoDeps(), entry.logicalId, entry.state, scrubResourceRecord(entry.state, (sameResource ? this.secretsRun.perResourceSecrets.get(entry.logicalId) : void 0) ?? /* @__PURE__ */ new Map(), orphanTemplateProps), orphanTemplateProps, state.resources), entry.state.properties, orphanTemplateProps, sameResource ? this.secretsRun.perResourceSecrets.get(entry.logicalId) : void 0, sameResource ? this.secretsRun.fingerprintNoEchoValues : void 0, sameResource ? this.secretsRun.perResourceInputFingerprints.get(entry.logicalId) : void 0)
|
|
48973
|
+
state: withMaskedPropertyFingerprints(applyNoEchoPersist(this.noEchoRun, this.noEchoDeps(), entry.logicalId, entry.state, scrubResourceRecord(entry.state, (sameResource ? this.secretsRun.perResourceSecrets.get(entry.logicalId) : void 0) ?? /* @__PURE__ */ new Map(), orphanTemplateProps, void 0, sameGenerationClaimsOf(entry.state)), orphanTemplateProps, state.resources), entry.state.properties, orphanTemplateProps, sameResource ? this.secretsRun.perResourceSecrets.get(entry.logicalId) : void 0, sameResource ? this.secretsRun.fingerprintNoEchoValues : void 0, sameResource ? this.secretsRun.perResourceInputFingerprints.get(entry.logicalId) : void 0)
|
|
48792
48974
|
};
|
|
48793
48975
|
});
|
|
48794
48976
|
const outputs = redactOutputs(this.maskingDeps(), state.outputs);
|
|
@@ -48939,7 +49121,13 @@ var DeployEngine = class {
|
|
|
48939
49121
|
return maskingRetryLogger(this.logger, secrets);
|
|
48940
49122
|
}
|
|
48941
49123
|
};
|
|
49124
|
+
function sameGenerationClaimsOf(record) {
|
|
49125
|
+
return {
|
|
49126
|
+
properties: isSameGenerationBag(record.properties) ? "same-generation" : "unproven",
|
|
49127
|
+
observed: isSameGenerationBag(record.observedProperties) ? "same-generation" : "unproven"
|
|
49128
|
+
};
|
|
49129
|
+
}
|
|
48942
49130
|
|
|
48943
49131
|
//#endregion
|
|
48944
|
-
export { resolvePendingCloudControlRequests as $, repairMalformedOutputsForReadOnly as $a, warnFinchArgvExposure as $c, accountArgs as $i, buildFinalSnapshotIdentifier as $n, readbackPathFor as $o, DiffCalculator as $r, CrossPrefixScanCache as $s, namesAnyDeclaredParameter as $t, findServiceTokenRefusals as A, refuseMalformedOrphanRecordsForDestroy as Aa, isCrossRegionRedirect as Ac, coerceParameterTypedValue as Ai, derivePartitionAndUrlSuffix as Al, gray as An, replayWarn as Ao, isCustomResourceType as Ar, inheritNestedStackParameterAssociations as As, removeProtectionTypeList as At, parentSuppliedValues as B, refuseMalformedResourceEntriesForImport as Ba, describeDockerFailure as Bc, cfnRefValueFromPhysicalId as Bi, describeFileReadFailure 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, loadPublishableAssetManifest as Cc, applyCallerIdentityCredentials as Ci, findLargeInlineResources as Cl, awaitInFlightSibling as Cn, toFiniteNumber as Co, ProviderRegistry as Cr, withPhysicalNameCopies as Cs, formatResourceLine as Ct, crossStackOutputProvenanceSource as D, refuseDivergentRecordRegionForDestroy as Da, assertAssetBucketRegion as Dc, classifyReplaySecretRegion as Di, expectedOwnerParam as Dl, replacedDeleteFailureVerdict as Dn, configIntegerRefusal as Do, waitForLambdaFunctionActive as Dr, isUncertifiedBaselineMaskPosition as Ds, withApiLimit as Dt, computeImplicitDeleteEdges as E, previewableOrphanRecords as Ea, BOOTSTRAP_MARKER_PREFIX as Ec, classifyRecordedSecretRegion as Ei, decodeListingKey as El, withStackRecords as En, configBooleanRefusal as Eo, wouldReturnToSdkProvider as Er, dynamicReferenceTokens as Es, lookupEachName as Et, listNestedTemplateRows as F, refuseMalformedOutputsForDestroy as Fa, buildDenyExternalAccessPolicy as Fc, carriesDynamicReference as Fi, hasOwnKey as Fl, noEchoComparisonForTemplate as Fn, templateResourceTypes as Fo, customResourceResponseExpirationWarning as Fr, recordPhysicalNameCopy as Fs, planFailedOps as Ft, keptWholeReasonText as G, refuseMalformedResourcePropertiesForExport as Ga, isDockerClientEnvKey as Gc, parameterInputsFor as Gi, injectedAwsRegionValue as Gl, secretNamePrintingBags as Gn, maskAtCoordinates as Go, isWaitAbandonedError as Gr, STATE_SOURCED_CROSS_GENERATION_RULES as Gs, inheritProducerRegions as Gt, withResourceDeadline as H, refuseMalformedResourceEntriesForOrphan as Ha, finchSecretArgvRefusal as Hc, refStateLookupFromResource as Hi, renderAssemblyPathEscape as Hl, namingSecretsWithRecordedNoEcho as Hn, TemplateParser as Ho, deleteLeftInPlace as Hr, recordNoEchoParameterFreshValue as Hs, orphanNeedsIdentity as Ht, renderNestedTemplateTreeDefect as I, refuseMalformedResourceAttributesForOrphan as Ia, buildDockerImage as Ic, carriesFetchableDynamicReference as Ii, hasPlainPrototype$1 as Il, noEchoExactEchoLeavesOf as In, describeTypeWithThrottleRetry as Io, CloudControlProvider as Ir, splitGetAttStringForm as Is, planRollback as It, makeSiblingClaimReader as J, refuseMalformedResourcesForDestroy as Ja, redactDockerArgvValues as Jc, JSON_LISTING_HOLE_VALUE as Ji, stateSecretNameNeedles as Jn, maskedLeafCoordinatesOf as Jo, ec2InstanceProtectionSite as Jr, LockManager as Js, redactedDeleteAddressFields as Jt, mergeNoChangeOutputs as K, refuseMalformedResourcePropertiesForOrphan as Ka, isMalformedEnvKey as Kc, passedParameterClassesOf as Ki, clearBucketRegionCache as Kl, secretNamedAttributeNamesOf as Kn, maskReadbackAtCoordinates as Ko, markWaitAbandoned as Kr, WHOLE_DYNAMIC_REFERENCE_PATTERN as Ks, REDACTED_DELETE_ADDRESS_SKIP_REASON as Kt, templateIdentity as L, refuseMalformedResourceEntries as La, resolveDockerContextDirectory as Lc, isNamelessDynamicReferenceError as Li, nullPrototypeRecord as Ll, noEchoParameterNamesOf as Ln, withRetry as Lo, slowCcOperationTimeoutMs as Lr, carriesSecretMask as Ls, recheckFailedPlan as Lt, childTemplateLoader as M, refuseMalformedOrphansForDestroy as Ma, readBootstrapMarkerBody as Mc, parameterTypeMayLoseSecretIdentity as Mi, StageLoadError as Ml, red as Mn, requireConfigObject as Mo, withPrintingSecrets as Mr, recoverMaskedOutput as Ms, demoteSupersededOrphans as Mt, findNestedTemplateTreeDefect as N, refuseMalformedOrphansForOrphan as Na, validateAssetBucketName as Nc, getAccountInfo as Ni, processStackMessages 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, ensureAssetStorage as Oc, producerRegionsFromState as Oi, PARTITION_TABLE as Ol, bold as On, configStringRefusal as Oo, TemplateNoEchoReresolver as Or, pathCrossesDottedKey as Os, replayFailedOperations as Ot, isAbsoluteAssetPath as P, refuseMalformedOutputs as Pa, validateContainerRepoName as Pc, isImpossibleEmptyStoredAttribute as Pi, defineOwnKey as Pl, noEchoAttributeNamesOf as Pn, prefetchCreateOnlyPropertyPaths as Po, applyCustomResourceResponseExpiration as Pr, recordAttributeIdCopy as Ps, isReplacementOrphan as Pt, pendingRequestCount as Q, repairMalformedOrphansForReadOnly as Qa, runDockerStreaming as Qc, UNREADABLE_RESOURCES_MAP_ROW as Qi, PRE_DELETE_SNAPSHOT_TYPES as Qn, passedNoEchoParametersOf as Qo, reEnableInstanceApiTermination as Qr, CrossPrefixReadError as Qs, computeParameterTaint as Qt, conditionFingerprint as R, refuseMalformedResourceEntriesForDeploy as Ra, describeDockerCapturedOutput as Rc, keepsSecretReferenceToken as Ri, ownValue as Rl, createReadOnlyAttributeHealerFactory as Rn, canonicalLambdaFunctionName as Ro, unchangedBehindSecretReference as Rr, provenPublicValue as Rs, recordUnderIdIsNotOwn as Rt, isTruthyCfnBoolean as S, malformedResourcePropertiesWarning as Sa, createAssetRedirectResolver as Sc, AWS_CREDENTIAL_ENV_KEYS as Si, MIGRATE_TMP_PREFIX 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, AssetModeResolver as Tc, envCredentialsAreAssumedRole as Ti, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION 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, formatDockerLoginError as Uc, parseWebACLArn as Ui, resolveAssemblyPath as Ul, orphanRecordsPrintingBag as Un, canonicalCoordinates as Uo, deleteSkipReason as Ur, recordProvenPublicExpression as Us, findNestedStackTypeChanges as Ut, readRecordedConditionVerdicts as V, refuseMalformedResourceEntriesForImportSave as Va, dockerSpawnEnvWithSensitive as Vc, isStalePlaceholderArnAttribute as Vi, displayAssemblyPath as Vl, maskEventTextWithBoundBags as Vn, DagBuilder as Vo, deleteIndeterminateGuards as Vr, recordNoEchoAttributeValues as Vs, seedsDeleteFirstGuard as Vt, isSecretBearingReferenceString as W, refuseMalformedResourcePropertiesForDrift as Wa, getDockerCmd as Wc, withSharedDrainBudget as Wi, injectAwsRegion as Wl, secretNamePrintingBag as Wn, isMarkedCoordinate as Wo, withIndeterminateGuard as Wr, wholeStringLeavesOf as Ws, getCurrentProducerRegions as Wt, DeploymentEventsReader as X, refuseMalformedState as Xa, redactedDockerCause as Xc, STATE_RESOURCES_MALFORMED as Xi, extractDeploymentEventError as Xn, noEchoLeavesOf as Xo, observeThenDisableInstanceApiTermination as Xr, S3StateBackend as Xs, updatePartialMessage as Xt, planOrphanAdoption as Y, refuseMalformedResourcesForExport as Ya, redactedCause as Yc, STATE_REGION_DIVERGED as Yi, storedSecretNameNeedles as Yn, noEchoCoordinatesOf as Yo, isTerminationProtectionPropagationError as Yr, isLockInfoExpired as Ys, redactedDeleteAddressSkip as Yt, DeploymentEventsStore as Z, repairMalformedOrphanRecordsForReadOnly as Za, runDockerForeground as Zc, UNREADABLE_ORPHANS_CONTAINER_ROW as Zi, ATOMIC_FINAL_SNAPSHOT_TYPES as Zn, noEchoOutputsComparison as Zo, reDisableInstanceApiTermination as Zr, rebuildClientForBucketRegion as Zs, updatePartialReason as Zt, deleteTableWithIndexBusyRetry as _, malformedOrphansWarning as _a, AssetPublisher as _c, assertFlagRoleArn as _i, stateBucketExistenceConfirmed as _l, DEFAULT_RESOURCE_TIMEOUT_MS as _n, isStatefulRecreateTargetSync as _o, refuseMalformedDesiredTags as _r, maskSecretsInError as _s, dropFailedHint as _t, isProtectionValueActive as a, isReadableOrphanRecord as aa, acceptedCreateOnlyDropsOf as ac, s3BucketDomainName as ai, Synthesizer as al, secretBearing as an, unreadableResourceEntries as ao, unsupportedFinalSnapshotError as ar, carryLogOnlyValues as as, dropSettledNestedJournals as at, S3_AUTO_DELETE_OBJECTS_TAG as b, malformedRenderedContainersWarning as ba, WorkGraph as bc, isIamRoleArn as bi, CFN_TEMPLATE_BODY_LIMIT as bl, constructPathOf as bn, coerceWarmThroughput as bo, definedAttributes as br, recordReferenceProvenanceEntry as bs, loadJournaledOrphans as bt, DynamoDBGlobalTableProvider as c, malformedExportNamesWarning as ca, hasReadableExportSet as cc, s3BucketWebsiteUrl as ci, getLegacyStateBucketName as cl, carriedExportAliasExposure as cn, findSilentDropProperties as co, reserveStackCreateToken as cr, literalSplitDelimitersOf as cs, recordDisplacedSkips as ct, compensateRemovedDeletionProtection as d, malformedLocalResourceEntriesWarning as da, importableOutputKeys as dc, refuseUnreadableCdkCrossAccountRefs as di, resolveAutoAssetStorage as dl, isWholeDynamicReferenceValue as dn, NO_CC_HANDLERS_REASON as do, isRefusedByName as dr, recordLogOnlyParameterValue as ds, withNestedRevertRun as dt, deployRefusesOrphanRowsReason as ea, applyCrossPrefixScan as ec, INTRINSIC_KEYS as ei, escapeRegExp$3 as el, reachableDivergentParameters as en, repairMalformedResourceEntriesForReadOnly as eo, ccRoutedFinalSnapshotError as er, readsNoEchoSource as es, keptForReadoption as et, deleteBudgetKey as f, malformedLocalResourcesWarning as fa, importableOutputs as fc, keepHeldTokenProvenance as fi, resolveCaptureObservedState as fl, noEchoParameterValueSeed as fn, hasNoCloudControlHandlers as fo, markDeleteStarted as fr, recordLogOnlyValue as fs, collectNestedChildUnaddressed as ft, INDEX_SETTLE_POLL_INTERVAL_MS as g, malformedOrphansRefusalMessage as ga, shouldRetainResource as gc, applyRoleArnIfSet as gi, resolveUseCdkBootstrapAssets as gl, bindingSkippedOutputs as gn, isStatefulRecreateTargetForReplace as go, readTagList as gr, errorCauseChain as gs, dropFailedCommands as gt, DELETE_INDEX_WAIT_PROCEED_NOTE as h, malformedOrphanRowsKeptWarning as ha, orphansCarriedFrom as hc, recordedReferenceRegions as hi, resolveStateBucketWithDefaultAndSource as hl, isExportAliasCollision as hn, MULTI_REGION_RECREATE_BLOCKED_TYPES as ho, planTagDiff as hr, createSecretMasker as hs, deleteJournaledOrphans as ht, PROTECTION_PROPERTY_BY_TYPE as i, hasReadableResources as ia, splitImportedOps as ic, s3BucketArn as ii, getDockerImageBySourceHash as il, exportAliasCollisionScrubWarning as in, unreadableOrphanRecords as io, refusesFinalSnapshot as ir, liveMatchesUnresolvedTokenFrame as is, displacedPhysicalIdShown as it, serviceTokenBlockingReason as j, refuseMalformedOrphans as ja, parseBootstrapMarker as jc, isUnboundTemplateParameter as ji, AssemblyReader as jl, green as jn, requireConfigArray as jo, getCurrentResourceSecrets as jr, recordNestedStackParameterExpressions as js, recordAfterRollbackUpdate as jt, deferredServiceTokenWarning as k, refuseMalformedOrphanRecords as ka, getBootstrapMarkerKey as kc, regionLessSecretName as ki, canonicalizeRegion 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, hasReasonlessBaselineRefusal as lc, resolveDynamicReferences as li, loadCdkJson as ll, exportNameNoEchoParameters as ln, unwrittenCreateOnlyReplacement as lo, withCreateTokenLedger as lr, logOnlyValueCount as ls, revertNestedChildFromJournal as lt, resolveDynamoDbDeleteBudgetMs as m, malformedOrphanRecordsWarning as ma, orphansAfterRollback as mc, recordedOutputReferenceRegions as mi, resolveStateBucketWithDefault as ml, collectPublishedOutputNames as mn, shownType as mo, DBPROXY_TAG_OPTIONS as mr, unionOfSecretBags as ms, withNestedStackContext as mt, recordedProtectionEvidence as n, hasReadableOrphans as na, isAccessDenied$1 as nc, poisonRenderedSpellingsCollidingIn as ni, stripForDisplay 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, describeRegionValueKind as oc, s3BucketDualStackDomainName as oi, synthesisStatusMessage as ol, secretBearingStateKeyWarning as on, withheldAccountClause as oo, earliestDefined as or, createUnionSecretMasker as os, getNestedRevertRun as ot, resolveDynamoDbDeleteBudgetClock as p, malformedOrphanRecordsRefusalMessage as pa, isReadableBag as pc, outputReferenceProvenanceOf as pi, resolveSkipPrefix as pl, collectDeclaredOutputNames as pn, findReplacedReadersOfRecreateTargets as po, DBPROXY_TAGS_WHAT as pr, shareLogOnlyValues as ps, getCurrentNestedStackContext as pt, makeCanonicalizePropertiesFn as q, refuseMalformedResourcesForDeploy as qa, partitionSensitiveEnv as qc, declaresNoEcho as qi, resolveBucketRegion as ql, secretNamedRecordNeedles as qn, maskWholeValue as qo, disableInstanceApiTermination as qr, isSingleDynamicReferenceToken as qs, isRedactedRecordedValue as qt, recordedProtectionNote as r, hasReadableOutputs as ra, isNotImplemented as rc, isSettledInstanceState as ri, AssetManifestLoader as rl, displayTextOrWithheld as rn, unpreviewableOrphanRecords as ro, isFinalSnapshotError as rr, redactForState as rs, displacedOpClause as rt, readProtection as s, malformedDriftResourcePropertiesWarning as sa, exportNamesCarriedFrom as sc, s3BucketRegionalDomainName as si, getDefaultStateBucketName as sl, secretSafeKeyDisplay as sn, findActionableSilentDrops as so, ledgerForStack as sr, hasMaskableValues as ss, nestedChildStackName as st, DeployEngine as t, displayLogicalId as ta, crossPrefixDeniedWarning as tc, IntrinsicFunctionResolver as ti, stripControlChars as tl, resourcesNamingDeclaredParameter as tn, repairMalformedResourcePropertiesForReadOnly as to, createPreDeleteFinalSnapshot as tr, recordedNoEchoValuesOf as ts, recordRetainedForReadoption as tt, beginDeleteWait as u, malformedLocalOutputsWarning as ua, hasUnverifiableParameterRefusal as uc, producerLookupOver as ui, resolveApp as ul, exportNameSecretExposure as un, withoutSilentDropProperties as uo, acquireIdempotencyToken as ur, printingCorpusOf as us, revertedNestedRowIds as ut, waitForIndexesSettled as v, malformedOutputsRefusalMessage as va, isSensitiveAttributeName as vc, assertSendableRoleArn as vi, warnDeprecatedNoPrefixCliFlag as vl, DEFAULT_RESOURCE_WARN_AFTER_MS as vn, renderStatefulReason as vo, tagMapAsList as vr, maskSecretsInText as vs, isHandledOrphan as vt, markRefusedBeforeApplying as w, malformedScrubResourceEntriesRefusalMessage as wa, rewriteTemplateAssetReferences as wc, callerEnvCredentials as wi, uploadCfnTemplate as wl, destroyStackRecordsView as wn, coerceCfnBoolean as wo, ccBrokenReason as wr, withoutPhysicalNameCopies as ws, chunks as wt, hasCdkAutoDeleteTag as x, malformedResourceEntriesWarning as xa, buildAssetRedirectMap as xc, sendableAssumeRoleCommand as xi, CFN_TEMPLATE_URL_LIMIT as xl, findDestructiveChanges as xn, isWarmThroughputDecrease as xo, stringifyIfAssigned as xr, snapshotPassProvenance as xs, makeForeignHolderScan as xt, ECR_AUTO_DELETE_IMAGES_TAG as y, malformedOutputsWarning as ya, stringifyValue as yc, explicitRoleArnOrThrow as yi, ssmResolvedValueType as yl, maskingRetryLogger as yn, WARM_THROUGHPUT_MEMBERS as yo, tagPlanWarning as yr, markSameGenerationBag as ys, journaledOrphanLines as yt, conditionInputsFrom as z, refuseMalformedResourceEntriesForDestroy as za, describeDockerExecFailure as zc, AWS_NO_VALUE as zi, absoluteAssemblyPathEscape as zl, completedReplayEntries as zn, lambdaFunctionNameForMask as zo, RollbackInlinePolicyWriters as zr, recordMaskOnlyValue as zs, replacementNeverSwapped as zt };
|
|
48945
|
-
//# sourceMappingURL=deploy-engine-
|
|
49132
|
+
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 };
|
|
49133
|
+
//# sourceMappingURL=deploy-engine-6bGIDa7Z.js.map
|