Skip to content

fix(env): redact credentials from Node.js mirror URLs in errors and logs - #3700

Open
jong-kyung wants to merge 1 commit into
voidzero-dev:mainfrom
jong-kyung:fix/redact-node-mirror-credentials
Open

jong-kyung wants to merge 1 commit into
voidzero-dev:mainfrom
jong-kyung:fix/redact-node-mirror-credentials

Conversation

@jong-kyung

Copy link
Copy Markdown
Collaborator

Follow-up to #3645 (comment).

When VP_NODE_DIST_MIRROR contains credentials, such as https://user:token@mirror.example/node, a failed Node.js download printed the full URL in the error message. For example, Failed to download from https://user:token@mirror.example/node/index.json: .... This can expose the token in CI logs. The same URL also appeared in debug logs.

reqwest already removes credentials from the URL before sending the request, so the URL in its own error text is safe. The leak came from the URL that vp_js_runtime stores in DownloadFailed and writes to debug logs.

This change replaces the username and password with *** in those places. URLs without credentials are unchanged. It also removes a duplicate debug log in the Node.js provider, because fetch_json_with_cache_headers already logs the same URL.

A new test downloads from a local mock server through a URL with credentials and checks that the error message does not contain the password. The test fails without this change.

@jong-kyung jong-kyung self-assigned this Dec 5, 2026
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 5, 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-12-05T04:15:03.766148Z 1dd26f8 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.

@jong-kyung jong-kyung added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests test: sfw labels Dec 5, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 1dd26f8eb7

ℹ️ 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 December 5, 2026 04:12
@jong-kyung
jong-kyung requested a review from fengmk2 December 5, 2026 04:12

This branch has not been deployed

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

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: sfw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant