Skip to content

fix(create): stop logging template command environment in debug output - #3552

Merged
fengmk2 merged 5 commits into
voidzero-dev:mainfrom
jong-kyung:fix/redact-run-command-env-log
Nov 23, 2026
Merged

fengmk2 merged 5 commits into
voidzero-dev:mainfrom
jong-kyung:fix/redact-run-command-env-log

Conversation

@jong-kyung

Copy link
Copy Markdown
Collaborator

With VP_LOG=debug, vp create printed every environment variable passed to the template command, including secrets such as NPM_TOKEN. This happened because the native runCommand binding logged its options with Debug, and those options carry a copy of process.env. Every local and remote template that goes through project directory detection used this path.

This change removes that log line. The vp_command::spawn debug log still records the binary, arguments, and working directory, so the only information that no longer appears in debug output is the environment itself.

To reproduce before this change, run NPM_TOKEN=npm_FAKE_SECRET VP_LOG=vite_plus_cli=debug vp create <local-template> --no-interactive and the token appears in stderr. After this change, nothing from vite_plus_cli is printed and the token does not appear.

VP_LOG=debug printed every environment variable passed to the template command, including secrets such as NPM_TOKEN. The vp_command spawn log still records the binary, arguments, and working directory.
@jong-kyung jong-kyung self-assigned this Nov 23, 2026
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T07:40:49.188472Z e712ea9 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: e712ea9032

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jong-kyung
jong-kyung marked this pull request as ready for review November 23, 2026 07:39
@jong-kyung
jong-kyung requested a review from fengmk2 November 23, 2026 07:39
@fengmk2
fengmk2 merged commit 160d927 into voidzero-dev:main Nov 23, 2026
57 checks passed
@jong-kyung
jong-kyung deleted the fix/redact-run-command-env-log branch November 23, 2026 12:33
@fengmk2 fengmk2 mentioned this pull request Nov 23, 2026
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.

2 participants