Skip to content

fix(renovate): allow npm remote fetches in Renovate lockfile updates (npm/cli#9800) - #536

Draft
DevSecNinja wants to merge 2 commits into
mainfrom
devsecninja-npm-allow-remote
Draft

DevSecNinja wants to merge 2 commits into
mainfrom
devsecninja-npm-allow-remote

Conversation

@DevSecNinja

@DevSecNinja DevSecNinja commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Description

Renovate's lockfile updates fail with EALLOWREMOTE in 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-remote defaults to none, and registry tarballs are normally exempt. Under --package-lock-only (Renovate's lockfile command), npm misclassifies a registry tarball as "remote" when the package declares bundleDependencies. @tailwindcss/oxide-wasm32-wasi does, as an optional dependency of @tailwindcss/oxide. A real npm install works because it skips that cpu: ["wasm32"] package.

Options considered (least permissive first)

Option Fixes it? Notes
allow-remote=root No Only allows URLs declared in the root package.json; the refused package is transitive.
Hold tailwind No The failure is the same on 4.3.1, 4.3.3 and 4.3.5, and it also hits lock file maintenance.
npmrc in packageRules scoped to tailwind Unreliable Lock file maintenance and other updates in a Tailwind repo don't match a tailwind rule.
allow-remote=all in the npm manager block Yes Chosen. Only Renovate's npm-manager lockfile updates. That manager also runs pnpm and Yarn, but only the npm CLI has an allow-remote setting, so for them the line is inert. allow-git and other npm 12 defaults stay.
constraints: { npm: "<12" } Yes npm 11 also defaults to allow-remote=all and allow-git=all, so it is more permissive and stale.
Top-level npmrc Yes Reaches every manager and, with npmrcMerge: false, replaces repo .npmrc files.

Changes

  • .renovate/base.json5: npm: { npmrc: "allow-remote=all\n", npmrcMerge: true }. npmrcMerge keeps a repository's own .npmrc (lovelace-ovapi has one). Renovate writes the repository's lines after this one, so a repository can still set allow-remote itself. The comment links [BUG] --dry-run fails 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.
  • New tests/renovate-npm-allow-remote.sh in mise run test: npmrc may only appear in the npm manager block (not at the top level or in packageRules), may only set allow-remote=all, needs npmrcMerge: true, and may exist in at most one preset.
  • docs/architecture.md: safety-net bullet.

Security

allow-remote controls 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:

  • It applies to Renovate's npm-manager lockfile updates only (for npm: npm install --package-lock-only). pnpm and Yarn read the same .npmrc but have no allow-remote setting (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.
  • CI and developer installs keep npm 12's allow-remote=none (no repository .npmrc sets it), so a URL dependency that reaches a lockfile still fails CI before the PR can automerge.
  • allow-git stays none, and the override doesn't touch the registry, auth or script settings (the test enforces this).

Closes #535

Checklist

  • Linting passes locally (mise exec -- lefthook run pre-commit)
  • Commit messages follow Conventional Commits
  • Documentation updated (if applicable)

Validation (Windows/Git Bash):

  • bash ./tests/renovate-npm-allow-remote.sh: passed. Mutation checks: adding allow-git=all, setting npmrcMerge: false or adding a top-level npmrc each fail it.
  • bash ./tests/renovate-engines-range.sh: passed.
  • Renovate JSON schema validation of base.json5: no new errors (the one existing error is also on main).
  • shellcheck, shfmt -d -i 4 and dprint check: clean. The full mise run test runs in CI.
  • Not verified locally: the npm registry is blocked here, so I couldn't reproduce the npm 12 lockfile run. The fix is confirmed by [BUG] --dry-run fails with EALLOWREMOTE on registry tarballs for packages that declare bundleDependencies npm/cli#9800 (the --package-lock-only repro with @tailwindcss/oxide passes with allow-remote=all). Whether the non-major group PRs in the affected repos go green shows on the next Renovate run after release.

…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>
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0cb6f9d2-91a9-423c-a167-d1a372067baf
Commits

Reviewing files that changed from the base of the PR and between 36da004 and 5e8e6e3.

Files selected for processing: 4

  • .mise.toml
  • .renovate/base.json5
  • docs/architecture.md
  • tests/renovate-npm-allow-remote.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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=all in Renovate’s npm manager configuration while preserving repository .npmrc settings.
  • 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

Comment thread .renovate/base.json5 Resolved
…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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@DevSecNinja

Copy link
Copy Markdown
Owner Author

Owner decision (2026-11-16): on hold until January 2027. We'll wait for upstream progress on npm/cli#9800 first.

  • If npm fixes it by then, close this PR and upgrade npm instead.
  • If there's no progress by then, merge this as is: allow-remote=all applies only to Renovate's lockfile runs.

Until then, Tailwind 4 repos' Renovate lockfile and lock-maintenance PRs keep failing.

@DevSecNinja
DevSecNinja marked this pull request as draft November 16, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(renovate): npm EALLOWREMOTE breaks non-major group PRs (tailwind 4.3.5)

2 participants