@go-to-k/cdkd 0.291.24 → 0.291.25
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-CXNAEgyw.js → asg-provider-B32vpt_E.js} +2 -2
- package/dist/{asg-provider-CXNAEgyw.js.map → asg-provider-B32vpt_E.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-Czuf7jgT.js → deploy-engine-JdJuqXID.js} +3 -3
- package/dist/{deploy-engine-Czuf7jgT.js.map → deploy-engine-JdJuqXID.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/{program-CQ_Y14q1.js → program-DGa6mbzV.js} +103 -88
- package/dist/{program-CQ_Y14q1.js.map → program-DGa6mbzV.js.map} +1 -1
- package/dist/{version-BI33Emlj.js → version-BuS5njuZ.js} +2 -2
- package/dist/{version-BI33Emlj.js.map → version-BuS5njuZ.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as yellow, $i as synthesisStatusMessage, $n as refuseMalformedOrphanRecordsForDestroy, $r as forceQuitRecoveryClause, $t as configIntegerRefusal, A as createPreDeleteFinalSnapshot, Aa as credentialFingerprint, Ai as validateContainerRepoName, An as hasReadableOutputs, Ao as retryClassificationText, Ar as TEMPLATE_SOURCED_RULES, At as deleteSkipReason, B as isStatefulRecreateTargetSync, Ba as absoluteAssemblyPathEscape, Bi as getDockerCmd, Bn as malformedOrphansRefusalMessage, Br as maskSecretsInText, Bt as isImpossibleEmptyStoredAttribute, C as namesAnyDeclaredParameter, Ca as expectedOwnerParam, Ci as assertAssetBucketRegion, Cn as STATE_REGION_DIVERGED, Co as shellQuote, Cr as describeTypeWithThrottleRetry, Ct as compositeIdSkipResult, D as PRE_DELETE_SNAPSHOT_TYPES, Da as ambientClientDefaults, Di as parseBootstrapMarker, Dn as deployRefusesOrphanRowsReason, Do as isTransientServerError, Dr as STATE_SOURCED_BASELINE_RULES, Dt as maskerOrIdentity, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ea as derivePartitionAndUrlSuffix, Ei as isCrossRegionRedirect, En as UNREADABLE_RESOURCES_MAP_ROW, Eo as isThrottlingError, Er as TemplateParser, Et as maskDeep, F as extractDeploymentEventError, Fa as defineOwnKey, Fi as describeDockerExecFailure, Fn as malformedExportSourceWarning, Fr as identityKeyFor, Ft as carriesDynamicReference, G as toCfnInteger, Ga as resolveBucketRegion, Gi as runDockerForeground, Gn as malformedResourceEntriesWarning, Gr as redactSecretsForState, Gt as isSettledInstanceState, H as WARM_THROUGHPUT_MEMBERS, Ha as renderAssemblyPathEscape, Hi as isMalformedEnvKey, Hn as malformedOutputsRefusalMessage, Hr as recordMaskOnlyValue, Ht as isUnboundTemplateParameter, I as makeSiblingClaimReader, Ia as hasOwnKey, Ii as describeDockerFailure, In as malformedLocalOutputsWarning, Ir as isSingleDynamicReferenceToken, It as carriesFetchableDynamicReference, J as bold, Ja as resetAwsClients, Ji as escapeRegExp, Jn as malformedStateRefusalMessage, Jr as S3StateBackend, Jt as resolveExplicitPhysicalId, K as toFiniteNumber, Ka as AwsClients, Ki as runDockerStreaming, Kn as malformedResourcePropertiesWarning, Kr as scrubResourceRecord, Kt as WAFv2WebACLProvider, L as planOrphanAdoption, La as hasPlainPrototype, Li as dockerSpawnEnvWithSensitive, Ln as malformedOrphanRecordsRefusalMessage, Lr as isUncertifiedBaselineMaskPosition, Lt as cfnRefValueFromPhysicalId, M as refusesFinalSnapshot, Ma as failedStageNote, Mi as buildDockerImage, Mn as isReadableOrphanRecord, Mo as safeStringify, Mr as createSecretMasker, Mt as disableInstanceApiTermination, N as unsupportedFinalSnapshotError, Na as globMatches, Ni as resolveDockerContextDirectory, Nn as isReadableResourceEntry, Nr as dynamicReferenceTokens, Nt as isTerminationProtectionPropagationError, O as buildFinalSnapshotIdentifier, Oa as ambientCredentialConfig, Oi as readBootstrapMarkerBody, On as displayLogicalId, Oo as markNonRetryable, Or as STATE_SOURCED_CROSS_GENERATION_RULES, Ot as UNSPECIFIED_SKIP_REASON, P as makeCanonicalizePropertiesFn, Pa as processStackMessages, Pi as describeDockerCapturedOutput, Pn as malformedExportNamesWarning, Pr as errorCauseChain, Pt as IntrinsicFunctionResolver, Q as red, Qa as CdkdError, Qi as Synthesizer, Qn as refuseMalformedOrphanRecords, Qr as buildLockContentionMessage, Qt as configBooleanRefusal, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as nullPrototypeRecord, Ri as finchSecretArgvRefusal, Rn as malformedOrphanRecordsWarning, Rr as markSameGenerationBag, Rt as coerceParameterTypedValue, S as computeParameterTaint, Sa as decodeListingKey, Si as BOOTSTRAP_MARKER_PREFIX, Sn as INTRINSIC_KEYS, So as pasteableCommand, Sr as findSilentDropProperties, St as compositeIdSeparatorRefusal, T as resourcesNamingDeclaredParameter, Ta as canonicalizeRegion, Ti as getBootstrapMarkerKey, Tn as UNREADABLE_ORPHANS_CONTAINER_ROW, To as isRetryableTransientError, Tr as DagBuilder, Tt as createMaskedRetryLogger, U as coerceWarmThroughput$1, Ua as resolveAssemblyPath, Ui as partitionSensitiveEnv, Un as malformedOutputsWarning, Ur as recordMaskOnlyValuesIn, Ut as parameterTypeMayLoseSecretIdentity, V as renderStatefulReason, Va as displayAssemblyPath, Vi as isDockerClientEnvKey, Vn as malformedOrphansWarning, Vr as pathCrossesDottedKey, Vt as isNamelessDynamicReferenceError, W as isWarmThroughputDecrease, Wi as redactDockerArgvValues, Wn as malformedRenderedContainersWarning, Wr as recoverMaskedOutput, Wt as refStateLookupFromResource, X as gray, Xa as setAwsClients, Xi as AssetManifestLoader, Xn as refuseDivergentRecordRegionForDestroy, Xr as UNREPRODUCIBLE_LOCK_CLAUSE, Xt as coerceCfnBoolean, Y as cyan, Ya as runWithStackAwsClients, Yi as stripControlChars, Yn as previewableOrphanRecords, Yr as rebuildClientForBucketRegion, Yt as assertRegionMatch, Z as green, Zi as getDockerImageBySourceHash, Zn as refuseMalformedNestedChildOutputs, Zr as buildForceUnlockCommand, Zt as coerceCfnInteger, _ as bagHoldsSecretExpression, _a as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, _i as buildAssetRedirectMap, _n as AWS_CREDENTIAL_ENV_KEYS, _o as SynthesisError, _r as safeRegion, _t as startInterruptWatch, a as DeploymentEventsStore, aa as resolveSkipPrefix, ai as hasReadableExportSet, an as requireConfigString, ao as LocalInvokeBuildError$1, ar as refuseMalformedResourceAttributesForOrphan, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as producerCoordinateKey, bi as rewriteTemplateAssetReferences, bn as envCredentialsAreAssumedRole, bo as normalizeAwsError, br as unreadableOrphanRecords, bt as ccProtectionRegistryTypes, c as replayFailedOperations, ca as resolveUseCdkBootstrapAssets, ci as importableOutputKeys, cn as classifyReplaySecretRegion, co as MalformedProducerRecordRefusalError, cr as refuseMalformedResourcePropertiesForOrphan, ct as IAMRoleProvider, d as updatePartialMessage, da as ssmResolvedValueType, di as orphansAfterRollback, dn as s3BucketArn, do as ProvisioningError, dr as repairMalformedOrphanRecordsForReadOnly, dt as ProviderRegistry, ea as getDefaultStateBucketName, ei as formatLockExpiry, en as configStringRefusal, eo as CrossAccountSecretRefusalError, er as refuseMalformedOrphans, et as collectDeclaredOutputNames, f as updatePartialReason, fa as CFN_TEMPLATE_BODY_LIMIT, fi as orphansCarriedFrom, fn as s3BucketDomainName, fo as ResourceTimeoutError, fr as repairMalformedOrphansForReadOnly, ft as wouldReturnToSdkProvider, g as computeImplicitDeleteEdges, ga as uploadCfnTemplate, gi as WorkGraph, gn as applyRoleArnIfSet, gr as repairMalformedResourcesForReadOnly, gt as isInterruptedWaitError, h as IMPLICIT_DELETE_DEPENDENCIES, ha as findLargeInlineResources, hi as stringifyValue, hn as s3BucketWebsiteUrl, ho as StackTerminationProtectionError, hr as repairMalformedResourcePropertiesForReadOnly, ht as interruptWatchListenerCount, i as DeploymentEventsReader, ia as resolveCaptureObservedState, ii as exportNamesCarriedFrom, in as requireConfigObject, io as IntrinsicResolutionRefusalError, ir as refuseMalformedOutputsForDestroy, it as secretBearing, j as isFinalSnapshotError, ja as AssemblyReader, ji as buildDenyExternalAccessPolicy, jn as hasReadableResources, jo as describeAwsFailure, jr as carriesSecretMask, jt as isWaitAbandonedError, k as ccRoutedFinalSnapshotError, ka as clientDefaultsFor, ki as validateAssetBucketName, kn as hasReadableOrphans, ko as markRedactedCause, kr as STATE_SOURCED_READBACK_RULES, kt as deleteIndeterminateGuards, l as replayRollback, la as stateBucketExistenceConfirmed, li as importableOutputs, ln as producerRegionsFromState, lo as NestedStackChildDirectDestroyError, lr as refuseMalformedResourcesForDestroy, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, ma as MIGRATE_TMP_PREFIX, mi as AssetPublisher, mn as s3BucketRegionalDomainName, mo as StackHasActiveImportsError, mr as repairMalformedResourceEntriesForReadOnly, mt as endCommandInterruptScope, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as resolveApp, ni as DEFAULT_STATE_PREFIX, nn as replayWarn, no as DeployCancelledError, nr as refuseMalformedOrphansForOrphan, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as resolveStateBucketWithDefault, oi as hasReasonlessBaselineRefusal, on as definedAttributes, oo as LocalStartServiceError, or as refuseMalformedResourceEntries, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as CFN_TEMPLATE_URL_LIMIT, pi as shouldRetainResource, pn as s3BucketDualStackDomainName, po as ResourceUpdateNotSupportedError, pr as repairMalformedOutputsForReadOnly, pt as beginCommandInterruptScope, q as formatResourceLine, qa as getAwsClients, qi as warnFinchArgvExposure, qn as malformedResourcesWarning, qr as LockManager, qt as normalizeAwsTagsToCfn, r as DeployEngine, ra as resolveAutoAssetStorage, ri as describeRegionValueKind, rn as requireConfigArray, ro as DynamicReferenceRegionAmbiguousError, rr as refuseMalformedOutputs, rt as isExportAliasCollision, s as planRollback, sa as resolveStateBucketWithDefaultAndSource, si as hasUnverifiableParameterRefusal, sn as stringifyIfAssigned, sr as refuseMalformedResourceEntriesForOrphan, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as getLegacyStateBucketName, ti as CUSTOM_RESOURCE_RESPONSE_PREFIX, tn as readConfigString, tr as refuseMalformedOrphansForDestroy, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as warnDeprecatedNoPrefixCliFlag, ui as isReadableBag, un as withSharedDrainBudget, uo as PartialFailureError, ur as refuseMalformedState, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as injectiveKey, vi as createAssetRedirectResolver, vn as applyCallerIdentityCredentials, vr as safeStackName, vt as CloudControlProvider, w as reachableDivergentParameters, wa as PARTITION_TABLE, wi as ensureAssetStorage, wn as STATE_RESOURCES_MALFORMED, wo as isMarkedNonRetryable, wr as withRetry, wt as packCompositeId, x as bindingSkippedOutputs, xa as producerRecordKey, xi as AssetModeResolver, xn as DiffCalculator, xo as withErrorHandling, xr as findActionableSilentDrops, xt as compositeIdFormatMessage, y as keptWholeReasonText, ya as injectiveKeyPrefix, yi as loadPublishableAssetManifest, yn as callerEnvCredentials, yr as unpreviewableOrphanRecords, yt as slowCcOperationTimeoutMs, z as isStatefulRecreateTargetForReplace, za as ownValue, zi as formatDockerLoginError, zn as malformedOrphanRowsKeptWarning, zr as maskSecretsInError, zt as getAccountInfo } from "./deploy-engine-Czuf7jgT.js";
|
|
1
|
+
import { $ as yellow, $i as synthesisStatusMessage, $n as refuseMalformedOrphanRecordsForDestroy, $r as forceQuitRecoveryClause, $t as configIntegerRefusal, A as createPreDeleteFinalSnapshot, Aa as credentialFingerprint, Ai as validateContainerRepoName, An as hasReadableOutputs, Ao as retryClassificationText, Ar as TEMPLATE_SOURCED_RULES, At as deleteSkipReason, B as isStatefulRecreateTargetSync, Ba as absoluteAssemblyPathEscape, Bi as getDockerCmd, Bn as malformedOrphansRefusalMessage, Br as maskSecretsInText, Bt as isImpossibleEmptyStoredAttribute, C as namesAnyDeclaredParameter, Ca as expectedOwnerParam, Ci as assertAssetBucketRegion, Cn as STATE_REGION_DIVERGED, Co as shellQuote, Cr as describeTypeWithThrottleRetry, Ct as compositeIdSkipResult, D as PRE_DELETE_SNAPSHOT_TYPES, Da as ambientClientDefaults, Di as parseBootstrapMarker, Dn as deployRefusesOrphanRowsReason, Do as isTransientServerError, Dr as STATE_SOURCED_BASELINE_RULES, Dt as maskerOrIdentity, E as ATOMIC_FINAL_SNAPSHOT_TYPES, Ea as derivePartitionAndUrlSuffix, Ei as isCrossRegionRedirect, En as UNREADABLE_RESOURCES_MAP_ROW, Eo as isThrottlingError, Er as TemplateParser, Et as maskDeep, F as extractDeploymentEventError, Fa as defineOwnKey, Fi as describeDockerExecFailure, Fn as malformedExportSourceWarning, Fr as identityKeyFor, Ft as carriesDynamicReference, G as toCfnInteger, Ga as resolveBucketRegion, Gi as runDockerForeground, Gn as malformedResourceEntriesWarning, Gr as redactSecretsForState, Gt as isSettledInstanceState, H as WARM_THROUGHPUT_MEMBERS, Ha as renderAssemblyPathEscape, Hi as isMalformedEnvKey, Hn as malformedOutputsRefusalMessage, Hr as recordMaskOnlyValue, Ht as isUnboundTemplateParameter, I as makeSiblingClaimReader, Ia as hasOwnKey, Ii as describeDockerFailure, In as malformedLocalOutputsWarning, Ir as isSingleDynamicReferenceToken, It as carriesFetchableDynamicReference, J as bold, Ja as resetAwsClients, Ji as escapeRegExp, Jn as malformedStateRefusalMessage, Jr as S3StateBackend, Jt as resolveExplicitPhysicalId, K as toFiniteNumber, Ka as AwsClients, Ki as runDockerStreaming, Kn as malformedResourcePropertiesWarning, Kr as scrubResourceRecord, Kt as WAFv2WebACLProvider, L as planOrphanAdoption, La as hasPlainPrototype, Li as dockerSpawnEnvWithSensitive, Ln as malformedOrphanRecordsRefusalMessage, Lr as isUncertifiedBaselineMaskPosition, Lt as cfnRefValueFromPhysicalId, M as refusesFinalSnapshot, Ma as failedStageNote, Mi as buildDockerImage, Mn as isReadableOrphanRecord, Mo as safeStringify, Mr as createSecretMasker, Mt as disableInstanceApiTermination, N as unsupportedFinalSnapshotError, Na as globMatches, Ni as resolveDockerContextDirectory, Nn as isReadableResourceEntry, Nr as dynamicReferenceTokens, Nt as isTerminationProtectionPropagationError, O as buildFinalSnapshotIdentifier, Oa as ambientCredentialConfig, Oi as readBootstrapMarkerBody, On as displayLogicalId, Oo as markNonRetryable, Or as STATE_SOURCED_CROSS_GENERATION_RULES, Ot as UNSPECIFIED_SKIP_REASON, P as makeCanonicalizePropertiesFn, Pa as processStackMessages, Pi as describeDockerCapturedOutput, Pn as malformedExportNamesWarning, Pr as errorCauseChain, Pt as IntrinsicFunctionResolver, Q as red, Qa as CdkdError, Qi as Synthesizer, Qn as refuseMalformedOrphanRecords, Qr as buildLockContentionMessage, Qt as configBooleanRefusal, R as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ra as nullPrototypeRecord, Ri as finchSecretArgvRefusal, Rn as malformedOrphanRecordsWarning, Rr as markSameGenerationBag, Rt as coerceParameterTypedValue, S as computeParameterTaint, Sa as decodeListingKey, Si as BOOTSTRAP_MARKER_PREFIX, Sn as INTRINSIC_KEYS, So as pasteableCommand, Sr as findSilentDropProperties, St as compositeIdSeparatorRefusal, T as resourcesNamingDeclaredParameter, Ta as canonicalizeRegion, Ti as getBootstrapMarkerKey, Tn as UNREADABLE_ORPHANS_CONTAINER_ROW, To as isRetryableTransientError, Tr as DagBuilder, Tt as createMaskedRetryLogger, U as coerceWarmThroughput$1, Ua as resolveAssemblyPath, Ui as partitionSensitiveEnv, Un as malformedOutputsWarning, Ur as recordMaskOnlyValuesIn, Ut as parameterTypeMayLoseSecretIdentity, V as renderStatefulReason, Va as displayAssemblyPath, Vi as isDockerClientEnvKey, Vn as malformedOrphansWarning, Vr as pathCrossesDottedKey, Vt as isNamelessDynamicReferenceError, W as isWarmThroughputDecrease, Wi as redactDockerArgvValues, Wn as malformedRenderedContainersWarning, Wr as recoverMaskedOutput, Wt as refStateLookupFromResource, X as gray, Xa as setAwsClients, Xi as AssetManifestLoader, Xn as refuseDivergentRecordRegionForDestroy, Xr as UNREPRODUCIBLE_LOCK_CLAUSE, Xt as coerceCfnBoolean, Y as cyan, Ya as runWithStackAwsClients, Yi as stripControlChars, Yn as previewableOrphanRecords, Yr as rebuildClientForBucketRegion, Yt as assertRegionMatch, Z as green, Zi as getDockerImageBySourceHash, Zn as refuseMalformedNestedChildOutputs, Zr as buildForceUnlockCommand, Zt as coerceCfnInteger, _ as bagHoldsSecretExpression, _a as CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION, _i as buildAssetRedirectMap, _n as AWS_CREDENTIAL_ENV_KEYS, _o as SynthesisError, _r as safeRegion, _t as startInterruptWatch, a as DeploymentEventsStore, aa as resolveSkipPrefix, ai as hasReadableExportSet, an as requireConfigString, ao as LocalInvokeBuildError$1, ar as refuseMalformedResourceAttributesForOrphan, at as secretBearingStateKeyWarning, b as mergeNoChangeOutputs, ba as producerCoordinateKey, bi as rewriteTemplateAssetReferences, bn as envCredentialsAreAssumedRole, bo as normalizeAwsError, br as unreadableOrphanRecords, bt as ccProtectionRegistryTypes, c as replayFailedOperations, ca as resolveUseCdkBootstrapAssets, ci as importableOutputKeys, cn as classifyReplaySecretRegion, co as MalformedProducerRecordRefusalError, cr as refuseMalformedResourcePropertiesForOrphan, ct as IAMRoleProvider, d as updatePartialMessage, da as ssmResolvedValueType, di as orphansAfterRollback, dn as s3BucketArn, do as ProvisioningError, dr as repairMalformedOrphanRecordsForReadOnly, dt as ProviderRegistry, ea as getDefaultStateBucketName, ei as formatLockExpiry, en as configStringRefusal, eo as CrossAccountSecretRefusalError, er as refuseMalformedOrphans, et as collectDeclaredOutputNames, f as updatePartialReason, fa as CFN_TEMPLATE_BODY_LIMIT, fi as orphansCarriedFrom, fn as s3BucketDomainName, fo as ResourceTimeoutError, fr as repairMalformedOrphansForReadOnly, ft as wouldReturnToSdkProvider, g as computeImplicitDeleteEdges, ga as uploadCfnTemplate, gi as WorkGraph, gn as applyRoleArnIfSet, gr as repairMalformedResourcesForReadOnly, gt as isInterruptedWaitError, h as IMPLICIT_DELETE_DEPENDENCIES, ha as findLargeInlineResources, hi as stringifyValue, hn as s3BucketWebsiteUrl, ho as StackTerminationProtectionError, hr as repairMalformedResourcePropertiesForReadOnly, ht as interruptWatchListenerCount, i as DeploymentEventsReader, ia as resolveCaptureObservedState, ii as exportNamesCarriedFrom, in as requireConfigObject, io as IntrinsicResolutionRefusalError, ir as refuseMalformedOutputsForDestroy, it as secretBearing, j as isFinalSnapshotError, ja as AssemblyReader, ji as buildDenyExternalAccessPolicy, jn as hasReadableResources, jo as describeAwsFailure, jr as carriesSecretMask, jt as isWaitAbandonedError, k as ccRoutedFinalSnapshotError, ka as clientDefaultsFor, ki as validateAssetBucketName, kn as hasReadableOrphans, ko as markRedactedCause, kr as STATE_SOURCED_READBACK_RULES, kt as deleteIndeterminateGuards, l as replayRollback, la as stateBucketExistenceConfirmed, li as importableOutputs, ln as producerRegionsFromState, lo as NestedStackChildDirectDestroyError, lr as refuseMalformedResourcesForDestroy, lt as collectInlinePolicyNamesManagedBySiblings, m as maskingRetryLogger, ma as MIGRATE_TMP_PREFIX, mi as AssetPublisher, mn as s3BucketRegionalDomainName, mo as StackHasActiveImportsError, mr as repairMalformedResourceEntriesForReadOnly, mt as endCommandInterruptScope, n as DEFAULT_RESOURCE_WARN_AFTER_MS, na as resolveApp, ni as DEFAULT_STATE_PREFIX, nn as replayWarn, no as DeployCancelledError, nr as refuseMalformedOrphansForOrphan, nt as exportAliasCollisionScrubWarning, o as planFailedOps, oa as resolveStateBucketWithDefault, oi as hasReasonlessBaselineRefusal, on as definedAttributes, oo as LocalStartServiceError, or as refuseMalformedResourceEntries, ot as secretSafeKeyDisplay, p as withResourceDeadline, pa as CFN_TEMPLATE_URL_LIMIT, pi as shouldRetainResource, pn as s3BucketDualStackDomainName, po as ResourceUpdateNotSupportedError, pr as repairMalformedOutputsForReadOnly, pt as beginCommandInterruptScope, q as formatResourceLine, qa as getAwsClients, qi as warnFinchArgvExposure, qn as malformedResourcesWarning, qr as LockManager, qt as normalizeAwsTagsToCfn, r as DeployEngine, ra as resolveAutoAssetStorage, ri as describeRegionValueKind, rn as requireConfigArray, ro as DynamicReferenceRegionAmbiguousError, rr as refuseMalformedOutputs, rt as isExportAliasCollision, s as planRollback, sa as resolveStateBucketWithDefaultAndSource, si as hasUnverifiableParameterRefusal, sn as stringifyIfAssigned, sr as refuseMalformedResourceEntriesForOrphan, st as getCurrentResourceSecrets, t as DEFAULT_RESOURCE_TIMEOUT_MS, ta as getLegacyStateBucketName, ti as CUSTOM_RESOURCE_RESPONSE_PREFIX, tn as readConfigString, tr as refuseMalformedOrphansForDestroy, tt as collectPublishedOutputNames, u as resolveReplacementOldType, ua as warnDeprecatedNoPrefixCliFlag, ui as isReadableBag, un as withSharedDrainBudget, uo as PartialFailureError, ur as refuseMalformedState, ut as clearOnUpdateRemoval, v as isSecretBearingReferenceString, va as injectiveKey, vi as createAssetRedirectResolver, vn as applyCallerIdentityCredentials, vr as safeStackName, vt as CloudControlProvider, w as reachableDivergentParameters, wa as PARTITION_TABLE, wi as ensureAssetStorage, wn as STATE_RESOURCES_MALFORMED, wo as isMarkedNonRetryable, wr as withRetry, wt as packCompositeId, x as bindingSkippedOutputs, xa as producerRecordKey, xi as AssetModeResolver, xn as DiffCalculator, xo as withErrorHandling, xr as findActionableSilentDrops, xt as compositeIdFormatMessage, y as keptWholeReasonText, ya as injectiveKeyPrefix, yi as loadPublishableAssetManifest, yn as callerEnvCredentials, yr as unpreviewableOrphanRecords, yt as slowCcOperationTimeoutMs, z as isStatefulRecreateTargetForReplace, za as ownValue, zi as formatDockerLoginError, zn as malformedOrphanRowsKeptWarning, zr as maskSecretsInError, zt as getAccountInfo } from "./deploy-engine-JdJuqXID.js";
|
|
2
2
|
import { C as displayAwsMessage, D as isPasteableIdent, E as displayStackName, O as truncateCodePoints, S as UNRENDERABLE, T as displaySafe, _ as withSkipPrefix, b as SECRET_REF_MAX_CODE_POINTS, c as PATTERN_B_NAME_OPTIONS, f as explicitNamePropertyFor, h as getCurrentStackName, i as reserveStdoutForPayload, l as PATTERN_B_NAME_PROPERTIES, m as generateResourceNameWithFallback, n as getLogger, o as runStackBuffered, p as generateResourceName, s as getLiveRenderer, u as PATTERN_B_RESOURCE_TYPES, v as withStackName, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS } from "./logger-Bt0RGDfb.js";
|
|
3
3
|
import { n as awsClientDefaults, s as ambientRegion } from "./aws-client-defaults-jISU4PHo.js";
|
|
4
|
-
import { t as getCdkdVersion } from "./version-
|
|
5
|
-
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as getCdkdVersion } from "./version-BuS5njuZ.js";
|
|
5
|
+
import { a as renderDisableCommand, i as protectedReplacementAdvice, r as UNNAMEABLE_ID_CLAUSE, t as ASGProvider } from "./asg-provider-B32vpt_E.js";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
8
8
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, NotFound, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -68527,9 +68527,9 @@ function indexNestedChildTemplates(template, templatePath) {
|
|
|
68527
68527
|
if (resource?.Type !== "AWS::CloudFormation::Stack") continue;
|
|
68528
68528
|
const assetPath = resource.Metadata?.["aws:asset:path"];
|
|
68529
68529
|
if (typeof assetPath !== "string" || assetPath.length === 0) continue;
|
|
68530
|
-
if (isAbsoluteCrossPlatform(assetPath)) throw new Error(`Nested stack
|
|
68530
|
+
if (isAbsoluteCrossPlatform(assetPath)) throw new Error(`Nested stack ${displayIdent(logicalId)} has Metadata['aws:asset:path']=${displayAssemblyPath(assetPath)} which is absolute. CDK emits relative asset paths for nested templates; an absolute path indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to load.`);
|
|
68531
68531
|
const resolved = resolveAssemblyPath(dir, assetPath);
|
|
68532
|
-
if (!resolved.contained) throw new Error(`Nested stack
|
|
68532
|
+
if (!resolved.contained) throw new Error(`Nested stack ${displayIdent(logicalId)} has Metadata['aws:asset:path']=${displayAssemblyPath(assetPath)} which ${renderAssemblyPathEscape(resolved, dir)}`);
|
|
68533
68533
|
result[logicalId] = resolved.path;
|
|
68534
68534
|
}
|
|
68535
68535
|
return result;
|
|
@@ -68685,7 +68685,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
68685
68685
|
const tokenParameterNames = new Set(Object.entries(parameters ?? {}).filter(([, value]) => carriesDynamicReference(value)).map(([name]) => name));
|
|
68686
68686
|
for (const name of tokenParameterNames) {
|
|
68687
68687
|
const declaredType = (template.Parameters?.[name])?.Type;
|
|
68688
|
-
if (typeof declaredType === "string" && parameterTypeMayLoseSecretIdentity(declaredType)) logger.warn(`Stack ${
|
|
68688
|
+
if (typeof declaredType === "string" && parameterTypeMayLoseSecretIdentity(declaredType)) logger.warn(`Stack ${displayStackName(stackName)}: parameter ${displayIdent(name)} is declared Type: ${displayIdent(declaredType)} and is fed a secret dynamic reference. 'cdkd deploy' refuses this when the coercion actually destroys the plaintext (a comma-bearing secret in a list-typed parameter) — declare it 'Type: String' — and this diff compares the unresolved reference, shaped by the declared type only where that keeps every part of it a string.`);
|
|
68689
68689
|
}
|
|
68690
68690
|
try {
|
|
68691
68691
|
const userParameters = {};
|
|
@@ -68701,7 +68701,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
68701
68701
|
}
|
|
68702
68702
|
parametersBound = true;
|
|
68703
68703
|
} catch (error) {
|
|
68704
|
-
logger.debug(`Diff parameter binding for stack ${stackName} is partial: ${error instanceof Error ? error.message : String(error)}`);
|
|
68704
|
+
logger.debug(`Diff parameter binding for stack ${displayStackName(stackName)} is partial: ${error instanceof Error ? error.message : String(error)}`);
|
|
68705
68705
|
}
|
|
68706
68706
|
let effectiveTemplate = template;
|
|
68707
68707
|
let conditions;
|
|
@@ -68716,7 +68716,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
|
|
|
68716
68716
|
});
|
|
68717
68717
|
effectiveTemplate = new TemplateParser().filterResourcesByCondition(template, conditions);
|
|
68718
68718
|
} catch (error) {
|
|
68719
|
-
logger.debug(`Diff condition evaluation for stack ${stackName} skipped: ${error instanceof Error ? error.message : String(error)}`);
|
|
68719
|
+
logger.debug(`Diff condition evaluation for stack ${displayStackName(stackName)} skipped: ${error instanceof Error ? error.message : String(error)}`);
|
|
68720
68720
|
}
|
|
68721
68721
|
const resolveFn = (value) => intrinsicResolver.resolve(value, {
|
|
68722
68722
|
template: effectiveTemplate,
|
|
@@ -68929,10 +68929,10 @@ async function buildDiffTree(args) {
|
|
|
68929
68929
|
if (resource?.Type !== "AWS::CloudFormation::Stack") continue;
|
|
68930
68930
|
templateChildIds.add(logicalId);
|
|
68931
68931
|
const childTemplatePath = nestedTemplates[logicalId];
|
|
68932
|
-
if (!childTemplatePath) throw new Error(`Nested template file not found for ${NESTED_STACK_RESOURCE_TYPE}
|
|
68932
|
+
if (!childTemplatePath) throw new Error(`Nested template file not found for ${NESTED_STACK_RESOURCE_TYPE} ${displayIdent(logicalId)} under stack ${displayStackName(stackName)}. Verify the synth output emits Metadata['aws:asset:path'] on this resource (CDK 2.x cdk.NestedStack does so by default), then re-run synth.`);
|
|
68933
68933
|
const childStackName = `${stackName}~${logicalId}`;
|
|
68934
68934
|
const resolvedChildPath = path.resolve(childTemplatePath);
|
|
68935
|
-
if (ancestorTemplatePaths?.has(resolvedChildPath) === true) throw new Error(`Nested stack
|
|
68935
|
+
if (ancestorTemplatePaths?.has(resolvedChildPath) === true) throw new Error(`Nested stack ${displayIdent(logicalId)} under stack ${displayStackName(stackName)} resolves to nested template ${displayAssemblyPath(resolvedChildPath)}, which is already being diffed higher up the same nesting chain. Its Metadata['aws:asset:path'] closes a cycle; CDK emits an acyclic nested template tree, so this indicates the synth output was hand-modified or generated by a non-CDK toolchain. Refusing to diff.`);
|
|
68936
68936
|
const childAncestorTemplatePaths = new Set(ancestorTemplatePaths ?? []).add(resolvedChildPath);
|
|
68937
68937
|
const childTemplate = readNestedTemplate(childTemplatePath);
|
|
68938
68938
|
if (assetRedirect) rewriteTemplateAssetReferences(childTemplate, assetRedirect);
|
|
@@ -69672,7 +69672,7 @@ function describeFailure(err) {
|
|
|
69672
69672
|
* thing the paragraph above rejects.
|
|
69673
69673
|
*/
|
|
69674
69674
|
function scrubStacksFailedError(failures) {
|
|
69675
|
-
return new ScrubRefusalError(`${failures.length} stack(s) could not be scrubbed: ${failures.map((f) => f.stackName).join(", ")}. Each one's reason was logged as it happened — see the 'Scrub of <stack> failed:' line above for it.`, "SCRUB_STACKS_FAILED");
|
|
69675
|
+
return new ScrubRefusalError(`${failures.length} stack(s) could not be scrubbed: ${failures.map((f) => displayStackName(f.stackName)).join(", ")}. Each one's reason was logged as it happened — see the 'Scrub of <stack> failed:' line above for it.`, "SCRUB_STACKS_FAILED");
|
|
69676
69676
|
}
|
|
69677
69677
|
/**
|
|
69678
69678
|
* Which of `entries` this stack's post-scrub `outputs` bag disagrees with.
|
|
@@ -69751,8 +69751,8 @@ function planExportIndexRepair(entries, stackName, producerRegion, outputs) {
|
|
|
69751
69751
|
*/
|
|
69752
69752
|
function exportIndexIncompleteError(unwritten, unreadable, dryRun) {
|
|
69753
69753
|
const parts = [dryRun ? "no state written (--dry-run)" : "state.json complete"];
|
|
69754
|
-
if (unwritten.length > 0) parts.push(`${unwritten.length} exports index entr${unwritten.length === 1 ? "y" : "ies"} unwritten (${unwritten.map((u) => `${u.shown} in ${u.region}`).join(", ")})`);
|
|
69755
|
-
if (unreadable.length > 0) parts.push(`${unreadable.length} region(s) whose exports index could not be read (${unreadable.map((u) => `${u.region}: ${u.reason}`).join("; ")})`);
|
|
69754
|
+
if (unwritten.length > 0) parts.push(`${unwritten.length} exports index entr${unwritten.length === 1 ? "y" : "ies"} unwritten (${unwritten.map((u) => `${u.shown} in ${displayIdent(u.region)}`).join(", ")})`);
|
|
69755
|
+
if (unreadable.length > 0) parts.push(`${unreadable.length} region(s) whose exports index could not be read (${unreadable.map((u) => `${displayIdent(u.region)}: ${u.reason}`).join("; ")})`);
|
|
69756
69756
|
return new ScrubRefusalError(`${parts.join("; ")}. Re-run the same command once the cause is cleared: each entry is written only while its value differs from the producer's state.outputs, so a re-run writes the remainder and leaves the rest alone.`, "SCRUB_EXPORT_INDEX_INCOMPLETE");
|
|
69757
69757
|
}
|
|
69758
69758
|
/**
|
|
@@ -69983,6 +69983,7 @@ async function scrubCommand(stacks, options) {
|
|
|
69983
69983
|
const indexUnwritten = [];
|
|
69984
69984
|
const indexUnreadable = [];
|
|
69985
69985
|
for (const stack of targetStacks) {
|
|
69986
|
+
const shownStack = displayStackName(stack.stackName);
|
|
69986
69987
|
const stackRegion = stack.region || region;
|
|
69987
69988
|
let scrubbed;
|
|
69988
69989
|
try {
|
|
@@ -69994,7 +69995,7 @@ async function scrubCommand(stacks, options) {
|
|
|
69994
69995
|
});
|
|
69995
69996
|
} catch (err) {
|
|
69996
69997
|
failures.push({ stackName: stack.stackName });
|
|
69997
|
-
logger.error(`Scrub of ${
|
|
69998
|
+
logger.error(`Scrub of ${shownStack} failed: ${describeFailure(err)}`);
|
|
69998
69999
|
if (err instanceof Error && err.stack) logger.debug("Stack trace:", err.stack);
|
|
69999
70000
|
continue;
|
|
70000
70001
|
}
|
|
@@ -70007,8 +70008,8 @@ async function scrubCommand(stacks, options) {
|
|
|
70007
70008
|
const named = (exportName) => {
|
|
70008
70009
|
const shown = scrubbed.exportNameDisplay(exportName);
|
|
70009
70010
|
switch (shown.kind) {
|
|
70010
|
-
case "safe": return
|
|
70011
|
-
case "masked": return `(masked:
|
|
70011
|
+
case "safe": return displayIdent(shown.text);
|
|
70012
|
+
case "masked": return `(masked: ${displayIdent(shown.text)})`;
|
|
70012
70013
|
case "withheld": return "(name withheld: it holds a secret this run recorded)";
|
|
70013
70014
|
}
|
|
70014
70015
|
};
|
|
@@ -70019,14 +70020,14 @@ async function scrubCommand(stacks, options) {
|
|
|
70019
70020
|
});
|
|
70020
70021
|
for (const finding of repair.findings) if (finding.kind === "converge") {
|
|
70021
70022
|
indexConverged++;
|
|
70022
|
-
if (!options.dryRun && unwrittenNames.has(finding.exportName)) logger.warn(`Exports index entry ${named(finding.exportName)} (${stackRegion}) differs from ${
|
|
70023
|
+
if (!options.dryRun && unwrittenNames.has(finding.exportName)) logger.warn(`Exports index entry ${named(finding.exportName)} (${displayIdent(stackRegion)}) differs from ${shownStack}'s state.outputs and could NOT be written — it keeps the value it holds.`);
|
|
70023
70024
|
else {
|
|
70024
70025
|
totalIndexEntriesConverged++;
|
|
70025
|
-
logger.info(`${options.dryRun ? "Would converge" : "Converged"} exports index entry ${named(finding.exportName)} (${stackRegion}) to ${
|
|
70026
|
+
logger.info(`${options.dryRun ? "Would converge" : "Converged"} exports index entry ${named(finding.exportName)} (${displayIdent(stackRegion)}) to ${shownStack}'s state.outputs value.`);
|
|
70026
70027
|
}
|
|
70027
70028
|
} else {
|
|
70028
70029
|
totalIndexEntriesAbsent++;
|
|
70029
|
-
logger.warn(`Exports index entry ${named(finding.exportName)} (${stackRegion}) is published by ${
|
|
70030
|
+
logger.warn(`Exports index entry ${named(finding.exportName)} (${displayIdent(stackRegion)}) is published by ${shownStack}, whose state.outputs has no key of that name — nothing was written for it and it keeps the value it holds. Redeploy ${shownStack} to rewrite the index from its own outputs.`);
|
|
70030
70031
|
}
|
|
70031
70032
|
} catch (err) {
|
|
70032
70033
|
if (err instanceof ScrubIndexInvariantError) throw err;
|
|
@@ -70036,28 +70037,28 @@ async function scrubCommand(stacks, options) {
|
|
|
70036
70037
|
region: stackRegion,
|
|
70037
70038
|
reason
|
|
70038
70039
|
});
|
|
70039
|
-
logger.error(`Exports index for ${stackRegion} could not be read (first seen while scrubbing ${
|
|
70040
|
+
logger.error(`Exports index for ${displayIdent(stackRegion)} could not be read (first seen while scrubbing ${shownStack}): ${reason}`);
|
|
70040
70041
|
}
|
|
70041
70042
|
}
|
|
70042
70043
|
if (scrubbed.recordsChanged > 0) {
|
|
70043
70044
|
totalStacksScrubbed++;
|
|
70044
|
-
logger.info(`${options.dryRun ? "Would scrub" : "Scrubbed"} ${scrubbed.recordsChanged} resource record(s) in ${
|
|
70045
|
-
} else if (scrubbed.secretBearingKeys === 0 && scrubbed.unverifiableReads === 0 && scrubbed.unverifiableLeaves === 0 && indexConverged === 0) logger.info(`No plaintext secrets found in ${
|
|
70045
|
+
logger.info(`${options.dryRun ? "Would scrub" : "Scrubbed"} ${scrubbed.recordsChanged} resource record(s) in ${shownStack}`);
|
|
70046
|
+
} else if (scrubbed.secretBearingKeys === 0 && scrubbed.unverifiableReads === 0 && scrubbed.unverifiableLeaves === 0 && indexConverged === 0) logger.info(`No plaintext secrets found in ${shownStack}`);
|
|
70046
70047
|
if (scrubbed.malformedResources) malformedRecords.push(stack.stackName);
|
|
70047
70048
|
if (scrubbed.malformedOutputs) malformedOutputRecords.push(stack.stackName);
|
|
70048
70049
|
if (scrubbed.malformedOrphans || scrubbed.malformedOrphanRows) malformedOrphanRecords.push(stack.stackName);
|
|
70049
70050
|
if (scrubbed.unverifiableLeaves > 0) {
|
|
70050
70051
|
totalStacksWithUnverifiableLeaves++;
|
|
70051
|
-
logger.warn(`${scrubbed.unverifiableLeaves} scan(s) in ${
|
|
70052
|
+
logger.warn(`${scrubbed.unverifiableLeaves} scan(s) in ${shownStack} were ABANDONED mid-value because a {{resolve:...}} reference could not be resolved (see the warnings above). The resolver stops at the first failing token, so a real secret after it in the same value recorded no needle — this stack is not reported clean. The count is per abandoned SCAN, not per secret: one record can contribute more than once (an output whose Export.Name and Value both abandon), and one abandoned scan can hide several unexamined leaves.`);
|
|
70052
70053
|
}
|
|
70053
70054
|
if (scrubbed.unverifiableProducerRecords > 0) damagedProducerStacks.push(stack.stackName);
|
|
70054
70055
|
if (scrubbed.unverifiableReads > 0) {
|
|
70055
70056
|
totalStacksWithUnverifiableReads++;
|
|
70056
|
-
logger.warn(`${scrubbed.unverifiableReads} cross-stack read(s) in ${
|
|
70057
|
+
logger.warn(`${scrubbed.unverifiableReads} cross-stack read(s) in ${shownStack} could NOT be verified (see the warnings above for which, and why) — so this stack is not reported clean.`);
|
|
70057
70058
|
}
|
|
70058
70059
|
if (scrubbed.secretBearingKeys > 0) {
|
|
70059
70060
|
totalStacksWithUnscrubbableKeys++;
|
|
70060
|
-
logger.warn(`${scrubbed.secretBearingKeys} output KEY(s) in ${
|
|
70061
|
+
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).`);
|
|
70061
70062
|
}
|
|
70062
70063
|
}
|
|
70063
70064
|
for (const [indexRegion, store] of exportIndexStores) {
|
|
@@ -70071,7 +70072,7 @@ async function scrubCommand(stacks, options) {
|
|
|
70071
70072
|
region: indexRegion,
|
|
70072
70073
|
reason
|
|
70073
70074
|
});
|
|
70074
|
-
logger.error(`Exports index for ${indexRegion} could not be read for the coverage report: ${reason}`);
|
|
70075
|
+
logger.error(`Exports index for ${displayIdent(indexRegion)} could not be read for the coverage report: ${reason}`);
|
|
70075
70076
|
continue;
|
|
70076
70077
|
}
|
|
70077
70078
|
if (!entries) continue;
|
|
@@ -70079,7 +70080,7 @@ async function scrubCommand(stacks, options) {
|
|
|
70079
70080
|
const unexamined = [...entries.keys()].filter((name) => !examined.has(name));
|
|
70080
70081
|
if (unexamined.length === 0) continue;
|
|
70081
70082
|
totalIndexEntriesUnexamined += unexamined.length;
|
|
70082
|
-
logger.info(`Exports index (${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.`);
|
|
70083
|
+
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.`);
|
|
70083
70084
|
}
|
|
70084
70085
|
if (totalStacksScrubbed === 0 && totalStacksWithUnscrubbableKeys === 0 && totalStacksWithUnverifiableReads === 0 && totalStacksWithUnverifiableLeaves === 0 && totalIndexEntriesConverged === 0 && indexUnwritten.length === 0 && indexUnreadable.length === 0 && malformedRecords.length === 0 && malformedOutputRecords.length === 0 && malformedOrphanRecords.length === 0) {
|
|
70085
70086
|
if (failures.length === 0) {
|
|
@@ -70370,8 +70371,8 @@ var ScrubResolvers = class {
|
|
|
70370
70371
|
* Never the resolved value: nothing has been resolved for this reference, and
|
|
70371
70372
|
* the expression is the same string `state.json` already stores in the clear.
|
|
70372
70373
|
*/
|
|
70373
|
-
function regionAmbiguousScrubSecretError(origin, stackName, secretName, foreignProducerRegions, stackRegion) {
|
|
70374
|
-
return new ScrubRefusalError(`Scrub of ${stackName} cannot re-resolve the secret reference
|
|
70374
|
+
function regionAmbiguousScrubSecretError(origin, stackName, secretName, foreignProducerRegions, stackRegion, secrets) {
|
|
70375
|
+
return new ScrubRefusalError(`Scrub of ${displayStackName(stackName)} cannot re-resolve the secret reference ${maskedIdent(secretName, secrets)} in ${origin}: the reference carries no region of its own, and this stack read across a region boundary (producer region(s) on record: ${foreignProducerRegions.map((r) => displayIdent(r)).join(", ")}), so it may have been resolved in one of those rather than in ${displayIdent(stackRegion)}. A secret of the same name in two regions is two independent values, so scrub would look for the WRONG plaintext — leaving the real one in state while reporting the stack clean, and using the foreign value as a needle that can rewrite an unrelated literal. Refusing instead. Spell the reference as a full ARN, which names its region and is resolved there, then re-run 'cdkd scrub'.`, "SCRUB_SECRET_REGION_AMBIGUOUS");
|
|
70375
70376
|
}
|
|
70376
70377
|
/**
|
|
70377
70378
|
* The refusal a `named-region` reference raises when its OWN region cannot
|
|
@@ -70389,7 +70390,7 @@ function regionAmbiguousScrubSecretError(origin, stackName, secretName, foreignP
|
|
|
70389
70390
|
* into, so a value recorded a moment earlier in this very leaf is covered.
|
|
70390
70391
|
*/
|
|
70391
70392
|
function unresolvableForeignScrubSecretError(origin, stackName, secretName, region, cause, secrets) {
|
|
70392
|
-
return new ScrubRefusalError(`Scrub of ${stackName} could not resolve the secret reference
|
|
70393
|
+
return new ScrubRefusalError(`Scrub of ${displayStackName(stackName)} could not resolve the secret reference ${maskedIdent(secretName, secrets)} in ${origin} in the region its ARN names (${displayIdent(region)}): ${maskSecretsInText(cause instanceof Error ? cause.message : String(cause), secrets)}. Refusing rather than resolving it in the stack's own region, which would look for a different secret's value and report the stack clean over state that still holds the plaintext.`, "SCRUB_CROSS_REGION_SECRET_UNRESOLVED");
|
|
70393
70394
|
}
|
|
70394
70395
|
/**
|
|
70395
70396
|
* The literal that OPENS a dynamic reference. Used as the CHEAP pre-filter that
|
|
@@ -70537,17 +70538,18 @@ function isAssembledSecretReference(leaf, secretTokens) {
|
|
|
70537
70538
|
* together out of a plaintext is not.
|
|
70538
70539
|
*/
|
|
70539
70540
|
async function resolveForeignRegionTokens(leaf, stackName, ctx) {
|
|
70541
|
+
const shownStackName = displayStackName(stackName);
|
|
70540
70542
|
const tokens = dynamicReferenceTokens(leaf);
|
|
70541
70543
|
if (isAssembledSecretReference(leaf, tokens.filter(isSecretReferenceToken))) return leaf;
|
|
70542
70544
|
const verdicts = tokens.map((token) => [token, classifyReplaySecretRegion(token, ctx.stackRegion, ctx.producerRegions)]);
|
|
70543
|
-
for (const [, verdict] of verdicts) if (verdict.kind === "ambiguous") throw regionAmbiguousScrubSecretError(ctx.origin, stackName, verdict.secretName, verdict.foreignProducerRegions, ctx.stackRegion);
|
|
70545
|
+
for (const [, verdict] of verdicts) if (verdict.kind === "ambiguous") throw regionAmbiguousScrubSecretError(ctx.origin, stackName, verdict.secretName, verdict.foreignProducerRegions, ctx.stackRegion, ctx.recordedSecretValues);
|
|
70544
70546
|
if (!verdicts.some(([, verdict]) => verdict.kind === "named-region")) return leaf;
|
|
70545
70547
|
const localTokens = [];
|
|
70546
70548
|
let out = "";
|
|
70547
70549
|
let cursor = 0;
|
|
70548
70550
|
for (const [token, verdict] of verdicts) {
|
|
70549
70551
|
const at = leaf.indexOf(token, cursor);
|
|
70550
|
-
if (at < 0) throw new ScrubRefusalError(`Scrub of ${
|
|
70552
|
+
if (at < 0) throw new ScrubRefusalError(`Scrub of ${shownStackName} could not locate a scanned dynamic reference in ${ctx.origin}, in the value it was scanned from. Refusing rather than resolving it in ${displayIdent(ctx.stackRegion)}, which would be the wrong region for a reference that names another one. This is an internal invariant failure — please report it with the resource type and property path.`, "SCRUB_SECRET_TOKEN_SCAN_MISMATCH");
|
|
70551
70553
|
out += leaf.slice(cursor, at);
|
|
70552
70554
|
if (verdict.kind === "named-region") {
|
|
70553
70555
|
const resolver = ctx.resolvers.forRegion(verdict.region);
|
|
@@ -70568,7 +70570,7 @@ async function resolveForeignRegionTokens(leaf, stackName, ctx) {
|
|
|
70568
70570
|
}
|
|
70569
70571
|
out += leaf.slice(cursor);
|
|
70570
70572
|
const surviving = dynamicReferenceTokens(out);
|
|
70571
|
-
if (surviving.length !== localTokens.length || surviving.some((token, i) => token !== localTokens[i])) throw new ScrubRefusalError(`Scrub of ${
|
|
70573
|
+
if (surviving.length !== localTokens.length || surviving.some((token, i) => token !== localTokens[i])) throw new ScrubRefusalError(`Scrub of ${shownStackName} refused ${ctx.origin}: resolving a cross-region secret reference produced a value that is itself dynamic-reference shaped, which the stack's own resolver would then resolve as if it were a reference of this stack's. Refusing rather than passing it on.`, "SCRUB_SECRET_RESOLUTION_REINTRODUCED_TOKEN");
|
|
70572
70574
|
return out;
|
|
70573
70575
|
}
|
|
70574
70576
|
/**
|
|
@@ -70875,7 +70877,7 @@ function effectiveIntrinsicKey(node) {
|
|
|
70875
70877
|
* can carry one, and the map is the same one this pass records into.
|
|
70876
70878
|
*/
|
|
70877
70879
|
function unresolvableCrossStackReadError(origin, stackName, intrinsic, path, cause, secrets) {
|
|
70878
|
-
return new ScrubRefusalError(`Scrub of ${stackName} could not resolve the ${intrinsic} in ${origin}${path ? ` at ${path}` : ""}: ${maskSecretsInText(cause instanceof Error ? cause.message : String(cause), secrets)}. Refusing rather than continuing: the value that reference carries may be a secret, and scrub would then have no plaintext to look for — reporting the stack clean over state that still holds it. Deploy the producer stack (or correct the reference) and re-run 'cdkd scrub'.`, "SCRUB_CROSS_STACK_READ_UNRESOLVED");
|
|
70880
|
+
return new ScrubRefusalError(`Scrub of ${displayStackName(stackName)} could not resolve the ${intrinsic} in ${origin}${path ? ` at ${maskedIdent(path, secrets)}` : ""}: ${maskSecretsInText(cause instanceof Error ? cause.message : String(cause), secrets)}. Refusing rather than continuing: the value that reference carries may be a secret, and scrub would then have no plaintext to look for — reporting the stack clean over state that still holds it. Deploy the producer stack (or correct the reference) and re-run 'cdkd scrub'.`, "SCRUB_CROSS_STACK_READ_UNRESOLVED");
|
|
70879
70881
|
}
|
|
70880
70882
|
/**
|
|
70881
70883
|
* The two sentences the plaintext-producer refusal is built from: what the
|
|
@@ -70919,8 +70921,10 @@ function unresolvableCrossStackReadError(origin, stackName, intrinsic, path, cau
|
|
|
70919
70921
|
function scrubRefusalWording(verdict, loggedExportKey, loggedProducerStack, loggedVia) {
|
|
70920
70922
|
const chain = dedupePreservingOrder(loggedVia, "first");
|
|
70921
70923
|
const chainRoot = chain[chain.length - 1];
|
|
70922
|
-
const
|
|
70923
|
-
const
|
|
70924
|
+
const shownKey = displayIdent(loggedExportKey);
|
|
70925
|
+
const shownRoot = chainRoot === void 0 ? void 0 : displayStackName(chainRoot);
|
|
70926
|
+
const through = chain.length > 1 ? ` (through ${chain.slice(0, -1).map((s) => displayStackName(s)).join(", ")})` : "";
|
|
70927
|
+
const templateClaim = verdict.kind === "declared" ? `declares ${shownKey} from a {{resolve:...}} expression` : verdict.kind === "chained" ? chainRoot !== void 0 ? `publishes ${shownKey} by RE-EXPORTING a value that ${shownRoot} declares from a {{resolve:...}} expression${through}` : `publishes ${shownKey} by RE-EXPORTING a value another stack of this app declares from a {{resolve:...}} expression` : chainRoot !== void 0 ? `publishes at least one output that RE-EXPORTS a value ${shownRoot} declares from a {{resolve:...}} expression${through} (this run could not match ${shownKey} to a declared output, so it cannot say which)` : `publishes at least one output from a {{resolve:...}} expression (this run could not match ${shownKey} to a declared output, so it cannot say which)`;
|
|
70924
70928
|
const scrubOrder = dedupePreservingOrder([...chain].reverse().concat(loggedProducerStack), "last");
|
|
70925
70929
|
const remedyCommands = scrubOrder.map((name) => `Scrub with: ${pasteableCommand("cdkd scrub", [{
|
|
70926
70930
|
value: name,
|
|
@@ -70993,7 +70997,7 @@ function plaintextProducerCrossStackReadError(origin, stackName, intrinsic, path
|
|
|
70993
70997
|
const loggedExportKey = maskSecretsInText(exportKey, secrets);
|
|
70994
70998
|
const loggedProducerStack = maskSecretsInText(producerStack, secrets);
|
|
70995
70999
|
const { templateClaim, remedy, remedyCommands } = scrubRefusalWording(verdict, loggedExportKey, loggedProducerStack, verdict.via.map((s) => maskSecretsInText(s, secrets)));
|
|
70996
|
-
return new ScrubRefusalError(`Scrub of ${stackName} resolved the ${intrinsic} in ${origin}${path ? ` at ${path}` : ""} to a PLAINTEXT value: the producer stack
|
|
71000
|
+
return new ScrubRefusalError(`Scrub of ${displayStackName(stackName)} resolved the ${intrinsic} in ${origin}${path ? ` at ${maskedIdent(path, secrets)}` : ""} to a PLAINTEXT value: the producer stack ${displayStackName(loggedProducerStack)} ${templateClaim}, but its own state still stores the resolved plaintext rather than that expression. scrub has no expression to write in this stack's place, so it cannot redact the imported secret and must not report this stack clean. ${remedy}, then re-run scrub for this stack — the read will then return the expression and this stack is scrubbed normally.\n${remedyCommands.join("\n")}\nThen re-run: ${pasteableCommand("cdkd scrub", [{
|
|
70997
71001
|
value: stackName,
|
|
70998
71002
|
hole: "stack",
|
|
70999
71003
|
opts: { patternMatched: true }
|
|
@@ -71445,6 +71449,16 @@ function isNamelessDynamicReferenceFailure(err) {
|
|
|
71445
71449
|
return isNamelessDynamicReferenceError(err);
|
|
71446
71450
|
}
|
|
71447
71451
|
/**
|
|
71452
|
+
* An assembly-chosen NAME (a logical id, a property or output name, a property
|
|
71453
|
+
* path, a secret reference's name) rendered into scrub's prose: MASKED FIRST,
|
|
71454
|
+
* then bounded (go-to-k/cdkd#3638). `displayIdent` JSON-escapes, blanks
|
|
71455
|
+
* non-ASCII and cuts at 255, any of which would stop a recorded plaintext
|
|
71456
|
+
* embedded in the name from matching a mask that ran over the rendered text.
|
|
71457
|
+
*/
|
|
71458
|
+
function maskedIdent(value, secrets) {
|
|
71459
|
+
return displayIdent(maskSecretsInText(value, secrets));
|
|
71460
|
+
}
|
|
71461
|
+
/**
|
|
71448
71462
|
* The per-record line each counting site prints. Deliberately ONE SHORT
|
|
71449
71463
|
* SENTENCE, and that is a fix rather than a style choice: the first cut emitted
|
|
71450
71464
|
* a ~440-character paragraph PER RECORD at default verbosity, and the arm it
|
|
@@ -71459,11 +71473,9 @@ function isNamelessDynamicReferenceFailure(err) {
|
|
|
71459
71473
|
* it through `maskSecretsInText`, and a resolver error echoes what it was
|
|
71460
71474
|
* handed — which, after `pinCrossRegionSecrets`, can be a foreign plaintext.
|
|
71461
71475
|
*
|
|
71462
|
-
*
|
|
71463
|
-
*
|
|
71464
|
-
*
|
|
71465
|
-
* it, so it cannot JOIN a split needle (the go-to-k/cdkd#2874 direction) but it
|
|
71466
|
-
* can BREAK one, and it leaves `U+200B`-`U+200D` / `U+FEFF` untouched. A secret
|
|
71476
|
+
* The `subject` the call sites pass renders each name through
|
|
71477
|
+
* {@link maskedIdent} — masked, then bounded — so bounding cannot break a needle.
|
|
71478
|
+
* RESIDUAL: the mask sees only what this run has recorded SO FAR, and a secret
|
|
71467
71479
|
* would have to sit inside a template logical id or Outputs key to be reachable,
|
|
71468
71480
|
* which is why `secretSafeKeyDisplay` is not used here — that one is for RESOLVED
|
|
71469
71481
|
* state-bag keys. Recorded rather than closed: go-to-k/cdkd#3178 security review.
|
|
@@ -71850,6 +71862,7 @@ var SharedEntriesSecrets = class extends Map {
|
|
|
71850
71862
|
*/
|
|
71851
71863
|
function makeCrossStackPrePass(deps) {
|
|
71852
71864
|
const { stackName, resolver, producerTemplates, findings, logger } = deps;
|
|
71865
|
+
const shownStackName = displayStackName(stackName);
|
|
71853
71866
|
const exportOwners = buildExportOwnerIndex(producerTemplates);
|
|
71854
71867
|
const verdicts = /* @__PURE__ */ new Map();
|
|
71855
71868
|
/**
|
|
@@ -72004,26 +72017,27 @@ function makeCrossStackPrePass(deps) {
|
|
|
72004
72017
|
*/
|
|
72005
72018
|
const storedProducerValue = async (producer, backend, nodeCanRefuse) => {
|
|
72006
72019
|
if (!backend) return void 0;
|
|
72020
|
+
const shownProducer = displayStackName(maskSecretsInText(producer.stack, secrets));
|
|
72007
72021
|
let loaded;
|
|
72008
72022
|
try {
|
|
72009
72023
|
loaded = await backend.getState(producer.stack, producer.region);
|
|
72010
72024
|
} catch (err) {
|
|
72011
|
-
logger.debug(`Scrub of ${
|
|
72025
|
+
logger.debug(`Scrub of ${shownStackName}: could not re-read producer ${shownProducer} (${displayIdent(producer.region)}) to classify its stored value: ${maskSecretsInText(err instanceof Error ? err.message : String(err), secrets)}`);
|
|
72012
72026
|
return;
|
|
72013
72027
|
}
|
|
72014
72028
|
const outputs = loaded?.state?.outputs;
|
|
72015
72029
|
if (outputs !== void 0 && !isReadableBag(outputs)) {
|
|
72016
72030
|
if (!nodeCanRefuse) {
|
|
72017
|
-
logger.debug(`Scrub of ${
|
|
72031
|
+
logger.debug(`Scrub of ${shownStackName}: producer ${shownProducer} (${displayIdent(producer.region)}) has no readable 'outputs' map, and this position cannot refuse.`);
|
|
72018
72032
|
return;
|
|
72019
72033
|
}
|
|
72020
72034
|
const seenKey = producerRecordKey(producer.stack, producer.region);
|
|
72021
72035
|
if (!warnedDamagedProducers.has(seenKey)) {
|
|
72022
72036
|
warnedDamagedProducers.add(seenKey);
|
|
72023
|
-
const detail = `the stored value of producer
|
|
72037
|
+
const detail = `the stored value of producer ${shownProducer} (${displayIdent(producer.region)}), whose 'outputs' map cannot be read`;
|
|
72024
72038
|
findings.unverifiable.push(detail);
|
|
72025
72039
|
findings.damagedProducerRecords.push(detail);
|
|
72026
|
-
logger.warn(`Scrub of ${
|
|
72040
|
+
logger.warn(`Scrub of ${shownStackName}: producer ${shownProducer} (${displayIdent(producer.region)}) has no readable 'outputs' map, so its stored value could NOT be classified — this run cannot tell whether it still holds plaintext for the value ${shownStackName} imports from it. ${shownStackName} is scrubbed for everything else. Repair that record and scrub it first.`);
|
|
72027
72041
|
}
|
|
72028
72042
|
return;
|
|
72029
72043
|
}
|
|
@@ -72037,60 +72051,60 @@ function makeCrossStackPrePass(deps) {
|
|
|
72037
72051
|
recordedImports: [],
|
|
72038
72052
|
recordedOutputReads: []
|
|
72039
72053
|
};
|
|
72040
|
-
const where = `${key} in ${origin}${path ? ` at ${path}` : ""}`;
|
|
72054
|
+
const where = `${key} in ${origin}${path ? ` at ${maskedIdent(path, secrets)}` : ""}`;
|
|
72041
72055
|
try {
|
|
72042
72056
|
await resolver.resolve({ [key]: node[key] }, probe);
|
|
72043
72057
|
} catch (err) {
|
|
72044
72058
|
if (!nodeCanRefuse) {
|
|
72045
|
-
logger.debug(`Scrub of ${
|
|
72059
|
+
logger.debug(`Scrub of ${shownStackName}: ${where} could not be resolved, and this position cannot refuse: ${maskSecretsInText(err instanceof Error ? err.message : String(err), secrets)}`);
|
|
72046
72060
|
return;
|
|
72047
72061
|
}
|
|
72048
72062
|
if (isByDesignRefusal(err)) {
|
|
72049
72063
|
const detail = `${where}: ${maskSecretsInText(err instanceof Error ? err.message : String(err), secrets)}`;
|
|
72050
72064
|
findings.unverifiable.push(detail);
|
|
72051
|
-
logger.warn(`Scrub of ${
|
|
72065
|
+
logger.warn(`Scrub of ${shownStackName} cannot verify ${detail} — cdkd declines this read by design, so no re-run can change it. The rest of the stack is still scrubbed; this stack is NOT reported clean.`);
|
|
72052
72066
|
return;
|
|
72053
72067
|
}
|
|
72054
72068
|
if (isMalformedProducerRefusal(err)) {
|
|
72055
72069
|
const detail = `${where}: ${maskSecretsInText(err instanceof Error ? err.message : String(err), secrets)}`;
|
|
72056
72070
|
findings.unverifiable.push(detail);
|
|
72057
72071
|
findings.damagedProducerRecords.push(detail);
|
|
72058
|
-
logger.warn(`Scrub of ${
|
|
72072
|
+
logger.warn(`Scrub of ${shownStackName} cannot verify ${detail} — the PRODUCER's state record is malformed or truncated, so this run cannot tell whether that producer still holds the plaintext. The rest of the stack is still scrubbed; this stack is NOT reported clean. Repair the producer's record and scrub it first, then re-run.`);
|
|
72059
72073
|
return;
|
|
72060
72074
|
}
|
|
72061
72075
|
throw unresolvableCrossStackReadError(origin, stackName, key, path, err, secrets);
|
|
72062
72076
|
}
|
|
72063
72077
|
const producer = recordedProducer(key, probe);
|
|
72064
72078
|
if (!producer) {
|
|
72065
|
-
logger.debug(`Scrub of ${
|
|
72079
|
+
logger.debug(`Scrub of ${shownStackName}: ${where} resolved, but the resolver recorded no cdkd cross-stack read for it — the value came from a CloudFormation fallback or a cross-account arm that records nothing, so scrub cannot name a producer to classify. Not classified as a plaintext producer.`);
|
|
72066
72080
|
return;
|
|
72067
72081
|
}
|
|
72068
|
-
const loggedKey = maskSecretsInText(producer.key, secrets);
|
|
72069
|
-
const loggedStack = maskSecretsInText(producer.stack, secrets);
|
|
72082
|
+
const loggedKey = displayIdent(maskSecretsInText(producer.key, secrets));
|
|
72083
|
+
const loggedStack = displayStackName(maskSecretsInText(producer.stack, secrets));
|
|
72070
72084
|
if (!producerTemplates.has(producer.stack)) {
|
|
72071
|
-
logger.debug(`Scrub of ${
|
|
72085
|
+
logger.debug(`Scrub of ${shownStackName}: ${where} resolved through producer ${loggedStack} (${displayIdent(producer.region)}), which is not a stack of this app — scrub has no template to classify export ${loggedKey} with. Not classified as a plaintext producer.`);
|
|
72072
72086
|
return;
|
|
72073
72087
|
}
|
|
72074
72088
|
const verdict = secretExpressionVerdict(producer.stack, producer.key);
|
|
72075
72089
|
if (verdict.kind === "no") {
|
|
72076
|
-
logger.debug(`Scrub of ${
|
|
72090
|
+
logger.debug(`Scrub of ${shownStackName}: ${where} resolved through producer ${loggedStack}, whose template declares no {{resolve:...}} expression for ${loggedKey} and no re-export chain reaching one. Not classified as a plaintext producer.`);
|
|
72077
72091
|
return;
|
|
72078
72092
|
}
|
|
72079
72093
|
const stored = await storedProducerValue(producer, context.stateBackend, nodeCanRefuse);
|
|
72080
72094
|
if (!stored) {
|
|
72081
|
-
logger.debug(`Scrub of ${
|
|
72095
|
+
logger.debug(`Scrub of ${shownStackName}: ${where} resolved through producer ${loggedStack} (${displayIdent(producer.region)}), whose state record could not be read or does not carry the key ${loggedKey} — cannot classify, so this is not classified as a plaintext producer.`);
|
|
72082
72096
|
return;
|
|
72083
72097
|
}
|
|
72084
72098
|
if (carriesDynamicReference(stored.stored)) {
|
|
72085
|
-
logger.debug(`Scrub of ${
|
|
72099
|
+
logger.debug(`Scrub of ${shownStackName}: ${where} resolved through producer ${loggedStack}, whose stored value for ${loggedKey} already carries a {{resolve:...}} expression — the producer is scrubbed and there is nothing wrong with this read.`);
|
|
72086
72100
|
return;
|
|
72087
72101
|
}
|
|
72088
72102
|
if (storedValueCarriesNoPlaintext(stored.stored)) {
|
|
72089
|
-
logger.debug(`Scrub of ${
|
|
72103
|
+
logger.debug(`Scrub of ${shownStackName}: ${where} resolved through producer ${loggedStack}, whose stored value for that key carries no text — nothing to redact, so this is not classified as a plaintext producer.`);
|
|
72090
72104
|
return;
|
|
72091
72105
|
}
|
|
72092
72106
|
if (!nodeCanRefuse) {
|
|
72093
|
-
logger.debug(`Scrub of ${
|
|
72107
|
+
logger.debug(`Scrub of ${shownStackName}: ${where} resolved to a plaintext from unscrubbed producer ${loggedStack}, and this position cannot refuse.`);
|
|
72094
72108
|
return;
|
|
72095
72109
|
}
|
|
72096
72110
|
throw plaintextProducerCrossStackReadError(origin, stackName, key, path, producer.stack, producer.key, verdict, secrets);
|
|
@@ -72147,6 +72161,7 @@ function makeCrossStackPrePass(deps) {
|
|
|
72147
72161
|
*/
|
|
72148
72162
|
async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
72149
72163
|
const { logger } = opts;
|
|
72164
|
+
const shownStack = displayStackName(stack.stackName);
|
|
72150
72165
|
const acquired = !opts.dryRun;
|
|
72151
72166
|
if (acquired) await lockManager.acquireLockWithRetry(stack.stackName, region, void 0, "scrub");
|
|
72152
72167
|
const perResourceSecrets = /* @__PURE__ */ new Map();
|
|
@@ -72232,7 +72247,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72232
72247
|
try {
|
|
72233
72248
|
const loaded = await stateBackend.getState(stack.stackName, region);
|
|
72234
72249
|
if (!loaded) {
|
|
72235
|
-
logger.debug(`No state for ${
|
|
72250
|
+
logger.debug(`No state for ${shownStack} (${displayIdent(region)}) — skipping`);
|
|
72236
72251
|
return {
|
|
72237
72252
|
recordsChanged: 0,
|
|
72238
72253
|
secretsFound: 0,
|
|
@@ -72285,7 +72300,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72285
72300
|
try {
|
|
72286
72301
|
parameters = await resolver.resolveParameters(stack.template);
|
|
72287
72302
|
} catch (err) {
|
|
72288
|
-
logger.debug(`Parameter resolution skipped for ${
|
|
72303
|
+
logger.debug(`Parameter resolution skipped for ${shownStack}: ${maskSecretsInText(err instanceof Error ? err.message : String(err), outputSecrets)}`);
|
|
72289
72304
|
}
|
|
72290
72305
|
const resolverStateBackend = memoizeCrossStackStateReads(stateBackend);
|
|
72291
72306
|
const resolverContext = (recordedSecretValues) => ({
|
|
@@ -72309,7 +72324,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72309
72324
|
try {
|
|
72310
72325
|
conditions = await resolver.evaluateConditions(resolverContext(outputSecrets));
|
|
72311
72326
|
} catch (err) {
|
|
72312
|
-
logger.debug(`Condition evaluation skipped for ${
|
|
72327
|
+
logger.debug(`Condition evaluation skipped for ${shownStack}: ${maskSecretsInText(err instanceof Error ? err.message : String(err), outputSecrets)}`);
|
|
72313
72328
|
}
|
|
72314
72329
|
const templateResources = stack.template.Resources ?? {};
|
|
72315
72330
|
const templateOutputs = stack.template.Outputs ?? {};
|
|
@@ -72329,10 +72344,10 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72329
72344
|
producerRegions,
|
|
72330
72345
|
resolvers,
|
|
72331
72346
|
recordedSecretValues,
|
|
72332
|
-
origin: `resource
|
|
72347
|
+
origin: `resource ${maskedIdent(logicalId, recordedSecretValues)}`
|
|
72333
72348
|
});
|
|
72334
72349
|
const resourceContext = resolverContext(recordedSecretValues);
|
|
72335
|
-
await resolveCrossStackReads(resolveInput, resourceContext, `resource
|
|
72350
|
+
await resolveCrossStackReads(resolveInput, resourceContext, `resource ${maskedIdent(logicalId, recordedSecretValues)}`);
|
|
72336
72351
|
const bagKeys = resolveInput !== null && typeof resolveInput === "object" && !Array.isArray(resolveInput) ? Object.keys(resolveInput) : void 0;
|
|
72337
72352
|
const intrinsicShapedBag = bagKeys?.some((k) => RESOLVER_DISPATCH_KEYS.has(k)) ?? false;
|
|
72338
72353
|
const resolveUnits = bagKeys && !intrinsicShapedBag ? Object.entries(resolveInput) : [["", resolveInput]];
|
|
@@ -72343,16 +72358,16 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72343
72358
|
...resourceContext,
|
|
72344
72359
|
abandonedResolutions: abandoned
|
|
72345
72360
|
});
|
|
72346
|
-
reportAbandonedBag(abandoned, propertyName ? `resource
|
|
72361
|
+
reportAbandonedBag(abandoned, propertyName ? `resource ${maskedIdent(logicalId, recordedSecretValues)} property ${maskedIdent(propertyName, recordedSecretValues)}` : `resource ${maskedIdent(logicalId, recordedSecretValues)}`, recordedSecretValues, `${maskedIdent(logicalId, recordedSecretValues)}${propertyName ? `.${maskedIdent(propertyName, recordedSecretValues)}` : ""}`);
|
|
72347
72362
|
} catch (err) {
|
|
72348
72363
|
if (isRegionAmbiguousRefusal(err) || isNamelessDynamicReferenceFailure(err)) throw err;
|
|
72349
72364
|
const leafVerdict = abandonedScanVerdict(propertyValue, err);
|
|
72350
72365
|
if (leafVerdict !== "silent") {
|
|
72351
72366
|
if (leafVerdict === "count") unverifiableLeaves++;
|
|
72352
72367
|
else ungateableAbandonedScans++;
|
|
72353
|
-
logger.warn(maskSecretsInText(abandonedScanWarning(propertyName ? `resource
|
|
72368
|
+
logger.warn(maskSecretsInText(abandonedScanWarning(propertyName ? `resource ${maskedIdent(logicalId, recordedSecretValues)} property ${maskedIdent(propertyName, recordedSecretValues)}` : `resource ${maskedIdent(logicalId, recordedSecretValues)}`, leafVerdict), recordedSecretValues));
|
|
72354
72369
|
}
|
|
72355
|
-
logger.debug(maskSecretsInText(`Resolution of ${
|
|
72370
|
+
logger.debug(maskSecretsInText(`Resolution of ${maskedIdent(logicalId, recordedSecretValues)}${propertyName ? `.${maskedIdent(propertyName, recordedSecretValues)}` : ""} during scrub was partial: ${err instanceof Error ? err.message : String(err)}`, recordedSecretValues));
|
|
72356
72371
|
}
|
|
72357
72372
|
}
|
|
72358
72373
|
perResourceTemplateProps.set(logicalId, templateResource.Properties);
|
|
@@ -72369,7 +72384,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72369
72384
|
producerRegions,
|
|
72370
72385
|
resolvers,
|
|
72371
72386
|
recordedSecretValues,
|
|
72372
|
-
origin: `orphan record
|
|
72387
|
+
origin: `orphan record ${maskedIdent(record.logicalId, recordedSecretValues)}`
|
|
72373
72388
|
});
|
|
72374
72389
|
const orphanContext = resolverContext(recordedSecretValues);
|
|
72375
72390
|
for (const [bagName, bagValue] of Object.entries(resolveInput)) {
|
|
@@ -72379,16 +72394,16 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72379
72394
|
...orphanContext,
|
|
72380
72395
|
abandonedResolutions: abandoned
|
|
72381
72396
|
});
|
|
72382
|
-
reportAbandonedBag(abandoned, `orphan record
|
|
72397
|
+
reportAbandonedBag(abandoned, `orphan record ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName}`, recordedSecretValues, `orphan record ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName}`);
|
|
72383
72398
|
} catch (err) {
|
|
72384
72399
|
if (isRegionAmbiguousRefusal(err) || isNamelessDynamicReferenceFailure(err)) throw err;
|
|
72385
72400
|
const leafVerdict = abandonedScanVerdict(bagValue, err);
|
|
72386
72401
|
if (leafVerdict !== "silent") {
|
|
72387
72402
|
if (leafVerdict === "count") unverifiableLeaves++;
|
|
72388
72403
|
else ungateableAbandonedScans++;
|
|
72389
|
-
logger.warn(maskSecretsInText(abandonedScanWarning(`orphan record
|
|
72404
|
+
logger.warn(maskSecretsInText(abandonedScanWarning(`orphan record ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName}`, leafVerdict), recordedSecretValues));
|
|
72390
72405
|
}
|
|
72391
|
-
logger.debug(maskSecretsInText(`Resolution of orphan record ${
|
|
72406
|
+
logger.debug(maskSecretsInText(`Resolution of orphan record ${maskedIdent(record.logicalId, recordedSecretValues)} ${bagName} during scrub was partial: ${err instanceof Error ? err.message : String(err)}`, recordedSecretValues));
|
|
72392
72407
|
}
|
|
72393
72408
|
}
|
|
72394
72409
|
}
|
|
@@ -72404,10 +72419,10 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72404
72419
|
producerRegions,
|
|
72405
72420
|
resolvers,
|
|
72406
72421
|
recordedSecretValues: nameSecrets,
|
|
72407
|
-
origin: `Export.Name of output
|
|
72422
|
+
origin: `Export.Name of output ${maskedIdent(name, nameSecrets)}`
|
|
72408
72423
|
});
|
|
72409
72424
|
const nameContext = resolverContext(nameSecrets);
|
|
72410
|
-
await resolveCrossStackReads(nameSource, nameContext, `Export.Name of output
|
|
72425
|
+
await resolveCrossStackReads(nameSource, nameContext, `Export.Name of output ${maskedIdent(name, nameSecrets)}`, { canRefuse: !isOutputSuppressed(name, output, conditions, state.outputs ?? {}) });
|
|
72411
72426
|
try {
|
|
72412
72427
|
exportName = await resolver.resolve(nameSource, nameContext);
|
|
72413
72428
|
} catch (err) {
|
|
@@ -72416,14 +72431,14 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72416
72431
|
if (leafVerdict !== "silent") {
|
|
72417
72432
|
if (leafVerdict === "count") unverifiableLeaves++;
|
|
72418
72433
|
else ungateableAbandonedScans++;
|
|
72419
|
-
logger.warn(maskSecretsInText(abandonedScanWarning(`the Export.Name of output
|
|
72434
|
+
logger.warn(maskSecretsInText(abandonedScanWarning(`the Export.Name of output ${maskedIdent(name, outputSecrets)}`, leafVerdict), outputSecrets));
|
|
72420
72435
|
}
|
|
72421
72436
|
nameFailed = true;
|
|
72422
72437
|
nameError = err;
|
|
72423
72438
|
}
|
|
72424
72439
|
if (nameFailed) {
|
|
72425
72440
|
outputsSourceUntrusted = true;
|
|
72426
|
-
logger.warn(`Export.Name of output ${name} could not be resolved during scrub (${maskSecretsInText(nameError instanceof Error ? nameError.message : String(nameError), outputSecrets)}) — redacting this stack's outputs by value match instead of by template position, since state may be keyed under a name this run cannot reproduce.`);
|
|
72441
|
+
logger.warn(`Export.Name of output ${maskedIdent(name, outputSecrets)} could not be resolved during scrub (${maskSecretsInText(nameError instanceof Error ? nameError.message : String(nameError), outputSecrets)}) — redacting this stack's outputs by value match instead of by template position, since state may be keyed under a name this run cannot reproduce.`);
|
|
72427
72442
|
}
|
|
72428
72443
|
}
|
|
72429
72444
|
if (declaredExportName !== void 0 && typeof exportName !== "string") outputsSourceUntrusted = true;
|
|
@@ -72431,7 +72446,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72431
72446
|
if (typeof exportName === "string" && !exportNameUnresolved) accountedOutputKeys.add(exportName);
|
|
72432
72447
|
if (exportNameUnresolved) {
|
|
72433
72448
|
outputsSourceUntrusted = true;
|
|
72434
|
-
logger.warn(`Export.Name of output ${name} did not fully resolve during scrub — redacting this stack's outputs by value match instead of by template position, since state may be keyed under a name this run cannot reproduce.`);
|
|
72449
|
+
logger.warn(`Export.Name of output ${maskedIdent(name, outputSecrets)} did not fully resolve during scrub — redacting this stack's outputs by value match instead of by template position, since state may be keyed under a name this run cannot reproduce.`);
|
|
72435
72450
|
} else if (typeof exportName === "string" && isExportAliasCollision(exportName, name, declaredOutputNames)) {
|
|
72436
72451
|
ambiguousKeys.add(exportName);
|
|
72437
72452
|
collisions.push([name, exportName]);
|
|
@@ -72448,26 +72463,26 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72448
72463
|
producerRegions,
|
|
72449
72464
|
resolvers,
|
|
72450
72465
|
recordedSecretValues: outputSecrets,
|
|
72451
|
-
origin: `output
|
|
72466
|
+
origin: `output ${maskedIdent(name, outputSecrets)}`
|
|
72452
72467
|
});
|
|
72453
72468
|
const valueContext = resolverContext(outputSecrets);
|
|
72454
|
-
await resolveCrossStackReads(valueSource, valueContext, `output
|
|
72469
|
+
await resolveCrossStackReads(valueSource, valueContext, `output ${maskedIdent(name, outputSecrets)}`, { canRefuse: !isOutputSuppressed(name, output, conditions, state.outputs ?? {}) });
|
|
72455
72470
|
const abandonedOutput = [];
|
|
72456
72471
|
try {
|
|
72457
72472
|
await resolver.resolve(valueSource, {
|
|
72458
72473
|
...valueContext,
|
|
72459
72474
|
abandonedResolutions: abandonedOutput
|
|
72460
72475
|
});
|
|
72461
|
-
reportAbandonedBag(abandonedOutput, `output
|
|
72476
|
+
reportAbandonedBag(abandonedOutput, `output ${maskedIdent(name, outputSecrets)}`, outputSecrets, `output ${maskedIdent(name, outputSecrets)}`);
|
|
72462
72477
|
} catch (err) {
|
|
72463
72478
|
if (isRegionAmbiguousRefusal(err) || isNamelessDynamicReferenceFailure(err)) throw err;
|
|
72464
72479
|
const leafVerdict = abandonedScanVerdict(valueSource, err);
|
|
72465
72480
|
if (leafVerdict !== "silent") {
|
|
72466
72481
|
if (leafVerdict === "count") unverifiableLeaves++;
|
|
72467
72482
|
else ungateableAbandonedScans++;
|
|
72468
|
-
logger.warn(maskSecretsInText(abandonedScanWarning(`output
|
|
72483
|
+
logger.warn(maskSecretsInText(abandonedScanWarning(`output ${maskedIdent(name, outputSecrets)}`, leafVerdict), outputSecrets));
|
|
72469
72484
|
}
|
|
72470
|
-
logger.debug(`Resolution of output ${name} during scrub was partial: ${maskSecretsInText(err instanceof Error ? err.message : String(err), outputSecrets)}`);
|
|
72485
|
+
logger.debug(`Resolution of output ${maskedIdent(name, outputSecrets)} during scrub was partial: ${maskSecretsInText(err instanceof Error ? err.message : String(err), outputSecrets)}`);
|
|
72471
72486
|
}
|
|
72472
72487
|
}
|
|
72473
72488
|
});
|
|
@@ -72580,7 +72595,7 @@ async function scrubStack(stack, region, stateBackend, lockManager, opts) {
|
|
|
72580
72595
|
throw maskSecretsInError(err, allRecordedSecrets(outputSecrets, perResourceSecrets, orphanSecrets));
|
|
72581
72596
|
} finally {
|
|
72582
72597
|
if (acquired) await lockManager.releaseLock(stack.stackName, region).catch((err) => {
|
|
72583
|
-
logger.warn(`Failed to release lock for ${
|
|
72598
|
+
logger.warn(`Failed to release lock for ${shownStack}: ${err instanceof Error ? err.message : String(err)}`);
|
|
72584
72599
|
});
|
|
72585
72600
|
}
|
|
72586
72601
|
}
|
|
@@ -88372,7 +88387,7 @@ async function resolveImportedProperties(stackState, template, region, stateBack
|
|
|
88372
88387
|
if (divergentParameters !== void 0 && divergentParameters.size > 0) try {
|
|
88373
88388
|
parameterTaint = computeParameterTaint(template, new Map(entries.map(([logicalId, resource]) => [logicalId, resource.properties])), divergentParameters);
|
|
88374
88389
|
} catch (err) {
|
|
88375
|
-
logger.debug(`observed-baseline parameter-dependence walk failed for
|
|
88390
|
+
logger.debug(`observed-baseline parameter-dependence walk failed for ${displayStackName(stackState.stackName)}: ${err instanceof Error ? err.name : typeof err} — refusing every baseline in the stack fail-closed.`);
|
|
88376
88391
|
const all = new Set(entries.map(([logicalId]) => logicalId));
|
|
88377
88392
|
parameterTaint = {
|
|
88378
88393
|
refused: all,
|
|
@@ -88425,8 +88440,8 @@ async function resolveImportedProperties(stackState, template, region, stateBack
|
|
|
88425
88440
|
const refusedHere = [...parameterTaint.refused].filter((id) => inState.has(id));
|
|
88426
88441
|
const unreadable = refusedHere.filter((id) => parameterTaint.unclassifiable.has(id));
|
|
88427
88442
|
if (refusedHere.length > 0) {
|
|
88428
|
-
const named = [...parameterTaint.parametersHit].sort().map((name) =>
|
|
88429
|
-
logger.warn(`${refusedHere.length} resource(s) in
|
|
88443
|
+
const named = [...parameterTaint.parametersHit].sort().map((name) => displayIdent(name));
|
|
88444
|
+
logger.warn(`${refusedHere.length} resource(s) in ${displayStackName(stackState.stackName)} depend, directly or through another resource's attributes, on template parameter(s) whose deployed CloudFormation value could not be proven equal to the template 'Default' 'cdkd import' binds` + (named.length > 0 ? ` (${named.join(", ")})` : "") + (unreadable.length > 0 ? ` — ${unreadable.length} of them because their properties could not be checked for such a dependence` : "") + ". Their recorded properties hold the 'Default', NOT the deployed value, and no observed drift baseline was captured for them by this import (the live value may be a secret this import cannot position a redaction for). Review 'cdkd diff' before the next 'cdkd deploy'.");
|
|
88430
88445
|
}
|
|
88431
88446
|
}
|
|
88432
88447
|
return unsafeObservedBaselineLogicalIds;
|
|
@@ -89048,9 +89063,9 @@ function indexGrandchildTemplatePaths(childTemplate, childTemplatePath) {
|
|
|
89048
89063
|
if (resource.Type !== "AWS::CloudFormation::Stack") continue;
|
|
89049
89064
|
const assetPath = resource.Metadata?.["aws:asset:path"];
|
|
89050
89065
|
if (typeof assetPath !== "string" || assetPath.length === 0) continue;
|
|
89051
|
-
if (path.isAbsolute(assetPath)) throw new Error(`cdkd import --migrate-from-cloudformation: grandchild nested-stack
|
|
89066
|
+
if (path.isAbsolute(assetPath)) throw new Error(`cdkd import --migrate-from-cloudformation: grandchild nested-stack ${displayIdent(grandLogicalId)} has Metadata['aws:asset:path']=${displayAssemblyPath(assetPath)} which is absolute. CDK emits relative asset paths for nested templates.`);
|
|
89052
89067
|
const resolved = resolveAssemblyPath(dir, assetPath);
|
|
89053
|
-
if (!resolved.contained) throw new Error(`cdkd import --migrate-from-cloudformation: grandchild nested-stack
|
|
89068
|
+
if (!resolved.contained) throw new Error(`cdkd import --migrate-from-cloudformation: grandchild nested-stack ${displayIdent(grandLogicalId)} has Metadata['aws:asset:path']=${displayAssemblyPath(assetPath)} which ${renderAssemblyPathEscape(resolved, dir)}`);
|
|
89054
89069
|
result[grandLogicalId] = resolved.path;
|
|
89055
89070
|
}
|
|
89056
89071
|
return result;
|
|
@@ -99040,4 +99055,4 @@ function buildProgram() {
|
|
|
99040
99055
|
|
|
99041
99056
|
//#endregion
|
|
99042
99057
|
export { buildProgram };
|
|
99043
|
-
//# sourceMappingURL=program-
|
|
99058
|
+
//# sourceMappingURL=program-DGa6mbzV.js.map
|