@go-to-k/cdkd 0.294.13 → 0.295.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-DYk4gHU2.js → asg-provider-DuAHOXvT.js} +2 -2
- package/dist/{asg-provider-DYk4gHU2.js.map → asg-provider-DuAHOXvT.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-BiA8Ud6-.js → deploy-engine-CuI_h_Ml.js} +56 -10
- package/dist/deploy-engine-CuI_h_Ml.js.map +1 -0
- package/dist/{iam-role-provider-BkweI2zb.js → iam-role-provider-CyM-wxAp.js} +2 -2
- package/dist/{iam-role-provider-BkweI2zb.js.map → iam-role-provider-CyM-wxAp.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{neptune-provider-BtKWZD6O.js → neptune-provider-BGVccWhg.js} +2 -2
- package/dist/{neptune-provider-BtKWZD6O.js.map → neptune-provider-BGVccWhg.js.map} +1 -1
- package/dist/{program-DyHae7kQ.js → program-Cbxe8TgI.js} +157 -17
- package/dist/program-Cbxe8TgI.js.map +1 -0
- package/dist/{provider-classes-DBap0t3K.js → provider-classes-DiWFkAOH.js} +7 -7
- package/dist/{provider-classes-DBap0t3K.js.map → provider-classes-DiWFkAOH.js.map} +1 -1
- package/dist/{rds-provider-BeG3nAP_.js → rds-provider-D6_Rcnub.js} +2 -2
- package/dist/{rds-provider-BeG3nAP_.js.map → rds-provider-D6_Rcnub.js.map} +1 -1
- package/dist/{version-CKLiAWMw.js → version-CMMITJVg.js} +2 -2
- package/dist/{version-CKLiAWMw.js.map → version-CMMITJVg.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-BiA8Ud6-.js.map +0 -1
- package/dist/program-DyHae7kQ.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as runWithStackAwsClients, i as resetAwsClients, o as setAwsClients, t as AwsClients } from "./aws-clients-CnmtbrxD.js";
|
|
2
2
|
import { A as displaySafe, C as SAFE_MSG_ALTERED_CHAR, D as cutMarker, E as UNRENDERABLE, F as safeMsg, I as stringifyJsonPayload, L as truncateCodePoints, M as isPasteableIdent, O as displayAwsMessage, P as plainIdentOr, T as STACK_REF_MAX_CODE_POINTS, b as withSkipPrefix, c as getLiveRenderer, d as PATTERN_B_RESOURCE_TYPES, h as generateResourceName, i as reserveStdoutForPayload, j as displayStackName, k as displayIdent, l as PATTERN_B_NAME_OPTIONS, m as explicitNamePropertyFor, n as getLogger, o as runStackBuffered, p as derivesPatternBName, r as isStdoutReservedForPayload, u as PATTERN_B_NAME_PROPERTIES, w as SECRET_REF_MAX_CODE_POINTS, x as withStackName } from "./logger-B46YMG0h.js";
|
|
3
|
-
import { At as clientDefaultsFor, Bn as isMarkedNonRetryable, Bt as IntrinsicResolutionRefusalError, Dt as withPasteableAwsProfile, Et as setPasteableAwsProfile, F as runDeleteAttempt, Fn as retryClassificationText, G as beginCommandInterruptScope, Gt as MalformedProducerRecordRefusalError, Hn as markNonRetryable, Ht as LocalStartServiceError, In as describeAwsFailure, It as CrossAccountSecretRefusalError, J as isInterruptedWaitError, Jt as ProvisioningError, K as endCommandInterruptScope, Kt as NestedStackChildDirectDestroyError, Mt as AccountIdUnavailableError, Nn as isRetryableTransientError, Ot as ambientClientDefaults, Pn as isTransientServerError, Pt as CdkdError, Qt as StackTerminationProtectionError, Rn as safeStringify, Rt as DeployCancelledError, St as injectiveKey, Tt as producerRecordKey, V as isAwsCliLiteral, Vn as isThrottlingError, Vt as LocalInvokeBuildError$1, Xt as ResourceUpdateNotSupportedError, Yt as ResourceTimeoutError, Zt as StackHasActiveImportsError, _ as VALUE_NOT_SHOWN, _n as shellQuote, _t as formatLockOperation, an as TIMEOUT_FLAG_RESOURCE_TYPE, bn as setPasteableVerbFlags, bt as CUSTOM_RESOURCE_RESPONSE_PREFIX, dn as isInertUnquoted, en as SynthesisError, fn as pasteableCommand, ft as UNREPRODUCIBLE_LOCK_CLAUSE, g as assertRegionMatch, gn as shellBoundedDisplay, gt as formatLockExpiry, h as RESOURCE_NOT_FOUND, hn as quotedOrDescribed, ht as forceQuitRecoveryClause, in as withErrorHandling, it as resourceTypeShown, jt as credentialFingerprint, kt as ambientCredentialConfig, ln as commandHole, mn as plainOrDescribed, mt as buildLockContentionMessage, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nt as logicalIdShown, pt as buildForceUnlockCommand, q as interruptWatchListenerCount, qt as PartialFailureError, rn as normalizeAwsError, s as readRecordedPrincipals, sn as SHELL_ACTIVE_WHY, t as IAM_PRINCIPAL_NAME, vn as withheldTargetClause, vt as formatLockOwner, w as remedyLogicalId, wt as producerCoordinateKey, xt as DEFAULT_STATE_PREFIX, yn as setPasteableRunFlags, zt as DynamicReferenceRegionAmbiguousError } from "./iam-policy-targets-CMSQGQnm.js";
|
|
3
|
+
import { At as clientDefaultsFor, Bn as isMarkedNonRetryable, Bt as IntrinsicResolutionRefusalError, Dt as withPasteableAwsProfile, Et as setPasteableAwsProfile, F as runDeleteAttempt, Fn as retryClassificationText, G as beginCommandInterruptScope, Gt as MalformedProducerRecordRefusalError, Hn as markNonRetryable, Ht as LocalStartServiceError, In as describeAwsFailure, It as CrossAccountSecretRefusalError, J as isInterruptedWaitError, Jt as ProvisioningError, K as endCommandInterruptScope, Kt as NestedStackChildDirectDestroyError, Mt as AccountIdUnavailableError, Nn as isRetryableTransientError, Ot as ambientClientDefaults, Pn as isTransientServerError, Pt as CdkdError, Qt as StackTerminationProtectionError, Rn as safeStringify, Rt as DeployCancelledError, St as injectiveKey, Tt as producerRecordKey, V as isAwsCliLiteral, Vn as isThrottlingError, Vt as LocalInvokeBuildError$1, Xt as ResourceUpdateNotSupportedError, Yt as ResourceTimeoutError, Zt as StackHasActiveImportsError, _ as VALUE_NOT_SHOWN, _n as shellQuote, _t as formatLockOperation, an as TIMEOUT_FLAG_RESOURCE_TYPE, bn as setPasteableVerbFlags, bt as CUSTOM_RESOURCE_RESPONSE_PREFIX, dn as isInertUnquoted, en as SynthesisError, fn as pasteableCommand, ft as UNREPRODUCIBLE_LOCK_CLAUSE, g as assertRegionMatch, gn as shellBoundedDisplay, gt as formatLockExpiry, h as RESOURCE_NOT_FOUND, hn as quotedOrDescribed, ht as forceQuitRecoveryClause, in as withErrorHandling, it as resourceTypeShown, jn as isAmbiguousOutcomeError, jt as credentialFingerprint, kt as ambientCredentialConfig, ln as commandHole, mn as plainOrDescribed, mt as buildLockContentionMessage, n as RESOLVED_PREVIOUS_PRINCIPAL_KEYS, nt as logicalIdShown, pt as buildForceUnlockCommand, q as interruptWatchListenerCount, qt as PartialFailureError, rn as normalizeAwsError, s as readRecordedPrincipals, sn as SHELL_ACTIVE_WHY, t as IAM_PRINCIPAL_NAME, vn as withheldTargetClause, vt as formatLockOwner, w as remedyLogicalId, wt as producerCoordinateKey, xt as DEFAULT_STATE_PREFIX, yn as setPasteableRunFlags, zt as DynamicReferenceRegionAmbiguousError } from "./iam-policy-targets-CMSQGQnm.js";
|
|
4
4
|
import { n as awsClientDefaults, r as getAssumedRoleCredentials, u as formatAuthority } from "./aws-client-defaults-D0q0z4dG.js";
|
|
5
|
-
import { $ as resourcesNamingDeclaredParameter, $a as STATE_SOURCED_READBACK_RULES, $n as explicitRoleArnOrThrow, $o as runDockerForeground, $r as malformedOutputsWarning, $t as noEchoParameterValueSeed, Aa as printingCorpusOf, Ai as repairMalformedOrphanRecordsForReadOnly, An as ccProtectionRegistryTypes, Ao as assertAssetBucketRegion, Ar as STATE_REGION_DIVERGED, As as derivePartitionAndUrlSuffix, At as ccRoutedFinalSnapshotError, Ba as scrubResourceRecord, Bo as resolveDockerContextDirectory, Br as isReadableResourceEntry, Bs as describeFileReadFailure, Bt as updatePartialMessage, C as perType, Ca as inheritNestedStackParameterAssociations, Ci as refuseMalformedResourcePropertiesForDrift, Cn as ProviderRegistry, Co as WorkGraph, Cr as isStalePlaceholderArnAttribute, Cs as findLargeInlineResources, Ct as resolveReplacementOldType, Da as hasMaskableValues, Di as refuseMalformedResourcesForDestroy, Do as rewriteTemplateAssetReferences, Dr as parameterInputsFor, Ds as expectedOwnerParam, Dt as ATOMIC_FINAL_SNAPSHOT_TYPES, Ea as createUnionSecretMasker, Ei as refuseMalformedResourcesForDeploy, En as isCustomResourceType$1, Eo as loadPublishableAssetManifest, Er as withSharedDrainBudget, Es as decodeListingKey, Et as inheritProducerRegions, Fa as errorCauseChain, Fi as repairMalformedResourcesForReadOnly, Fo as readBootstrapMarkerBody, Fr as displayLogicalId, Fs as hasOwnKey, Ft as unsupportedFinalSnapshotError, G as cyan, Ga as pathCrossesDottedKey, Gi as findReplacedReadersOfRecreateTargets, Gn as INTRINSIC_KEYS, Go as finchSecretArgvRefusal, Gr as malformedLocalResourceEntriesWarning, Gs as resolveBucketRegion, Gt as WITHHELD_NAME_DISPLAY, H as formatResourceLine, Ha as DYNAMIC_REFERENCE_TOKEN_SCAN, Ho as describeDockerExecFailure, Hr as malformedExportNamesWarning, Hs as renderAssemblyPathEscape, Ht as DeploymentEventsReader, Ia as maskSecretsInError, Ii as unpreviewableOrphanRecords, In as isWaitAbandonedError, Io as validateAssetBucketName, Ir as hasReadableOrphans, Is as hasPlainPrototype, J as red, Ja as recordMaskOnlyValue, Ji as isStatefulRecreateTargetForReplace, Jn as producerRegionsFromState, Jo as isDockerClientEnvKey, Jr as malformedOrphanRecordsWarning, Jt as secretBearing, K as gray, Ka as identityKeyFor, Ki as shownType, Kn as IntrinsicFunctionResolver, Ko as formatDockerLoginError, Kr as malformedLocalResourcesWarning, Kt as displayTextOrWithheld, La as maskSecretsInText, Li as unreadableOrphanRecords, Lo as validateContainerRepoName, Lr as hasReadableOutputs, Ls as nullPrototypeRecord, Ma as recordLogOnlyValue, Mi as repairMalformedOutputsForReadOnly, Mn as UNSPECIFIED_SKIP_REASON, Mo as getBootstrapMarkerKey, Mr as UNREADABLE_ORPHANS_CONTAINER_ROW, Ms as StageLoadError, Mt as effectiveDeletionPolicy, Na as shareLogOnlyValues, Ni as repairMalformedResourceEntriesForReadOnly, Nn as deleteIndeterminateGuards, No as isCrossRegionRedirect, Nr as UNREADABLE_RESOURCES_MAP_ROW, Ns as processStackMessages, Nt as isFinalSnapshotError, Oa as literalSplitDelimitersOf, Oi as refuseMalformedResourcesForExport, On as CloudControlProvider, Oo as AssetModeResolver, Os as PARTITION_TABLE, Ot as PRE_DELETE_SNAPSHOT_TYPES, Pa as createSecretMasker, Pi as repairMalformedResourcePropertiesForReadOnly, Pn as deleteSkipReason, Po as parseBootstrapMarker, Pr as deployRefusesOrphanRowsReason, Ps as defineOwnKey, Pt as refusesFinalSnapshot, Q as reachableDivergentParameters, Qa as STATE_SOURCED_CROSS_GENERATION_RULES, Qn as assertSendableRoleArn, Qo as redactedDockerCause, Qr as malformedOutputsRefusalMessage, Qt as isWholeDynamicReferenceValue, Ra as markSameGenerationBag, Ri as unreadableResourceEntries, Ro as buildDenyExternalAccessPolicy, Rr as hasReadableResources, Rs as ownValue, S as isProtectionValueActive, Sa as liveMatchesUnresolvedTokenFrame, Si as refuseMalformedResourceEntriesForOrphan, Sn as CC_BROKEN_REASON, So as stringifyValue, Sr as cfnRefValueFromPhysicalId, Ss as MIGRATE_TMP_PREFIX, St as planRollback, Ta as carryLogOnlyValues, Ti as refuseMalformedResourcePropertiesForOrphan, Tn as wouldReturnToSdkProvider, To as createAssetRedirectResolver, Ts as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, U as createReadOnlyAttributeHealerFactory, Ua as dynamicReferenceTokens, Ui as NO_CC_HANDLERS_REASON, Uo as describeDockerFailure, Ur as malformedExportSourceWarning, Us as resolveAssemblyPath, Ut as DeploymentEventsStore, Vi as unwrittenCreateOnlyReplacement, Vo as describeDockerCapturedOutput, Vr as malformedDriftResourcePropertiesWarning, Vs as displayAssemblyPath, Vt as updatePartialReason, W as bold, Wa as isUncertifiedBaselineMaskPosition, Wi as hasNoCloudControlHandlers, Wn as DiffCalculator, Wo as dockerSpawnEnvWithSensitive, Wr as malformedLocalOutputsWarning, Wt as extractDeploymentEventError, X as computeParameterTaint, Xa as recordNoEchoAttributeValues, Xi as renderStatefulReason, Xn as applyRoleArnIfSet, Xo as partitionSensitiveEnv, Xr as malformedOrphansRefusalMessage, Xt as secretSafeKeyDisplay, Y as yellow, Ya as recordMaskOnlyValuesIn, Yi as isStatefulRecreateTargetSync, Yn as regionLessSecretName, Yo as isMalformedEnvKey, Yr as malformedOrphanRowsKeptWarning, Yt as secretBearingStateKeyWarning, Z as namesAnyDeclaredParameter, Za as STATE_SOURCED_BASELINE_RULES, Zn as assertFlagRoleArn, Zo as redactDockerArgvValues, Zr as malformedOrphansWarning, Zt as exportNameSecretExposure, _ as makeCanonicalizePropertiesFn, _i as refuseMalformedResourceEntries, _o as orphansAfterRollback, _r as carriesDynamicReference, _s as stateBucketExistenceConfirmed, _t as destroyStackRecordsView, a as findNestedTemplateTreeDefect, ai as malformedStateRefusalMessage, an as DEFAULT_RESOURCE_WARN_AFTER_MS, ao as S3StateBackend, ar as envCredentialsAreAssumedRole, as as getDockerImageBySourceHash, at as dropSettledNestedJournals, b as recordedProtectionNote, ba as DagBuilder, bi as refuseMalformedResourceEntriesForImport, bo as AssetPublisher, br as keepsSecretReferenceToken, bs as CFN_TEMPLATE_BODY_LIMIT, bt as recordAfterRollbackUpdate, c as renderNestedTemplateTreeDefect, co as acceptedCreateOnlyDropsOf, cs as getDefaultStateBucketName, ct as recordDisplacedSkips, d as conditionInputsFrom, di as refuseMalformedOrphans, dn as withCreateTokenLedger, do as hasReadableExportSet, ds as resolveAutoAssetStorage, dt as withNestedRevertRun, ei as malformedRenderedContainersWarning, en as collectDeclaredOutputNames, eo as TEMPLATE_SOURCED_RULES, er as isIamRoleArn, es as runDockerStreaming, et as makeSiblingClaimReader, f as parentSuppliedValues, fa as prefetchCreateOnlyPropertyPaths, fi as refuseMalformedOrphansForDestroy, fo as hasReasonlessBaselineRefusal, fr as coerceParameterTypedValue, fs as resolveCaptureObservedState, g as mergeNoChangeOutputs, gi as refuseMalformedResourceAttributesForOrphan, go as isReadableBag, gr as isImpossibleEmptyStoredAttribute, gs as resolveUseCdkBootstrapAssets, h as keptWholeReasonText, ha as withRetry, hi as refuseMalformedOutputsForDestroy, ho as importableOutputs, hr as getAccountInfo, hs as resolveStateBucketWithDefaultAndSource, ht as replayRollback, i as childTemplateLoader, ii as malformedScrubResourceEntriesRefusalMessage, in as DEFAULT_RESOURCE_TIMEOUT_MS, io as isLockInfoExpired, ir as callerEnvCredentials, is as AssetManifestLoader, it as displacedPhysicalIdShown, ja as recordLogOnlyParameterValue, ji as repairMalformedOrphansForReadOnly, jo as ensureAssetStorage, jr as STATE_RESOURCES_MALFORMED, js as AssemblyReader, jt as createPreDeleteFinalSnapshot, ka as logOnlyValueCount, ki as refuseMalformedState, kn as slowCcOperationTimeoutMs, ko as BOOTSTRAP_MARKER_PREFIX, kr as JSON_LISTING_HOLE_VALUE, ks as canonicalizeRegion, kt as buildFinalSnapshotIdentifier, l as templateIdentity, li as refuseMalformedOrphanRecords, ln as ledgerForStack, lo as describeRegionValueKind, ls as getLegacyStateBucketName, m as isSecretBearingReferenceString, ma as describeTypeWithThrottleRetry, mi as refuseMalformedOutputs, mo as importableOutputKeys, mr as parameterTypeMayLoseSecretIdentity, ms as resolveStateBucketWithDefault, mt as replayFailedOperations, n as IMPLICIT_DELETE_DEPENDENCIES, ni as malformedResourcePropertiesWarning, nn as isExportAliasCollision, no as isSingleDynamicReferenceToken, nr as AWS_CREDENTIAL_ENV_KEYS, ns as escapeRegExp, nt as NESTED_PENDING_PARENT_REASON, o as isAbsoluteAssetPath, oi as previewableOrphanRecords, on as maskingRetryLogger, oo as rebuildClientForBucketRegion, os as Synthesizer, p as readRecordedConditionVerdicts, pa as templateResourceTypes, pi as refuseMalformedOrphansForOrphan, po as hasUnverifiableParameterRefusal, pr as isUnboundTemplateParameter, ps as resolveSkipPrefix, pt as withNestedStackContext, q as green, qa as carriesSecretMask, qi as MULTI_REGION_RECREATE_BLOCKED_TYPES, qn as classifyReplaySecretRegion, qo as getDockerCmd, qr as malformedOrphanRecordsRefusalMessage, qt as exportAliasCollisionScrubWarning, r as computeImplicitDeleteEdges, ri as malformedResourcesWarning, rn as bindingSkippedOutputs, ro as LockManager, rr as applyCallerIdentityCredentials, rs as stripControlChars, rt as displacedOpClause, s as listNestedTemplateRows, si as refuseDivergentRecordRegionForDestroy, sn as RollbackInlinePolicyWriters, so as splitImportedOps, ss as synthesisStatusMessage, st as nestedChildStackName$1, t as DeployEngine, ti as malformedResourceEntriesWarning, tn as collectPublishedOutputNames, to as WHOLE_DYNAMIC_REFERENCE_PATTERN, tr as sendableAssumeRoleCommand, ts as warnFinchArgvExposure, tt as planOrphanAdoption, u as conditionFingerprint, ui as refuseMalformedOrphanRecordsForDestroy, uo as exportNamesCarriedFrom, us as resolveApp, ut as revertedNestedRowIds, v as withResourceDeadline, vi as refuseMalformedResourceEntriesForDeploy, vo as orphansCarriedFrom, vr as carriesFetchableDynamicReference, vs as warnDeprecatedNoPrefixCliFlag, w as readProtection, wa as recordNestedStackParameterExpressions, wi as refuseMalformedResourcePropertiesForExport, wn as ccBrokenReason, wo as buildAssetRedirectMap, wr as refStateLookupFromResource, ws as uploadCfnTemplate, wt as findNestedStackTypeChanges, x as PROTECTION_PROPERTY_BY_TYPE, xa as TemplateParser, xi as refuseMalformedResourceEntriesForImportSave, xo as isSensitiveAttributeName, xr as AWS_NO_VALUE, xs as CFN_TEMPLATE_URL_LIMIT, xt as planFailedOps, y as recordedProtectionEvidence, yi as refuseMalformedResourceEntriesForDestroy, yo as shouldRetainResource, yr as isNamelessDynamicReferenceError, ys as ssmResolvedValueType, yt as withStackRecords, za as redactSecretsForState, zi as findActionableSilentDrops, zo as buildDockerImage, zr as isReadableOrphanRecord, zs as absoluteAssemblyPathEscape } from "./deploy-engine-BiA8Ud6-.js";
|
|
6
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
+
import { $ as resourcesNamingDeclaredParameter, $a as wholeStringLeavesOf, $n as explicitRoleArnOrThrow, $o as partitionSensitiveEnv, $r as malformedOutputsWarning, $t as noEchoParameterValueSeed, Aa as printingCorpusOf, Ai as repairMalformedOrphanRecordsForReadOnly, An as ccProtectionRegistryTypes, Ao as rewriteTemplateAssetReferences, Ar as STATE_REGION_DIVERGED, As as expectedOwnerParam, At as ccRoutedFinalSnapshotError, Ba as scrubResourceRecord, Bo as validateContainerRepoName, Br as isReadableResourceEntry, Bs as nullPrototypeRecord, Bt as updatePartialMessage, C as perType, Ca as inheritNestedStackParameterAssociations, Ci as refuseMalformedResourcePropertiesForDrift, Cn as ProviderRegistry, Co as AssetPublisher, Cr as isStalePlaceholderArnAttribute, Cs as CFN_TEMPLATE_BODY_LIMIT, Ct as resolveReplacementOldType, Da as hasMaskableValues, Di as refuseMalformedResourcesForDestroy, Do as buildAssetRedirectMap, Dr as parameterInputsFor, Ds as uploadCfnTemplate, Dt as ATOMIC_FINAL_SNAPSHOT_TYPES, Ea as createUnionSecretMasker, Ei as refuseMalformedResourcesForDeploy, En as isCustomResourceType$1, Eo as WorkGraph, Er as withSharedDrainBudget, Es as findLargeInlineResources, Et as inheritProducerRegions, Fa as errorCauseChain, Fi as repairMalformedResourcesForReadOnly, Fo as getBootstrapMarkerKey, Fr as displayLogicalId, Fs as StageLoadError, Ft as unsupportedFinalSnapshotError, G as cyan, Ga as pathCrossesDottedKey, Gi as findReplacedReadersOfRecreateTargets, Gn as INTRINSIC_KEYS, Go as describeDockerExecFailure, Gr as malformedLocalResourceEntriesWarning, Gs as renderAssemblyPathEscape, Gt as WITHHELD_NAME_DISPLAY, H as formatResourceLine, Ha as DYNAMIC_REFERENCE_TOKEN_SCAN, Ho as buildDockerImage, Hr as malformedExportNamesWarning, Hs as absoluteAssemblyPathEscape, Ht as DeploymentEventsReader, Ia as maskSecretsInError, Ii as unpreviewableOrphanRecords, In as isWaitAbandonedError, Io as isCrossRegionRedirect, Ir as hasReadableOrphans, Is as processStackMessages, J as red, Ja as provenPublicValue, Ji as isStatefulRecreateTargetForReplace, Jn as producerRegionsFromState, Jo as finchSecretArgvRefusal, Jr as malformedOrphanRecordsWarning, Js as resolveBucketRegion, Jt as secretBearing, K as gray, Ka as identityKeyFor, Ki as shownType, Kn as IntrinsicFunctionResolver, Ko as describeDockerFailure, Kr as malformedLocalResourcesWarning, Ks as resolveAssemblyPath, Kt as displayTextOrWithheld, La as maskSecretsInText, Li as unreadableOrphanRecords, Lo as parseBootstrapMarker, Lr as hasReadableOutputs, Ls as defineOwnKey, Ma as recordLogOnlyValue, Mi as repairMalformedOutputsForReadOnly, Mn as UNSPECIFIED_SKIP_REASON, Mo as BOOTSTRAP_MARKER_PREFIX, Mr as UNREADABLE_ORPHANS_CONTAINER_ROW, Ms as canonicalizeRegion, Mt as effectiveDeletionPolicy, Na as shareLogOnlyValues, Ni as repairMalformedResourceEntriesForReadOnly, Nn as deleteIndeterminateGuards, No as assertAssetBucketRegion, Nr as UNREADABLE_RESOURCES_MAP_ROW, Ns as derivePartitionAndUrlSuffix, Nt as isFinalSnapshotError, Oa as literalSplitDelimitersOf, Oi as refuseMalformedResourcesForExport, On as CloudControlProvider, Oo as createAssetRedirectResolver, Os as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, Ot as PRE_DELETE_SNAPSHOT_TYPES, Pa as createSecretMasker, Pi as repairMalformedResourcePropertiesForReadOnly, Pn as deleteSkipReason, Po as ensureAssetStorage, Pr as deployRefusesOrphanRowsReason, Ps as AssemblyReader, Pt as refusesFinalSnapshot, Q as reachableDivergentParameters, Qa as recordProvenPublicExpression, Qn as assertSendableRoleArn, Qo as isMalformedEnvKey, Qr as malformedOutputsRefusalMessage, Qt as isWholeDynamicReferenceValue, Ra as markSameGenerationBag, Ri as unreadableResourceEntries, Ro as readBootstrapMarkerBody, Rr as hasReadableResources, Rs as hasOwnKey, S as isProtectionValueActive, Sa as liveMatchesUnresolvedTokenFrame, Si as refuseMalformedResourceEntriesForOrphan, Sn as CC_BROKEN_REASON, So as shouldRetainResource, Sr as cfnRefValueFromPhysicalId, Ss as ssmResolvedValueType, St as planRollback, Ta as carryLogOnlyValues, Ti as refuseMalformedResourcePropertiesForOrphan, Tn as wouldReturnToSdkProvider, To as stringifyValue, Ts as MIGRATE_TMP_PREFIX, U as createReadOnlyAttributeHealerFactory, Ua as dynamicReferenceTokens, Ui as NO_CC_HANDLERS_REASON, Uo as resolveDockerContextDirectory, Ur as malformedExportSourceWarning, Us as describeFileReadFailure, Ut as DeploymentEventsStore, Vi as unwrittenCreateOnlyReplacement, Vo as buildDenyExternalAccessPolicy, Vr as malformedDriftResourcePropertiesWarning, Vs as ownValue, Vt as updatePartialReason, W as bold, Wa as isUncertifiedBaselineMaskPosition, Wi as hasNoCloudControlHandlers, Wn as DiffCalculator, Wo as describeDockerCapturedOutput, Wr as malformedLocalOutputsWarning, Ws as displayAssemblyPath, Wt as extractDeploymentEventError, X as computeParameterTaint, Xa as recordMaskOnlyValuesIn, Xi as renderStatefulReason, Xn as applyRoleArnIfSet, Xo as getDockerCmd, Xr as malformedOrphansRefusalMessage, Xt as secretSafeKeyDisplay, Y as yellow, Ya as recordMaskOnlyValue, Yi as isStatefulRecreateTargetSync, Yn as regionLessSecretName, Yo as formatDockerLoginError, Yr as malformedOrphanRowsKeptWarning, Yt as secretBearingStateKeyWarning, Z as namesAnyDeclaredParameter, Za as recordNoEchoAttributeValues, Zn as assertFlagRoleArn, Zo as isDockerClientEnvKey, Zr as malformedOrphansWarning, Zt as exportNameSecretExposure, _ as makeCanonicalizePropertiesFn, _i as refuseMalformedResourceEntries, _o as importableOutputKeys, _r as carriesDynamicReference, _s as resolveStateBucketWithDefault, _t as destroyStackRecordsView, a as findNestedTemplateTreeDefect, ai as malformedStateRefusalMessage, an as DEFAULT_RESOURCE_WARN_AFTER_MS, ao as isSingleDynamicReferenceToken, ar as envCredentialsAreAssumedRole, as as escapeRegExp, at as dropSettledNestedJournals, b as recordedProtectionNote, ba as DagBuilder, bi as refuseMalformedResourceEntriesForImport, bo as orphansAfterRollback, br as keepsSecretReferenceToken, bs as stateBucketExistenceConfirmed, bt as recordAfterRollbackUpdate, c as renderNestedTemplateTreeDefect, co as S3StateBackend, cs as getDockerImageBySourceHash, ct as recordDisplacedSkips, d as conditionInputsFrom, di as refuseMalformedOrphans, dn as withCreateTokenLedger, do as acceptedCreateOnlyDropsOf, ds as getDefaultStateBucketName, dt as withNestedRevertRun, ei as malformedRenderedContainersWarning, en as collectDeclaredOutputNames, eo as STATE_SOURCED_BASELINE_RULES, er as isIamRoleArn, es as redactDockerArgvValues, et as makeSiblingClaimReader, f as parentSuppliedValues, fa as prefetchCreateOnlyPropertyPaths, fi as refuseMalformedOrphansForDestroy, fo as describeRegionValueKind, fr as coerceParameterTypedValue, fs as getLegacyStateBucketName, g as mergeNoChangeOutputs, gi as refuseMalformedResourceAttributesForOrphan, go as hasUnverifiableParameterRefusal, gr as isImpossibleEmptyStoredAttribute, gs as resolveSkipPrefix, h as keptWholeReasonText, ha as withRetry, hi as refuseMalformedOutputsForDestroy, ho as hasReasonlessBaselineRefusal, hr as getAccountInfo, hs as resolveCaptureObservedState, ht as replayRollback, i as childTemplateLoader, ii as malformedScrubResourceEntriesRefusalMessage, in as DEFAULT_RESOURCE_TIMEOUT_MS, io as WHOLE_DYNAMIC_REFERENCE_PATTERN, ir as callerEnvCredentials, is as warnFinchArgvExposure, it as displacedPhysicalIdShown, ja as recordLogOnlyParameterValue, ji as repairMalformedOrphansForReadOnly, jo as AssetModeResolver, jr as STATE_RESOURCES_MALFORMED, js as PARTITION_TABLE, jt as createPreDeleteFinalSnapshot, ka as logOnlyValueCount, ki as refuseMalformedState, kn as slowCcOperationTimeoutMs, ko as loadPublishableAssetManifest, kr as JSON_LISTING_HOLE_VALUE, ks as decodeListingKey, kt as buildFinalSnapshotIdentifier, l as templateIdentity, li as refuseMalformedOrphanRecords, ln as ledgerForStack, lo as rebuildClientForBucketRegion, ls as Synthesizer, m as isSecretBearingReferenceString, ma as describeTypeWithThrottleRetry, mi as refuseMalformedOutputs, mo as hasReadableExportSet, mr as parameterTypeMayLoseSecretIdentity, ms as resolveAutoAssetStorage, mt as replayFailedOperations, n as IMPLICIT_DELETE_DEPENDENCIES, ni as malformedResourcePropertiesWarning, nn as isExportAliasCollision, no as STATE_SOURCED_READBACK_RULES, nr as AWS_CREDENTIAL_ENV_KEYS, ns as runDockerForeground, nt as NESTED_PENDING_PARENT_REASON, o as isAbsoluteAssetPath, oi as previewableOrphanRecords, on as maskingRetryLogger, oo as LockManager, os as stripControlChars, p as readRecordedConditionVerdicts, pa as templateResourceTypes, pi as refuseMalformedOrphansForOrphan, po as exportNamesCarriedFrom, pr as isUnboundTemplateParameter, ps as resolveApp, pt as withNestedStackContext, q as green, qa as carriesSecretMask, qi as MULTI_REGION_RECREATE_BLOCKED_TYPES, qn as classifyReplaySecretRegion, qo as dockerSpawnEnvWithSensitive, qr as malformedOrphanRecordsRefusalMessage, qt as exportAliasCollisionScrubWarning, r as computeImplicitDeleteEdges, ri as malformedResourcesWarning, rn as bindingSkippedOutputs, ro as TEMPLATE_SOURCED_RULES, rr as applyCallerIdentityCredentials, rs as runDockerStreaming, rt as displacedOpClause, s as listNestedTemplateRows, si as refuseDivergentRecordRegionForDestroy, sn as RollbackInlinePolicyWriters, so as isLockInfoExpired, ss as AssetManifestLoader, st as nestedChildStackName$1, t as DeployEngine, ti as malformedResourceEntriesWarning, tn as collectPublishedOutputNames, to as STATE_SOURCED_CROSS_GENERATION_RULES, tr as sendableAssumeRoleCommand, ts as redactedDockerCause, tt as planOrphanAdoption, u as conditionFingerprint, ui as refuseMalformedOrphanRecordsForDestroy, uo as splitImportedOps, us as synthesisStatusMessage, ut as revertedNestedRowIds, v as withResourceDeadline, vi as refuseMalformedResourceEntriesForDeploy, vo as importableOutputs, vr as carriesFetchableDynamicReference, vs as resolveStateBucketWithDefaultAndSource, w as readProtection, wa as recordNestedStackParameterExpressions, wi as refuseMalformedResourcePropertiesForExport, wn as ccBrokenReason, wo as isSensitiveAttributeName, wr as refStateLookupFromResource, ws as CFN_TEMPLATE_URL_LIMIT, wt as findNestedStackTypeChanges, x as PROTECTION_PROPERTY_BY_TYPE, xa as TemplateParser, xi as refuseMalformedResourceEntriesForImportSave, xo as orphansCarriedFrom, xr as AWS_NO_VALUE, xs as warnDeprecatedNoPrefixCliFlag, xt as planFailedOps, y as recordedProtectionEvidence, yi as refuseMalformedResourceEntriesForDestroy, yo as isReadableBag, yr as isNamelessDynamicReferenceError, ys as resolveUseCdkBootstrapAssets, yt as withStackRecords, za as redactSecretsForState, zi as findActionableSilentDrops, zo as validateAssetBucketName, zr as isReadableOrphanRecord, zs as hasPlainPrototype } from "./deploy-engine-CuI_h_Ml.js";
|
|
6
|
+
import { t as getCdkdVersion } from "./version-CMMITJVg.js";
|
|
7
7
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
8
8
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetObjectCommand, HeadBucketCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutBucketVersioningCommand, PutObjectCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
9
9
|
import { GetRoleCommand, GetUserCommand } from "@aws-sdk/client-iam";
|
|
@@ -2362,7 +2362,7 @@ function collectCrossStackRefs(node, onRef) {
|
|
|
2362
2362
|
//#region src/provisioning/register-providers.ts
|
|
2363
2363
|
let providerClasses;
|
|
2364
2364
|
function loadProviderClasses() {
|
|
2365
|
-
providerClasses ??= import("./provider-classes-
|
|
2365
|
+
providerClasses ??= import("./provider-classes-DiWFkAOH.js");
|
|
2366
2366
|
return providerClasses;
|
|
2367
2367
|
}
|
|
2368
2368
|
function registerAllProviders(registry, classes) {
|
|
@@ -5474,6 +5474,7 @@ async function repairExportIndexForStack(store, stackName, producerRegion, outpu
|
|
|
5474
5474
|
if (finding.kind !== "converge") continue;
|
|
5475
5475
|
const entry = entries.get(finding.exportName);
|
|
5476
5476
|
if (!entry) throw new ScrubIndexInvariantError("exports index repair: a planned entry is absent from the snapshot it was planned from");
|
|
5477
|
+
opts.onWriteAttempt?.();
|
|
5477
5478
|
if (!await store.patchEntry(finding.exportName, {
|
|
5478
5479
|
...entry,
|
|
5479
5480
|
value: finding.stateValue
|
|
@@ -5487,6 +5488,56 @@ async function repairExportIndexForStack(store, stackName, producerRegion, outpu
|
|
|
5487
5488
|
unwritten
|
|
5488
5489
|
};
|
|
5489
5490
|
}
|
|
5491
|
+
const SCRUBBED_STATE_OBJECT_DESCRIPTION = "the stack's earlier state.json versions, which may hold a plaintext secret";
|
|
5492
|
+
const SCRUBBED_EXPORT_INDEX_OBJECT_DESCRIPTION = "the region's pre-scrub exports index, which may hold the plaintext secret scrub rewrote";
|
|
5493
|
+
function scrubbedStateKey(backend, stackName, region) {
|
|
5494
|
+
return `${backend.prefix}/${stackName}/${region}/state.json`;
|
|
5495
|
+
}
|
|
5496
|
+
function scrubbedLegacyStateKey(backend, stackName) {
|
|
5497
|
+
return `${backend.prefix}/${stackName}/state.json`;
|
|
5498
|
+
}
|
|
5499
|
+
function stateHistoryKeys(backend, stackName, region, migrationPending) {
|
|
5500
|
+
return [scrubbedStateKey(backend, stackName, region), ...migrationPending ? [scrubbedLegacyStateKey(backend, stackName)] : []];
|
|
5501
|
+
}
|
|
5502
|
+
function scrubbedExportIndexKey(backend, region) {
|
|
5503
|
+
return `${backend.prefix}/_index/${region}/exports.json`;
|
|
5504
|
+
}
|
|
5505
|
+
function wasRetriedBySdk(err) {
|
|
5506
|
+
let current = err;
|
|
5507
|
+
for (let depth = 0; depth < 8 && typeof current === "object" && current !== null; depth++) {
|
|
5508
|
+
const attempts = current.$metadata?.attempts;
|
|
5509
|
+
if (typeof attempts === "number" && attempts > 1) return true;
|
|
5510
|
+
current = current.cause;
|
|
5511
|
+
}
|
|
5512
|
+
return false;
|
|
5513
|
+
}
|
|
5514
|
+
async function saveScrubbedState(stateBackend, stackName, region, state, loaded) {
|
|
5515
|
+
let mayHaveWritten = false;
|
|
5516
|
+
try {
|
|
5517
|
+
try {
|
|
5518
|
+
await stateBackend.saveState(stackName, region, state, {
|
|
5519
|
+
expectedEtag: loaded.etag,
|
|
5520
|
+
...loaded.migrationPending && { migrateLegacy: true }
|
|
5521
|
+
});
|
|
5522
|
+
} catch (err) {
|
|
5523
|
+
mayHaveWritten = isAmbiguousOutcomeError(err) || wasRetriedBySdk(err);
|
|
5524
|
+
throw err;
|
|
5525
|
+
}
|
|
5526
|
+
mayHaveWritten = true;
|
|
5527
|
+
if (loaded.migrationPending) {
|
|
5528
|
+
const legacyKey = scrubbedLegacyStateKey(stateBackend, stackName);
|
|
5529
|
+
let survives;
|
|
5530
|
+
try {
|
|
5531
|
+
survives = await stateBackend.getRawObject(legacyKey) !== null;
|
|
5532
|
+
} catch (err) {
|
|
5533
|
+
throw new ScrubRefusalError(safeMsg`${displayStackName(stackName)} was rewritten to the region-scoped state key, ` + safeMsg`but whether its legacy key ${legacyKey} still holds the pre-scrub record ` + safeMsg`could not be verified (${err instanceof Error ? err.message : String(err)}). ` + "Check that key yourself and, if it exists, delete it (aws s3api delete-object --bucket <state-bucket> --key <that key>), then purge its earlier versions as docs/cli-scrub.md describes. A re-run will not check it again.", "SCRUB_LEGACY_STATE_KEY_UNVERIFIED");
|
|
5534
|
+
}
|
|
5535
|
+
if (survives) throw new ScrubRefusalError(safeMsg`${displayStackName(stackName)} was rewritten to the region-scoped state key, ` + safeMsg`but its legacy key ${legacyKey} could not be deleted and still holds the ` + "pre-scrub record as its CURRENT object. Delete it (aws s3api delete-object --bucket <state-bucket> --key <that key>), then purge its earlier versions as docs/cli-scrub.md describes.", "SCRUB_LEGACY_STATE_KEY_SURVIVES");
|
|
5536
|
+
}
|
|
5537
|
+
} finally {
|
|
5538
|
+
if (mayHaveWritten) await stateBackend.purgeNoncurrentVersions(stateHistoryKeys(stateBackend, stackName, region, loaded.migrationPending), { objectDescription: SCRUBBED_STATE_OBJECT_DESCRIPTION });
|
|
5539
|
+
}
|
|
5540
|
+
}
|
|
5490
5541
|
const NESTED_STACK_TYPE$1 = "AWS::CloudFormation::Stack";
|
|
5491
5542
|
function readNestedChildTemplate$1(templatePath) {
|
|
5492
5543
|
let template;
|
|
@@ -5586,6 +5637,7 @@ async function repairParentOutputAttributes(parentRow, region, stateBackend, loc
|
|
|
5586
5637
|
return changed > 0 || unmatched.length > 0 ? {
|
|
5587
5638
|
state: loaded.state,
|
|
5588
5639
|
etag: loaded.etag,
|
|
5640
|
+
migrationPending: loaded.migrationPending,
|
|
5589
5641
|
attributes,
|
|
5590
5642
|
changed,
|
|
5591
5643
|
unmatched
|
|
@@ -5603,7 +5655,7 @@ async function repairParentOutputAttributes(parentRow, region, stateBackend, loc
|
|
|
5603
5655
|
if (!locked) return none;
|
|
5604
5656
|
if (locked.changed > 0) {
|
|
5605
5657
|
const row = locked.state.resources[parentRow.logicalId];
|
|
5606
|
-
await stateBackend
|
|
5658
|
+
await saveScrubbedState(stateBackend, parentRow.stackName, region, {
|
|
5607
5659
|
...locked.state,
|
|
5608
5660
|
resources: {
|
|
5609
5661
|
...locked.state.resources,
|
|
@@ -5613,7 +5665,7 @@ async function repairParentOutputAttributes(parentRow, region, stateBackend, loc
|
|
|
5613
5665
|
}
|
|
5614
5666
|
},
|
|
5615
5667
|
lastModified: Date.now()
|
|
5616
|
-
},
|
|
5668
|
+
}, locked);
|
|
5617
5669
|
}
|
|
5618
5670
|
return {
|
|
5619
5671
|
changed: locked.changed,
|
|
@@ -5770,11 +5822,13 @@ async function scrubCommand(stacks, options) {
|
|
|
5770
5822
|
};
|
|
5771
5823
|
const examinedIndexNames = /* @__PURE__ */ new Map();
|
|
5772
5824
|
let totalIndexEntriesConverged = 0;
|
|
5825
|
+
const historyPurgedStacks = /* @__PURE__ */ new Set();
|
|
5773
5826
|
let totalIndexEntriesAbsent = 0;
|
|
5774
5827
|
let totalIndexEntriesAbsentWithSecret = 0;
|
|
5775
5828
|
let totalIndexEntriesUnexamined = 0;
|
|
5776
5829
|
const indexUnwritten = [];
|
|
5777
5830
|
const indexUnreadable = [];
|
|
5831
|
+
const indexRegionsWritten = /* @__PURE__ */ new Set();
|
|
5778
5832
|
const work = targetStacks.map((stack) => ({
|
|
5779
5833
|
stackName: stack.stackName,
|
|
5780
5834
|
region: stack.region || region,
|
|
@@ -5796,6 +5850,7 @@ async function scrubCommand(stacks, options) {
|
|
|
5796
5850
|
scrubbedStack = stack;
|
|
5797
5851
|
scrubbed = await scrubStack(stack, stackRegion, stateBackend, lockManager, {
|
|
5798
5852
|
dryRun: options.dryRun ?? false,
|
|
5853
|
+
purgeHistory: options.purgeHistory ?? false,
|
|
5799
5854
|
roleArn: options.roleArn,
|
|
5800
5855
|
logger,
|
|
5801
5856
|
appStacks: allStacks,
|
|
@@ -5829,7 +5884,10 @@ async function scrubCommand(stacks, options) {
|
|
|
5829
5884
|
let indexConverged = 0;
|
|
5830
5885
|
let indexAbsentWithSecret = 0;
|
|
5831
5886
|
try {
|
|
5832
|
-
const repair = await repairExportIndexForStack(exportIndexFor(stackRegion), stackName, stackRegion, scrubbed.outputs, {
|
|
5887
|
+
const repair = await repairExportIndexForStack(exportIndexFor(stackRegion), stackName, stackRegion, scrubbed.outputs, {
|
|
5888
|
+
dryRun: options.dryRun ?? false,
|
|
5889
|
+
onWriteAttempt: () => indexRegionsWritten.add(stackRegion)
|
|
5890
|
+
});
|
|
5833
5891
|
const seen = examinedIndexNames.get(stackRegion) ?? /* @__PURE__ */ new Set();
|
|
5834
5892
|
for (const name of repair.examined) seen.add(name);
|
|
5835
5893
|
examinedIndexNames.set(stackRegion, seen);
|
|
@@ -5886,6 +5944,7 @@ async function scrubCommand(stacks, options) {
|
|
|
5886
5944
|
if (!failures.some((f) => f.stackName === label)) failures.push({ stackName: label });
|
|
5887
5945
|
logger.error(safeMsg`Scrub of ${displayStackName(item.parentRow.stackName)}'s nested-stack output attributes for ${shownStack} failed: ${describeFailure(err)}`);
|
|
5888
5946
|
}
|
|
5947
|
+
if (scrubbed.historyPurged) historyPurgedStacks.add(stackName);
|
|
5889
5948
|
if (scrubbed.recordsChanged > 0) {
|
|
5890
5949
|
if (!rewrittenStacks.has(stackName)) totalStacksScrubbed++;
|
|
5891
5950
|
rewrittenStacks.add(stackName);
|
|
@@ -5915,6 +5974,11 @@ async function scrubCommand(stacks, options) {
|
|
|
5915
5974
|
logger.warn(`${scrubbed.secretBearingKeys} output KEY(s) in ${shownStack} hold plaintext and CANNOT be scrubbed — rename the Export.Name and redeploy (see the warning above).`);
|
|
5916
5975
|
}
|
|
5917
5976
|
}
|
|
5977
|
+
for (const indexRegion of indexRegionsWritten) await stateBackend.purgeNoncurrentVersions([scrubbedExportIndexKey(stateBackend, indexRegion)], { objectDescription: SCRUBBED_EXPORT_INDEX_OBJECT_DESCRIPTION });
|
|
5978
|
+
const historyNote = () => {
|
|
5979
|
+
const purgedOnly = [...historyPurgedStacks].filter((n) => !rewrittenStacks.has(n)).length;
|
|
5980
|
+
return purgedOnly > 0 ? ` --purge-history: on a VERSIONED state bucket, the earlier state.json versions of ${purgedOnly} examined record(s) scrub did not rewrite were purged too, unless a warning above says otherwise.` : "";
|
|
5981
|
+
};
|
|
5918
5982
|
for (const [indexRegion, store] of exportIndexStores) {
|
|
5919
5983
|
if (indexUnreadable.some((u) => u.region === indexRegion)) continue;
|
|
5920
5984
|
let entries;
|
|
@@ -5938,10 +6002,10 @@ async function scrubCommand(stacks, options) {
|
|
|
5938
6002
|
}
|
|
5939
6003
|
if (totalStacksScrubbed === 0 && totalStacksWithUnscrubbableKeys === 0 && totalStacksWithUnverifiableReads === 0 && totalStacksWithUnverifiableLeaves === 0 && totalStacksWithUnrepairedReadNames === 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) {
|
|
5940
6004
|
if (failures.length === 0) {
|
|
5941
|
-
logger.info(
|
|
6005
|
+
logger.info(safeMsg`\nNo plaintext secrets found in any target stack state. Nothing to scrub.${historyNote()}`);
|
|
5942
6006
|
return;
|
|
5943
6007
|
}
|
|
5944
|
-
logger.info(`\nNo plaintext secrets found in the ${work.length - failures.length} stack(s) this run could examine. ${failures.length} stack(s) could NOT be scrubbed — see the errors above
|
|
6008
|
+
logger.info(`\nNo plaintext secrets found in the ${work.length - failures.length} stack(s) this run could examine. ${failures.length} stack(s) could NOT be scrubbed — see the errors above.${historyNote()}`);
|
|
5945
6009
|
throw scrubStacksFailedError(failures);
|
|
5946
6010
|
}
|
|
5947
6011
|
const failureNote = failures.length > 0 ? ` ${failures.length} stack(s) could NOT be scrubbed at all and are NOT covered by this summary — see the errors above.` : "";
|
|
@@ -5953,7 +6017,7 @@ async function scrubCommand(stacks, options) {
|
|
|
5953
6017
|
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.` : "";
|
|
5954
6018
|
const indexNote = (() => {
|
|
5955
6019
|
const parts = [];
|
|
5956
|
-
if (totalIndexEntriesConverged > 0) parts.push(options.dryRun ? ` ${totalIndexEntriesConverged} exports index entr${totalIndexEntriesConverged === 1 ? "y" : "ies"} differ from the producer's scrubbed state.outputs and would be converged to it (--dry-run, nothing written).` : ` ${totalIndexEntriesConverged} exports index entr${totalIndexEntriesConverged === 1 ? "y" : "ies"} converged to the producer's state.outputs value
|
|
6020
|
+
if (totalIndexEntriesConverged > 0) parts.push(options.dryRun ? ` ${totalIndexEntriesConverged} exports index entr${totalIndexEntriesConverged === 1 ? "y" : "ies"} differ from the producer's scrubbed state.outputs and would be converged to it (--dry-run, nothing written).` : ` ${totalIndexEntriesConverged} exports index entr${totalIndexEntriesConverged === 1 ? "y" : "ies"} converged to the producer's state.outputs value, and on a VERSIONED bucket the index's earlier versions were purged, unless a warning above says otherwise.`);
|
|
5957
6021
|
if (totalIndexEntriesAbsent > 0) parts.push(` ${totalIndexEntriesAbsent} exports index entr${totalIndexEntriesAbsent === 1 ? "y is" : "ies are"} published by a scrubbed stack under a name its state.outputs does not carry; nothing was written for ${totalIndexEntriesAbsent === 1 ? "it" : "them"} — redeploy that producer.`);
|
|
5958
6022
|
if (totalIndexEntriesAbsentWithSecret > 0) parts.push(` ${totalIndexEntriesAbsentWithSecret === 1 ? "One such entry still holds" : `${totalIndexEntriesAbsentWithSecret} such entries still hold`} a secret this run recorded — see the warnings above.`);
|
|
5959
6023
|
if (totalIndexEntriesUnexamined > 0) parts.push(` ${totalIndexEntriesUnexamined} exports index entr${totalIndexEntriesUnexamined === 1 ? "y" : "ies"} belong to producers outside this run and were NOT examined.`);
|
|
@@ -5970,8 +6034,8 @@ async function scrubCommand(stacks, options) {
|
|
|
5970
6034
|
if (options.fail) throw new ScrubNeededError();
|
|
5971
6035
|
return;
|
|
5972
6036
|
}
|
|
5973
|
-
if (totalStacksScrubbed > 0) logger.info(`\nDone: scrubbed ${totalStacksScrubbed} stack(s). The
|
|
5974
|
-
else logger.info(`\nNo state record was rewritten.${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
|
|
6037
|
+
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}`);
|
|
6038
|
+
else logger.info(`\nNo state record was rewritten.${historyNote()}${keyNote}${unverifiableNote}${readNameNote}${outputKeyNote}${parentAttributeNote}${leafNote}${indexNote}${failureNote} ROTATE any exposed secret.`);
|
|
5975
6039
|
if (failures.length > 0) throw scrubStacksFailedError(failures);
|
|
5976
6040
|
if (indexUnwritten.length > 0 || indexUnreadable.length > 0) throw exportIndexIncompleteError(indexUnwritten, indexUnreadable, false);
|
|
5977
6041
|
if (malformedRecords.length > 0 || malformedOutputRecords.length > 0 || malformedOrphanRecords.length > 0) throw malformedRecordsAuditedError(malformedRecords, malformedOutputRecords, malformedOrphanRecords);
|
|
@@ -6947,6 +7011,11 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
6947
7011
|
if (unverifiableLeaves > 0) logger.warn(abandonedScanStackNote("count", unverifiableLeaves));
|
|
6948
7012
|
if (ungateableAbandonedScans > 0) logger.warn(abandonedScanStackNote("warn", ungateableAbandonedScans));
|
|
6949
7013
|
};
|
|
7014
|
+
const purgeExaminedHistory = async (migrationPending) => {
|
|
7015
|
+
if (opts.dryRun || !opts.purgeHistory) return {};
|
|
7016
|
+
await stateBackend.purgeNoncurrentVersions(stateHistoryKeys(stateBackend, stack.stackName, region, migrationPending), { objectDescription: SCRUBBED_STATE_OBJECT_DESCRIPTION });
|
|
7017
|
+
return { historyPurged: true };
|
|
7018
|
+
};
|
|
6950
7019
|
try {
|
|
6951
7020
|
const loaded = await stateBackend.getState(stack.stackName, region);
|
|
6952
7021
|
if (!loaded) {
|
|
@@ -7326,6 +7395,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
7326
7395
|
if (totalSecrets === 0) {
|
|
7327
7396
|
emitAbandonedScanNotes();
|
|
7328
7397
|
return {
|
|
7398
|
+
...await purgeExaminedHistory(loaded.migrationPending),
|
|
7329
7399
|
recordsChanged: 0,
|
|
7330
7400
|
secretsFound: 0,
|
|
7331
7401
|
secretBearingKeys: secretBearingKeys.length,
|
|
@@ -7483,9 +7553,10 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
7483
7553
|
...newExportNames !== state.exportNames && { exportNames: newExportNames },
|
|
7484
7554
|
lastModified: Date.now()
|
|
7485
7555
|
};
|
|
7486
|
-
await stateBackend
|
|
7556
|
+
await saveScrubbedState(stateBackend, stack.stackName, region, nextState, loaded);
|
|
7487
7557
|
}
|
|
7488
7558
|
return {
|
|
7559
|
+
...recordsChanged > 0 ? {} : await purgeExaminedHistory(loaded.migrationPending),
|
|
7489
7560
|
recordsChanged,
|
|
7490
7561
|
secretsFound: totalSecrets,
|
|
7491
7562
|
secretBearingKeys: secretBearingKeys.length,
|
|
@@ -7520,7 +7591,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
7520
7591
|
}
|
|
7521
7592
|
}
|
|
7522
7593
|
function createScrubCommand() {
|
|
7523
|
-
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").option("--fail", "With --dry-run, exit non-zero if any plaintext secret is found (CI gate). Also exits non-zero on a real run when a leak was found that scrub cannot rewrite.");
|
|
7594
|
+
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 any plaintext secret is found (CI gate). Also exits non-zero on a real run when a leak was found that scrub cannot rewrite.");
|
|
7524
7595
|
[
|
|
7525
7596
|
...commonOptions,
|
|
7526
7597
|
...appOptions,
|
|
@@ -11095,6 +11166,75 @@ function createDestroyCommand() {
|
|
|
11095
11166
|
return cmd;
|
|
11096
11167
|
}
|
|
11097
11168
|
|
|
11169
|
+
//#endregion
|
|
11170
|
+
//#region src/deployment/public-ssm-proof.ts
|
|
11171
|
+
var PublicSsmProver = class {
|
|
11172
|
+
resolver;
|
|
11173
|
+
verdicts = /* @__PURE__ */ new Map();
|
|
11174
|
+
region;
|
|
11175
|
+
loadEvidence;
|
|
11176
|
+
evidence;
|
|
11177
|
+
logger;
|
|
11178
|
+
constructor(region, loadEvidence, logger) {
|
|
11179
|
+
this.region = region;
|
|
11180
|
+
this.loadEvidence = loadEvidence;
|
|
11181
|
+
this.logger = logger;
|
|
11182
|
+
}
|
|
11183
|
+
async proofBagFor(source) {
|
|
11184
|
+
const bag = /* @__PURE__ */ new Map();
|
|
11185
|
+
for (const token of mixedLeafSsmTokens(source)) {
|
|
11186
|
+
const value = await this.publicValue(token);
|
|
11187
|
+
if (value !== void 0) recordProvenPublicExpression(bag, token, value);
|
|
11188
|
+
}
|
|
11189
|
+
return bag;
|
|
11190
|
+
}
|
|
11191
|
+
publicValue(token) {
|
|
11192
|
+
let verdict = this.verdicts.get(token);
|
|
11193
|
+
if (!verdict) {
|
|
11194
|
+
verdict = this.lookUp(token);
|
|
11195
|
+
this.verdicts.set(token, verdict);
|
|
11196
|
+
}
|
|
11197
|
+
return verdict;
|
|
11198
|
+
}
|
|
11199
|
+
async lookUp(token) {
|
|
11200
|
+
let regions = [];
|
|
11201
|
+
if (regionLessSecretName(token) !== void 0) {
|
|
11202
|
+
this.evidence ??= this.loadEvidence().catch(() => ({
|
|
11203
|
+
regions: [],
|
|
11204
|
+
complete: false
|
|
11205
|
+
}));
|
|
11206
|
+
const evidence = await this.evidence;
|
|
11207
|
+
if (!evidence.complete) return void 0;
|
|
11208
|
+
regions = evidence.regions;
|
|
11209
|
+
}
|
|
11210
|
+
if (classifyReplaySecretRegion(token, this.region, regions).kind !== "local") return;
|
|
11211
|
+
this.resolver ??= new IntrinsicFunctionResolver(this.region);
|
|
11212
|
+
const probe = /* @__PURE__ */ new Map();
|
|
11213
|
+
const context = {
|
|
11214
|
+
template: { Resources: {} },
|
|
11215
|
+
resources: {},
|
|
11216
|
+
recordedSecretValues: probe,
|
|
11217
|
+
skipDynamicReferences: true
|
|
11218
|
+
};
|
|
11219
|
+
try {
|
|
11220
|
+
await this.resolver.resolveDynamicReferences(token, context);
|
|
11221
|
+
} catch (err) {
|
|
11222
|
+
const name = err instanceof Error ? err.name : typeof err;
|
|
11223
|
+
this.logger.debug(safeMsg`Could not prove an ssm dynamic reference public (${name}); a leaf embedding it ` + `keeps its {{resolve:...}} expression in observedProperties.`);
|
|
11224
|
+
return;
|
|
11225
|
+
}
|
|
11226
|
+
return provenPublicValue(probe, token);
|
|
11227
|
+
}
|
|
11228
|
+
};
|
|
11229
|
+
function mixedLeafSsmTokens(source) {
|
|
11230
|
+
const tokens = /* @__PURE__ */ new Set();
|
|
11231
|
+
for (const leaf of wholeStringLeavesOf(source)) {
|
|
11232
|
+
if (isSingleDynamicReferenceToken(leaf)) continue;
|
|
11233
|
+
for (const token of dynamicReferenceTokens(leaf)) if (token.startsWith("{{resolve:ssm:")) tokens.add(token);
|
|
11234
|
+
}
|
|
11235
|
+
return tokens;
|
|
11236
|
+
}
|
|
11237
|
+
|
|
11098
11238
|
//#endregion
|
|
11099
11239
|
//#region src/cli/commands/state-migrate.ts
|
|
11100
11240
|
async function stateMigrateCommand(options) {
|
|
@@ -15422,7 +15562,6 @@ async function stateRefreshObservedCommand(stackArgs, options) {
|
|
|
15422
15562
|
setup.dispose();
|
|
15423
15563
|
}
|
|
15424
15564
|
}
|
|
15425
|
-
const NO_RECORDED_SECRETS$1 = /* @__PURE__ */ new Map();
|
|
15426
15565
|
async function warnOnLiveForeignLock(lockManager, stackName, region, logger) {
|
|
15427
15566
|
try {
|
|
15428
15567
|
const info = await lockManager.getLockInfo(stackName, region);
|
|
@@ -15509,6 +15648,7 @@ async function refreshObservedForStack(stackName, region, stateBackend, lockMana
|
|
|
15509
15648
|
let notFound = 0;
|
|
15510
15649
|
let refusedBaseline = 0;
|
|
15511
15650
|
let refusedSticky = 0;
|
|
15651
|
+
const publicSsmProver = new PublicSsmProver(region, () => driftProducerRegionEvidence(state, stackName, region, stateBackend), logger);
|
|
15512
15652
|
await withStackName(stackName, async () => {
|
|
15513
15653
|
const tasks = entries.map(async ([logicalId, resource]) => {
|
|
15514
15654
|
if (resource.observedBaselineRefused === true) {
|
|
@@ -15545,7 +15685,7 @@ async function refreshObservedForStack(stackName, region, stateBackend, lockMana
|
|
|
15545
15685
|
logger.warn(safeMsg` ✗ ${displayStackName(stackName)}/${displayIdent(logicalId)} ` + safeMsg`(${displayIdent(resource.resourceType)}): ` + `not found in AWS — it was deleted outside cdkd; 'cdkd drift' reports it as deleted.`);
|
|
15546
15686
|
return;
|
|
15547
15687
|
}
|
|
15548
|
-
resource.observedProperties = redactSecretsForState(observed,
|
|
15688
|
+
resource.observedProperties = redactSecretsForState(observed, await publicSsmProver.proofBagFor(resource.properties ?? {}), resource.properties ?? {}, STATE_SOURCED_BASELINE_RULES);
|
|
15549
15689
|
refreshed++;
|
|
15550
15690
|
} catch (err) {
|
|
15551
15691
|
failed++;
|
|
@@ -26145,4 +26285,4 @@ function collectVerbFlags(program) {
|
|
|
26145
26285
|
|
|
26146
26286
|
//#endregion
|
|
26147
26287
|
export { canonicalizeIpProtocolValue as a, buildProgram, resolveSecretDerivedPrincipals as i, runDestroyForStack as n, resolvedResourceTimeoutMs as o, isResolvableSecretPrincipalList as r, canonicalizeIpv4Cidr as t };
|
|
26148
|
-
//# sourceMappingURL=program-
|
|
26288
|
+
//# sourceMappingURL=program-Cbxe8TgI.js.map
|