@cdkd/cli 0.373.3 → 0.373.5
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/{ambient-client-defaults-ChOenyD2.js → ambient-client-defaults-D2ziUucm.js} +3 -3
- package/dist/{ambient-client-defaults-ChOenyD2.js.map → ambient-client-defaults-D2ziUucm.js.map} +1 -1
- package/dist/{asg-provider-Bfinx42n.js → asg-provider-DXerSmY8.js} +8 -8
- package/dist/{asg-provider-Bfinx42n.js.map → asg-provider-DXerSmY8.js.map} +1 -1
- package/dist/cli.js +3 -3
- package/dist/{custom-resource-runtime-9fjsDVrs.js → custom-resource-runtime-Z0UesGu4.js} +6 -6
- package/dist/{custom-resource-runtime-9fjsDVrs.js.map → custom-resource-runtime-Z0UesGu4.js.map} +1 -1
- package/dist/{db-associated-roles-Bn8HCQ2r.js → db-associated-roles-BVE6a5hy.js} +2 -2
- package/dist/{db-associated-roles-Bn8HCQ2r.js.map → db-associated-roles-BVE6a5hy.js.map} +1 -1
- package/dist/{delete-started-CiTP5c3_.js → delete-started-C-Fplb9I.js} +4 -4
- package/dist/{delete-started-CiTP5c3_.js.map → delete-started-C-Fplb9I.js.map} +1 -1
- package/dist/{deploy-engine-D7Iv9v8e.js → deploy-engine-7gPM_z0r.js} +282 -66
- package/dist/deploy-engine-7gPM_z0r.js.map +1 -0
- package/dist/{ec2-termination-protection-BXy91mrW.js → ec2-termination-protection-C3bNJVAK.js} +3 -3
- package/dist/{ec2-termination-protection-BXy91mrW.js.map → ec2-termination-protection-C3bNJVAK.js.map} +1 -1
- package/dist/{ecr-uri-DUDwEekn.js → ecr-uri-Dy7a2hEI.js} +2 -2
- package/dist/{ecr-uri-DUDwEekn.js.map → ecr-uri-Dy7a2hEI.js.map} +1 -1
- package/dist/{emr-cluster-provider-MokUAEGh.js → emr-cluster-provider-DpzQ2tXe.js} +80 -16
- package/dist/emr-cluster-provider-DpzQ2tXe.js.map +1 -0
- package/dist/{expected-bucket-owner-BrzB1C4p.js → expected-bucket-owner-NU2Veqhr.js} +2 -2
- package/dist/{expected-bucket-owner-BrzB1C4p.js.map → expected-bucket-owner-NU2Veqhr.js.map} +1 -1
- package/dist/{iam-role-provider-CB--BYVm.js → iam-role-provider-BK7LqipH.js} +12 -12
- package/dist/{iam-role-provider-CB--BYVm.js.map → iam-role-provider-BK7LqipH.js.map} +1 -1
- package/dist/{identity-read-denied-CoeMBkCz.js → identity-read-denied-BnZ-p9kt.js} +4 -4
- package/dist/{identity-read-denied-CoeMBkCz.js.map → identity-read-denied-BnZ-p9kt.js.map} +1 -1
- package/dist/{image-plan-RNp8hqc4.js → image-plan-7isjcxk3.js} +10 -10
- package/dist/{image-plan-RNp8hqc4.js.map → image-plan-7isjcxk3.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/{logger-Bfz63gW5.js → logger-CC9C99az.js} +2 -2
- package/dist/{logger-Bfz63gW5.js.map → logger-CC9C99az.js.map} +1 -1
- package/dist/{neptune-provider-BFwovty1.js → neptune-provider-CjjpqzLj.js} +9 -9
- package/dist/{neptune-provider-BFwovty1.js.map → neptune-provider-CjjpqzLj.js.map} +1 -1
- package/dist/{program-DR3X8-7x.js → program-Ce2id6tt.js} +678 -194
- package/dist/program-Ce2id6tt.js.map +1 -0
- package/dist/{provider-classes-BNZGFwNO.js → provider-classes-BesMsi8i.js} +748 -139
- package/dist/provider-classes-BesMsi8i.js.map +1 -0
- package/dist/{rds-provider-evebINWq.js → rds-provider-j7YCssyt.js} +13 -13
- package/dist/{rds-provider-evebINWq.js.map → rds-provider-j7YCssyt.js.map} +1 -1
- package/dist/{read-replica-BGoRAh10.js → read-replica-B3tUZd7q.js} +3 -3
- package/dist/{read-replica-BGoRAh10.js.map → read-replica-B3tUZd7q.js.map} +1 -1
- package/dist/{redacted-delete-address-rTL8ikg4.js → redacted-delete-address-DAZayV8w.js} +4 -4
- package/dist/{redacted-delete-address-rTL8ikg4.js.map → redacted-delete-address-DAZayV8w.js.map} +1 -1
- package/dist/{replacement-rules-roVU6gYR.js → replacement-rules-bf4K_Yka.js} +172 -69
- package/dist/replacement-rules-bf4K_Yka.js.map +1 -0
- package/dist/{created-resource-sink-D7iM5jwM.js → resource-deadline-D6p4x_pl.js} +108 -5
- package/dist/resource-deadline-D6p4x_pl.js.map +1 -0
- package/dist/{restore-source-guard-Dz_vQPiM.js → restore-source-guard-DRxM4nEI.js} +4 -4
- package/dist/{restore-source-guard-Dz_vQPiM.js.map → restore-source-guard-DRxM4nEI.js.map} +1 -1
- package/dist/{run-cli-vKsR6JeT.js → run-cli-B1pXbQh9.js} +2 -2
- package/dist/{run-cli-vKsR6JeT.js.map → run-cli-B1pXbQh9.js.map} +1 -1
- package/dist/{secret-reference-immutable-BF02Wobz.js → secret-reference-immutable-CGZO-iyw.js} +6 -6
- package/dist/{secret-reference-immutable-BF02Wobz.js.map → secret-reference-immutable-CGZO-iyw.js.map} +1 -1
- package/dist/{settle-own-write-members-CF-RPYMD.js → settle-own-write-members-WuNz0klP.js} +10 -10
- package/dist/{settle-own-write-members-CF-RPYMD.js.map → settle-own-write-members-WuNz0klP.js.map} +1 -1
- package/dist/{tag-list-DbmXev9Z.js → tag-list-DiQb3Tm9.js} +4 -4
- package/dist/{tag-list-DbmXev9Z.js.map → tag-list-DiQb3Tm9.js.map} +1 -1
- package/dist/update-removal-CBAhk3SI.js +82 -0
- package/dist/update-removal-CBAhk3SI.js.map +1 -0
- package/dist/{version-CP9RYTCy.js → version-CdLI5JxZ.js} +2 -2
- package/dist/{version-CP9RYTCy.js.map → version-CdLI5JxZ.js.map} +1 -1
- package/package.json +1 -1
- package/dist/created-resource-sink-D7iM5jwM.js.map +0 -1
- package/dist/deploy-engine-D7Iv9v8e.js.map +0 -1
- package/dist/emr-cluster-provider-MokUAEGh.js.map +0 -1
- package/dist/program-DR3X8-7x.js.map +0 -1
- package/dist/provider-classes-BNZGFwNO.js.map +0 -1
- package/dist/replacement-rules-roVU6gYR.js.map +0 -1
- package/dist/resource-deadline-B4Rp-3f7.js +0 -186
- package/dist/resource-deadline-B4Rp-3f7.js.map +0 -1
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-
|
|
2
|
-
import { $ as renderStacksNoLongerSelected, $t as contextOptions, A as followContainerLogs, An as parseStateKey, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as parsePositiveIntegerOption, Ct as resolveContainerRegion, Dn as describeStateKey, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as STATE_KEY_MAX_CODE_POINTS, Et as taskRoleAssumedInRealAws, F as removeContainer, Ft as legacyStateBucketFallbackRegion, G as nestedOwnerOfLogicalId, Gt as withOtherIndexRemoval, H as resolveRuntimeImage, Ht as resolveEffectiveRegion, It as namedCliRegion, J as renderAllLeftOutStageStacks, Jt as annotationMessageOptions, K as partitionTopLevel, Kt as strandedProfileCredentialsNotice, L as runDetached, Lt as rawCliRegion, M as killAndDrainContainerLogs, Mt as adoptRegionFlag, N as pickFreePort, Nt as exportInferredRegionForSdk, O as ensureDockerAvailable, On as listAllLockKeys, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as commonOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as cliArgParser, St as realAwsException, T as DockerRunnerError, Tn as STATE_FILE_SUFFIX, Tt as stateRoleRecordIsEmulatorSide, U as describeStack, Ut as stackRegionResolver, V as resolveRuntimeFileExtension, Vt as regionShown, W as matchStacks, Wt as stateWithRegion, X as renderAmbiguousTargetStack, Xt as applyWaitFlagEnv, Y as renderAllNoTopLevelStacks, Yt as appOptions, Z as renderNoStackMatch, Zt as collectRepeated, _ as probeHostGatewaySupport, _n as allowUnsupportedTypesOption, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noCfnFallbackOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as resourceTimeoutOptions, bt as prepareLocalLoopbackForwarder, cn as parseStackRegion, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stackOptions, dt as activateLocalAwsAndRoleArn, en as deployOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as stateOptions, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as parseAssumeRoleToken, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as normalizeStartApiAssumeRole, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as guardStackRegionOptions, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kn as listAllStateKeys, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as regionOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as effectiveAssumeRoleArn, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as diffUpdatePolicyOptions, nt as stackMatchesPattern, o as resolveLambdaTarget, on as noLocalCustomResourcesOption, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as useCdkBootstrapAssetsOption, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as exclusivelyOption, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseContextOptions, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as destroyOptions, tt as selectTargetStack, u as assetPathDirs, un as skipFinalSnapshotOption, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as diffReplaceResourceOption, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as LOCK_FILE_SUFFIX, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as validateResourceTimeouts, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as parseDuration, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-
|
|
3
|
-
import {
|
|
1
|
+
import { A as displayStackName, C as STACK_REF_MAX_CODE_POINTS, D as displayAwsMessage, E as cutMarker, F as stringifyJsonPayload, I as terminalSafe, L as truncateCodePoints, N as plainIdentOr, O as displayIdent, P as safeMsg, S as SECRET_REF_MAX_CODE_POINTS, T as asIsMessage, _ as shellQuote, b as setPasteableVerbFlags, c as deployReplaceCommand, d as pasteableCommand, g as shellBoundedDisplay, h as quotedOrDescribed, i as SHELL_ACTIVE_WHY, j as isPasteableIdent, k as displaySafe, m as proseQuoted, o as cdkdRemedy, p as plainOrDescribed, s as commandHole, t as getCdkdVersion, u as isInertUnquoted, v as withheldTargetClause, w as UNRENDERABLE, x as SAFE_MSG_ALTERED_CHAR, y as setPasteableRunFlags } from "./version-CdLI5JxZ.js";
|
|
2
|
+
import { $ as renderStacksNoLongerSelected, $t as contextOptions, A as followContainerLogs, An as parseStateKey, At as namedEnvAwsRegion, B as resolveRuntimeCodeMountPath, Bt as regionNeedsReconciliation, C as waitForRieReady, Cn as parsePositiveIntegerOption, Ct as resolveContainerRegion, Dn as describeStateKey, Dt as warnAwsEmulatorStateSourceHint, E as SENSITIVE_ENV_KEYS, En as STATE_KEY_MAX_CODE_POINTS, Et as taskRoleAssumedInRealAws, F as removeContainer, Ft as legacyStateBucketFallbackRegion, G as nestedOwnerOfLogicalId, Gt as withOtherIndexRemoval, H as resolveRuntimeImage, Ht as resolveEffectiveRegion, It as namedCliRegion, J as renderAllLeftOutStageStacks, Jt as annotationMessageOptions, K as partitionTopLevel, Kt as strandedProfileCredentialsNotice, L as runDetached, Lt as rawCliRegion, M as killAndDrainContainerLogs, Mt as adoptRegionFlag, N as pickFreePort, Nt as exportInferredRegionForSdk, O as ensureDockerAvailable, On as listAllLockKeys, Ot as workloadGetsEmulatorKeysOnly, P as pullImage, Pt as foldRegionOption, Q as renderNotInAppWarning, Qt as commonOptions, Rt as reconcileExportIndexRegion, S as invokeRie, Sn as cliArgParser, St as realAwsException, T as DockerRunnerError, Tn as STATE_FILE_SUFFIX, Tt as stateRoleRecordIsEmulatorSide, U as describeStack, Ut as stackRegionResolver, V as resolveRuntimeFileExtension, Vt as regionShown, W as matchStacks, Wt as stateWithRegion, X as renderAmbiguousTargetStack, Xt as applyWaitFlagEnv, Y as renderAllNoTopLevelStacks, Yt as appOptions, Z as renderNoStackMatch, Zt as collectRepeated, _ as probeHostGatewaySupport, _n as allowUnsupportedTypesOption, _t as localAwsEmulatorCredentials, a as materializeLayerFromArn, an as noCfnFallbackOption, at as unmatchedPatterns, b as substituteImagePlaceholders, bn as resourceTimeoutOptions, bt as prepareLocalLoopbackForwarder, cn as parseStackRegion, ct as resolveCdkPathToLogicalIds, d as resolveAssetCodeDirectory, dn as stackOptions, dt as activateLocalAwsAndRoleArn, en as deployOptions, et as renderUnmatchedPatternsWarning, f as architectureToPlatform, fn as stateOptions, ft as assertAwsEmulatorValue, g as HOST_GATEWAY_MIN_VERSION, gn as parseAssumeRoleToken, gt as localAwsEmulatorActive, h as layerAssetDirectory, hn as normalizeStartApiAssumeRole, ht as keepEmulatorIssuedCredentials, i as resolveInlineCodeFilePath, in as guardStackRegionOptions, it as stacksNoLongerSelected, jt as recordEmulatorDefaultRegion, k as flushStdio, kn as listAllStateKeys, kt as emulatorDefaultRegion, l as resolveLambdaLayers, ln as regionOption, lt as stackForConstructPath, m as copyLayerTreeLastWins, mn as effectiveAssumeRoleArn, mt as getActiveWorkloadAwsWiring$1, n as resolveTmpfsForLambda, nn as diffUpdatePolicyOptions, nt as stackMatchesPattern, o as resolveLambdaTarget, on as noLocalCustomResourcesOption, ot as buildCdkPathIndex, p as buildContainerImage$1, pn as useCdkBootstrapAssetsOption, pt as attachLocalLoopbackForwarder, q as refuseStackNameRegionCollisions, qt as writeProfileCredentialsFile, r as resolveZipImagePlan, rn as exclusivelyOption, rt as stacksForDependency, s as extractEphemeralStorageMb, sn as parseContextOptions, st as readCdkPathOrUndefined, t as resolveLocalBuildPlan$1, tn as destroyOptions, tt as selectTargetStack, u as assetPathDirs, un as skipFinalSnapshotOption, ut as stackForPathFormTarget, v as resolveHostGatewayExtraHosts, vn as diffReplaceResourceOption, vt as mixedModeActive, w as CONTAINER_LOG_DRAIN_TIMEOUT_MS, wn as LOCK_FILE_SUFFIX, wt as setContainerRegion, x as tryResolveImageFnJoin, xn as validateResourceTimeouts, xt as profileCredentialsForWorkload, y as derivePseudoParametersFromRegion$1, yn as parseDuration, yt as mixedModeEmulatorOverride, z as streamLogs, zt as reconcileMarkerRegionWithLegacyDefault } from "./image-plan-7isjcxk3.js";
|
|
3
|
+
import { $i as producerCoordinateKey, $n as createSecretMasker, $r as DYNAMIC_REFERENCE_TOKEN_SCAN, Ar as inheritNestedStackParameterAssociations, Bi as formatLockExpiry, C as DriftReadRefusedError, Cr as identityKeyFor, Di as recordNoEchoParameterFreshValue, Dt as isInterruptedWaitError, Ei as recordNoEchoAttributeValues, Et as interruptWatchListenerCount, Ft as resourceTypeShown, Gi as CUSTOM_RESOURCE_RESPONSE_PREFIX, Gn as logOnlyValueCount, Hi as formatLockOwner, Hr as recordNestedStackParameterExpressions, Ii as UNREPRODUCIBLE_LOCK_CLAUSE, Ji as setPasteableAwsCaBundle, Jn as recordLogOnlyParameterValue, Ki as DEFAULT_STATE_PREFIX, L as remedyLogicalId, Li as buildForceUnlockCommand, Ni as isPlainObject$1, Nt as logicalIdShown, O as VALUE_NOT_SHOWN, Oi as recordProvenPublicExpression, Pi as isSingleDynamicReferenceToken, Qn as unionOfSecretBags, Ri as buildLockContentionMessage, T as assertRegionMatch, Ti as recordMaskOnlyValuesIn, Tn as resolvedPlaintextOf, Tt as endCommandInterruptScope, Un as hasMaskableValues, Vi as formatLockOperation, Vn as createUnionSecretMasker, Vt as maskDeep, Wn as literalSplitDelimitersOf, Xi as withPasteableAwsProfile, Xn as recordLogOnlyValue, Yi as setPasteableAwsProfile, Yr as physicalNameCopiesOf, Zi as injectiveKey, Zn as shareLogOnlyValues, Zr as recordPhysicalNameCopy, a as withResourceDeadline, an as holdsMaskLeaf, br as spelledKeysOf, ci as splitGetAttStringForm, cn as mentionsDynamicReference, ea as producerRecordKey, ei as dynamicReferenceSpans, er as errorCauseChain, fn as opensDynamicReferenceTo, hn as valueMentionsDynamicReference, hr as withPhysicalNameCopies, ht as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, ji as WHOLE_DYNAMIC_REFERENCE_PATTERN, ki as wholeStringLeavesOf, kn as redactForState, li as carriesSecretMask, ln as mentionsDynamicReferenceTo, mr as scrubResourceRecord, mt as IAM_PRINCIPAL_NAME, nn as countDynamicReferenceOpenings, nr as maskSecretsInError, on as isMaskLeaf, pn as recordedSecrecyOf, pt as renderDisableCommand, qi as WAIT_CONDITION_SIGNAL_PREFIX, qn as printingCorpusOf, qr as keepTemplateLiteralLeaves, rr as maskSecretsInText, rt as runDeleteAttempt, ti as dynamicReferenceTokens, un as mentionsMask, ut as isAwsCliLiteral, w as RESOURCE_NOT_FOUND, wi as recordMaskOnlyValue, wt as beginCommandInterruptScope, xi as provenPublicValue, xr as pathCrossesDottedKey, xt as readRecordedPrincipals, yr as isUncertifiedBaselineMaskPosition, z as isMarkedNotGone, zi as forceQuitRecoveryClause, zn as carryLogOnlyValues } from "./resource-deadline-D6p4x_pl.js";
|
|
4
4
|
import { a as runWithStackAwsClients, i as resetAwsClients, l as s3ClientDefaults, o as setAwsClients, s as resolveS3ClientDefaults, t as AwsClients, u as setS3ClientDefaultsDebugLog } from "./aws-clients-DOkPjjAW.js";
|
|
5
|
-
import { $ as withStackScope, A as configStringRefusal, B as generateResourceName, E as coerceCfnBoolean, F as requireConfigString, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, f as isAwsAuthoredFailure, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-
|
|
6
|
-
import { $ as AccountIdUnavailableError, A as stripControlChars, B as isTransientServerError, F as isAmbiguousOutcomeError, G as markNonRetryable, H as THROTTLING_ERROR_NAMES, J as CrossAccountSecretRefusalError, U as isMarkedNonRetryable, V as retryClassificationText, W as isThrottlingError, X as IntrinsicResolutionRefusalError, Y as DynamicReferenceRegionAmbiguousError, Z as MalformedProducerRecordRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, ct as StateError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, it as LocalInvokeBuildError$1, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, lt as SynthesisError, n as ambientCredentialConfig, nt as DeployCancelledError, o as formatError, ot as ProvisioningError, r as clientDefaultsFor, s as handleError, st as ResourceTimeoutError, t as ambientClientDefaults, tt as CdkdError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isRetryableTransientError } from "./ambient-client-defaults-
|
|
5
|
+
import { $ as withStackScope, A as configStringRefusal, B as generateResourceName, E as coerceCfnBoolean, F as requireConfigString, I as PATTERN_B_NAME_OPTIONS, L as PATTERN_B_NAME_PROPERTIES, N as requireConfigArray, O as configBooleanRefusal, P as requireConfigObject, Q as withSkipPrefix, R as PATTERN_B_RESOURCE_TYPES, S as explicitNamePropertyFor, X as isNameGeneration, a as reserveStdoutForPayload, f as isAwsAuthoredFailure, i as releaseStdoutForPayload, m as verboseAwareText, n as getLogger, p as safeStringify, r as isStdoutReservedForPayload, s as runStackBuffered, u as describeAwsFailure, y as getLiveRenderer, z as derivesPatternBName } from "./logger-CC9C99az.js";
|
|
6
|
+
import { $ as AccountIdUnavailableError, A as stripControlChars, B as isTransientServerError, F as isAmbiguousOutcomeError, G as markNonRetryable, H as THROTTLING_ERROR_NAMES, J as CrossAccountSecretRefusalError, U as isMarkedNonRetryable, V as retryClassificationText, W as isThrottlingError, X as IntrinsicResolutionRefusalError, Y as DynamicReferenceRegionAmbiguousError, Z as MalformedProducerRecordRefusalError, _ as ResourceUpdateNotSupportedError, a as normalizeAwsError, ct as StateError, g as PartialFailureError, h as NestedStackChildDirectDestroyError, i as credentialFingerprint, it as LocalInvokeBuildError$1, j as stripForDisplay, k as escapeRegExp, l as withErrorHandling, lt as SynthesisError, n as ambientCredentialConfig, nt as DeployCancelledError, o as formatError, ot as ProvisioningError, r as clientDefaultsFor, s as handleError, st as ResourceTimeoutError, t as ambientClientDefaults, tt as CdkdError, u as LocalStartServiceError, v as StackHasActiveImportsError, y as StackTerminationProtectionError, z as isRetryableTransientError } from "./ambient-client-defaults-D2ziUucm.js";
|
|
7
7
|
import { a as getAssumedRoleCredentials, c as setAssumedRoleCredentials, h as formatAuthority, l as setAwsEndpointOverrideSource, m as runInStackAwsScope, n as awsClientDefaults, r as awsEndpointOverrideActive, s as runWithRealAws } from "./aws-client-defaults-DAebi99J.js";
|
|
8
|
-
import { $ as createLegacyAssetParameterBinder, A as runDockerForeground, B as resolveCaptureObservedState, C as finchSecretArgvRefusal, D as isMalformedEnvKey, E as isDockerClientEnvKey, F as getDefaultStateBucketName, G as resolveUpdatePolicy, H as resolveStateBucketWithDefault, I as getLegacyStateBucketName, J as warnDeprecatedNoPrefixCliFlag, K as resolveUseCdkBootstrapAssets, L as loadCdkJson, M as abortInFlightMultipartUploads, N as Synthesizer, O as formatDockerLoginError, P as synthesisStatusMessage, Q as bindLegacyStackAssetParameters, R as resolveApp, S as dockerSpawnEnvWithSensitive, T as warnFinchArgvExposure, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as resolveStateBucketWithSource, X as AssemblyReader, Y as refuseFailedLookups, Z as StageLoadError, _ as describeDockerExecFailure, at as setChildProcessAwsEnv, b as redactedDockerCause, d as isLockInfoExpired, et as legacyPlanAssetCount, f as AssetPublisher, h as resolveDockerContextDirectory, i as mergeDeclaredEntries, it as processStackMessages, j as runDockerStreaming, k as getDockerCmd, l as DagBuilder, m as buildDockerImage, n as declaredStringList, nt as prepareLegacyStackAssets, p as WorkGraph, q as stateBucketExistenceConfirmed, r as inlinePoliciesAreDeclared, rt as CdkToolkitBucketMissingError, s as stringListIsDeclared, t as declaredInlinePolicies, tt as predictedAutoCreatedAssetMode, u as LockManager, v as describeDockerFailure, w as partitionSensitiveEnv, x as redactDockerArgvValues, y as redactedCause, z as resolveAutoAssetStorage } from "./settle-own-write-members-
|
|
9
|
-
import { $a as orphanRecordsPrintingBag, $c as withPrintingSecrets, $i as computeParameterTaint, $l as unreadableOrphanRecords, $n as displacedPhysicalIdShown, $r as sgSiblingDecidedById, $s as regionLessSecretName, $u as hasReadableOutputs, A as renderUnreplacedTarget, Ac as taintedNamesOf, Ai as isReplacementOrphan, Al as secretSegmentsOfState, An as refuseRefactorMarker, Ar as withMovedTo, As as isSelectOutOfBounds, Au as malformedLocalOutputsWarning, B as readProtection, Bc as SUPERSEDED_COPY_HINT, Bd as CFN_TEMPLATE_BODY_LIMIT, Bi as segmentCleanupOptions, Bl as declaresNoEcho, Bn as childStackTags, Bo as reReadUntilSettled, Br as proposeRenames, Bs as assertFlagRoleArn, Bu as malformedResourcesWarning, C as healSlashedSsmParameterNames, Ca as isSupersededResourceRecord, Cc as maskPassedSecretReasons, Cd as crossPrefixDeniedWarning, Cn as NestedCleanupQueue, Cr as formatChangeCounts, Cs as deleteSkipReason, Cu as malformedOrphansRefusalMessage, D as scanActiveConsumers, Da as supersededHolderOf, Dc as readsTainted, Dd as withStackInstanceIdWithheld, Df as hasPlainPrototype, Di as seedsDeleteFirstGuard, Dl as displayPhysicalId, Dn as readRefactorMarkerOnce, Do as revertStackRecordsView, Dr as hintSidesOf, Du as repairMalformedOrphansForReadOnly, E as slashedSsmNameHealPendingNote, Ea as supersededHeldByOtherTypeWarning, Ec as mixesDynamicReference, Ed as stackInstanceIdOf, Ef as hasOwnKey, Ei as planRollback, En as readRefactorMarker, Er as findRefactorHints, Es as isWaitAbandonedError, Eu as refuseMalformedOrphansForDestroy, F as recordedProtectionEvidence, Fc as getCloudFormationResourceTree, Fd as renderNestedTemplateTreeDefect, Ff as renderAssemblyPathEscape, Fi as IMPLICIT_DELETE_DEPENDENCIES, Fl as publicReferencesOf, Fn as removeSignalReceiverNamed, Fo as declaredPolicyDocument, Fr as isPairableType, Fu as refuseMalformedOutputsForDestroy, Ga as noEchoParameterNamesOf, Gc as NESTED_STACK_RESOURCE_TYPE$1, Gi as nameGenerationHighWaterOf, Gl as malformedOrphanRecordsWarning, Gn as formatResourceLine, Gr as noEchoMacParametersOf, Gs as sendableAssumeRoleCommand, Gu as refuseMalformedState, Ha as canonicalizeIpProtocolValue, Hc as confirmOrRefuse, Hd as findLargeInlineResources, Hi as removeProtectionTypes, Hl as deployRefusesOrphanRowsReason, Hn as macWriteOnlyKeys, Hr as NOECHO_MAC_KEY_ALIAS, Hs as explicitRoleArnOrThrow, Hu as refuseMalformedResourcesForDeploy, I as recordedProtectionNote, Ia as cfnIngressPortValue, Ic as tryGetCloudFormationResourceMap, Id as templateIdentity, If as resolveAssemblyPath, Ii as computeImplicitDeleteEdges, Il as maskedPropertyFingerprintsOf, In as childTemplateLoader, Io as efsPolicyMatchesDeclared, Ir as looselyEqual, Is as resolveDynamicReferences, Iu as repairMalformedOutputsForReadOnly, Ja as createReadOnlyAttributeHealerFactory, Jc as gray, Ji as retiredNameGenerationsAfter, Jl as refuseMalformedOrphanRecords, Jn as resolvePendingCloudControlRequests, Jo as ccBrokenReason, Jr as siblingOwnedRevertDesired, Js as callerEnvCredentials, Ju as accountArgs, Ka as withAttemptedItemsMasked, Kc as bold, Kd as decodeListingKey, Ki as nameScopeOf, Kl as malformedOrphanRowsKeptWarning, Kn as startForceQuitFlushes, Ko as CC_BROKEN_REASON, Kr as noEchoMacVerdict, Ks as AWS_CREDENTIAL_ENV_KEYS, Ku as repairMalformedResourcesForReadOnly, L as PROTECTION_PROPERTY_BY_TYPE, La as recordedSgRuleId, Lc as parseCfnTemplate, Li as typesDeletedBefore, Ll as parameterInputsFor, Ln as inRunStackKey, Lo as lambdaPermissionMatchesDeclared, Lr as mappingPairs, Ls as producerLookupOver, Lt as tagsMatchDeclared, Lu as STATE_REGION_DIVERGED, M as findServiceTokenRefusals, Ma as resolveReplacementOldType, Mc as deleteRetiredCloudFormationStack, Md as findNestedTemplateTreeDefect, Mf as describeFileReadFailure, Mi as recheckFailedPlan, Ml as getSettledWriteOnlyPropertyPaths, Mn as updateRefactorMarker, Mr as changedReferencePath, Ms as poisonRenderedSpellingsCollidingIn, Mu as malformedOutputsWarning, N as serviceTokenBlockingReason, Na as withPreviousPolicies, Nc as prepareCloudFormationStackRetirement, Nd as isAbsoluteAssetPath, Nf as displayAssemblyPath, Ni as recordUnderIdIsNotOwn, Nl as getTopLevelKeysHoldingUnreadableCreateOnly, Nn as deleteSignalReceiver, Nr as changedReferenceReason, Ns as stackIdTailOf, Nt as declaredTagsReadback, O as planReplaceResourceTargets, Oa as supersededResourcesOf, Oc as recordedValuesOf, Od as isSecretValuedAttribute, Of as nullPrototypeRecord, Oi as demoteSupersededOrphans, On as refactorMarkerMovesOf, Or as movedToHint, Os as DiffCalculator, Ou as malformedExportNamesWarning, P as diffSecurity, Pa as findNestedStackTypeChanges, Pc as findReplacedCfnResources, Pd as listNestedTemplateRows, Pi as replacementNeverSwapped, Pl as tryGetTopLevelWriteOnlyProperties, Pn as isReceiver, Po as declaredMemberDocument, Pr as differingRemedy, Pu as refuseMalformedOutputs, Q as streamPolicyMatchesDeclared, Qa as namingSecretsWithRecordedNoEcho, Qi as inheritProducerRegions, Ql as unpreviewableOrphanRecords, Qn as displacedOpClause, Qo as classifyHandleUrl, Qr as sgRuleOwnershipIdentity, Qs as producerRegionsFromState, Qu as displayLogicalId, R as isProtectionValueActive, Ra as sgCidrKey, Rc as parseCfnTemplateWithFormat, Rf as resolveBucketRegion, Ri as attemptUsesCompletedCreate, Rl as maskedInputProof, Rn as settleStackTagChildRuns, Ro as memberReadFailure, Rr as parseMappingFile, Rs as refuseUnreadableCdkCrossAccountRefs, Ru as refuseDivergentRecordRegionForDestroy, S as warnLegacySpelling, Sa as holdsSupersededResources, Sc as maskPassedSecretOutputs, Sd as applyCrossPrefixScan, Sf as BOOTSTRAP_MARKER_PREFIX, Si as ledgerForStack, Sl as renderStatefulReason, Sr as findDestructiveChanges, Ss as deleteLeftInPlace, Su as hasReadableOrphans, T as slashedSsmNameHealNote, Ta as supersededDependentsFirst, Tc as mixedSecretTagKeys, Td as isNotImplemented, Tf as defineOwnKey, Tn as recordRetainedForReadoption, To as destroyStackRecordsView, Tr as orphanedLogicalIds, Ts as getReadOnlyPropertyPaths, Tu as refuseMalformedOrphans, Ua as noEchoAttributeNamesOf, Uc as promptYesNo, Ud as uploadCfnTemplate, Ui as orphanNeedsIdentity, Ul as isReadableOrphanRecord, Un as readsOnlyNoEchoParameters, Uo as verbatimEchoDriftKeys, Ur as createNoEchoValueMacs, Us as isIamRoleArn, Uu as refuseMalformedResourcesForDestroy, Va as canonicalizeIpv4Cidr, Vc as cfnFailureText, Vd as CFN_TEMPLATE_URL_LIMIT, Vi as removeProtectionTypeList, Vl as maskedPropertyFingerprint, Vn as literalRowTags, Vr as referencedLogicalIds, Vs as assertSendableRoleArn, Vu as malformedStateRefusalMessage, Wa as noEchoComparisonForTemplate, Wc as serializePrompt, Wd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Wi as nameGenerationCarriedFrom, Wl as malformedOrphanRecordsRefusalMessage, Wr as noEchoMacBinding, Ws as parseIamRoleArn, Wu as refuseMalformedResourcesForExport, Xa as journaledOrphanPrintingBag, Xc as red, Xd as createAssetRedirectResolver, Xi as withNameGenerationReached, Xl as refuseMalformedOrphansForOrphan, Xn as planOrphanAdoption, Xo as wouldReturnToSdkProvider, Xr as undeclaredGrantSiblingMembers, Xs as classifyRecordedSecretRegion, Xu as STATE_RESOURCES_MALFORMED, Ya as completedReplayEntries, Yc as green, Yd as buildAssetRedirectMap, Yi as retiredNameGenerationsLeaving, Yl as refuseMalformedOrphanRecordsForDestroy, Yn as makeSiblingClaimReader, Yo as isCustomResource, Yr as stripSiblingOwnedParentMembers, Ys as envCredentialsAreAssumedRole, Yu as withheldAccountClause, Za as maskEventTextWithBoundBags, Zc as yellow, Zd as createLazyAssetModeContext, Zl as repairMalformedOrphanRecordsForReadOnly, Zn as NESTED_PENDING_PARENT_REASON, Zo as WaitConditionSignalStore, Zr as recordedRuleIdOf, Zs as classifyReplaySecretRegion, Zu as UNREADABLE_RESOURCES_MAP_ROW, _ as readRecordedConditionVerdicts, _a as bindingSkippedOutputs, _d as hasReasonlessBaselineRefusal, _f as getBootstrapMarkerKey, _i as updatePartialMessage, _l as refuseStatefulReplacedReaders, _o as buildFinalSnapshotIdentifier, _r as makeForeignHolderScan, _s as CloudControlProvider, _u as refuseMalformedResourcePropertiesForDrift, a as mergeNoChangeOutputs, aa as exportAliasCollisionScrubWarning, af as AssetManifestLoader, ai as DELETED_RESOURCE_REMEDY, al as getAccountInfo, ao as stateSecretNameNeedles, ar as revertedNestedRowIds, as as TemplateNoEchoReresolver, au as refuseMalformedResourceAttributesForOrphan, b as pendingMovesRefusalMessage, ba as maskingRetryLogger, bc as crossStackTaintSeeds, bd as CrossPrefixReadError, bf as validateAssetBucketName, bi as replacementCreateRoutesToCloudControl, bl as isStatefulRecreateTargetForReplace, br as crossStackReadsForPartialSave, bs as UNSPECIFIED_SKIP_REASON, bu as repairMalformedResourcePropertiesForReadOnly, c as nestedSsmNameRowNote, ca as secretSafeKeyDisplay, cc as coerceParameterTypedValue, cd as PROPERTY_COVERAGE_BY_TYPE, ci as earlyDeletedOld, cl as isNamelessDynamicReferenceError, co as ATOMIC_FINAL_SNAPSHOT_TYPES, cr as getCurrentNestedStackContext, cs as NO_LOCAL_CUSTOM_RESOURCES_FLAG, cu as refuseMalformedResourceEntriesForDestroy, d as makeCanonicalizePropertiesFn, da as exportNameSecretExposure, dc as AWS_NO_VALUE, di as settleUnsettledPrevious, dl as withSharedDrainBudget, do as ccRoutedInstanceTakesNoSnapshot, dr as dropFailedCommands, ds as customResourcesRunWithoutApp, du as refuseMalformedResourceEntriesForOrphan, ea as namesAnyDeclaredParameter, ec as withoutLapsedStaleShapeStamp, ed as hasReadableResources, el as keepHeldTokenProvenance, eo as secretNamePrintingBag, er as dropSettledNestedJournals, es as isSignalKey, eu as isReadableResourceEntry, f as readDbInstanceAvailabilityZone, fa as isWholeDynamicReferenceValue, fc as cfnRefValueFromPhysicalId, ff as AssetModeResolver, fi as withUnprovenUnsettled, fl as INTRINSIC_KEYS, fo as effectiveDeletionPolicy, fr as dropFailedHint, fs as localCustomResourceCommand, fu as repairMalformedResourceEntriesForReadOnly, g as parentSuppliedValues, ga as isExportAliasCollision, gc as lacksRecordedTableArn, gd as readOnlyStateVersionOf, gf as isCrossRegionRedirect, gi as undeclaredEmptyObservedKeys, gl as findReplacedReadersOfRecreateTargets, go as createPreDeleteFinalSnapshot, gr as sameJournaledOrphans, gu as refuseMalformedResourcePropertiesForDestroy, h as conditionInputsFrom, ha as collectPublishedOutputNames, hc as lacksRecordedRefArn, hd as splitImportedOps, hf as assertAssetBucketRegion, hi as equalModuloMask, ho as unsupportedFinalSnapshotError, hr as loadJournaledOrphans, hs as withCustomResourceStack, hu as malformedResourcePropertiesWarning, i as keptWholeReasonText, ia as displayTextOrWithheld, id as unwrittenCreateOnlyReplacement, if as rewriteTemplateAssetReferences, ii as replayRollback, il as withoutVersionAttestation, io as stackSecretNamesMasker, iu as malformedScrubResourceEntriesRefusalMessage, j as deferredServiceTokenWarning, ja as snapshotSegmentSurvivors, jc as templateMixesDynamicReference, ji as planFailedOps, jl as withSecretPhysicalIdsMaskedInState, jn as sameMove, jo as LAMBDA_PERMISSION_STATEMENT_KEYS, jr as changedReferenceInDiff, js as isAlwaysLiveAttribute, ju as malformedOutputsRefusalMessage, k as refuseStatefulReplaceResourceTargets, ka as withoutSuperseded, kc as securityDiffWithPassedSecretWithheld, kd as isSensitiveAttributeName, kf as ownValue, ki as isJournaledOrphan, kl as secretPhysicalIdSegment, kn as refactorMarkerRefusalMessage, ko as withStackRecords, kr as rollbackOrphanIds, ks as IntrinsicFunctionResolver, ku as malformedExportSourceWarning, l as crossStackOutputProvenanceSource, la as carriedExportAliasExposure, lc as isUnboundTemplateParameter, ld as providerReplacementOldDeleted, li as buildReadCurrentStateContext, ll as carriesDynamicReference, lo as PRE_DELETE_SNAPSHOT_TYPES, lr as withNestedStackContext, lu as refuseMalformedResourceEntriesForImport, m as conditionFingerprint, ma as collectDeclaredOutputNames, mc as refStateLookupFromResource, md as S3StateBackend, mf as buildDenyExternalAccessPolicy, mi as equalModuloMarkedMask, mo as refusesFinalSnapshot, mr as journaledOrphanLines, ms as setLocalCustomResourceRuntimeEnabled, mu as malformedDriftResourcePropertiesWarning, n as applyStackTagsToTemplate, na as resourcesNamingDeclaredParameter, nd as findHandledUnwrittenCreateOnly, nl as recordedOutputReferenceRegions, nr as nestedChildStackName$1, ns as applyCustomResourceResponseExpiration, nu as malformedLocalResourcesWarning, o as checkNestedSsmNames, oa as secretBearing, od as NO_CC_HANDLERS_REASON, of as getDockerImageBySourceHash, oi as PLANNED_EARLY_DELETE_CONSEQUENCE, ol as isImpossibleEmptyStoredAttribute, oo as storedSecretNameNeedles, or as withNestedRevertRun, os as readsNoEchoDeleteValues, ou as refuseMalformedResourceEntries, p as healZonelessDbInstanceRecords, pa as noEchoParameterValueSeed, pc as isStalePlaceholderArnAttribute, pd as TemplateParser, pf as ensureAssetStorage, pi as calculateResourceDrift, pl as LEGACY_HANDLE_HEAL_REASON, po as isFinalSnapshotError, pr as isHandledOrphan, pu as unreadableResourceEntries, q as readStreamPolicy, qa as noEchoExactEchoLeavesOf, qc as cyan, qi as retiredAfterRollback, ql as previewableOrphanRecords, qn as pendingRequestCount, qo as ProviderRegistry, qr as noEchoValueMacsOf, qs as applyCallerIdentityCredentials, qu as JSON_LISTING_HOLE_VALUE, r as isSecretBearingReferenceString, ra as WITHHELD_NAME_DISPLAY, ri as replayFailedOperations, rl as recordedReferenceRegions, ro as secretNamedRecordNeedles, rr as recordDisplacedSkips, rs as customResourceResponseExpirationWarning, ru as malformedResourceEntriesWarning, s as nestedSsmNameDeferredNote, sa as secretBearingStateKeyWarning, sd as hasNoCloudControlHandlers, si as earlyDeleteWhen, sl as carriesFetchableDynamicReference, so as extractDeploymentEventError, sr as collectNestedChildUnaddressed, ss as isCustomResourceType$1, su as refuseMalformedResourceEntriesForDeploy, t as DeployEngine, ta as reachableDivergentParameters, tc as isUnexposedRecordedIdentity, td as findActionableSdkUnwired, tf as loadPublishableAssetManifest, ti as siblingRecordedSgRuleIds, to as secretNamePrintingBags, ts as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, tu as malformedLocalResourceEntriesWarning, u as inheritedProvenanceForChildDiff, ua as exportNameNoEchoParameters, uc as parameterTypeMayLoseSecretIdentity, ui as recordAfterRollbackUpdate, ul as keepsSecretReferenceToken, uo as ccRoutedFinalSnapshotError, ur as deleteJournaledOrphans, us as customResourcesFailedWithoutApp, uu as refuseMalformedResourceEntriesForImportSave, v as hasPendingMovesOut, va as DEFAULT_RESOURCE_TIMEOUT_MS, vc as SECURITY_TABLE_WITHHELD, vd as hasUnverifiableParameterRefusal, vf as parseBootstrapMarker, vi as updatePartialReason, vl as shownType, vr as DeploymentEventsReader, vu as refuseMalformedResourcePropertiesForExport, w as slashedSsmNameHealAdoptedNote, wa as supersededAfterRollback, wc as mixedSecretRowKeys, wd as isAccessDenied, wi as withCreateTokenLedger, wn as keptForRetainedRecord, wr as formatDestructiveChange, wu as malformedOrphansWarning, x as refusePendingMovesOut, xa as deleteSupersededEntry, xc as maskPassedSecretChanges, xd as CrossPrefixScanCache, xf as validateContainerRepoName, xl as isStatefulRecreateTargetSync, xr as constructPathOf$1, xs as deleteIndeterminateGuards, xu as UNREADABLE_ORPHANS_CONTAINER_ROW, y as pendingMovesOutOf, ya as DEFAULT_RESOURCE_WARN_AFTER_MS, yc as calculatorMaskingPassedSecretLines, yd as rebuildClientForBucketRegion, yf as readBootstrapMarkerBody, yi as findUpdatePolicyReplacementRefusals, yl as MULTI_REGION_RECREATE_BLOCKED_TYPES, yr as DeploymentEventsStore, ys as RollbackInlinePolicyWriters, yu as refuseMalformedResourcePropertiesForOrphan, z as perType, za as sgProtocolKey, zc as stringifyCfnTemplate, zd as ssmResolvedValueType, zi as readsRegeneratingSecret, zo as policyDocumentMatchesDeclared, zr as propertiesChangedReason, zs as applyRoleArnIfSet, zu as malformedRenderedContainersWarning } from "./deploy-engine-D7Iv9v8e.js";
|
|
8
|
+
import { $ as createLegacyAssetParameterBinder, A as runDockerForeground, B as resolveCaptureObservedState, C as finchSecretArgvRefusal, D as isMalformedEnvKey, E as isDockerClientEnvKey, F as getDefaultStateBucketName, G as resolveUpdatePolicy, H as resolveStateBucketWithDefault, I as getLegacyStateBucketName, J as warnDeprecatedNoPrefixCliFlag, K as resolveUseCdkBootstrapAssets, L as loadCdkJson, M as abortInFlightMultipartUploads, N as Synthesizer, O as formatDockerLoginError, P as synthesisStatusMessage, Q as bindLegacyStackAssetParameters, R as resolveApp, S as dockerSpawnEnvWithSensitive, T as warnFinchArgvExposure, U as resolveStateBucketWithDefaultAndSource, V as resolveSkipPrefix, W as resolveStateBucketWithSource, X as AssemblyReader, Y as refuseFailedLookups, Z as StageLoadError, _ as describeDockerExecFailure, at as setChildProcessAwsEnv, b as redactedDockerCause, d as isLockInfoExpired, et as legacyPlanAssetCount, f as AssetPublisher, h as resolveDockerContextDirectory, i as mergeDeclaredEntries, it as processStackMessages, j as runDockerStreaming, k as getDockerCmd, l as DagBuilder, m as buildDockerImage, n as declaredStringList, nt as prepareLegacyStackAssets, p as WorkGraph, q as stateBucketExistenceConfirmed, r as inlinePoliciesAreDeclared, rt as CdkToolkitBucketMissingError, s as stringListIsDeclared, t as declaredInlinePolicies, tt as predictedAutoCreatedAssetMode, u as LockManager, v as describeDockerFailure, w as partitionSensitiveEnv, x as redactDockerArgvValues, y as redactedCause, z as resolveAutoAssetStorage } from "./settle-own-write-members-WuNz0klP.js";
|
|
9
|
+
import { $a as maskEventTextWithBoundBags, $c as yellow, $d as createLazyAssetModeContext, $l as repairMalformedOrphanRecordsForReadOnly, $n as NESTED_PENDING_PARENT_REASON, $o as WaitConditionSignalStore, $r as recordedRuleIdOf, $s as classifyReplaySecretRegion, $u as UNREADABLE_RESOURCES_MAP_ROW, A as renderUnreplacedTarget, Aa as supersededResourcesOf, Ac as recordedValuesOf, Ad as isSecretValuedAttribute, Af as nullPrototypeRecord, Ai as demoteSupersededOrphans, An as refactorMarkerMovesOf, Ar as movedToHint, As as DiffCalculator, Au as malformedExportNamesWarning, B as readProtection, Ba as sgCidrKey, Bc as parseCfnTemplateWithFormat, Bf as resolveBucketRegion, Bi as attemptUsesCompletedCreate, Bl as maskedInputProof, Bn as settleStackTagChildRuns, Bo as memberReadFailure, Br as parseMappingFile, Bs as refuseUnreadableCdkCrossAccountRefs, Bu as refuseDivergentRecordRegionForDestroy, C as healSlashedSsmParameterNames, Ca as deleteSupersededEntry, Cc as maskPassedSecretChanges, Cd as CrossPrefixScanCache, Cf as validateContainerRepoName, Cl as isStatefulRecreateTargetSync, Cr as constructPathOf$1, Cs as deleteIndeterminateGuards, Cu as UNREADABLE_ORPHANS_CONTAINER_ROW, D as scanActiveConsumers, Da as supersededDependentsFirst, Dc as mixedSecretTagKeys, Dd as isNotImplemented, Df as defineOwnKey, Dn as recordRetainedForReadoption, Do as destroyStackRecordsView, Dr as orphanedLogicalIds, Ds as getReadOnlyPropertyPaths, Du as refuseMalformedOrphans, E as slashedSsmNameHealPendingNote, Ea as supersededAfterRollback, Ec as mixedSecretRowKeys, Ed as isAccessDenied, Ei as withCreateTokenLedger, En as keptForRetainedRecord, Er as formatDestructiveChange, Eu as malformedOrphansWarning, F as recordedProtectionEvidence, Fa as withPreviousPolicies, Fc as prepareCloudFormationStackRetirement, Fd as isAbsoluteAssetPath, Ff as displayAssemblyPath, Fi as recordUnderIdIsNotOwn, Fl as getTopLevelKeysHoldingUnreadableCreateOnly, Fn as deleteSignalReceiver, Fr as changedReferenceReason, Fs as stackIdTailOf, Ga as noEchoAttributeNamesOf, Gc as promptYesNo, Gd as uploadCfnTemplate, Gi as orphanNeedsIdentity, Gl as isReadableOrphanRecord, Gn as readsOnlyNoEchoParameters, Go as verbatimEchoDriftKeys, Gr as createNoEchoValueMacs, Gs as isIamRoleArn, Gu as refuseMalformedResourcesForDestroy, Hc as SUPERSEDED_COPY_HINT, Hd as CFN_TEMPLATE_BODY_LIMIT, Hi as segmentCleanupOptions, Hl as declaresNoEcho, Hn as childStackTags, Ho as reReadUntilSettled, Hr as proposeRenames, Hs as assertFlagRoleArn, Hu as malformedResourcesWarning, I as recordedProtectionNote, Ia as findNestedStackTypeChanges, Ic as findReplacedCfnResources, Id as listNestedTemplateRows, Ii as replacementNeverSwapped, Il as tryGetTopLevelWriteOnlyProperties, In as isReceiver, Io as declaredMemberDocument, Ir as differingRemedy, Iu as refuseMalformedOutputs, Ja as withAttemptedItemsMasked, Jc as bold, Jd as decodeListingKey, Ji as nameScopeOf, Jl as malformedOrphanRowsKeptWarning, Jn as startForceQuitFlushes, Jo as CC_BROKEN_REASON, Jr as noEchoMacVerdict, Js as AWS_CREDENTIAL_ENV_KEYS, Ju as repairMalformedResourcesForReadOnly, Ka as noEchoComparisonForTemplate, Kc as serializePrompt, Kd as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Ki as nameGenerationCarriedFrom, Kl as malformedOrphanRecordsRefusalMessage, Kr as noEchoMacBinding, Ks as parseIamRoleArn, Ku as refuseMalformedResourcesForExport, L as PROTECTION_PROPERTY_BY_TYPE, Lc as getCloudFormationResourceTree, Ld as renderNestedTemplateTreeDefect, Lf as renderAssemblyPathEscape, Li as IMPLICIT_DELETE_DEPENDENCIES, Ll as publicReferencesOf, Ln as removeSignalReceiverNamed, Lo as declaredPolicyDocument, Lr as isPairableType, Lt as tagsMatchDeclared, Lu as refuseMalformedOutputsForDestroy, M as findServiceTokenRefusals, Mc as taintedNamesOf, Mi as isReplacementOrphan, Ml as secretSegmentsOfState, Mn as refuseRefactorMarker, Mr as withMovedTo, Ms as isSelectOutOfBounds, Mu as malformedLocalOutputsWarning, N as serviceTokenBlockingReason, Na as snapshotSegmentSurvivors, Nc as templateMixesDynamicReference, Ni as planFailedOps, Nl as withSecretPhysicalIdsMaskedInState, Nn as sameMove, No as LAMBDA_PERMISSION_STATEMENT_KEYS, Nr as changedReferenceInDiff, Ns as isAlwaysLiveAttribute, Nt as declaredTagsReadback, Nu as malformedOutputsRefusalMessage, O as planReplaceResourceTargets, Oa as supersededHeldByOtherTypeWarning, Oc as mixesDynamicReference, Od as stackInstanceIdOf, Of as hasOwnKey, Oi as planRollback, On as readRefactorMarker, Or as findRefactorHints, Os as isWaitAbandonedError, Ou as refuseMalformedOrphansForDestroy, P as diffSecurity, Pa as resolveReplacementOldType, Pc as deleteRetiredCloudFormationStack, Pd as findNestedTemplateTreeDefect, Pf as describeFileReadFailure, Pi as recheckFailedPlan, Pl as getSettledWriteOnlyPropertyPaths, Pn as updateRefactorMarker, Pr as changedReferencePath, Ps as poisonRenderedSpellingsCollidingIn, Pu as malformedOutputsWarning, Q as streamPolicyMatchesDeclared, Qa as journaledOrphanPrintingBag, Qc as red, Qd as createAssetRedirectResolver, Qi as withNameGenerationReached, Ql as refuseMalformedOrphansForOrphan, Qn as planOrphanAdoption, Qo as wouldReturnToSdkProvider, Qr as undeclaredGrantSiblingMembers, Qs as classifyRecordedSecretRegion, Qu as STATE_RESOURCES_MALFORMED, R as isProtectionValueActive, Ra as cfnIngressPortValue, Rc as tryGetCloudFormationResourceMap, Rd as templateIdentity, Rf as resolveAssemblyPath, Ri as computeImplicitDeleteEdges, Rl as maskedPropertyFingerprintsOf, Rn as childTemplateLoader, Ro as efsPolicyMatchesDeclared, Rr as looselyEqual, Rs as resolveDynamicReferences, Ru as repairMalformedOutputsForReadOnly, S as warnLegacySpelling, Sa as maskingRetryLogger, Sc as crossStackTaintSeeds, Sd as CrossPrefixReadError, Sf as validateAssetBucketName, Si as replacementCreateRoutesToCloudControl, Sl as isStatefulRecreateTargetForReplace, Sr as crossStackReadsForPartialSave, Ss as UNSPECIFIED_SKIP_REASON, Su as repairMalformedResourcePropertiesForReadOnly, T as slashedSsmNameHealNote, Ta as isSupersededResourceRecord, Tc as maskPassedSecretReasons, Td as crossPrefixDeniedWarning, Tn as NestedCleanupQueue, Tr as formatChangeCounts, Ts as deleteSkipReason, Tu as malformedOrphansRefusalMessage, Ua as canonicalizeIpv4Cidr, Uc as cfnFailureText, Ud as CFN_TEMPLATE_URL_LIMIT, Ui as removeProtectionTypeList, Ul as maskedPropertyFingerprint, Un as literalRowTags, Ur as referencedLogicalIds, Us as assertSendableRoleArn, Uu as malformedStateRefusalMessage, Va as sgProtocolKey, Vc as stringifyCfnTemplate, Vd as ssmResolvedValueType, Vi as readsRegeneratingSecret, Vo as policyDocumentMatchesDeclared, Vr as propertiesChangedReason, Vs as applyRoleArnIfSet, Vu as malformedRenderedContainersWarning, Wa as canonicalizeIpProtocolValue, Wc as confirmOrRefuse, Wd as findLargeInlineResources, Wi as removeProtectionTypes, Wl as deployRefusesOrphanRowsReason, Wn as macWriteOnlyKeys, Wr as NOECHO_MAC_KEY_ALIAS, Ws as explicitRoleArnOrThrow, Wu as refuseMalformedResourcesForDeploy, Xa as createReadOnlyAttributeHealerFactory, Xc as gray, Xi as retiredNameGenerationsAfter, Xl as refuseMalformedOrphanRecords, Xn as resolvePendingCloudControlRequests, Xo as ccBrokenReason, Xr as siblingOwnedRevertDesired, Xs as callerEnvCredentials, Xu as accountArgs, Ya as noEchoExactEchoLeavesOf, Yc as cyan, Yi as retiredAfterRollback, Yl as previewableOrphanRecords, Yn as pendingRequestCount, Yo as ProviderRegistry, Yr as noEchoValueMacsOf, Ys as applyCallerIdentityCredentials, Yu as JSON_LISTING_HOLE_VALUE, Za as completedReplayEntries, Zc as green, Zd as buildAssetRedirectMap, Zi as retiredNameGenerationsLeaving, Zl as refuseMalformedOrphanRecordsForDestroy, Zn as makeSiblingClaimReader, Zo as isCustomResource, Zr as stripSiblingOwnedParentMembers, Zs as envCredentialsAreAssumedRole, Zu as withheldAccountClause, _ as readRecordedConditionVerdicts, _a as collectPublishedOutputNames, _c as lacksRecordedRefArn, _d as splitImportedOps, _f as assertAssetBucketRegion, _i as equalModuloMask, _o as unsupportedFinalSnapshotError, _r as loadJournaledOrphans, _s as withCustomResourceStack, _u as malformedResourcePropertiesWarning, a as mergeNoChangeOutputs, aa as WITHHELD_NAME_DISPLAY, ai as replayFailedOperations, al as recordedReferenceRegions, ao as secretNamedRecordNeedles, ar as recordDisplacedSkips, as as customResourceResponseExpirationWarning, au as malformedResourceEntriesWarning, b as pendingMovesRefusalMessage, ba as DEFAULT_RESOURCE_TIMEOUT_MS, bc as SECURITY_TABLE_WITHHELD, bd as hasUnverifiableParameterRefusal, bf as parseBootstrapMarker, bi as updatePartialReason, bl as shownType, br as DeploymentEventsReader, bu as refuseMalformedResourcePropertiesForExport, c as nestedSsmNameRowNote, ca as secretBearing, cd as NO_CC_HANDLERS_REASON, cf as getDockerImageBySourceHash, ci as PLANNED_EARLY_DELETE_CONSEQUENCE, cl as isImpossibleEmptyStoredAttribute, co as storedSecretNameNeedles, cr as withNestedRevertRun, cs as readsNoEchoDeleteValues, cu as refuseMalformedResourceEntries, d as makeCanonicalizePropertiesFn, da as carriedExportAliasExposure, dc as isUnboundTemplateParameter, dd as providerReplacementOldDeleted, di as buildReadCurrentStateContext, dl as carriesDynamicReference, do as PRE_DELETE_SNAPSHOT_TYPES, dr as withNestedStackContext, du as refuseMalformedResourceEntriesForImport, ea as inheritProducerRegions, ec as producerRegionsFromState, ed as displayLogicalId, ei as sgRuleOwnershipIdentity, eo as namingSecretsWithRecordedNoEcho, er as displacedOpClause, es as classifyHandleUrl, eu as unpreviewableOrphanRecords, f as readDbInstanceAvailabilityZone, fa as exportNameNoEchoParameters, fc as parameterTypeMayLoseSecretIdentity, fi as recordAfterRollbackUpdate, fl as keepsSecretReferenceToken, fo as ccRoutedFinalSnapshotError, fr as deleteJournaledOrphans, fs as customResourcesFailedWithoutApp, fu as refuseMalformedResourceEntriesForImportSave, g as parentSuppliedValues, ga as collectDeclaredOutputNames, gc as refStateLookupFromResource, gd as S3StateBackend, gf as buildDenyExternalAccessPolicy, gi as equalModuloMarkedMask, go as refusesFinalSnapshot, gr as journaledOrphanLines, gs as setLocalCustomResourceRuntimeEnabled, gu as malformedDriftResourcePropertiesWarning, h as conditionInputsFrom, ha as noEchoParameterValueSeed, hc as isStalePlaceholderArnAttribute, hd as TemplateParser, hf as ensureAssetStorage, hi as calculateResourceDrift, hl as LEGACY_HANDLE_HEAL_REASON, ho as isFinalSnapshotError, hr as isHandledOrphan, hu as unreadableResourceEntries, i as keptWholeReasonText, ia as resourcesNamingDeclaredParameter, id as findHandledUnwrittenCreateOnly, il as recordedOutputReferenceRegions, ir as nestedChildStackName$1, is as applyCustomResourceResponseExpiration, iu as malformedLocalResourcesWarning, j as deferredServiceTokenWarning, ja as withoutSuperseded, jc as securityDiffWithPassedSecretWithheld, jd as isSensitiveAttributeName, jf as ownValue, ji as isJournaledOrphan, jl as secretPhysicalIdSegment, jn as refactorMarkerRefusalMessage, jo as withStackRecords, jr as rollbackOrphanIds, js as IntrinsicFunctionResolver, ju as malformedExportSourceWarning, k as refuseStatefulReplaceResourceTargets, ka as supersededHolderOf, kc as readsTainted, kd as withStackInstanceIdWithheld, kf as hasPlainPrototype, ki as seedsDeleteFirstGuard, kl as displayPhysicalId, kn as readRefactorMarkerOnce, ko as revertStackRecordsView, kr as hintSidesOf, ku as repairMalformedOrphansForReadOnly, l as crossStackOutputProvenanceSource, la as secretBearingStateKeyWarning, ld as hasNoCloudControlHandlers, li as earlyDeleteWhen, ll as carriesFetchableDynamicReference, lo as extractDeploymentEventError, lr as collectNestedChildUnaddressed, ls as isCustomResourceType$1, lu as refuseMalformedResourceEntriesForDeploy, m as conditionFingerprint, ma as isWholeDynamicReferenceValue, mc as cfnRefValueFromPhysicalId, mf as AssetModeResolver, mi as withUnprovenUnsettled, ml as INTRINSIC_KEYS, mo as effectiveDeletionPolicy, mr as dropFailedHint, ms as localCustomResourceCommand, mu as repairMalformedResourceEntriesForReadOnly, n as applyStackTagsToTemplate, na as namesAnyDeclaredParameter, nc as withoutLapsedStaleShapeStamp, nd as hasReadableResources, nl as keepHeldTokenProvenance, no as secretNamePrintingBag, nr as dropSettledNestedJournals, ns as isSignalKey, nu as isReadableResourceEntry, o as checkNestedSsmNames, oa as displayTextOrWithheld, od as unwrittenCreateOnlyReplacement, of as rewriteTemplateAssetReferences, oi as replayRollback, ol as withoutVersionAttestation, oo as stackSecretNamesMasker, ou as malformedScrubResourceEntriesRefusalMessage, p as healZonelessDbInstanceRecords, pa as exportNameSecretExposure, pc as AWS_NO_VALUE, pi as settleUnsettledPrevious, pl as withSharedDrainBudget, po as ccRoutedInstanceTakesNoSnapshot, pr as dropFailedCommands, ps as customResourcesRunWithoutApp, pu as refuseMalformedResourceEntriesForOrphan, q as readStreamPolicy, qa as noEchoParameterNamesOf, qc as NESTED_STACK_RESOURCE_TYPE$1, qi as nameGenerationHighWaterOf, ql as malformedOrphanRecordsWarning, qn as formatResourceLine, qr as noEchoMacParametersOf, qs as sendableAssumeRoleCommand, qu as refuseMalformedState, r as isSecretBearingReferenceString, ra as reachableDivergentParameters, rc as isUnexposedRecordedIdentity, rd as findActionableSdkUnwired, rf as loadPublishableAssetManifest, ri as siblingRecordedSgRuleIds, ro as secretNamePrintingBags, rs as CUSTOM_RESOURCE_RESPONSE_LIFECYCLE_RULE_ID, ru as malformedLocalResourceEntriesWarning, s as nestedSsmNameDeferredNote, sa as exportAliasCollisionScrubWarning, sf as AssetManifestLoader, si as DELETED_RESOURCE_REMEDY, sl as getAccountInfo, so as stateSecretNameNeedles, sr as revertedNestedRowIds, ss as TemplateNoEchoReresolver, su as refuseMalformedResourceAttributesForOrphan, t as DeployEngine, ta as computeParameterTaint, tc as regionLessSecretName, td as hasReadableOutputs, ti as sgSiblingDecidedById, tl as withPrintingSecrets, to as orphanRecordsPrintingBag, tr as displacedPhysicalIdShown, tu as unreadableOrphanRecords, u as inheritedProvenanceForChildDiff, ua as secretSafeKeyDisplay, uc as coerceParameterTypedValue, ud as PROPERTY_COVERAGE_BY_TYPE, ui as earlyDeletedOld, ul as isNamelessDynamicReferenceError, uo as ATOMIC_FINAL_SNAPSHOT_TYPES, ur as getCurrentNestedStackContext, us as NO_LOCAL_CUSTOM_RESOURCES_FLAG, uu as refuseMalformedResourceEntriesForDestroy, v as hasPendingMovesOut, va as isExportAliasCollision, vc as lacksRecordedTableArn, vd as readOnlyStateVersionOf, vf as isCrossRegionRedirect, vi as undeclaredEmptyObservedKeys, vl as findReplacedReadersOfRecreateTargets, vo as createPreDeleteFinalSnapshot, vr as sameJournaledOrphans, vu as refuseMalformedResourcePropertiesForDestroy, w as slashedSsmNameHealAdoptedNote, wa as holdsSupersededResources, wc as maskPassedSecretOutputs, wd as applyCrossPrefixScan, wf as BOOTSTRAP_MARKER_PREFIX, wi as ledgerForStack, wl as renderStatefulReason, wr as findDestructiveChanges, ws as deleteLeftInPlace, wu as hasReadableOrphans, x as refusePendingMovesOut, xa as DEFAULT_RESOURCE_WARN_AFTER_MS, xc as calculatorMaskingPassedSecretLines, xd as rebuildClientForBucketRegion, xf as readBootstrapMarkerBody, xi as findUpdatePolicyReplacementRefusals, xl as MULTI_REGION_RECREATE_BLOCKED_TYPES, xr as DeploymentEventsStore, xs as RollbackInlinePolicyWriters, xu as refuseMalformedResourcePropertiesForOrphan, y as pendingMovesOutOf, ya as bindingSkippedOutputs, yd as hasReasonlessBaselineRefusal, yf as getBootstrapMarkerKey, yi as updatePartialMessage, yl as refuseStatefulReplacedReaders, yo as buildFinalSnapshotIdentifier, yr as makeForeignHolderScan, ys as CloudControlProvider, yu as refuseMalformedResourcePropertiesForDrift, z as perType, za as recordedSgRuleId, zc as parseCfnTemplate, zi as typesDeletedBefore, zl as parameterInputsFor, zn as inRunStackKey, zo as lambdaPermissionMatchesDeclared, zr as mappingPairs, zs as producerLookupOver, zu as STATE_REGION_DIVERGED } from "./deploy-engine-7gPM_z0r.js";
|
|
10
10
|
import { n as canonicalizeRegion, r as derivePartitionAndUrlSuffix, t as PARTITION_TABLE } from "./aws-partition-DA0r2sr-.js";
|
|
11
|
-
import { D as describeJsonParseFailure, T as timePhase, a as getCreateOnlyPropertyPaths, b as PhaseClock, c as templateResourceTypes, f as describeTypeWithThrottleRetry, j as utf8ByteLength, k as parseFailureDebugDetail, s as prefetchCreateOnlyPropertyPaths, v as withRetry, w as renderPhaseTimings } from "./secret-reference-immutable-
|
|
12
|
-
import { l as setResolvedResourceTimeouts } from "./ec2-termination-protection-
|
|
13
|
-
import { t as expectedOwnerParam } from "./expected-bucket-owner-
|
|
14
|
-
import { Ct as isReadableBag, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, bt as hasReadableExportSet, gt as slowCcOperationTimeoutMs, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { n as isRedactedRecordedValue } from "./redacted-delete-address-
|
|
19
|
-
import { a as
|
|
20
|
-
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-DUDwEekn.js";
|
|
11
|
+
import { D as describeJsonParseFailure, T as timePhase, a as getCreateOnlyPropertyPaths, b as PhaseClock, c as templateResourceTypes, f as describeTypeWithThrottleRetry, j as utf8ByteLength, k as parseFailureDebugDetail, s as prefetchCreateOnlyPropertyPaths, v as withRetry, w as renderPhaseTimings } from "./secret-reference-immutable-CGZO-iyw.js";
|
|
12
|
+
import { l as setResolvedResourceTimeouts } from "./ec2-termination-protection-C3bNJVAK.js";
|
|
13
|
+
import { t as expectedOwnerParam } from "./expected-bucket-owner-NU2Veqhr.js";
|
|
14
|
+
import { Ct as isReadableBag, Et as shouldRetainResource, Ot as stackInstanceIdCarriedFrom, St as importableOutputs, Tt as orphansCarriedFrom, _t as acceptedCreateOnlyDropsOf, bt as hasReadableExportSet, gt as slowCcOperationTimeoutMs, vt as describeRegionValueKind, wt as orphansAfterRollback, xt as importableOutputKeys, yt as exportNamesCarriedFrom } from "./delete-started-C-Fplb9I.js";
|
|
15
|
+
import { C as observedMaskedLeavesOf, D as canonicalCoordinates, E as noEchoOutputsComparison, H as readsNoEchoSource, I as noEchoCoordinatesOf, J as liveMatchesUnresolvedTokenFrame, K as valueAtCoordinate, L as noEchoLeavesOf, M as maskReadbackAtCoordinates, N as maskWholeValue, P as maskedLeafCoordinatesOf, S as maskOffTemplateEchoes, W as recordedNoEchoValuesOf, _ as storedNoEchoInputsKnown, j as maskAtCoordinates, k as isMarkedCoordinate, v as storedRecordFinisher, w as withOffTemplateEchoesMasked } from "./replacement-rules-bf4K_Yka.js";
|
|
16
|
+
import { m as SURVIVOR_IDENTITY_ATTRIBUTES, u as differingIdentityWarning } from "./identity-read-denied-BnZ-p9kt.js";
|
|
17
|
+
import { S as unsettledPropertiesOf, T as withoutUnsettledProperties, b as unsettledItemsOf, w as withUnsettledProperties, y as unsettledItemsField } from "./restore-source-guard-DRxM4nEI.js";
|
|
18
|
+
import { n as isRedactedRecordedValue } from "./redacted-delete-address-DAZayV8w.js";
|
|
19
|
+
import { a as parseEcrRegistryHost, i as looksLikeEcrHostWithForeignSuffix, n as hasEcrRegistryHostLabels, t as ecrRegistryHostPattern } from "./ecr-uri-Dy7a2hEI.js";
|
|
21
20
|
import { t as cdkdCacheHome } from "./cache-home-BVYKj3de.js";
|
|
22
21
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
23
22
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -1561,7 +1560,7 @@ function collectCrossStackRefs(node, onRef, unconditional) {
|
|
|
1561
1560
|
// src/provisioning/register-providers.ts
|
|
1562
1561
|
let providerClasses;
|
|
1563
1562
|
function loadProviderClasses() {
|
|
1564
|
-
providerClasses ??= import("./provider-classes-
|
|
1563
|
+
providerClasses ??= import("./provider-classes-BesMsi8i.js");
|
|
1565
1564
|
return providerClasses;
|
|
1566
1565
|
}
|
|
1567
1566
|
function registerAllProviders(registry, classes) {
|
|
@@ -7292,7 +7291,7 @@ async function repairExportIndexForStack(store, stackName, producerRegion, outpu
|
|
|
7292
7291
|
}
|
|
7293
7292
|
|
|
7294
7293
|
// src/cli/commands/scrub/command-report.ts
|
|
7295
|
-
async function reportScrubOutcome({ options, logger, stateBackend, totalStacksScrubbed, rewrittenStacks, totalParentAttributesUnmatched, totalStacksWithUnscrubbableKeys, totalStacksWithUnverifiableReads, totalStacksWithUnverifiableLeaves, totalStacksWithUnrepairedReadNames, totalOutputKeysDropped, totalStacksWithReadOutputKeys, droppedReadersUnverifiedStacks, malformedRecords, malformedOutputRecords, malformedOrphanRecords, damagedProducerStacks, failures, exportIndexStores, examinedIndexNames, totalIndexEntriesConverged, historyPurgedStacks, totalIndexEntriesAbsent, totalIndexEntriesAbsentWithSecret, indexUnwritten, indexUnreadable, indexRegionsWritten, work }) {
|
|
7294
|
+
async function reportScrubOutcome({ options, logger, stateBackend, totalStacksScrubbed, rewrittenStacks, totalParentAttributesUnmatched, totalStacksWithUnscrubbableKeys, totalStacksWithUnverifiableReads, totalStacksWithUnverifiableLeaves, totalStacksWithUnrepairedReadNames, totalStacksWithUnverifiableNoEchoRecords = 0, totalOutputKeysDropped, totalStacksWithReadOutputKeys, droppedReadersUnverifiedStacks, malformedRecords, malformedOutputRecords, malformedOrphanRecords, damagedProducerStacks, failures, exportIndexStores, examinedIndexNames, totalIndexEntriesConverged, historyPurgedStacks, totalIndexEntriesAbsent, totalIndexEntriesAbsentWithSecret, indexUnwritten, indexUnreadable, indexRegionsWritten, work }) {
|
|
7296
7295
|
let totalIndexEntriesUnexamined = 0;
|
|
7297
7296
|
for (const indexRegion of indexRegionsWritten) await stateBackend.purgeNoncurrentVersions([scrubbedExportIndexKey(stateBackend, indexRegion)], { objectDescription: SCRUBBED_EXPORT_INDEX_OBJECT_DESCRIPTION });
|
|
7298
7297
|
const historyNote = () => {
|
|
@@ -7320,7 +7319,8 @@ async function reportScrubOutcome({ options, logger, stateBackend, totalStacksSc
|
|
|
7320
7319
|
totalIndexEntriesUnexamined += unexamined.length;
|
|
7321
7320
|
logger.info(`Exports index (${displayIdent(indexRegion)}): ${unexamined.length} entr${unexamined.length === 1 ? "y is" : "ies are"} published by a producer this run did not scrub, so nothing here read ${unexamined.length === 1 ? "its" : "their"} value. Coverage composes across the apps sharing this bucket and region — run each app's own cdkd scrub to reach its entries.`);
|
|
7322
7321
|
}
|
|
7323
|
-
|
|
7322
|
+
const failingFindingsAbsent = totalStacksScrubbed === 0 && totalStacksWithUnscrubbableKeys === 0 && totalStacksWithUnverifiableReads === 0 && totalStacksWithUnverifiableLeaves === 0 && totalStacksWithUnrepairedReadNames === 0 && totalStacksWithUnverifiableNoEchoRecords === 0 && totalStacksWithReadOutputKeys === 0 && totalIndexEntriesAbsentWithSecret === 0 && droppedReadersUnverifiedStacks.length === 0 && totalParentAttributesUnmatched === 0 && totalIndexEntriesConverged === 0 && indexUnwritten.length === 0 && indexUnreadable.length === 0 && malformedRecords.length === 0 && malformedOutputRecords.length === 0 && malformedOrphanRecords.length === 0;
|
|
7323
|
+
if (failingFindingsAbsent) {
|
|
7324
7324
|
if (failures.length === 0) {
|
|
7325
7325
|
logger.info(safeMsg`\nNo plaintext secrets found in any target stack state${SCRUB_CLEAN_SCOPE_NOTE}. Nothing to scrub.${historyNote()}`);
|
|
7326
7326
|
return;
|
|
@@ -7334,6 +7334,7 @@ async function reportScrubOutcome({ options, logger, stateBackend, totalStacksSc
|
|
|
7334
7334
|
const unverifiableNote = totalStacksWithUnverifiableReads > 0 ? ` ${totalStacksWithUnverifiableReads} stack(s) carry a cross-stack read that could NOT be verified, so their imported values were not checked — see the warnings above for which read, why, and what to do about it.` : "";
|
|
7335
7335
|
const outputKeyNote = (totalOutputKeysDropped > 0 ? ` ${totalOutputKeysDropped} output key(s) the template no longer declares ${options.dryRun ? "would be" : "were"} dropped: their values could not be identified, and they are not necessarily secrets (see the lines above).` : "") + (totalStacksWithReadOutputKeys > 0 ? ` ${totalStacksWithReadOutputKeys} stack(s) keep an undeclared output key another stack still reads, or one that may be a live export alias — its value can still be printed by cdkd diff; see the warnings above.` : "");
|
|
7336
7336
|
const readNameNote = totalStacksWithUnrepairedReadNames > 0 ? ` ${totalStacksWithUnrepairedReadNames} stack(s) hold a cross-stack read name in plaintext that scrub could NOT repair, most likely a secret's value from before a rotation — see the warnings above.` : "";
|
|
7337
|
+
const storedNoEchoNote = totalStacksWithUnverifiableNoEchoRecords > 0 ? ` ${totalStacksWithUnverifiableNoEchoRecords} stack(s) hold an orphan or superseded record whose NoEcho positions scrub could NOT verify — see the warnings above.` : "";
|
|
7337
7338
|
const parentAttributeNote = totalParentAttributesUnmatched > 0 ? ` ${totalParentAttributesUnmatched} nested-stack output attribute(s) in a parent record hold a plaintext scrub could NOT match to its child's output — see the warnings above.` : "";
|
|
7338
7339
|
const indexNote = (() => {
|
|
7339
7340
|
const parts = [];
|
|
@@ -7344,24 +7345,24 @@ async function reportScrubOutcome({ options, logger, stateBackend, totalStacksSc
|
|
|
7344
7345
|
return parts.join("");
|
|
7345
7346
|
})();
|
|
7346
7347
|
if (options.dryRun) {
|
|
7347
|
-
if (totalStacksScrubbed > 0) logger.info(`\nPlan: ${totalStacksScrubbed} stack(s) hold plaintext secrets and would be scrubbed (--dry-run, no state written).${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret in Secrets Manager.`);
|
|
7348
|
-
else logger.info(`\nPlan: no state record can be rewritten.${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
|
|
7348
|
+
if (totalStacksScrubbed > 0) logger.info(`\nPlan: ${totalStacksScrubbed} stack(s) hold plaintext secrets and would be scrubbed (--dry-run, no state written).${keyNote}${unverifiableNote}${readNameNote}${storedNoEchoNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret in Secrets Manager.`);
|
|
7349
|
+
else logger.info(`\nPlan: no state record can be rewritten.${keyNote}${unverifiableNote}${readNameNote}${storedNoEchoNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
|
|
7349
7350
|
if (failures.length > 0) throw scrubStacksFailedError(failures);
|
|
7350
7351
|
if (indexUnwritten.length > 0 || indexUnreadable.length > 0) throw exportIndexIncompleteError(indexUnwritten, indexUnreadable, true);
|
|
7351
7352
|
if (malformedRecords.length > 0 || malformedOutputRecords.length > 0 || malformedOrphanRecords.length > 0) throw malformedRecordsAuditedError(malformedRecords, malformedOutputRecords, malformedOrphanRecords);
|
|
7352
7353
|
if (damagedProducerStacks.length > 0) throw damagedProducerRecordsError(damagedProducerStacks);
|
|
7353
7354
|
if (droppedReadersUnverifiedStacks.length > 0) throw droppedOutputReadersUnverifiedError(droppedReadersUnverifiedStacks);
|
|
7354
|
-
if (options.fail) throw new ScrubNeededError();
|
|
7355
|
+
if (options.fail && !failingFindingsAbsent) throw new ScrubNeededError();
|
|
7355
7356
|
return;
|
|
7356
7357
|
}
|
|
7357
|
-
if (totalStacksScrubbed > 0) logger.info(`\nDone: scrubbed ${totalStacksScrubbed} stack(s). The rewritten state.json no longer holds the plaintext, and on a VERSIONED state bucket its earlier versions were purged, unless a warning above says otherwise. A value that was ever persisted must still be treated as compromised — ROTATE it in Secrets Manager (scrub matches the current value, so scrub BEFORE rotating); rotation is what makes any copy cdkd cannot reach harmless.${historyNote()}${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote}`);
|
|
7358
|
-
else logger.info(`\nNo state record was rewritten.${historyNote()}${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
|
|
7358
|
+
if (totalStacksScrubbed > 0) logger.info(`\nDone: scrubbed ${totalStacksScrubbed} stack(s). The rewritten state.json no longer holds the plaintext, and on a VERSIONED state bucket its earlier versions were purged, unless a warning above says otherwise. A value that was ever persisted must still be treated as compromised — ROTATE it in Secrets Manager (scrub matches the current value, so scrub BEFORE rotating); rotation is what makes any copy cdkd cannot reach harmless.${historyNote()}${keyNote}${unverifiableNote}${readNameNote}${storedNoEchoNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote}`);
|
|
7359
|
+
else logger.info(`\nNo state record was rewritten.${historyNote()}${keyNote}${unverifiableNote}${readNameNote}${storedNoEchoNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
|
|
7359
7360
|
if (failures.length > 0) throw scrubStacksFailedError(failures);
|
|
7360
7361
|
if (indexUnwritten.length > 0 || indexUnreadable.length > 0) throw exportIndexIncompleteError(indexUnwritten, indexUnreadable, false);
|
|
7361
7362
|
if (malformedRecords.length > 0 || malformedOutputRecords.length > 0 || malformedOrphanRecords.length > 0) throw malformedRecordsAuditedError(malformedRecords, malformedOutputRecords, malformedOrphanRecords);
|
|
7362
7363
|
if (damagedProducerStacks.length > 0) throw damagedProducerRecordsError(damagedProducerStacks);
|
|
7363
7364
|
if (droppedReadersUnverifiedStacks.length > 0) throw droppedOutputReadersUnverifiedError(droppedReadersUnverifiedStacks);
|
|
7364
|
-
if (options.fail && (totalStacksWithUnscrubbableKeys > 0 || totalStacksWithUnverifiableReads > 0 || totalStacksWithUnrepairedReadNames > 0 || totalStacksWithReadOutputKeys > 0 || totalIndexEntriesAbsentWithSecret > 0 || totalParentAttributesUnmatched > 0 || totalStacksWithUnverifiableLeaves > 0)) throw new ScrubNeededError();
|
|
7365
|
+
if (options.fail && (totalStacksWithUnscrubbableKeys > 0 || totalStacksWithUnverifiableReads > 0 || totalStacksWithUnrepairedReadNames > 0 || totalStacksWithReadOutputKeys > 0 || totalIndexEntriesAbsentWithSecret > 0 || totalParentAttributesUnmatched > 0 || totalStacksWithUnverifiableLeaves > 0 || totalStacksWithUnverifiableNoEchoRecords > 0)) throw new ScrubNeededError();
|
|
7365
7366
|
}
|
|
7366
7367
|
|
|
7367
7368
|
// src/cli/commands/scrub/outputs.ts
|
|
@@ -8159,6 +8160,136 @@ function exportNameDisplayOver(outputSecrets, extra, withheld) {
|
|
|
8159
8160
|
};
|
|
8160
8161
|
}
|
|
8161
8162
|
|
|
8163
|
+
// src/cli/commands/scrub/twin-references.ts
|
|
8164
|
+
function recordResolvedUnit(resolvedProps, logicalId, propertyName, value) {
|
|
8165
|
+
if (propertyName === "") {
|
|
8166
|
+
resolvedProps.set(logicalId, value);
|
|
8167
|
+
return;
|
|
8168
|
+
}
|
|
8169
|
+
let bag = resolvedProps.get(logicalId);
|
|
8170
|
+
if (bag === void 0) {
|
|
8171
|
+
bag = nullPrototypeRecord();
|
|
8172
|
+
resolvedProps.set(logicalId, bag);
|
|
8173
|
+
}
|
|
8174
|
+
defineOwnKey(bag, propertyName, value);
|
|
8175
|
+
}
|
|
8176
|
+
function withObservedTwinsPositioned(walked, stored, positionedProperties, secrets) {
|
|
8177
|
+
if (positionedProperties === void 0) return walked;
|
|
8178
|
+
if (stored.observedProperties === void 0 || walked.observedProperties === void 0) return walked;
|
|
8179
|
+
const observed = positionTwinReferences(stored.observedProperties, walked.observedProperties, positionedProperties, secrets);
|
|
8180
|
+
return observed === walked.observedProperties ? walked : {
|
|
8181
|
+
...walked,
|
|
8182
|
+
observedProperties: observed
|
|
8183
|
+
};
|
|
8184
|
+
}
|
|
8185
|
+
function positionTwinReferences(stored, positioned, template, secrets, resolved) {
|
|
8186
|
+
if (secrets.size === 0) return positioned;
|
|
8187
|
+
const plaintexts = [...secrets.keys()].filter((p) => p !== "");
|
|
8188
|
+
const walk = (s, p, t, r) => {
|
|
8189
|
+
if (typeof t === "string") {
|
|
8190
|
+
if (typeof s !== "string" || typeof p !== "string" || p === t) return p;
|
|
8191
|
+
return provenTemplateText(s, t, secrets, plaintexts) ? t : p;
|
|
8192
|
+
}
|
|
8193
|
+
if (Array.isArray(t)) {
|
|
8194
|
+
if (!Array.isArray(s) || !Array.isArray(p) || s.length !== t.length || p.length !== t.length) return p;
|
|
8195
|
+
let changed = false;
|
|
8196
|
+
const out = p.map((item, i) => {
|
|
8197
|
+
const ri = elementOf(r, t, i);
|
|
8198
|
+
if (!corroborates(s[i], t[i], ri, plaintexts)) return item;
|
|
8199
|
+
const next = walk(s[i], item, t[i], ri);
|
|
8200
|
+
if (next !== item) changed = true;
|
|
8201
|
+
return next;
|
|
8202
|
+
});
|
|
8203
|
+
return changed ? out : p;
|
|
8204
|
+
}
|
|
8205
|
+
if (!isPlainRecord$5(t) || !isPlainRecord$5(s) || !isPlainRecord$5(p)) return p;
|
|
8206
|
+
let out;
|
|
8207
|
+
for (const key of Object.keys(t)) {
|
|
8208
|
+
if (!Object.hasOwn(s, key) || !Object.hasOwn(p, key)) continue;
|
|
8209
|
+
const next = walk(s[key], p[key], t[key], memberOf(r, t, key));
|
|
8210
|
+
if (next !== p[key]) {
|
|
8211
|
+
out ??= copyOwnKeys(p);
|
|
8212
|
+
defineOwnKey(out, key, next);
|
|
8213
|
+
}
|
|
8214
|
+
}
|
|
8215
|
+
return out ?? p;
|
|
8216
|
+
};
|
|
8217
|
+
return walk(stored, positioned, template, resolved);
|
|
8218
|
+
}
|
|
8219
|
+
function corroborates(s, t, r, plaintexts) {
|
|
8220
|
+
if (typeof t === "string") return typeof s === "string" && (dynamicReferenceSpans(t).length > 0 || s === t);
|
|
8221
|
+
if (Array.isArray(t)) return Array.isArray(s) && s.length === t.length && t.every((item, i) => corroborates(s[i], item, elementOf(r, t, i), plaintexts));
|
|
8222
|
+
if (isPlainRecord$5(t)) {
|
|
8223
|
+
if (isIntrinsicNode(t) && certainResolution(r, plaintexts) && sameValue(s, r)) return true;
|
|
8224
|
+
if (!isPlainRecord$5(s)) return false;
|
|
8225
|
+
const keys = Object.keys(t);
|
|
8226
|
+
return keys.length === Object.keys(s).length && keys.every((key) => Object.hasOwn(s, key) && corroborates(s[key], t[key], memberOf(r, t, key), plaintexts));
|
|
8227
|
+
}
|
|
8228
|
+
return Object.is(s, t);
|
|
8229
|
+
}
|
|
8230
|
+
function isIntrinsicNode(t) {
|
|
8231
|
+
return effectiveIntrinsicKey(t) !== void 0;
|
|
8232
|
+
}
|
|
8233
|
+
function elementOf(r, t, i) {
|
|
8234
|
+
return Array.isArray(r) && r.length === t.length ? r[i] : void 0;
|
|
8235
|
+
}
|
|
8236
|
+
function memberOf(r, t, key) {
|
|
8237
|
+
if (isIntrinsicNode(t) || !isPlainRecord$5(r) || !Object.hasOwn(r, key)) return void 0;
|
|
8238
|
+
return r[key];
|
|
8239
|
+
}
|
|
8240
|
+
function certainResolution(r, plaintexts) {
|
|
8241
|
+
const leaves = [];
|
|
8242
|
+
if (r === void 0 || !jsonLeaves(r, leaves)) return false;
|
|
8243
|
+
if (mentionsMask(r)) return false;
|
|
8244
|
+
return leaves.every((leaf) => !mentionsDynamicReference(leaf) && !plaintexts.some((p) => leaf.includes(p)));
|
|
8245
|
+
}
|
|
8246
|
+
function jsonLeaves(value, into) {
|
|
8247
|
+
if (typeof value === "string") {
|
|
8248
|
+
into.push(value);
|
|
8249
|
+
return true;
|
|
8250
|
+
}
|
|
8251
|
+
if (value === null || typeof value === "boolean") return true;
|
|
8252
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
8253
|
+
if (Array.isArray(value)) return value.every((item) => jsonLeaves(item, into));
|
|
8254
|
+
if (isPlainRecord$5(value)) return Object.keys(value).every((key) => jsonLeaves(value[key], into));
|
|
8255
|
+
return false;
|
|
8256
|
+
}
|
|
8257
|
+
function sameValue(a, b) {
|
|
8258
|
+
if (Array.isArray(b)) return Array.isArray(a) && a.length === b.length && b.every((item, i) => sameValue(a[i], item));
|
|
8259
|
+
if (isPlainRecord$5(b)) {
|
|
8260
|
+
if (!isPlainRecord$5(a)) return false;
|
|
8261
|
+
const keys = Object.keys(b);
|
|
8262
|
+
return keys.length === Object.keys(a).length && keys.every((key) => Object.hasOwn(a, key) && sameValue(a[key], b[key]));
|
|
8263
|
+
}
|
|
8264
|
+
return Object.is(a, b);
|
|
8265
|
+
}
|
|
8266
|
+
function provenTemplateText(value, text, secrets, plaintexts) {
|
|
8267
|
+
const spans = dynamicReferenceSpans(text);
|
|
8268
|
+
let resolved = "";
|
|
8269
|
+
let cursor = 0;
|
|
8270
|
+
for (const { start, end } of spans) {
|
|
8271
|
+
const literal = text.slice(cursor, start);
|
|
8272
|
+
if (plaintexts.some((p) => literal.includes(p))) return false;
|
|
8273
|
+
const plaintext = resolvedPlaintextOf(secrets, text.slice(start, end));
|
|
8274
|
+
if (plaintext === void 0 || !secrets.has(plaintext)) return false;
|
|
8275
|
+
resolved += literal + plaintext;
|
|
8276
|
+
cursor = end;
|
|
8277
|
+
}
|
|
8278
|
+
const tail = text.slice(cursor);
|
|
8279
|
+
if (plaintexts.some((p) => tail.includes(p))) return false;
|
|
8280
|
+
return resolved + tail === value;
|
|
8281
|
+
}
|
|
8282
|
+
function copyOwnKeys(bag) {
|
|
8283
|
+
const copy = Object.getPrototypeOf(bag) === null ? nullPrototypeRecord() : {};
|
|
8284
|
+
for (const key of Object.keys(bag)) defineOwnKey(copy, key, bag[key]);
|
|
8285
|
+
return copy;
|
|
8286
|
+
}
|
|
8287
|
+
function isPlainRecord$5(value) {
|
|
8288
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
8289
|
+
const proto = Object.getPrototypeOf(value);
|
|
8290
|
+
return proto === Object.prototype || proto === null;
|
|
8291
|
+
}
|
|
8292
|
+
|
|
8162
8293
|
// src/cli/commands/scrub/shared-entries-secrets.ts
|
|
8163
8294
|
var SharedEntriesSecrets = class extends Map {
|
|
8164
8295
|
target;
|
|
@@ -8203,7 +8334,7 @@ var SharedEntriesSecrets = class extends Map {
|
|
|
8203
8334
|
};
|
|
8204
8335
|
|
|
8205
8336
|
// src/cli/commands/scrub/stack-resolve.ts
|
|
8206
|
-
async function scrubStackResolvePass({ stack, region, logger, newBag, perResourceSecrets, outputSecrets, orphanSecrets, state, perResourceTemplateProps, outputsTemplateSource, resolvers, resolver, producerRegions, conditions, resolverContext, resolveCrossStackReads, templateResources, templateOutputs, declaredOutputNames, accountedOutputKeys, ambiguousKeys, collisions, noEchoNameParameters, declaredAliasOf, noEchoNameSeed }) {
|
|
8337
|
+
async function scrubStackResolvePass({ stack, region, logger, newBag, perResourceSecrets, outputSecrets, orphanSecrets, state, perResourceTemplateProps, perResourceResolvedProps, outputsTemplateSource, resolvers, resolver, producerRegions, conditions, resolverContext, resolveCrossStackReads, templateResources, templateOutputs, declaredOutputNames, accountedOutputKeys, ambiguousKeys, collisions, noEchoNameParameters, declaredAliasOf, noEchoNameSeed }) {
|
|
8207
8338
|
let unverifiableLeaves = 0;
|
|
8208
8339
|
let ungateableAbandonedScans = 0;
|
|
8209
8340
|
const reportAbandonedBag = (entries, subject, secrets, debugSubject) => {
|
|
@@ -8258,6 +8389,7 @@ async function scrubStackResolvePass({ stack, region, logger, newBag, perResourc
|
|
|
8258
8389
|
...resourceContext,
|
|
8259
8390
|
abandonedResolutions: abandoned
|
|
8260
8391
|
});
|
|
8392
|
+
recordResolvedUnit(perResourceResolvedProps, logicalId, propertyName, resolvedUnit);
|
|
8261
8393
|
if (isNestedRow && propertyName !== "") resolvedRowProps[propertyName] = resolvedUnit;
|
|
8262
8394
|
if (isNestedRow && propertyName === "Parameters") nestedRowParameters.set(logicalId, {
|
|
8263
8395
|
value: resolvedUnit,
|
|
@@ -8422,86 +8554,6 @@ async function scrubStackResolvePass({ stack, region, logger, newBag, perResourc
|
|
|
8422
8554
|
};
|
|
8423
8555
|
}
|
|
8424
8556
|
|
|
8425
|
-
// src/cli/commands/scrub/twin-references.ts
|
|
8426
|
-
function withObservedTwinsPositioned(walked, stored, positionedProperties, secrets) {
|
|
8427
|
-
if (positionedProperties === void 0) return walked;
|
|
8428
|
-
if (stored.observedProperties === void 0 || walked.observedProperties === void 0) return walked;
|
|
8429
|
-
const observed = positionTwinReferences(stored.observedProperties, walked.observedProperties, positionedProperties, secrets);
|
|
8430
|
-
return observed === walked.observedProperties ? walked : {
|
|
8431
|
-
...walked,
|
|
8432
|
-
observedProperties: observed
|
|
8433
|
-
};
|
|
8434
|
-
}
|
|
8435
|
-
function positionTwinReferences(stored, positioned, template, secrets) {
|
|
8436
|
-
if (secrets.size === 0) return positioned;
|
|
8437
|
-
const plaintexts = [...secrets.keys()].filter((p) => p !== "");
|
|
8438
|
-
const walk = (s, p, t) => {
|
|
8439
|
-
if (typeof t === "string") {
|
|
8440
|
-
if (typeof s !== "string" || typeof p !== "string" || p === t) return p;
|
|
8441
|
-
return provenTemplateText(s, t, secrets, plaintexts) ? t : p;
|
|
8442
|
-
}
|
|
8443
|
-
if (Array.isArray(t)) {
|
|
8444
|
-
if (!Array.isArray(s) || !Array.isArray(p) || s.length !== t.length || p.length !== t.length) return p;
|
|
8445
|
-
let changed = false;
|
|
8446
|
-
const out = p.map((item, i) => {
|
|
8447
|
-
if (!corroborates(s[i], t[i])) return item;
|
|
8448
|
-
const next = walk(s[i], item, t[i]);
|
|
8449
|
-
if (next !== item) changed = true;
|
|
8450
|
-
return next;
|
|
8451
|
-
});
|
|
8452
|
-
return changed ? out : p;
|
|
8453
|
-
}
|
|
8454
|
-
if (!isPlainRecord$4(t) || !isPlainRecord$4(s) || !isPlainRecord$4(p)) return p;
|
|
8455
|
-
let out;
|
|
8456
|
-
for (const key of Object.keys(t)) {
|
|
8457
|
-
if (!Object.hasOwn(s, key) || !Object.hasOwn(p, key)) continue;
|
|
8458
|
-
const next = walk(s[key], p[key], t[key]);
|
|
8459
|
-
if (next !== p[key]) {
|
|
8460
|
-
out ??= copyOwnKeys(p);
|
|
8461
|
-
defineOwnKey(out, key, next);
|
|
8462
|
-
}
|
|
8463
|
-
}
|
|
8464
|
-
return out ?? p;
|
|
8465
|
-
};
|
|
8466
|
-
return walk(stored, positioned, template);
|
|
8467
|
-
}
|
|
8468
|
-
function corroborates(s, t) {
|
|
8469
|
-
if (typeof t === "string") return typeof s === "string" && (dynamicReferenceSpans(t).length > 0 || s === t);
|
|
8470
|
-
if (Array.isArray(t)) return Array.isArray(s) && s.length === t.length && t.every((item, i) => corroborates(s[i], item));
|
|
8471
|
-
if (isPlainRecord$4(t)) {
|
|
8472
|
-
if (!isPlainRecord$4(s)) return false;
|
|
8473
|
-
const keys = Object.keys(t);
|
|
8474
|
-
return keys.length === Object.keys(s).length && keys.every((key) => Object.hasOwn(s, key) && corroborates(s[key], t[key]));
|
|
8475
|
-
}
|
|
8476
|
-
return Object.is(s, t);
|
|
8477
|
-
}
|
|
8478
|
-
function provenTemplateText(value, text, secrets, plaintexts) {
|
|
8479
|
-
const spans = dynamicReferenceSpans(text);
|
|
8480
|
-
let resolved = "";
|
|
8481
|
-
let cursor = 0;
|
|
8482
|
-
for (const { start, end } of spans) {
|
|
8483
|
-
const literal = text.slice(cursor, start);
|
|
8484
|
-
if (plaintexts.some((p) => literal.includes(p))) return false;
|
|
8485
|
-
const plaintext = resolvedPlaintextOf(secrets, text.slice(start, end));
|
|
8486
|
-
if (plaintext === void 0 || !secrets.has(plaintext)) return false;
|
|
8487
|
-
resolved += literal + plaintext;
|
|
8488
|
-
cursor = end;
|
|
8489
|
-
}
|
|
8490
|
-
const tail = text.slice(cursor);
|
|
8491
|
-
if (plaintexts.some((p) => tail.includes(p))) return false;
|
|
8492
|
-
return resolved + tail === value;
|
|
8493
|
-
}
|
|
8494
|
-
function copyOwnKeys(bag) {
|
|
8495
|
-
const copy = Object.getPrototypeOf(bag) === null ? nullPrototypeRecord() : {};
|
|
8496
|
-
for (const key of Object.keys(bag)) defineOwnKey(copy, key, bag[key]);
|
|
8497
|
-
return copy;
|
|
8498
|
-
}
|
|
8499
|
-
function isPlainRecord$4(value) {
|
|
8500
|
-
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
8501
|
-
const proto = Object.getPrototypeOf(value);
|
|
8502
|
-
return proto === Object.prototype || proto === null;
|
|
8503
|
-
}
|
|
8504
|
-
|
|
8505
8557
|
// src/cli/commands/scrub/cross-stack-findings.ts
|
|
8506
8558
|
function literalParts(value, tokens) {
|
|
8507
8559
|
const parts = [];
|
|
@@ -8631,8 +8683,95 @@ function repairCrossStackReadNames({ state, outputSecrets, perResourceSecrets, o
|
|
|
8631
8683
|
};
|
|
8632
8684
|
}
|
|
8633
8685
|
|
|
8686
|
+
// src/cli/commands/scrub/noecho-output-exact.ts
|
|
8687
|
+
const MAX_HOLES = 4;
|
|
8688
|
+
const MAX_STORED_LENGTH = 4096;
|
|
8689
|
+
function segmentsOf$1(value, sources, pseudo) {
|
|
8690
|
+
if (!isPlainObject$1(value) || Object.keys(value).length !== 1) return void 0;
|
|
8691
|
+
const hole = (node) => {
|
|
8692
|
+
if (!readsNoEchoSource(node, sources) && isPlainObject$1(node) && Object.keys(node).length === 1 && typeof node["Ref"] === "string" && pseudo.has(node["Ref"])) return { literal: pseudo.get(node["Ref"]) };
|
|
8693
|
+
return { hole: "secret" };
|
|
8694
|
+
};
|
|
8695
|
+
if (Object.hasOwn(value, "Fn::Join")) {
|
|
8696
|
+
const args = value["Fn::Join"];
|
|
8697
|
+
if (!Array.isArray(args) || typeof args[0] !== "string" || !Array.isArray(args[1])) return;
|
|
8698
|
+
const segments = [];
|
|
8699
|
+
args[1].forEach((part, i) => {
|
|
8700
|
+
if (i > 0 && args[0] !== "") segments.push({ literal: args[0] });
|
|
8701
|
+
segments.push(typeof part === "string" ? { literal: part } : hole(part));
|
|
8702
|
+
});
|
|
8703
|
+
return segments;
|
|
8704
|
+
}
|
|
8705
|
+
if (Object.hasOwn(value, "Fn::Sub")) {
|
|
8706
|
+
const args = value["Fn::Sub"];
|
|
8707
|
+
const text = Array.isArray(args) ? args[0] : args;
|
|
8708
|
+
const variables = Array.isArray(args) && isPlainObject$1(args[1]) ? args[1] : {};
|
|
8709
|
+
if (typeof text !== "string") return void 0;
|
|
8710
|
+
const segments = [];
|
|
8711
|
+
let last = 0;
|
|
8712
|
+
for (const match of text.matchAll(/\$\{([^}]*)\}/g)) {
|
|
8713
|
+
segments.push({ literal: text.slice(last, match.index) });
|
|
8714
|
+
const name = match[1] ?? "";
|
|
8715
|
+
if (name.startsWith("!")) segments.push({ literal: `\${${name.slice(1)}}` });
|
|
8716
|
+
else if (Object.hasOwn(variables, name)) segments.push(hole(variables[name]));
|
|
8717
|
+
else if (name.includes(".")) {
|
|
8718
|
+
const dot = name.indexOf(".");
|
|
8719
|
+
segments.push(hole({ "Fn::GetAtt": [name.slice(0, dot), name.slice(dot + 1)] }));
|
|
8720
|
+
} else segments.push(hole({ Ref: name }));
|
|
8721
|
+
last = match.index + match[0].length;
|
|
8722
|
+
}
|
|
8723
|
+
segments.push({ literal: text.slice(last) });
|
|
8724
|
+
return segments;
|
|
8725
|
+
}
|
|
8726
|
+
}
|
|
8727
|
+
function matchesLiterals(stored, segments) {
|
|
8728
|
+
const parts = [];
|
|
8729
|
+
for (const segment of segments) {
|
|
8730
|
+
const last = parts.length - 1;
|
|
8731
|
+
if ("literal" in segment) {
|
|
8732
|
+
if (last >= 0 && parts[last] !== void 0) parts[last] += segment.literal;
|
|
8733
|
+
else parts.push(segment.literal);
|
|
8734
|
+
} else if (last < 0 || parts[last] !== void 0) parts.push(void 0);
|
|
8735
|
+
}
|
|
8736
|
+
let start = 0;
|
|
8737
|
+
let end = stored.length;
|
|
8738
|
+
let first = 0;
|
|
8739
|
+
let lastIndex = parts.length - 1;
|
|
8740
|
+
const head = parts[0];
|
|
8741
|
+
if (head !== void 0) {
|
|
8742
|
+
if (!stored.startsWith(head)) return false;
|
|
8743
|
+
start = head.length;
|
|
8744
|
+
first = 1;
|
|
8745
|
+
}
|
|
8746
|
+
const tail = parts[lastIndex];
|
|
8747
|
+
if (tail !== void 0 && lastIndex >= first) {
|
|
8748
|
+
if (end - start < tail.length || !stored.endsWith(tail)) return false;
|
|
8749
|
+
end -= tail.length;
|
|
8750
|
+
lastIndex -= 1;
|
|
8751
|
+
}
|
|
8752
|
+
for (let i = first; i <= lastIndex; i++) {
|
|
8753
|
+
const literal = parts[i];
|
|
8754
|
+
if (literal === void 0) continue;
|
|
8755
|
+
const at = stored.indexOf(literal, start);
|
|
8756
|
+
if (at < 0 || at + literal.length > end) return false;
|
|
8757
|
+
start = at + literal.length;
|
|
8758
|
+
}
|
|
8759
|
+
return true;
|
|
8760
|
+
}
|
|
8761
|
+
function exactNoEchoOutputMask(stored, templateValue, sources, pseudo) {
|
|
8762
|
+
const whole = maskWholeValue(stored);
|
|
8763
|
+
if (typeof stored !== "string" || stored.length > MAX_STORED_LENGTH) return whole;
|
|
8764
|
+
const segments = segmentsOf$1(templateValue, sources, pseudo)?.filter((segment) => !("literal" in segment) || segment.literal !== "");
|
|
8765
|
+
if (segments === void 0) return whole;
|
|
8766
|
+
const holes = segments.filter((segment) => "hole" in segment);
|
|
8767
|
+
if (holes.length === 0 || holes.length > MAX_HOLES) return whole;
|
|
8768
|
+
for (let i = 1; i < segments.length; i++) if ("hole" in segments[i] && "hole" in segments[i - 1]) return whole;
|
|
8769
|
+
if (!matchesLiterals(stored, segments)) return whole;
|
|
8770
|
+
return segments.map((segment) => "literal" in segment ? segment.literal : "***").join("");
|
|
8771
|
+
}
|
|
8772
|
+
|
|
8634
8773
|
// src/cli/commands/scrub/noecho.ts
|
|
8635
|
-
function planScrubNoEcho(state, template, templateProps, conditions, passedParameters = [], conditionalParameters = []) {
|
|
8774
|
+
function planScrubNoEcho(state, template, templateProps, conditions, passedParameters = [], conditionalParameters = [], pseudo = /* @__PURE__ */ new Map()) {
|
|
8636
8775
|
const byLogicalId = /* @__PURE__ */ new Map();
|
|
8637
8776
|
const parameters = /* @__PURE__ */ new Set([...noEchoParameterNamesOf(template), ...passedParameters]);
|
|
8638
8777
|
const resources = state.resources ?? {};
|
|
@@ -8657,7 +8796,7 @@ function planScrubNoEcho(state, template, templateProps, conditions, passedParam
|
|
|
8657
8796
|
let grew = false;
|
|
8658
8797
|
for (const [logicalId, record] of eligible) {
|
|
8659
8798
|
const own = noEchoLeavesOf(record);
|
|
8660
|
-
const leaves = canonicalCoordinates(own ?? noEchoCoordinatesOf(templateProps.get(logicalId), record.properties, from));
|
|
8799
|
+
const leaves = canonicalCoordinates((own !== void 0 && own.length > 0 ? own : void 0) ?? noEchoCoordinatesOf(templateProps.get(logicalId), record.properties, from, void 0, { maskedAt: record.properties }));
|
|
8661
8800
|
leavesOf.set(logicalId, leaves);
|
|
8662
8801
|
for (const [name, attribute] of Object.entries(record.attributes ?? {})) {
|
|
8663
8802
|
if (attribute === record.physicalId || persisted(attribute)) continue;
|
|
@@ -8712,7 +8851,10 @@ function planScrubNoEcho(state, template, templateProps, conditions, passedParam
|
|
|
8712
8851
|
if (!Object.hasOwn(stored, key)) continue;
|
|
8713
8852
|
const value = stored[key];
|
|
8714
8853
|
if (value === void 0 || value === null || persisted(value)) continue;
|
|
8715
|
-
|
|
8854
|
+
const outputValue = output?.Value;
|
|
8855
|
+
if (!readsNoEchoSource(outputValue, outputSources)) continue;
|
|
8856
|
+
const exact = exactNoEchoOutputMask(value, outputValue, outputSources, pseudo);
|
|
8857
|
+
if (JSON.stringify(exact) === JSON.stringify(value)) continue;
|
|
8716
8858
|
outputKeys.push(key);
|
|
8717
8859
|
}
|
|
8718
8860
|
if (outputKeys.length > 0) changesAny = true;
|
|
@@ -8734,15 +8876,30 @@ function scrubMigrationNeedles(plan, publicTokens) {
|
|
|
8734
8876
|
for (const { value, needle } of plan.stored) if (needle) recordNoEchoParameterFreshValue(value, needles, publicTokens);
|
|
8735
8877
|
return needles.size > 0 ? needles : void 0;
|
|
8736
8878
|
}
|
|
8737
|
-
function maskScrubNoEchoOutputs(outputs, keys, declared, aliasOf) {
|
|
8879
|
+
function maskScrubNoEchoOutputs(outputs, keys, declared, aliasOf, exact) {
|
|
8738
8880
|
if (outputs === void 0 || keys.length === 0) return outputs;
|
|
8739
8881
|
const ownAliases = new Set(keys.flatMap((key) => aliasOf.has(key) ? [aliasOf.get(key)] : []));
|
|
8740
8882
|
const otherAliases = new Set([...aliasOf].filter(([key]) => !keys.includes(key)).map(([, alias]) => alias));
|
|
8741
|
-
const
|
|
8883
|
+
const formOfKey = /* @__PURE__ */ new Map();
|
|
8884
|
+
const formOfSpelling = /* @__PURE__ */ new Map();
|
|
8885
|
+
for (const key of keys) {
|
|
8886
|
+
if (!Object.hasOwn(outputs, key)) continue;
|
|
8887
|
+
const templateValue = (exact?.templateOutputs[key])?.Value;
|
|
8888
|
+
const form = exact === void 0 ? maskWholeValue(outputs[key]) : exactNoEchoOutputMask(outputs[key], templateValue, exact.sources, exact.pseudo);
|
|
8889
|
+
formOfKey.set(key, form);
|
|
8890
|
+
const spelling = JSON.stringify(outputs[key]);
|
|
8891
|
+
const seen = formOfSpelling.get(spelling);
|
|
8892
|
+
formOfSpelling.set(spelling, formOfSpelling.has(spelling) && JSON.stringify(seen) !== JSON.stringify(form) ? maskWholeValue(outputs[key]) : form);
|
|
8893
|
+
}
|
|
8742
8894
|
const masked = nullPrototypeRecord();
|
|
8743
8895
|
for (const [key, value] of Object.entries(outputs)) {
|
|
8744
|
-
const
|
|
8745
|
-
|
|
8896
|
+
const spelling = JSON.stringify(value);
|
|
8897
|
+
const byValue = !declared.has(key) && !otherAliases.has(key) && formOfSpelling.has(spelling);
|
|
8898
|
+
if (formOfKey.has(key)) masked[key] = formOfKey.get(key);
|
|
8899
|
+
else if (keys.includes(key)) masked[key] = maskWholeValue(value);
|
|
8900
|
+
else if (ownAliases.has(key)) masked[key] = maskWholeValue(value);
|
|
8901
|
+
else if (byValue) masked[key] = formOfSpelling.get(spelling);
|
|
8902
|
+
else masked[key] = value;
|
|
8746
8903
|
}
|
|
8747
8904
|
return masked;
|
|
8748
8905
|
}
|
|
@@ -8814,8 +8971,248 @@ function copiesOfParentRow(bag) {
|
|
|
8814
8971
|
return copies === void 0 || copies.size === 0 ? {} : { inheritedPhysicalNameCopies: copies };
|
|
8815
8972
|
}
|
|
8816
8973
|
|
|
8974
|
+
// src/cli/commands/scrub/noecho-stored.ts
|
|
8975
|
+
function storedNoEchoRows(orphans, supersededResources) {
|
|
8976
|
+
const rows = [];
|
|
8977
|
+
const readable = (record) => record !== null && typeof record === "object" && typeof record.resourceType === "string";
|
|
8978
|
+
for (const [index, row] of (Array.isArray(orphans) ? orphans : []).entries()) if (readable(row?.state) && typeof row.logicalId === "string") rows.push({
|
|
8979
|
+
key: String(index),
|
|
8980
|
+
kind: "orphan record",
|
|
8981
|
+
logicalId: row.logicalId,
|
|
8982
|
+
state: row.state
|
|
8983
|
+
});
|
|
8984
|
+
const superseded = Array.isArray(supersededResources) ? supersededResources : [];
|
|
8985
|
+
for (const [index, row] of superseded.entries()) if (isSupersededResourceRecord(row) && readable(row.state)) rows.push({
|
|
8986
|
+
key: `superseded:${index}`,
|
|
8987
|
+
kind: "superseded record",
|
|
8988
|
+
logicalId: row.logicalId,
|
|
8989
|
+
state: row.state
|
|
8990
|
+
});
|
|
8991
|
+
return rows;
|
|
8992
|
+
}
|
|
8993
|
+
const persisted = (value) => holdsMaskLeaf(value) || typeof value === "string" && isSingleDynamicReferenceToken(value);
|
|
8994
|
+
function holdsUnmaskedLeaf(value) {
|
|
8995
|
+
if (Array.isArray(value)) return value.some(holdsUnmaskedLeaf);
|
|
8996
|
+
if (value !== null && typeof value === "object") return Object.values(value).some(holdsUnmaskedLeaf);
|
|
8997
|
+
return typeof value === "string" && value !== "" && !persisted(value);
|
|
8998
|
+
}
|
|
8999
|
+
function planScrubStoredNoEcho(state, rows, template, sources, needleSources) {
|
|
9000
|
+
const byKey = /* @__PURE__ */ new Map();
|
|
9001
|
+
const unverifiable = [];
|
|
9002
|
+
let changesAny = false;
|
|
9003
|
+
if (rows.length === 0) return {
|
|
9004
|
+
byKey,
|
|
9005
|
+
changesAny,
|
|
9006
|
+
unverifiable
|
|
9007
|
+
};
|
|
9008
|
+
const resources = state.resources ?? {};
|
|
9009
|
+
const templateResources = template.Resources ?? {};
|
|
9010
|
+
const recordsHoldEvidence = [...Object.values(resources), ...rows.map((row) => row.state)].some((record) => (noEchoLeavesOf(record ?? {})?.length ?? 0) > 0 || (noEchoAttributeNamesOf(record)?.length ?? 0) > 0);
|
|
9011
|
+
const stackHoldsEvidence = sources.parameters.size > 0 || recordsHoldEvidence;
|
|
9012
|
+
for (const row of rows) {
|
|
9013
|
+
const record = row.state;
|
|
9014
|
+
const own = noEchoLeavesOf(record);
|
|
9015
|
+
const definition = Object.hasOwn(templateResources, row.logicalId) ? templateResources[row.logicalId] : void 0;
|
|
9016
|
+
const live = Object.hasOwn(resources, row.logicalId) ? resources[row.logicalId] : void 0;
|
|
9017
|
+
const liveLeaves = live?.resourceType === record.resourceType ? noEchoLeavesOf(live) : void 0;
|
|
9018
|
+
let leaves;
|
|
9019
|
+
let needleAt;
|
|
9020
|
+
if (own !== void 0 && own.length > 0) leaves = canonicalCoordinates(own);
|
|
9021
|
+
else if (definition?.Type === record.resourceType) {
|
|
9022
|
+
leaves = canonicalCoordinates(noEchoCoordinatesOf(definition.Properties, record.properties, sources, void 0, { maskedAt: record.properties }));
|
|
9023
|
+
const needles = needleCoordinatesOf(definition.Properties, record.properties, needleSources);
|
|
9024
|
+
needleAt = (coordinate) => needles.has(JSON.stringify(coordinate));
|
|
9025
|
+
} else if (liveLeaves !== void 0 && liveLeaves.length > 0) leaves = canonicalCoordinates(liveLeaves);
|
|
9026
|
+
else if (own !== void 0) leaves = [];
|
|
9027
|
+
if (leaves === void 0) {
|
|
9028
|
+
if (stackHoldsEvidence && holdsUnmaskedLeaf(record.properties)) unverifiable.push({
|
|
9029
|
+
key: row.key,
|
|
9030
|
+
kind: row.kind,
|
|
9031
|
+
logicalId: row.logicalId,
|
|
9032
|
+
resourceType: record.resourceType
|
|
9033
|
+
});
|
|
9034
|
+
continue;
|
|
9035
|
+
}
|
|
9036
|
+
const names = new Set(noEchoAttributeNamesOf(record) ?? []);
|
|
9037
|
+
for (const [name, attribute] of Object.entries(record.attributes ?? {})) {
|
|
9038
|
+
if (attribute === record.physicalId || persisted(attribute)) continue;
|
|
9039
|
+
if (leaves.some((coordinate) => coordinate[0] === name && JSON.stringify(valueAtCoordinate(record.properties, coordinate)) === JSON.stringify(attribute))) names.add(name);
|
|
9040
|
+
}
|
|
9041
|
+
const attributeNames = [...names].sort();
|
|
9042
|
+
if (leaves.length === 0 && attributeNames.length === 0) continue;
|
|
9043
|
+
const stored = [];
|
|
9044
|
+
for (const coordinate of leaves) {
|
|
9045
|
+
const value = valueAtCoordinate(record.properties, coordinate);
|
|
9046
|
+
if (value === void 0 || value === null || persisted(value)) continue;
|
|
9047
|
+
stored.push({
|
|
9048
|
+
coordinate,
|
|
9049
|
+
value,
|
|
9050
|
+
needle: needleAt === void 0 || needleAt(coordinate)
|
|
9051
|
+
});
|
|
9052
|
+
}
|
|
9053
|
+
byKey.set(row.key, {
|
|
9054
|
+
leaves,
|
|
9055
|
+
stored,
|
|
9056
|
+
attributeNames
|
|
9057
|
+
});
|
|
9058
|
+
const unmaskedAttribute = attributeNames.some((name) => Object.hasOwn(record.attributes ?? {}, name) && !persisted(record.attributes[name]));
|
|
9059
|
+
if (stored.length > 0 || unmaskedAttribute || leaves.length > 0 && JSON.stringify(record.noEchoLeaves) !== JSON.stringify(leaves)) changesAny = true;
|
|
9060
|
+
}
|
|
9061
|
+
return {
|
|
9062
|
+
byKey,
|
|
9063
|
+
changesAny,
|
|
9064
|
+
unverifiable
|
|
9065
|
+
};
|
|
9066
|
+
}
|
|
9067
|
+
const MAX_NEEDLE_CONDITIONS = 6;
|
|
9068
|
+
function needleCoordinatesOf(properties, stored, sources) {
|
|
9069
|
+
const names = /* @__PURE__ */ new Set();
|
|
9070
|
+
const collapsed = collapseNoValueBranches(properties, names);
|
|
9071
|
+
const keysUnder = (template, conditions) => new Set(canonicalCoordinates(noEchoCoordinatesOf(template, stored, conditions === void 0 ? sources : {
|
|
9072
|
+
...sources,
|
|
9073
|
+
conditions
|
|
9074
|
+
}, void 0, { maskedAt: stored })).map((coordinate) => JSON.stringify(coordinate)));
|
|
9075
|
+
if (names.size > MAX_NEEDLE_CONDITIONS) return keysUnder(withoutFnIf(collapsed));
|
|
9076
|
+
const list = [...names];
|
|
9077
|
+
let needles;
|
|
9078
|
+
for (let verdicts = 0; verdicts < 2 ** list.length; verdicts++) {
|
|
9079
|
+
const keys = keysUnder(collapsed, Object.fromEntries(list.map((name, i) => [name, (verdicts & 1 << i) !== 0])));
|
|
9080
|
+
needles = needles === void 0 ? keys : new Set([...needles].filter((key) => keys.has(key)));
|
|
9081
|
+
}
|
|
9082
|
+
return needles;
|
|
9083
|
+
}
|
|
9084
|
+
function collapseNoValueBranches(node, names, asValue = true) {
|
|
9085
|
+
if (Array.isArray(node)) return node.map((item) => collapseNoValueBranches(item, names, false));
|
|
9086
|
+
if (node === null || typeof node !== "object") return node;
|
|
9087
|
+
const record = node;
|
|
9088
|
+
const branches = record["Fn::If"];
|
|
9089
|
+
if (Object.keys(record).length === 1 && Array.isArray(branches)) {
|
|
9090
|
+
const [condition, whenTrue, whenFalse] = branches;
|
|
9091
|
+
if (typeof condition !== "string" || branches.length !== 3) return null;
|
|
9092
|
+
const noValue = (branch) => branch !== null && typeof branch === "object" && branch["Ref"] === "AWS::NoValue";
|
|
9093
|
+
if (asValue && noValue(whenFalse)) return collapseNoValueBranches(whenTrue, names);
|
|
9094
|
+
if (asValue && noValue(whenTrue)) return collapseNoValueBranches(whenFalse, names);
|
|
9095
|
+
names.add(condition);
|
|
9096
|
+
return { "Fn::If": [
|
|
9097
|
+
condition,
|
|
9098
|
+
collapseNoValueBranches(whenTrue, names, asValue),
|
|
9099
|
+
collapseNoValueBranches(whenFalse, names, asValue)
|
|
9100
|
+
] };
|
|
9101
|
+
}
|
|
9102
|
+
const out = nullPrototypeRecord();
|
|
9103
|
+
for (const [key, inner] of Object.entries(record)) out[key] = collapseNoValueBranches(inner, names);
|
|
9104
|
+
return out;
|
|
9105
|
+
}
|
|
9106
|
+
function unverifiableNoEchoRecordWarning(shownStack, record) {
|
|
9107
|
+
return safeMsg`The ${record.kind} ${record.logicalId} (${record.resourceType}) in ${shownStack} names no NoEcho positions, and today's template no longer declares its logical id as that type: if a cdkd older than state schema v11 wrote it, a NoEcho value may sit in its properties in plaintext, and scrub cannot tell which leaf, so this stack is not reported clean and --fail exits non-zero. ${UNPOSITIONED_REMEDY}`;
|
|
9108
|
+
}
|
|
9109
|
+
const UNPOSITIONED_REMEDY = "Re-run scrub with --mask-unpositioned to mask every string value in that record (its properties, observed properties and attributes) and record those positions as NoEcho, which clears this finding. The cost: those values are lost from state, so a later adoption of the record compares and re-sends without them, and a delete that reads its address or payload from the record's properties (a custom resource, a Route 53 record set, a Lambda permission, and others) is skipped, keeping the record while the resource stays in AWS.";
|
|
9110
|
+
function unpositionedMaskPlanNote(shownStack, record, counts) {
|
|
9111
|
+
return safeMsg`--mask-unpositioned would mask, in the ${record.kind} ${record.logicalId} (${record.resourceType}) in ${shownStack}, ${String(counts.properties)} string value(s) in properties, ${String(counts.observed)} in the readback (observed properties) and ${String(counts.attributes)} in attributes (--dry-run, nothing written).`;
|
|
9112
|
+
}
|
|
9113
|
+
function unpositionedMaskDoneNote(shownStack, record, counts) {
|
|
9114
|
+
return safeMsg`--mask-unpositioned: masked, in the ${record.kind} ${record.logicalId} (${record.resourceType}) in ${shownStack}, ${String(counts.properties)} string value(s) in properties, ${String(counts.observed)} in the readback (observed properties) and ${String(counts.attributes)} in attributes, and recorded those positions as NoEcho.`;
|
|
9115
|
+
}
|
|
9116
|
+
function scrubStoredRecord(state, needles, plan, publicTokens, finish) {
|
|
9117
|
+
const migrationNeedles = scrubMigrationNeedles(plan, publicTokens);
|
|
9118
|
+
const walk = (bag, from) => scrubResourceRecord(from, bag, void 0, "state-cross-generation", {
|
|
9119
|
+
properties: "unproven",
|
|
9120
|
+
observed: "unproven"
|
|
9121
|
+
});
|
|
9122
|
+
let next = needles.size === 0 ? state : walk(needles, state);
|
|
9123
|
+
if (migrationNeedles !== void 0) next = walk(migrationNeedles, next);
|
|
9124
|
+
if (plan === void 0) return finish(needles.size > 0 ? keepHeldTokenProvenance(next) : next, needles);
|
|
9125
|
+
const finished = finish(plan.leaves.length > 0 ? {
|
|
9126
|
+
...next,
|
|
9127
|
+
noEchoLeaves: plan.leaves.map((coordinate) => [...coordinate])
|
|
9128
|
+
} : next, new Map([...needles, ...migrationNeedles ?? []]));
|
|
9129
|
+
const attributeNames = [.../* @__PURE__ */ new Set([...plan.attributeNames, ...noEchoAttributeNamesOf(finished) ?? []])].sort();
|
|
9130
|
+
return keepHeldTokenProvenance(applyScrubNoEcho(finished, state, {
|
|
9131
|
+
...plan,
|
|
9132
|
+
attributeNames
|
|
9133
|
+
}));
|
|
9134
|
+
}
|
|
9135
|
+
|
|
9136
|
+
// src/cli/commands/scrub/unpositioned.ts
|
|
9137
|
+
function isUnpositionedStringLeaf(value) {
|
|
9138
|
+
return typeof value === "string" && value !== "" && !holdsMaskLeaf(value) && !isSingleDynamicReferenceToken(value);
|
|
9139
|
+
}
|
|
9140
|
+
function maskStringLeaves(value, at, out, values) {
|
|
9141
|
+
if (isUnpositionedStringLeaf(value)) {
|
|
9142
|
+
out.push([...at]);
|
|
9143
|
+
values?.push(value);
|
|
9144
|
+
return "***";
|
|
9145
|
+
}
|
|
9146
|
+
if (Array.isArray(value)) return value.map((item, index) => maskStringLeaves(item, [...at, index], out, values));
|
|
9147
|
+
if (value !== null && typeof value === "object") {
|
|
9148
|
+
const next = {};
|
|
9149
|
+
for (const [key, item] of Object.entries(value)) next[key] = maskStringLeaves(item, [...at, key], out, values);
|
|
9150
|
+
return next;
|
|
9151
|
+
}
|
|
9152
|
+
return value;
|
|
9153
|
+
}
|
|
9154
|
+
function maskUnpositionedRecord(record) {
|
|
9155
|
+
const propertyLeaves = [];
|
|
9156
|
+
const observedLeaves = [];
|
|
9157
|
+
const attributeLeaves = [];
|
|
9158
|
+
const readback = record.observedProperties;
|
|
9159
|
+
const next = {
|
|
9160
|
+
...record,
|
|
9161
|
+
...readback !== void 0 && { observedProperties: maskStringLeaves(readback, [], observedLeaves) }
|
|
9162
|
+
};
|
|
9163
|
+
const maskedValues = [];
|
|
9164
|
+
if (record.properties !== void 0) next.properties = maskStringLeaves(record.properties, [], propertyLeaves, maskedValues);
|
|
9165
|
+
if (record.attributes !== void 0) {
|
|
9166
|
+
const identity = SURVIVOR_IDENTITY_ATTRIBUTES[record.resourceType];
|
|
9167
|
+
const kept = identity !== void 0 && Object.hasOwn(record.attributes, identity) ? record.attributes[identity] : void 0;
|
|
9168
|
+
next.attributes = maskStringLeaves(record.attributes, [], attributeLeaves);
|
|
9169
|
+
if (identity !== void 0 && kept !== void 0 && next.attributes !== void 0) {
|
|
9170
|
+
next.attributes[identity] = kept;
|
|
9171
|
+
for (let i = attributeLeaves.length - 1; i >= 0; i--) if (attributeLeaves[i][0] === identity) attributeLeaves.splice(i, 1);
|
|
9172
|
+
}
|
|
9173
|
+
}
|
|
9174
|
+
next.noEchoLeaves = canonicalCoordinates(propertyLeaves).map((coordinate) => [...coordinate]);
|
|
9175
|
+
const marked = new Set(next.noEchoLeaves.map((coordinate) => JSON.stringify(coordinate)));
|
|
9176
|
+
const observedOnly = [...observedMaskedLeavesOf(record) ?? [], ...observedLeaves.filter((coordinate) => !marked.has(JSON.stringify(coordinate)))];
|
|
9177
|
+
if (observedOnly.length > 0) next.observedMaskedLeaves = canonicalCoordinates(observedOnly).map((coordinate) => [...coordinate]);
|
|
9178
|
+
const names = new Set(noEchoAttributeNamesOf(record) ?? []);
|
|
9179
|
+
for (const coordinate of attributeLeaves) if (coordinate.length === 1 && typeof coordinate[0] === "string") names.add(coordinate[0]);
|
|
9180
|
+
if (names.size > 0) next.noEchoAttributeNames = [...names].sort();
|
|
9181
|
+
return {
|
|
9182
|
+
record: withAttemptedItemsMasked(next, maskedValues),
|
|
9183
|
+
counts: {
|
|
9184
|
+
properties: propertyLeaves.length,
|
|
9185
|
+
observed: observedLeaves.length,
|
|
9186
|
+
attributes: attributeLeaves.length
|
|
9187
|
+
}
|
|
9188
|
+
};
|
|
9189
|
+
}
|
|
9190
|
+
function planUnpositionedMasks(rows, unverifiable, opts, logger, shownStack) {
|
|
9191
|
+
const masked = /* @__PURE__ */ new Set();
|
|
9192
|
+
if (opts.maskUnpositioned !== true) {
|
|
9193
|
+
for (const record of unverifiable) logger.warn(unverifiableNoEchoRecordWarning(shownStack, record));
|
|
9194
|
+
return {
|
|
9195
|
+
masked,
|
|
9196
|
+
unverifiable: unverifiable.length
|
|
9197
|
+
};
|
|
9198
|
+
}
|
|
9199
|
+
const byKey = new Map(rows.map((row) => [row.key, row]));
|
|
9200
|
+
for (const record of unverifiable) {
|
|
9201
|
+
const row = byKey.get(record.key);
|
|
9202
|
+
if (row === void 0) continue;
|
|
9203
|
+
const plan = maskUnpositionedRecord(row.state);
|
|
9204
|
+
masked.add(record.key);
|
|
9205
|
+
if (opts.dryRun) logger.info(unpositionedMaskPlanNote(shownStack, record, plan.counts));
|
|
9206
|
+
else logger.info(unpositionedMaskDoneNote(shownStack, record, plan.counts));
|
|
9207
|
+
}
|
|
9208
|
+
return {
|
|
9209
|
+
masked,
|
|
9210
|
+
unverifiable: opts.dryRun ? unverifiable.length : unverifiable.length - masked.size
|
|
9211
|
+
};
|
|
9212
|
+
}
|
|
9213
|
+
|
|
8817
9214
|
// src/cli/commands/scrub/stack-rewrite.ts
|
|
8818
|
-
async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger, shownStack, nestedInput, perResourceSecrets, outputSecrets, orphanSecrets, prePassFindings, unverifiableLeaves, emitAbandonedScanNotes, purgeExaminedHistory, loaded, state, malformedResources, malformedResourceRows, malformedOutputs, malformedOrphans, malformedOrphanRows, perResourceTemplateProps, outputsTemplateSource, conditions, templateResources, accountedOutputKeys, collisions, outputsSourceUntrusted, everyExportAliasReproduced, declaredAliasOf, nestedRowParameters }) {
|
|
9215
|
+
async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger, shownStack, nestedInput, perResourceSecrets, outputSecrets, orphanSecrets, prePassFindings, unverifiableLeaves, emitAbandonedScanNotes, purgeExaminedHistory, loaded, state, malformedResources, malformedResourceRows, malformedOutputs, malformedOrphans, malformedOrphanRows, perResourceTemplateProps, perResourceResolvedProps, outputsTemplateSource, conditions, templateResources, accountedOutputKeys, collisions, outputsSourceUntrusted, everyExportAliasReproduced, declaredAliasOf, nestedRowParameters }) {
|
|
8819
9216
|
for (const [name, exportName] of collisions) logger.warn(exportAliasCollisionScrubWarning(name, exportName, outputSecrets));
|
|
8820
9217
|
const secretBearingKeys = [];
|
|
8821
9218
|
for (const key of Object.keys(state.outputs ?? {})) {
|
|
@@ -8824,7 +9221,11 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
8824
9221
|
secretBearingKeys.push(key);
|
|
8825
9222
|
logger.warn(secretBearingStateKeyWarning(stack.stackName, display));
|
|
8826
9223
|
}
|
|
8827
|
-
const
|
|
9224
|
+
const pseudoValues = /* @__PURE__ */ new Map([["AWS::Region", region], ["AWS::StackName", stack.stackName]]);
|
|
9225
|
+
const noEchoPlans = planScrubNoEcho(state, stack.template, perResourceTemplateProps, conditions, nestedInput?.noEchoParameters ?? [], nestedInput?.noEchoConditionalParameters ?? [], pseudoValues);
|
|
9226
|
+
const storedRows = storedNoEchoRows(state.orphans, state.supersededResources);
|
|
9227
|
+
const storedNoEcho = planScrubStoredNoEcho(state, storedRows, stack.template, noEchoPlans.sources, noEchoPlans.needleSources);
|
|
9228
|
+
const unpositioned = planUnpositionedMasks(storedRows, storedNoEcho.unverifiable, opts, logger, shownStack);
|
|
8828
9229
|
const nestedChildren = [];
|
|
8829
9230
|
const nestedRowIds = /* @__PURE__ */ new Set();
|
|
8830
9231
|
for (const [logicalId, resource] of Object.entries(templateResources)) if (resource?.Type === "AWS::CloudFormation::Stack") nestedRowIds.add(logicalId);
|
|
@@ -8901,9 +9302,26 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
8901
9302
|
})) !== JSON.stringify(value);
|
|
8902
9303
|
};
|
|
8903
9304
|
const noEchoPublicTokens = /* @__PURE__ */ new Set([region, stack.stackName]);
|
|
8904
|
-
const finishStored = storedRecordFinisher(stack.template, noEchoPublicTokens);
|
|
9305
|
+
const finishStored = storedRecordFinisher(stack.template, noEchoPublicTokens, stack.stackName);
|
|
9306
|
+
const storedInput = (logicalId, state) => ({
|
|
9307
|
+
logicalId,
|
|
9308
|
+
state,
|
|
9309
|
+
resolved: perResourceResolvedProps.get(logicalId),
|
|
9310
|
+
templateProps: perResourceTemplateProps.get(logicalId)
|
|
9311
|
+
});
|
|
9312
|
+
const finishRepairsAny = () => [
|
|
9313
|
+
...Object.entries(state.resources ?? {}).map(([logicalId, record]) => ({
|
|
9314
|
+
logicalId,
|
|
9315
|
+
state: record
|
|
9316
|
+
})),
|
|
9317
|
+
...state.orphans ?? [],
|
|
9318
|
+
...Array.isArray(state.supersededResources) ? state.supersededResources.filter(isSupersededResourceRecord) : []
|
|
9319
|
+
].some((row) => {
|
|
9320
|
+
const stored = storedInput(row.logicalId, row.state);
|
|
9321
|
+
return storedNoEchoInputsKnown(row.state, stored) && finishStored(row.state, void 0, stored) !== row.state;
|
|
9322
|
+
});
|
|
8905
9323
|
const totalSecrets = outputSecrets.size + [...perResourceSecrets.values()].reduce((n, m) => n + m.size, 0) + [...orphanSecrets.values()].reduce((n, m) => n + m.size, 0);
|
|
8906
|
-
if (totalSecrets === 0 && !noEchoPlans.changesAny) {
|
|
9324
|
+
if (totalSecrets === 0 && !noEchoPlans.changesAny && !storedNoEcho.changesAny && unpositioned.masked.size === 0 && !finishRepairsAny()) {
|
|
8907
9325
|
emitAbandonedScanNotes();
|
|
8908
9326
|
return {
|
|
8909
9327
|
...await purgeExaminedHistory(loaded.migrationPending),
|
|
@@ -8914,6 +9332,7 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
8914
9332
|
unverifiableProducerRecords: prePassFindings.damagedProducerRecords.length,
|
|
8915
9333
|
unverifiableLeaves,
|
|
8916
9334
|
unrepairedReadNames: 0,
|
|
9335
|
+
...unpositioned.unverifiable > 0 && { unverifiableNoEchoRecords: unpositioned.unverifiable },
|
|
8917
9336
|
...malformedResources ? { malformedResources } : {},
|
|
8918
9337
|
...malformedResourceRows ? { malformedResourceRows } : {},
|
|
8919
9338
|
...malformedOutputs ? { malformedOutputs } : {},
|
|
@@ -8939,7 +9358,7 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
8939
9358
|
secrets: ownSecrets,
|
|
8940
9359
|
source: templateProps,
|
|
8941
9360
|
generation: "unproven"
|
|
8942
|
-
}), templateProps, ownSecrets)
|
|
9361
|
+
}), templateProps, ownSecrets, perResourceResolvedProps.get(logicalId))
|
|
8943
9362
|
} : record;
|
|
8944
9363
|
const walked = secrets || templateProps ? withObservedTwinsPositioned(scrubResourceRecord(positioned, ownSecrets, void 0, "state-cross-generation", {
|
|
8945
9364
|
properties: "unproven",
|
|
@@ -8956,47 +9375,26 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
8956
9375
|
properties: "unproven",
|
|
8957
9376
|
observed: "unproven"
|
|
8958
9377
|
});
|
|
8959
|
-
const rewritten = finishStored(keepHeldTokenProvenance(applyScrubNoEcho(migrated, record, plan)), new Map([...ownSecrets, ...migrationNeedles ?? []]),
|
|
8960
|
-
logicalId,
|
|
8961
|
-
state: record
|
|
8962
|
-
});
|
|
9378
|
+
const rewritten = finishStored(keepHeldTokenProvenance(applyScrubNoEcho(migrated, record, plan)), new Map([...ownSecrets, ...migrationNeedles ?? []]), storedInput(logicalId, record));
|
|
8963
9379
|
const written = JSON.stringify(rewritten) === JSON.stringify(record) ? rewritten : withoutLapsedStaleShapeStamp(rewritten);
|
|
8964
9380
|
if (JSON.stringify(written) !== JSON.stringify(record)) recordsChanged++;
|
|
8965
9381
|
newResources[logicalId] = written;
|
|
8966
9382
|
}
|
|
8967
|
-
const
|
|
8968
|
-
const own = orphanSecrets.get(String(orphanIndex));
|
|
8969
|
-
const needles = new Map(allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
|
|
8970
|
-
for (const [plaintext, expression] of own ?? []) needles.set(plaintext, expression);
|
|
8971
|
-
if (needles.size === 0) return record;
|
|
8972
|
-
const scrubbed = finishStored(keepHeldTokenProvenance(scrubResourceRecord(record.state, needles, void 0, "state-cross-generation", {
|
|
8973
|
-
properties: "unproven",
|
|
8974
|
-
observed: "unproven"
|
|
8975
|
-
})), needles, record);
|
|
8976
|
-
if (JSON.stringify(scrubbed) === JSON.stringify(record.state)) return record;
|
|
8977
|
-
recordsChanged++;
|
|
8978
|
-
return {
|
|
8979
|
-
...record,
|
|
8980
|
-
state: withoutLapsedStaleShapeStamp(scrubbed)
|
|
8981
|
-
};
|
|
8982
|
-
});
|
|
8983
|
-
const newSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.map((entry, supersededIndex) => {
|
|
8984
|
-
if (!isSupersededResourceRecord(entry)) return entry;
|
|
8985
|
-
const own = orphanSecrets.get(`superseded:${supersededIndex}`);
|
|
9383
|
+
const rewriteStoredRecord = (key, row) => {
|
|
8986
9384
|
const needles = new Map(allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
|
|
8987
|
-
for (const [plaintext, expression] of
|
|
8988
|
-
|
|
8989
|
-
const
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
})), needles, entry);
|
|
8993
|
-
if (JSON.stringify(scrubbed) === JSON.stringify(entry.state)) return entry;
|
|
9385
|
+
for (const [plaintext, expression] of orphanSecrets.get(key) ?? []) needles.set(plaintext, expression);
|
|
9386
|
+
const stored = storedInput(row.logicalId, row.state);
|
|
9387
|
+
const finished = scrubStoredRecord(row.state, needles, storedNoEcho.byKey.get(key), noEchoPublicTokens, (record, bag) => finishStored(record, bag, stored));
|
|
9388
|
+
const scrubbed = unpositioned.masked.has(key) ? maskUnpositionedRecord(finished).record : finished;
|
|
9389
|
+
if (JSON.stringify(scrubbed) === JSON.stringify(row.state)) return row;
|
|
8994
9390
|
recordsChanged++;
|
|
8995
9391
|
return {
|
|
8996
|
-
...
|
|
9392
|
+
...row,
|
|
8997
9393
|
state: withoutLapsedStaleShapeStamp(scrubbed)
|
|
8998
9394
|
};
|
|
8999
|
-
}
|
|
9395
|
+
};
|
|
9396
|
+
const newOrphans = (state.orphans ?? []).map((record, orphanIndex) => rewriteStoredRecord(String(orphanIndex), record));
|
|
9397
|
+
const newSuperseded = Array.isArray(state.supersededResources) ? state.supersededResources.map((entry, supersededIndex) => isSupersededResourceRecord(entry) ? rewriteStoredRecord(`superseded:${supersededIndex}`, entry) : entry) : void 0;
|
|
9000
9398
|
const { newImports, newOutputReads, unrepairedReadNames, changed } = repairCrossStackReadNames({
|
|
9001
9399
|
state,
|
|
9002
9400
|
outputSecrets,
|
|
@@ -9017,7 +9415,11 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
9017
9415
|
generation: "unproven"
|
|
9018
9416
|
}) : state.outputs;
|
|
9019
9417
|
const redactedOutputs = redactUnaccountedOutputs(positionedOutputs, state.outputs, accountedOutputKeys, allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
|
|
9020
|
-
const noEchoMaskedOutputs = maskScrubNoEchoOutputs(redactedOutputs, noEchoPlans.outputKeys, new Set(Object.keys(stack.template.Outputs ?? {})), declaredAliasOf
|
|
9418
|
+
const noEchoMaskedOutputs = maskScrubNoEchoOutputs(redactedOutputs, noEchoPlans.outputKeys, new Set(Object.keys(stack.template.Outputs ?? {})), declaredAliasOf, {
|
|
9419
|
+
templateOutputs: stack.template.Outputs ?? {},
|
|
9420
|
+
sources: noEchoPlans.sources,
|
|
9421
|
+
pseudo: pseudoValues
|
|
9422
|
+
});
|
|
9021
9423
|
emitAbandonedScanNotes();
|
|
9022
9424
|
let newOutputs = noEchoMaskedOutputs;
|
|
9023
9425
|
let newExportNames = state.exportNames;
|
|
@@ -9115,6 +9517,7 @@ async function scrubStackRewritePass({ stack, region, stateBackend, opts, logger
|
|
|
9115
9517
|
unverifiableProducerRecords: prePassFindings.damagedProducerRecords.length,
|
|
9116
9518
|
unverifiableLeaves,
|
|
9117
9519
|
unrepairedReadNames: unrepairedReadNames.length,
|
|
9520
|
+
...unpositioned.unverifiable > 0 && { unverifiableNoEchoRecords: unpositioned.unverifiable },
|
|
9118
9521
|
...malformedResources ? { malformedResources } : {},
|
|
9119
9522
|
...malformedOutputs ? { malformedOutputs } : {},
|
|
9120
9523
|
...malformedOrphans ? { malformedOrphans } : {},
|
|
@@ -9239,6 +9642,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
9239
9642
|
if (unreadableRows.length > 0) throw new ScrubRefusalError(malformedOrphanRecordsRefusalMessage(stack.stackName, region, unreadableRows, opts.refusalRecovery), STATE_RESOURCES_MALFORMED);
|
|
9240
9643
|
}
|
|
9241
9644
|
const perResourceTemplateProps = /* @__PURE__ */ new Map();
|
|
9645
|
+
const perResourceResolvedProps = /* @__PURE__ */ new Map();
|
|
9242
9646
|
const outputsTemplateSource = {};
|
|
9243
9647
|
const resolvers = new ScrubResolvers(region);
|
|
9244
9648
|
const resolver = resolvers.primary;
|
|
@@ -9324,6 +9728,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
9324
9728
|
orphanSecrets,
|
|
9325
9729
|
state,
|
|
9326
9730
|
perResourceTemplateProps,
|
|
9731
|
+
perResourceResolvedProps,
|
|
9327
9732
|
outputsTemplateSource,
|
|
9328
9733
|
resolvers,
|
|
9329
9734
|
resolver,
|
|
@@ -9364,6 +9769,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
9364
9769
|
malformedOrphans,
|
|
9365
9770
|
malformedOrphanRows,
|
|
9366
9771
|
perResourceTemplateProps,
|
|
9772
|
+
perResourceResolvedProps,
|
|
9367
9773
|
outputsTemplateSource,
|
|
9368
9774
|
conditions,
|
|
9369
9775
|
templateResources,
|
|
@@ -9395,6 +9801,7 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
|
|
|
9395
9801
|
let totalStacksWithUnverifiableReads = 0;
|
|
9396
9802
|
let totalStacksWithUnverifiableLeaves = 0;
|
|
9397
9803
|
let totalStacksWithUnrepairedReadNames = 0;
|
|
9804
|
+
let totalStacksWithUnverifiableNoEchoRecords = 0;
|
|
9398
9805
|
let totalOutputKeysDropped = 0;
|
|
9399
9806
|
let totalStacksWithReadOutputKeys = 0;
|
|
9400
9807
|
const droppedReadersUnverifiedStacks = [];
|
|
@@ -9462,6 +9869,7 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
|
|
|
9462
9869
|
scrubbed = await scrubStack(stack, stackRegion, stateBackend, lockManager, {
|
|
9463
9870
|
dryRun: options.dryRun ?? false,
|
|
9464
9871
|
purgeHistory: options.purgeHistory ?? false,
|
|
9872
|
+
maskUnpositioned: options.maskUnpositioned ?? false,
|
|
9465
9873
|
roleArn: options.roleArn,
|
|
9466
9874
|
logger,
|
|
9467
9875
|
appStacks: allStacks,
|
|
@@ -9565,7 +9973,7 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
|
|
|
9565
9973
|
if (!rewrittenStacks.has(recordKey)) totalStacksScrubbed++;
|
|
9566
9974
|
rewrittenStacks.add(recordKey);
|
|
9567
9975
|
logger.info(`${options.dryRun ? "Would scrub" : "Scrubbed"} ${scrubbed.recordsChanged} resource record(s) in ${shownStack}`);
|
|
9568
|
-
} else if (scrubbed.secretBearingKeys === 0 && scrubbed.unverifiableReads === 0 && scrubbed.unverifiableLeaves === 0 && scrubbed.unrepairedReadNames === 0 && (scrubbed.keptReadOutputKeys ?? 0) === 0 && (scrubbed.keptAliasOutputKeys ?? 0) === 0 && !scrubbed.droppedOutputReadersUnverified && indexAbsentWithSecret === 0 && indexConverged === 0) logger.info(scrubbed.nestedChildren.some((child) => Boolean(child.input)) ? `No plaintext secrets found in ${shownStack}'s own records${SCRUB_CLEAN_SCOPE_NOTE}; its nested-stack output attributes are checked after each nested stack` : `No plaintext secrets found in ${shownStack}${SCRUB_CLEAN_SCOPE_NOTE}`);
|
|
9976
|
+
} else if (scrubbed.secretBearingKeys === 0 && scrubbed.unverifiableReads === 0 && scrubbed.unverifiableLeaves === 0 && scrubbed.unrepairedReadNames === 0 && (scrubbed.unverifiableNoEchoRecords ?? 0) === 0 && (scrubbed.keptReadOutputKeys ?? 0) === 0 && (scrubbed.keptAliasOutputKeys ?? 0) === 0 && !scrubbed.droppedOutputReadersUnverified && indexAbsentWithSecret === 0 && indexConverged === 0) logger.info(scrubbed.nestedChildren.some((child) => Boolean(child.input)) ? `No plaintext secrets found in ${shownStack}'s own records${SCRUB_CLEAN_SCOPE_NOTE}; its nested-stack output attributes are checked after each nested stack` : `No plaintext secrets found in ${shownStack}${SCRUB_CLEAN_SCOPE_NOTE}`);
|
|
9569
9977
|
if (scrubbed.malformedResources || scrubbed.malformedResourceRows) malformedRecords.push(stackName);
|
|
9570
9978
|
if (scrubbed.malformedOutputs) malformedOutputRecords.push(stackName);
|
|
9571
9979
|
if (scrubbed.malformedOrphans || scrubbed.malformedOrphanRows) malformedOrphanRecords.push(stackName);
|
|
@@ -9582,6 +9990,10 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
|
|
|
9582
9990
|
totalStacksWithUnrepairedReadNames++;
|
|
9583
9991
|
logger.warn(safeMsg`${scrubbed.unrepairedReadNames} cross-stack read name(s) in ${shownStack} hold a ` + "plaintext scrub could NOT repair (see the warnings above) — so this stack is not reported clean.");
|
|
9584
9992
|
}
|
|
9993
|
+
if ((scrubbed.unverifiableNoEchoRecords ?? 0) > 0) {
|
|
9994
|
+
totalStacksWithUnverifiableNoEchoRecords++;
|
|
9995
|
+
logger.warn(safeMsg`${scrubbed.unverifiableNoEchoRecords} orphan or superseded record(s) in ${shownStack} ` + "name no NoEcho positions scrub can verify (see the warnings above) — so this stack is not reported clean.");
|
|
9996
|
+
}
|
|
9585
9997
|
totalOutputKeysDropped += scrubbed.droppedOutputKeys ?? 0;
|
|
9586
9998
|
if ((scrubbed.keptReadOutputKeys ?? 0) > 0 || (scrubbed.keptAliasOutputKeys ?? 0) > 0) totalStacksWithReadOutputKeys++;
|
|
9587
9999
|
if (scrubbed.droppedOutputReadersUnverified) droppedReadersUnverifiedStacks.push(stackName);
|
|
@@ -9601,6 +10013,7 @@ async function runScrubTargets({ options, logger, effectiveRegion, region, state
|
|
|
9601
10013
|
totalStacksWithUnverifiableReads,
|
|
9602
10014
|
totalStacksWithUnverifiableLeaves,
|
|
9603
10015
|
totalStacksWithUnrepairedReadNames,
|
|
10016
|
+
totalStacksWithUnverifiableNoEchoRecords,
|
|
9604
10017
|
totalOutputKeysDropped,
|
|
9605
10018
|
totalStacksWithReadOutputKeys,
|
|
9606
10019
|
droppedReadersUnverifiedStacks,
|
|
@@ -9716,7 +10129,7 @@ async function scrubCommand(stacks, options) {
|
|
|
9716
10129
|
|
|
9717
10130
|
// src/cli/commands/scrub.ts
|
|
9718
10131
|
function createScrubCommand() {
|
|
9719
|
-
const cmd = new Command("scrub").description("Rewrite persisted state so resolved secret dynamic references are stored as their {{resolve:...}} expression, not the plaintext value (no deploy).").argument("[stacks...]", "Stack name(s) to scrub (physical name or display path); the nested stacks under each are scrubbed too").option("--all", "Scrub every stack in the synthesized app", false).option("--dry-run", "Report what would be scrubbed without writing state").addOption(new Option("--purge-history", "Also purge the earlier S3 versions of every examined stack's state.json, not only the ones scrub rewrites (drops their state-recovery history; a record scrub refuses is never purged)").conflicts("dryRun")).option("--fail", "With --dry-run, exit non-zero if a value the template names through a {{resolve:...}} reference is found in plaintext (CI gate). Also exits non-zero on a real run when a leak was found that scrub cannot rewrite.");
|
|
10132
|
+
const cmd = new Command("scrub").description("Rewrite persisted state so resolved secret dynamic references are stored as their {{resolve:...}} expression, not the plaintext value (no deploy).").argument("[stacks...]", "Stack name(s) to scrub (physical name or display path); the nested stacks under each are scrubbed too").option("--all", "Scrub every stack in the synthesized app", false).option("--dry-run", "Report what would be scrubbed without writing state").addOption(new Option("--purge-history", "Also purge the earlier S3 versions of every examined stack's state.json, not only the ones scrub rewrites (drops their state-recovery history; a record scrub refuses is never purged)").conflicts("dryRun")).option("--mask-unpositioned", "Mask every string value of an orphan or superseded record whose NoEcho positions scrub cannot tell (its logical id left the template, no noEchoLeaves recorded) and record those positions as NoEcho; those values are lost from state, so a later adoption of the record compares without them").option("--fail", "With --dry-run, exit non-zero if a value the template names through a {{resolve:...}} reference is found in plaintext (CI gate). Also exits non-zero on a real run when a leak was found that scrub cannot rewrite.");
|
|
9720
10133
|
[
|
|
9721
10134
|
...commonOptions,
|
|
9722
10135
|
...appOptions,
|
|
@@ -9939,7 +10352,7 @@ const UNCOMPARED_REASONS = {
|
|
|
9939
10352
|
},
|
|
9940
10353
|
noEchoParameter: {
|
|
9941
10354
|
kind: "unknown",
|
|
9942
|
-
phrase: "only PARTIALLY compared: their state holds a NoEcho parameter value only as the redaction mask, which no re-run can clear"
|
|
10355
|
+
phrase: "only PARTIALLY compared: their state holds a NoEcho parameter value, or a custom resource's NoEcho attribute value, only as the redaction mask, which no re-run can clear"
|
|
9943
10356
|
},
|
|
9944
10357
|
maskedEcho: {
|
|
9945
10358
|
kind: "unknown",
|
|
@@ -10840,6 +11253,45 @@ function readHadAgreeingCopies(read) {
|
|
|
10840
11253
|
return readsWithAgreeingCopies.has(read);
|
|
10841
11254
|
}
|
|
10842
11255
|
|
|
11256
|
+
// src/cli/commands/drift/transitional-read-heals.ts
|
|
11257
|
+
const isBag = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11258
|
+
const scalarText = (value) => typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value) : void 0;
|
|
11259
|
+
function instanceMonitoringIsDeclared(properties, aws) {
|
|
11260
|
+
const declared = coerceCfnBoolean(properties["Monitoring"]);
|
|
11261
|
+
return declared !== void 0 && aws["Monitoring"] === declared;
|
|
11262
|
+
}
|
|
11263
|
+
function instanceProfileIsDeclared(properties, aws) {
|
|
11264
|
+
const declared = properties["IamInstanceProfile"];
|
|
11265
|
+
const live = aws["IamInstanceProfile"];
|
|
11266
|
+
if (typeof declared !== "string" || declared === "" || typeof live !== "string") return false;
|
|
11267
|
+
if (live === declared) return true;
|
|
11268
|
+
return live.startsWith("arn:") && live.includes(":instance-profile/") && live.slice(live.lastIndexOf("/") + 1) === declared;
|
|
11269
|
+
}
|
|
11270
|
+
function instanceMetadataOptionsIsDeclared(properties, aws, observed) {
|
|
11271
|
+
const declared = properties["MetadataOptions"];
|
|
11272
|
+
const live = aws["MetadataOptions"];
|
|
11273
|
+
const recorded = observed["MetadataOptions"];
|
|
11274
|
+
if (!isBag(declared) || !isBag(live) || !isBag(recorded)) return false;
|
|
11275
|
+
const declaredKeys = Object.keys(declared);
|
|
11276
|
+
if (declaredKeys.length === 0) return false;
|
|
11277
|
+
for (const key of declaredKeys) {
|
|
11278
|
+
const want = scalarText(declared[key]);
|
|
11279
|
+
if (want === void 0 || scalarText(live[key]) !== want) return false;
|
|
11280
|
+
}
|
|
11281
|
+
for (const key of /* @__PURE__ */ new Set([...Object.keys(live), ...Object.keys(recorded)])) {
|
|
11282
|
+
if (declaredKeys.includes(key)) continue;
|
|
11283
|
+
if (scalarText(live[key]) !== scalarText(recorded[key])) return false;
|
|
11284
|
+
}
|
|
11285
|
+
return true;
|
|
11286
|
+
}
|
|
11287
|
+
function efsBackupPolicyIsDeclared(properties, aws) {
|
|
11288
|
+
const declared = properties["BackupPolicy"];
|
|
11289
|
+
const live = aws["BackupPolicy"];
|
|
11290
|
+
if (!isBag(declared) || !isBag(live)) return false;
|
|
11291
|
+
const status = declared["Status"];
|
|
11292
|
+
return typeof status === "string" && status !== "" && live["Status"] === status;
|
|
11293
|
+
}
|
|
11294
|
+
|
|
10843
11295
|
// src/cli/commands/drift/baseline-keys.ts
|
|
10844
11296
|
const UNDECLARED_UNCOMPARED_KEYS = {
|
|
10845
11297
|
"AWS::S3::Bucket": ["NotificationConfiguration"],
|
|
@@ -10878,7 +11330,7 @@ function preFixBaselineKeys(resourceType, observed, properties, aws) {
|
|
|
10878
11330
|
if (typeof properties !== "object" || properties === null || Array.isArray(properties)) return [];
|
|
10879
11331
|
if (resourceType === "AWS::DynamoDB::Table") {
|
|
10880
11332
|
const bag = properties;
|
|
10881
|
-
return [...staleTablePolicyBaseline(observed, bag, aws) ? ["ResourcePolicy"] : [], ...tagsHeal.liveIsDeclared(bag, aws) ? [tagsHeal.key] : []];
|
|
11333
|
+
return [...staleTablePolicyBaseline(observed, bag, aws) ? ["ResourcePolicy"] : [], ...tagsHeal.liveIsDeclared(bag, aws, observed) ? [tagsHeal.key] : []];
|
|
10882
11334
|
}
|
|
10883
11335
|
if (resourceType === "AWS::SQS::QueuePolicy" || resourceType === "AWS::SNS::TopicPolicy") {
|
|
10884
11336
|
const declared = declaredPolicyDocument(properties);
|
|
@@ -10889,7 +11341,7 @@ function preFixBaselineKeys(resourceType, observed, properties, aws) {
|
|
|
10889
11341
|
return lambdaPermissionMatchesDeclared(aws, declared) && !lambdaPermissionMatchesDeclared(observed, declared) ? [...LAMBDA_PERMISSION_STATEMENT_KEYS] : [];
|
|
10890
11342
|
}
|
|
10891
11343
|
const members = OWN_WRITE_MEMBERS.get(resourceType);
|
|
10892
|
-
if (members !== void 0) return members.filter((member) => member.liveIsDeclared(properties, aws)).map((member) => member.key);
|
|
11344
|
+
if (members !== void 0) return members.filter((member) => member.liveIsDeclared(properties, aws, observed)).map((member) => member.key);
|
|
10893
11345
|
if (resourceType !== "AWS::Lambda::EventSourceMapping") return [];
|
|
10894
11346
|
const declared = hasOwnKey(properties, "Enabled") ? coerceCfnBoolean(properties["Enabled"]) : void 0;
|
|
10895
11347
|
const recorded = hasOwnKey(observed, "Enabled") ? coerceCfnBoolean(observed["Enabled"]) : void 0;
|
|
@@ -10962,7 +11414,24 @@ const OWN_WRITE_MEMBERS = new Map(Object.entries({
|
|
|
10962
11414
|
if (declared === void 0) return properties["FileSystemPolicy"] === void 0 && aws["FileSystemPolicy"] === void 0;
|
|
10963
11415
|
return efsPolicyMatchesDeclared(aws["FileSystemPolicy"], declared);
|
|
10964
11416
|
}
|
|
11417
|
+
}, {
|
|
11418
|
+
key: "BackupPolicy",
|
|
11419
|
+
liveIsDeclared: efsBackupPolicyIsDeclared
|
|
10965
11420
|
}],
|
|
11421
|
+
"AWS::EC2::Instance": [
|
|
11422
|
+
{
|
|
11423
|
+
key: "Monitoring",
|
|
11424
|
+
liveIsDeclared: instanceMonitoringIsDeclared
|
|
11425
|
+
},
|
|
11426
|
+
{
|
|
11427
|
+
key: "IamInstanceProfile",
|
|
11428
|
+
liveIsDeclared: instanceProfileIsDeclared
|
|
11429
|
+
},
|
|
11430
|
+
{
|
|
11431
|
+
key: "MetadataOptions",
|
|
11432
|
+
liveIsDeclared: instanceMetadataOptionsIsDeclared
|
|
11433
|
+
}
|
|
11434
|
+
],
|
|
10966
11435
|
"AWS::S3::Bucket": [{
|
|
10967
11436
|
key: "LifecycleConfiguration",
|
|
10968
11437
|
liveIsDeclared: (properties, aws) => {
|
|
@@ -11001,7 +11470,7 @@ const OWN_WRITE_MEMBERS = new Map(Object.entries({
|
|
|
11001
11470
|
"AWS::IAM::Policy": [
|
|
11002
11471
|
{
|
|
11003
11472
|
key: "PolicyDocument",
|
|
11004
|
-
liveIsDeclared: (properties, aws) => readHadAgreeingCopies(aws) && documentHeal("PolicyDocument").liveIsDeclared(properties, aws)
|
|
11473
|
+
liveIsDeclared: (properties, aws, observed) => readHadAgreeingCopies(aws) && documentHeal("PolicyDocument").liveIsDeclared(properties, aws, observed)
|
|
11005
11474
|
},
|
|
11006
11475
|
{
|
|
11007
11476
|
key: "PolicyName",
|
|
@@ -11509,7 +11978,7 @@ function notComparedReason(cause, record) {
|
|
|
11509
11978
|
unreadableRecord: "its state record is not readable as a resource — not an object, carrying no resource type, or holding a 'properties' map that is not an object — so there was nothing to compare (repair or re-import the record)",
|
|
11510
11979
|
unreadableMap: "the record's whole 'resources' map is not a JSON object, so no resource in it could be read or compared (repair or re-import the record)",
|
|
11511
11980
|
baselineRefused: "a `cdkd import` run refused to capture its observed baseline, so the only baseline available is the recorded properties that refusal already found untrustworthy" + (refusedRemedy === void 0 ? " (deploy a change to this resource to restore one)" : `. ${refusedRemedy}`),
|
|
11512
|
-
noEchoParameter: `its state holds a NoEcho parameter's
|
|
11981
|
+
noEchoParameter: `its state holds the value of a NoEcho parameter, or of a custom resource's attribute declared NoEcho, only as the redaction mask${noEchoPathsClause(record)}, so that value was not compared — every other property was (permanent by design)`,
|
|
11513
11982
|
maskedEcho: `AWS echoes a secret into a property the template does not set${maskedEchoPathsClause(record)}, which its state holds only as the redaction mask, so that value was not compared — every other property was (permanent by design)`,
|
|
11514
11983
|
uncertifiedBaseline: "its recorded baseline holds the redaction mask at a position cdkd could not pair with the secret reference there, so that position was not compared — every other property was (deploy a change to this resource to re-capture the baseline)"
|
|
11515
11984
|
}[cause];
|
|
@@ -11613,12 +12082,12 @@ const UNDECLARED_GRANT_KEYS = {
|
|
|
11613
12082
|
};
|
|
11614
12083
|
const BOUNDARY_KEY = "PermissionsBoundary";
|
|
11615
12084
|
const NONE = [];
|
|
11616
|
-
function isPlainRecord$
|
|
12085
|
+
function isPlainRecord$4(value) {
|
|
11617
12086
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11618
12087
|
}
|
|
11619
12088
|
function undeclaredGrantDriftKeys(resourceType, properties) {
|
|
11620
12089
|
if (!hasOwnKey(UNDECLARED_GRANT_KEYS, resourceType)) return NONE;
|
|
11621
|
-
if (!isPlainRecord$
|
|
12090
|
+
if (!isPlainRecord$4(properties)) return NONE;
|
|
11622
12091
|
return UNDECLARED_GRANT_KEYS[resourceType].filter((key) => !hasOwnKey(properties, key));
|
|
11623
12092
|
}
|
|
11624
12093
|
function isUndeclaredGrantScalarKey(key) {
|
|
@@ -11626,7 +12095,7 @@ function isUndeclaredGrantScalarKey(key) {
|
|
|
11626
12095
|
}
|
|
11627
12096
|
function grantMemberIdentity(key, member) {
|
|
11628
12097
|
if (key === "Policies") {
|
|
11629
|
-
const name = isPlainRecord$
|
|
12098
|
+
const name = isPlainRecord$4(member) ? member["PolicyName"] : void 0;
|
|
11630
12099
|
return typeof name === "string" ? name : void 0;
|
|
11631
12100
|
}
|
|
11632
12101
|
if (typeof member !== "string") return void 0;
|
|
@@ -11698,7 +12167,7 @@ function removedGrantMembers(key, awsValue, stateValue) {
|
|
|
11698
12167
|
for (const m of awsValue) {
|
|
11699
12168
|
const id = grantMemberIdentity(key, m);
|
|
11700
12169
|
if (id !== void 0 && kept.has(id)) continue;
|
|
11701
|
-
const name = key === "Policies" && isPlainRecord$
|
|
12170
|
+
const name = key === "Policies" && isPlainRecord$4(m) ? m["PolicyName"] : void 0;
|
|
11702
12171
|
out.push({
|
|
11703
12172
|
key,
|
|
11704
12173
|
member: typeof name === "string" ? name : m
|
|
@@ -12366,9 +12835,9 @@ function corroboratedLeafCount(send, live, wildcardLeaf = isMaskLeaf) {
|
|
|
12366
12835
|
}
|
|
12367
12836
|
return total;
|
|
12368
12837
|
}
|
|
12369
|
-
if (isPlainRecord$
|
|
12838
|
+
if (isPlainRecord$3(send)) {
|
|
12370
12839
|
if (!hasPlainPrototype(send)) return void 0;
|
|
12371
|
-
if (!isPlainRecord$
|
|
12840
|
+
if (!isPlainRecord$3(live) || !hasPlainPrototype(live)) return void 0;
|
|
12372
12841
|
const keys = Object.keys(send);
|
|
12373
12842
|
if (keys.length !== Object.keys(live).length) return void 0;
|
|
12374
12843
|
let total = 0;
|
|
@@ -12488,8 +12957,8 @@ function preserveLiveValuesAtMaskedLeaves(send, awsProperties, secrets, corrobor
|
|
|
12488
12957
|
if (holdsMaskLeaf(value)) unpreservablePaths.push(path);
|
|
12489
12958
|
return value;
|
|
12490
12959
|
}
|
|
12491
|
-
const liveObject = isPlainRecord$
|
|
12492
|
-
const corrObject = isPlainRecord$
|
|
12960
|
+
const liveObject = isPlainRecord$3(live) ? live : void 0;
|
|
12961
|
+
const corrObject = isPlainRecord$3(corr) ? corr : void 0;
|
|
12493
12962
|
const out = Object.create(null);
|
|
12494
12963
|
for (const [k, v] of Object.entries(value)) out[k] = walk(v, corrObject === void 0 ? void 0 : ownValue(corrObject, k), liveObject === void 0 ? void 0 : ownValue(liveObject, k), path === "" ? k : `${path}.${k}`);
|
|
12495
12964
|
return out;
|
|
@@ -12512,7 +12981,7 @@ function isTagListKey(key) {
|
|
|
12512
12981
|
return key === "Tags" || key.endsWith("Tags");
|
|
12513
12982
|
}
|
|
12514
12983
|
function isCfnTagList(value) {
|
|
12515
|
-
return Array.isArray(value) && value.length > 0 && value.every((t) => isPlainRecord$
|
|
12984
|
+
return Array.isArray(value) && value.length > 0 && value.every((t) => isPlainRecord$3(t) && typeof t.Key === "string");
|
|
12516
12985
|
}
|
|
12517
12986
|
function tagKeys(tags) {
|
|
12518
12987
|
return tags.map((t) => t["Key"]);
|
|
@@ -12579,8 +13048,8 @@ function collectMissingPaths(awsValue, desiredValue, path, out, isPreservedKey)
|
|
|
12579
13048
|
}
|
|
12580
13049
|
return;
|
|
12581
13050
|
}
|
|
12582
|
-
if (!isPlainRecord$
|
|
12583
|
-
if (!isPlainRecord$
|
|
13051
|
+
if (!isPlainRecord$3(awsValue)) return;
|
|
13052
|
+
if (!isPlainRecord$3(desiredValue)) {
|
|
12584
13053
|
if (desiredValue === void 0) out.add(path);
|
|
12585
13054
|
return;
|
|
12586
13055
|
}
|
|
@@ -12596,7 +13065,7 @@ function collectMissingPaths(awsValue, desiredValue, path, out, isPreservedKey)
|
|
|
12596
13065
|
function isKeyedList(value) {
|
|
12597
13066
|
return Array.isArray(value) && value.length > 0 && value.every((e) => typeof e === "object" && e !== null && typeof e.Key === "string");
|
|
12598
13067
|
}
|
|
12599
|
-
function isPlainRecord$
|
|
13068
|
+
function isPlainRecord$3(value) {
|
|
12600
13069
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
12601
13070
|
}
|
|
12602
13071
|
function mergeUntemplatedValue(awsValue, desiredValue) {
|
|
@@ -12618,7 +13087,7 @@ function mergeUntemplatedValue(awsValue, desiredValue) {
|
|
|
12618
13087
|
}
|
|
12619
13088
|
return merged;
|
|
12620
13089
|
}
|
|
12621
|
-
if (!isPlainRecord$
|
|
13090
|
+
if (!isPlainRecord$3(awsValue) || !isPlainRecord$3(desiredValue)) return desiredValue;
|
|
12622
13091
|
if (!hasPlainPrototype(awsValue) || !hasPlainPrototype(desiredValue)) return desiredValue;
|
|
12623
13092
|
const merged = Object.create(null);
|
|
12624
13093
|
for (const [key, value] of Object.entries(awsValue)) merged[key] = hasOwnKey(desiredValue, key) ? mergeUntemplatedValue(value, desiredValue[key]) : value;
|
|
@@ -12638,7 +13107,7 @@ function preserveLiveValuesAtUnresolvedTokens(send, awsProperties, unresolvedTok
|
|
|
12638
13107
|
}
|
|
12639
13108
|
if (value !== null && typeof value === "object") {
|
|
12640
13109
|
if (!hasPlainPrototype(value)) return value;
|
|
12641
|
-
const liveObject = isPlainRecord$
|
|
13110
|
+
const liveObject = isPlainRecord$3(live) ? live : void 0;
|
|
12642
13111
|
const out = Object.create(null);
|
|
12643
13112
|
for (const [k, v] of Object.entries(value)) out[k] = walk(v, liveObject === void 0 ? void 0 : ownValue(liveObject, k));
|
|
12644
13113
|
return out;
|
|
@@ -12692,7 +13161,7 @@ function buildRevertNewProperties(drifts, desiredProperties, awsProperties, opti
|
|
|
12692
13161
|
return result;
|
|
12693
13162
|
}
|
|
12694
13163
|
function driftAbsentMeansDefaultKeys(provider, resourceType, properties) {
|
|
12695
|
-
if (provider.getDriftAbsentMeansDefaultKeys === void 0 || !isPlainRecord$
|
|
13164
|
+
if (provider.getDriftAbsentMeansDefaultKeys === void 0 || !isPlainRecord$3(properties)) return [];
|
|
12696
13165
|
const keys = provider.getDriftAbsentMeansDefaultKeys(resourceType, properties);
|
|
12697
13166
|
const dotted = keys.filter((key) => key.includes("."));
|
|
12698
13167
|
if (dotted.length === 0) return keys;
|
|
@@ -13238,7 +13707,7 @@ async function writeAheadRevertAttestations(report, logicalIds, stateBackend) {
|
|
|
13238
13707
|
|
|
13239
13708
|
// src/cli/commands/drift/revert-write-only.ts
|
|
13240
13709
|
function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames) {
|
|
13241
|
-
if (!writeOnlyNames || writeOnlyNames.size === 0 || !isPlainRecord$
|
|
13710
|
+
if (!writeOnlyNames || writeOnlyNames.size === 0 || !isPlainRecord$3(properties)) return [];
|
|
13242
13711
|
const unreadableCreateOnly = getTopLevelKeysHoldingUnreadableCreateOnly(resourceType, properties);
|
|
13243
13712
|
const names = [];
|
|
13244
13713
|
for (const name of writeOnlyNames) {
|
|
@@ -13253,7 +13722,7 @@ function revertWriteOnlyResendNames(resourceType, properties, writeOnlyNames) {
|
|
|
13253
13722
|
function withDeclaredWriteOnlyValues(send, resolvedProperties, names, paths) {
|
|
13254
13723
|
const skipped = [];
|
|
13255
13724
|
const wholesale = [];
|
|
13256
|
-
if (names.length === 0 || !isPlainRecord$
|
|
13725
|
+
if (names.length === 0 || !isPlainRecord$3(resolvedProperties)) return {
|
|
13257
13726
|
properties: send,
|
|
13258
13727
|
skipped,
|
|
13259
13728
|
wholesale
|
|
@@ -13326,11 +13795,11 @@ function graftAt(send, declared, path, writeOnly) {
|
|
|
13326
13795
|
ok
|
|
13327
13796
|
};
|
|
13328
13797
|
}
|
|
13329
|
-
if (!isPlainRecord$
|
|
13798
|
+
if (!isPlainRecord$3(declared) || !hasOwnKey(declared, segment)) return {
|
|
13330
13799
|
value: send,
|
|
13331
13800
|
ok: true
|
|
13332
13801
|
};
|
|
13333
|
-
if (!isPlainRecord$
|
|
13802
|
+
if (!isPlainRecord$3(send)) return {
|
|
13334
13803
|
value: send,
|
|
13335
13804
|
ok: false
|
|
13336
13805
|
};
|
|
@@ -13361,7 +13830,7 @@ function withoutPaths(value, paths) {
|
|
|
13361
13830
|
const inner = paths.filter((p) => p[0] === "*").map((p) => p.slice(1));
|
|
13362
13831
|
return value.map((item) => withoutPaths(item, inner));
|
|
13363
13832
|
}
|
|
13364
|
-
if (!isPlainRecord$
|
|
13833
|
+
if (!isPlainRecord$3(value)) return value;
|
|
13365
13834
|
const out = {};
|
|
13366
13835
|
for (const [key, child] of Object.entries(value)) {
|
|
13367
13836
|
const inner = paths.filter((p) => p[0] === key).map((p) => p.slice(1));
|
|
@@ -13371,8 +13840,8 @@ function withoutPaths(value, paths) {
|
|
|
13371
13840
|
return out;
|
|
13372
13841
|
}
|
|
13373
13842
|
function covers(template, actual) {
|
|
13374
|
-
if (isPlainRecord$
|
|
13375
|
-
if (!isPlainRecord$
|
|
13843
|
+
if (isPlainRecord$3(template)) {
|
|
13844
|
+
if (!isPlainRecord$3(actual)) return false;
|
|
13376
13845
|
return Object.entries(template).every(([key, child]) => hasOwnKey(actual, key) && covers(child, actual[key]));
|
|
13377
13846
|
}
|
|
13378
13847
|
if (Array.isArray(template)) return Array.isArray(actual) && template.length === actual.length && template.every((child, index) => covers(child, actual[index]));
|
|
@@ -13505,7 +13974,7 @@ const INGRESS_IDENTITY_KEYS$1 = [
|
|
|
13505
13974
|
"SourcePrefixListId"
|
|
13506
13975
|
];
|
|
13507
13976
|
function comparableIngressIdentity(group, rule) {
|
|
13508
|
-
if (!isPlainRecord$
|
|
13977
|
+
if (!isPlainRecord$2(rule) || typeof group !== "string" || group === "" || isRedactedRecordedValue(group) || !INGRESS_IDENTITY_KEYS$1.every((key) => !isRedactedRecordedValue(rule[key])) || !Number.isFinite(cfnIngressPortValue(rule["FromPort"])) || !Number.isFinite(cfnIngressPortValue(rule["ToPort"]))) return;
|
|
13509
13978
|
return ingressRuleIdentity(group, rule);
|
|
13510
13979
|
}
|
|
13511
13980
|
function survivingRecordOfRuleId(records, selfLogicalId, ruleId) {
|
|
@@ -13522,7 +13991,7 @@ function stackIngressRuleHolder(records, selfLogicalId, groupId, rule, idCheck)
|
|
|
13522
13991
|
if (lid === selfLogicalId) continue;
|
|
13523
13992
|
const props = record.properties;
|
|
13524
13993
|
if (record.resourceType === "AWS::EC2::SecurityGroupIngress") {
|
|
13525
|
-
if (!isPlainRecord$
|
|
13994
|
+
if (!isPlainRecord$2(props) || comparableIngressIdentity(props["GroupId"], props) !== wanted) continue;
|
|
13526
13995
|
const ruleId = recordedSgRuleId(record.attributes);
|
|
13527
13996
|
if (ruleId !== void 0 && idCheck !== void 0) {
|
|
13528
13997
|
if ("live" in idCheck && ruleId !== idCheck.live) continue;
|
|
@@ -13531,13 +14000,13 @@ function stackIngressRuleHolder(records, selfLogicalId, groupId, rule, idCheck)
|
|
|
13531
14000
|
return lid;
|
|
13532
14001
|
}
|
|
13533
14002
|
if (record.resourceType === "AWS::EC2::SecurityGroup" && record.physicalId === groupId) {
|
|
13534
|
-
const inline = isPlainRecord$
|
|
14003
|
+
const inline = isPlainRecord$2(props) ? props["SecurityGroupIngress"] : void 0;
|
|
13535
14004
|
if (Array.isArray(inline) && inline.some((entry) => comparableIngressIdentity(groupId, entry) === wanted)) return lid;
|
|
13536
14005
|
}
|
|
13537
14006
|
}
|
|
13538
14007
|
}
|
|
13539
14008
|
function tagListsMatch(live, declared) {
|
|
13540
|
-
const pairs = (list) => list.every((entry) => isPlainRecord$
|
|
14009
|
+
const pairs = (list) => list.every((entry) => isPlainRecord$2(entry) && typeof entry["Key"] === "string") ? list.map((entry) => {
|
|
13541
14010
|
const tag = entry;
|
|
13542
14011
|
return JSON.stringify([tag["Key"], tag["Value"] ?? ""]);
|
|
13543
14012
|
}).sort() : void 0;
|
|
@@ -13545,7 +14014,7 @@ function tagListsMatch(live, declared) {
|
|
|
13545
14014
|
const b = pairs(declared);
|
|
13546
14015
|
return a !== void 0 && b !== void 0 && JSON.stringify(a) === JSON.stringify(b);
|
|
13547
14016
|
}
|
|
13548
|
-
function isPlainRecord$
|
|
14017
|
+
function isPlainRecord$2(value) {
|
|
13549
14018
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13550
14019
|
}
|
|
13551
14020
|
function descriptionKey(value) {
|
|
@@ -13659,7 +14128,7 @@ function isDefaultEgressRule(rule) {
|
|
|
13659
14128
|
}
|
|
13660
14129
|
|
|
13661
14130
|
// src/provisioning/providers/ec2/sg-rule-by-id.ts
|
|
13662
|
-
function isPlainRecord(value) {
|
|
14131
|
+
function isPlainRecord$1(value) {
|
|
13663
14132
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13664
14133
|
}
|
|
13665
14134
|
const LIST_KEY = {
|
|
@@ -13701,7 +14170,7 @@ async function siblingIdOwnedSgRules(provider, groupId, properties, context) {
|
|
|
13701
14170
|
const byId = /* @__PURE__ */ new Map();
|
|
13702
14171
|
for (const [lid, sibling] of records) {
|
|
13703
14172
|
const props = sibling.properties;
|
|
13704
|
-
if (!isPlainRecord(props) || props["GroupId"] !== groupId) continue;
|
|
14173
|
+
if (!isPlainRecord$1(props) || props["GroupId"] !== groupId) continue;
|
|
13705
14174
|
if (!sgSiblingDecidedById(lid, sibling, records, properties)) continue;
|
|
13706
14175
|
const id = recordedRuleIdOf(sibling);
|
|
13707
14176
|
if (id !== void 0) byId.set(id, lid);
|
|
@@ -19695,7 +20164,7 @@ async function buildImportPlan(state, template, cfnClient, parentStackName, opti
|
|
|
19695
20164
|
});
|
|
19696
20165
|
continue;
|
|
19697
20166
|
}
|
|
19698
|
-
const noEchoLeaves = noEchoLeavesOf(stateEntry);
|
|
20167
|
+
const noEchoLeaves = withoutEmbeddedAttributeLeaves(noEchoLeavesOf(stateEntry), stateEntry, raw, template, state);
|
|
19699
20168
|
const masksOnlyAtNoEchoLeaves = noEchoLeaves !== void 0 && noEchoLeaves.length > 0 && holdsMaskLeaf(stateEntry.properties) && !holdsMaskLeaf(withoutCoordinates(stateEntry.properties, noEchoLeaves));
|
|
19700
20169
|
if (masksOnlyAtNoEchoLeaves && IMPORT_UNSUPPORTED_RECREATABLE_TYPES.has(resourceType) && noEchoLeaves.some((coordinate) => typeof coordinate[0] === "string" && NOECHO_PRE_DELETE_KEYS.has(coordinate[0]))) {
|
|
19701
20170
|
blocked.push({
|
|
@@ -19946,6 +20415,23 @@ function replaceAtCoordinate(node, coordinate, replacement) {
|
|
|
19946
20415
|
}
|
|
19947
20416
|
return node;
|
|
19948
20417
|
}
|
|
20418
|
+
function withoutEmbeddedAttributeLeaves(leaves, record, raw, template, state) {
|
|
20419
|
+
if (leaves === void 0 || leaves.length === 0) return leaves;
|
|
20420
|
+
const properties = raw !== null && typeof raw === "object" ? raw["Properties"] : void 0;
|
|
20421
|
+
if (properties === null || typeof properties !== "object") return leaves;
|
|
20422
|
+
const embedded = noEchoCoordinatesOf(properties, record.properties, {
|
|
20423
|
+
parameters: noEchoParameterNamesOf(isPlainRecord(template["Parameters"]) ? { Parameters: template["Parameters"] } : void 0),
|
|
20424
|
+
attributeIsNoEcho: (id, attribute) => Object.hasOwn(state.resources, id) && noEchoAttributeNamesOf(state.resources[id])?.includes(attribute) === true
|
|
20425
|
+
}, void 0, {
|
|
20426
|
+
maskedAt: record.properties,
|
|
20427
|
+
only: true
|
|
20428
|
+
}).map((coordinate) => JSON.stringify(coordinate));
|
|
20429
|
+
if (embedded.length === 0) return leaves;
|
|
20430
|
+
return leaves.filter((coordinate) => !embedded.includes(JSON.stringify(coordinate)));
|
|
20431
|
+
}
|
|
20432
|
+
function isPlainRecord(value) {
|
|
20433
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
20434
|
+
}
|
|
19949
20435
|
|
|
19950
20436
|
// src/cli/commands/export/ssm-parameter-preflight.ts
|
|
19951
20437
|
const CDK_BOOTSTRAP_VERSION_PATH = /^\/cdk-bootstrap\/([A-Za-z0-9_-]+)\/version$/;
|
|
@@ -27583,10 +28069,8 @@ function positionImportedNoEcho(stackState, inputs, template, conditions, refusa
|
|
|
27583
28069
|
for (const [id, leaves] of leavesOf) {
|
|
27584
28070
|
if (!Object.hasOwn(resources, id)) continue;
|
|
27585
28071
|
const resource = resources[id];
|
|
27586
|
-
if (leaves.length > 0)
|
|
27587
|
-
|
|
27588
|
-
resource.noEchoLeaves = leaves.map((coordinate) => [...coordinate]);
|
|
27589
|
-
}
|
|
28072
|
+
if (leaves.length > 0) resource.properties = maskAtCoordinates(resource.properties, leaves);
|
|
28073
|
+
resource.noEchoLeaves = leaves.map((coordinate) => [...coordinate]);
|
|
27590
28074
|
const echoed = [...declared.get(id) ?? []].filter((name) => resource.attributes !== void 0 && Object.hasOwn(resource.attributes, name));
|
|
27591
28075
|
if (echoed.length > 0 && resource.attributes !== void 0) {
|
|
27592
28076
|
const attributes = { ...resource.attributes };
|
|
@@ -37817,4 +38301,4 @@ function collectVerbFlags(program) {
|
|
|
37817
38301
|
}
|
|
37818
38302
|
|
|
37819
38303
|
export { effectiveInventoryItem as $, withRecordedCidrSpelling as A, LIFECYCLE_DEFAULT_STATUS as B, securityGroupReadbackDelays as C, stackIngressRuleHolder as D, singleSecurityGroupRuleId as E, clearLifecycleWritesOf as F, canonicalizeItemList as G, LIFECYCLE_RULE_PATH as H, lifecycleSettleTarget as I, lifecycleUsesFilterForm as J, effectiveLifecycleConfiguration as K, recordLifecycleWrite as L, sgRemovalRuleKey as M, sgRuleListMember as N, survivingRecordOfRuleId as O, LIFECYCLE_BASELINE_REREAD_DELAYS_MS as P, effectiveIntelligentTieringItem as Q, settleLifecycleRead as R, reconcileSgRules as S, sgRuleKey as T, LIFECYCLE_TAG_FILTERS_PATH as U, LIFECYCLE_FILTER_PATH as V, canonicalizeBlock as W, EVENTBRIDGE_CONFIG_PATH as X, parseCfnTimestamp as Y, effectiveAnalyticsItem as Z, ingressRuleIdentity as _, refuseRevertRevokingSiblingRules as a, declaresBucketObjectLock as at, isResendableSocketFailure as b, buildProgram, siblingIdOwnedSgRules as c, isPlainObject as ct, authorizeDefinitelyNotApplied as d, shownLifecycleRuleId as dt, effectiveNotificationConfiguration as et, canonicalizeSgInlineRuleProtocols as f, flattenIpPermissions as g, descriptionKey as h, resolveSecretDerivedPrincipals as i, configItemId as it, markCopiesAgreed as j, tagListsMatch as k, SG_READBACK_RETRY_DELAY_MS as l, manualBucketDeletionClause as lt, comparableIngressIdentity as m, holdsUnprovenSecretPrincipalToken as n, caughtErrorName as nt, sgRuleDiffKey as o, declaresNestedObjectLock as ot, canonicalizeSgRuleProtocol as p, lifecycleRuleScope as q, isResolvableSecretPrincipalList as r, coerceCfnNumber as rt, readSgIngressById as s, describeValue as st, runDestroyForStack as t, eventBridgeEnabledOf as tt, SG_RULE_PAGE_SIZE$1 as u, mergeLegacySingular as ut, isConnectTimeout as v, securityGroupRuleMatchesCfnIngress as w, narrowIngressIpProtocol as x, isDefaultEgressRule as y, takeLifecycleWrite as z };
|
|
37820
|
-
//# sourceMappingURL=program-
|
|
38304
|
+
//# sourceMappingURL=program-Ce2id6tt.js.map
|