Repository navigation
fix(renovate): allow npm remote fetches in Renovate lockfile updates (npm/cli#9800) - #536
DevSecNinja wants to merge 2 commits into
Conversation
…pm/cli#9800) npm 12 (allow-remote=none) refuses registry tarballs under --package-lock-only when a package declares bundleDependencies, so lockfile updates fail with EALLOWREMOTE in every Tailwind CSS 4 repository (@tailwindcss/oxide-wasm32-wasi). allow-remote has no narrower value that covers transitive dependencies, so set allow-remote=all for the npm manager only, merged with the repository's .npmrc. Installs in CI and on developer machines keep npm 12's default. A contract test keeps the override narrow. Closes #535 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 2 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
🟡 Changes recommended
The npm-manager setting also reaches pnpm and Yarn 1 updates, contradicting the claimed npm-CLI-only isolation and leaving the security rationale and new test inaccurate.
1 open issue
What changed in this PR
This PR adds a shared Renovate workaround for npm 12’s EALLOWREMOTE failures during Tailwind CSS 4 lockfile updates, addressing issue #535.
Changes:
- Sets
allow-remote=allin Renovate’s npm manager configuration while preserving repository.npmrcsettings. - Adds a contract test restricting the override’s placement, contents, and duplication.
- Documents the workaround and its removal condition.
Review was static; no project tests, builds, or linters were run.
| File | Description |
|---|---|
tests/renovate-npm-allow-remote.sh |
Adds configuration guardrails for the workaround. |
docs/architecture.md |
Documents the workaround and when to remove it. |
.renovate/base.json5 |
Adds the merged npm configuration override. |
.mise.toml |
Registers the new contract test. |
Review effort: Balanced
…d Yarn runs Renovate's npm manager writes the .npmrc for npm, pnpm and Yarn lockfile updates. Only the npm CLI has an allow-remote setting, so the line is inert for the others. Correct the comment, the test description and the docs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Maintainer confirmation is needed to accept the supply-chain tradeoff of relaxing npm’s remote-tarball protection across consuming repositories while affected lockfile runs and downstream CI behavior remain unverified.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
|
Owner decision (2026-11-16): on hold until January 2027. We'll wait for upstream progress on npm/cli#9800 first.
Until then, Tailwind 4 repos' Renovate lockfile and lock-maintenance PRs keep failing. |

Description
Renovate's lockfile updates fail with
EALLOWREMOTEin every Tailwind CSS 4 repository: DevSecNinja/deckio-digital-security#134, DevSecNinja/deckio-dfs#36, DevSecNinja/deckio-dfs#24, DevSecNinja/deckio-msft-defender-for-cloud#109 and DevSecNinja/hadiscover#418 (DevSecNinja/deckio-dfs#24 and DevSecNinja/hadiscover#418 are lock file maintenance). Every failure refuses the same package,@tailwindcss/oxide-wasm32-wasi, at tailwind 4.3.1, 4.3.3 and 4.3.5 alike, so the cause is not the 4.3.5 release.Root cause: npm/cli#9800, still open and reproduced on npm 12.2.1. Since npm 12,
allow-remotedefaults tonone, and registry tarballs are normally exempt. Under--package-lock-only(Renovate's lockfile command), npm misclassifies a registry tarball as "remote" when the package declaresbundleDependencies.@tailwindcss/oxide-wasm32-wasidoes, as an optional dependency of@tailwindcss/oxide. A realnpm installworks because it skips thatcpu: ["wasm32"]package.Options considered (least permissive first)
allow-remote=rootpackage.json; the refused package is transitive.npmrcinpackageRulesscoped to tailwindallow-remote=allin the npm manager blockallow-remotesetting, so for them the line is inert.allow-gitand other npm 12 defaults stay.constraints: { npm: "<12" }allow-remote=allandallow-git=all, so it is more permissive and stale.npmrcnpmrcMerge: false, replaces repo.npmrcfiles.Changes
.renovate/base.json5:npm: { npmrc: "allow-remote=all\n", npmrcMerge: true }.npmrcMergekeeps a repository's own.npmrc(lovelace-ovapi has one). Renovate writes the repository's lines after this one, so a repository can still setallow-remoteitself. The comment links [BUG]--dry-runfails with EALLOWREMOTE on registry tarballs for packages that declare bundleDependencies npm/cli#9800 and says to remove the block once Renovate's npm has the fix.tests/renovate-npm-allow-remote.shinmise run test:npmrcmay only appear in the npm manager block (not at the top level or inpackageRules), may only setallow-remote=all, needsnpmrcMerge: true, and may exist in at most one preset.docs/architecture.md: safety-net bullet.Security
allow-remotecontrols whether npm fetches dependencies given as tarball URLs. With this change, a URL dependency that a new package version introduces would no longer stop Renovate's lockfile update. The exposure stays narrow:npm install --package-lock-only). pnpm and Yarn read the same.npmrcbut have noallow-remotesetting (neither pnpm/pnpm nor yarnpkg/yarn references it), and the fleet has no pnpm or Yarn lockfiles. Renovate runs these updates with--ignore-scripts, so fetched packages are resolved but not executed.allow-remote=none(no repository.npmrcsets it), so a URL dependency that reaches a lockfile still fails CI before the PR can automerge.allow-gitstaysnone, and the override doesn't touch the registry, auth or script settings (the test enforces this).Closes #535
Checklist
mise exec -- lefthook run pre-commit)Validation (Windows/Git Bash):
bash ./tests/renovate-npm-allow-remote.sh: passed. Mutation checks: addingallow-git=all, settingnpmrcMerge: falseor adding a top-levelnpmrceach fail it.bash ./tests/renovate-engines-range.sh: passed.base.json5: no new errors (the one existing error is also onmain).shellcheck,shfmt -d -i 4anddprint check: clean. The fullmise run testruns in CI.--dry-runfails with EALLOWREMOTE on registry tarballs for packages that declare bundleDependencies npm/cli#9800 (the--package-lock-onlyrepro with@tailwindcss/oxidepasses withallow-remote=all). Whether the non-major group PRs in the affected repos go green shows on the next Renovate run after release.