fix(cli): omit sensitive placeholders from build environment - #17515
Open
liby wants to merge 1 commit into
Open
Conversation
`vercel pull` writes `[SENSITIVE]` when Sensitive Environment Variables cannot be retrieved. Treat the marker as unavailable during `vercel build` while preserving explicit process-level overrides.
🦋 Changeset detectedLatest commit: e3350d4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
@liby is attempting to deploy a commit to the Internal Playground Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prevent
vercel buildfrom injecting[SENSITIVE]placeholders written byvercel pullinto application build code.vercel pulluses this marker when a Sensitive Environment Variable cannot be retrieved. The build command previously loaded it throughdotenvas an ordinary value, so application parsers received redaction metadata instead of an unavailable variable.The build now:
Scope consideration
This PR preserves the pulled-file format introduced by #17125 and handles the placeholder at the
vercel buildboundary. This is the smallest change for #17514, but the file cannot distinguish the reserved marker from a legitimate non-sensitive value equal to[SENSITIVE].The marker can also be written to
.env.local, where other dotenv consumers treat it as a real value. Moving the fix toenv pullwould omit unavailable assignments and warn during pull, keeping all dotenv consumers generic. Writing comments would preserve unavailable key names without injecting a value, but would make the file a key manifest as well as a value file.Should pulled env files preserve unavailable key names, or contain only values that are actually available? That contract determines whether the fix belongs in
vercel buildorenv pull.Fixes #17514.