Skip to content

fix(update): reject npm redacted global root paths - #107901

Closed
felirami wants to merge 1 commit into
openclaw:mainfrom
felirami:fix/npm-root-redaction
Closed

felirami wants to merge 1 commit into
openclaw:mainfrom
felirami:fix/npm-root-redaction

Conversation

@felirami

Copy link
Copy Markdown
Contributor

npm >= 11 redacts UUID-like path segments in stdout to literal "". Trusting a poisoned path from "npm root -g" causes the updater to materialize a literal "" directory tree and leaves the live install stale.

This change treats any "npm root -g" / "npm prefix -g" output that contains the redaction marker as an unresolved probe, so the existing package-root fallback is used instead.

  • Added a regression test in src/infra/update-global.test.ts that verifies the fallback when npm returns a redacted path.

Fixes #107239

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

npm >= 11 redacts UUID-like path segments in stdout to literal "***".
Trusting a poisoned path from "npm root -g" causes the updater to
materialize a literal "***" directory tree and leaves the live install
stale. Treat such output as an unresolved probe so the existing package
root fallback is used instead.

Closes openclaw#107239

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 15, 2026
@arcabotai

Copy link
Copy Markdown
Contributor

Superseded by #107963. The replacement is rebased onto current main, narrows redaction handling to npm, adds composed-path and pnpm regressions, and carries fresh Blaxel verification under the arcabotai identity.

Copy link
Copy Markdown
Contributor Author

Superseded by #107963, which is rebased onto current main, narrows redaction handling to npm, adds pnpm and composed-path regressions, and includes fresh Blaxel verification.

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

Labels

size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

2 participants