Skip to content

fix(cli): omit sensitive placeholders from build environment - #17515

Open
liby wants to merge 1 commit into
vercel:mainfrom
liby:fix/cli-sensitive-placeholder-build
Open

fix(cli): omit sensitive placeholders from build environment#17515
liby wants to merge 1 commit into
vercel:mainfrom
liby:fix/cli-sensitive-placeholder-build

Conversation

@liby

@liby liby commented Aug 19, 2026

Copy link
Copy Markdown

Summary

Prevent vercel build from injecting [SENSITIVE] placeholders written by vercel pull into application build code.

vercel pull uses this marker when a Sensitive Environment Variable cannot be retrieved. The build command previously loaded it through dotenv as an ordinary value, so application parsers received redaction metadata instead of an unavailable variable.

The build now:

  • removes unavailable placeholders from the local build environment
  • preserves explicit process-level overrides, including empty strings
  • warns with only the names of omitted variables

Scope consideration

This PR preserves the pulled-file format introduced by #17125 and handles the placeholder at the vercel build boundary. 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 to env pull would 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 build or env pull.

Fixes #17514.

`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.
@liby
liby requested review from a team as code owners August 19, 2026 05:04
@changeset-bot

changeset-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e3350d4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vercel Patch

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

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI] vercel build treats [SENSITIVE] placeholders from vercel pull as environment values

1 participant