You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: check for accidental exposure of secrets (#19543)
Introduces the following changes to secrets handling:
- Deprecate `SecretValue.plainText()` in favor of `SecretValue.unsafePlainText()` to highlight its issues
- Introduce `SecretValue.resourceAttribute()` for cases where we know we want to use a value produced at deployment time
- Introduce a new feature flag (`@aws-cdk/core:checkSecretUsage`) which, when enabled, will make it impossible to use secrets without explicitly unwrapping them first (`secretValue.unsafeUnwrap`). This prevents people from naively sticking secrets into vulnerable locations like environment variables.
- Deprecate `secretsmanager.SecretStringValueBeta1` in favor of just accepting a `SecretValue`.
Since this behavior would constitute a breaking change, it will only be enabled if the feature flag `@aws-cdk/core:checkSecretUsage` is turned on.
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
0 commit comments