Repository navigation
feat(lockfiles): give aube, npm, Bun and Yarn opted-in registry credentials - #178
Merged
Merged
Conversation
…ntials A registry entry with `tools = true` also gives its credentials to the lockfile tools that run no repository or package code. They are written as per-host user configuration in the job's private home, owner-only, for the npm-family run alone, and removed afterwards. Bundler, dotnet, uv and Poetry never get them. `tools` needs `auth` and is refused on a mirror entry. Refs #157
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 68473ce | Commit Preview URL Branch Preview URL |
Nov 04 2026, 07:36 AM |
…e leaks review found npm, aube, Bun and Yarn can still run a git dependency's build scripts, so `tools = true` trusts the repositories that may use an entry, and their dependencies, with its credential; the docs now say so. Within that: - Yarn runs with an allowlist of `.yarnrc.yml` settings, so no repository proxy, TLS or plain-HTTP setting applies. - A run stops when a committed file names a credentialed host over plain HTTP, which npm, aube and Bun would send the credential to. - No other entry may sit under a tools entry's prefix, where these tools would send the broader entry's credential. - Tool output is redacted of every registry secret. - Credential files never write through an existing link and are removed on every exit path, the aube configuration included.
…tool credentials `patchula serve` built its lockfile runner without the tools entries, so `tools = true` only worked from the CLI. It now gets them. The repository is trusted with a tools credential, so its own registry, proxy and TLS settings apply as each tool reads them. The plain-HTTP scan and the Yarn settings allowlist go: neither could cover every file and URL the tools read, and the allowlist broke Yarn setups for operators who never set `tools`. The docs say what a plain-HTTP or TLS-off setting exposes.
…registry credentials A failing npm-family tool can quote what a private registry answered, and failure reasons reach reports, dashboards and public pages. When it held credentials, the reason now names the tool and nothing it printed, which replaces the secret redaction. Credentials are written before the sanitised `.npmrc` files, so a failed write leaves nothing to restore, and a tools prefix cannot hold `=` or `;`, which `.npmrc` keys cannot.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #157, phase 4: lockfile tools and private registries.
What
New operator setting
toolson aregistriesentry, defaultfalse. It needsauth. It is refused on amirrorOfentry, since lockfile tools read the registries the repository names, never a mirror. It is also refused when any other entry sits under its prefix, since npm, aube and Bun would send the broader entry's credential there, and when the prefix holds=or;, which.npmrckeys cannot.With
tools = true, aube, npm, Bun and Yarn get the credentials as per-prefix user configuration in the job's private HOME://host/path/:_authTokenor:_auth;npmRegistries.The files are owner-only, never written through an existing link, and removed on every exit path.
Trust model
tools = truetrusts every repository that may use the entry, and every package those repositories depend on, with the credential.These tools run with lifecycle scripts off, but they still prepare git dependencies by running their build scripts: npm's pacote runs
npm install --forcein the dependency, with no--ignore-scripts. The runner has no sandbox, so that code can read the credential.The docs say this plainly and point at
allowedInstallations. This is the same exposure Renovate'shostRuleshave.Within that model:
patchula servegives the runner its tools entries (it built the runner without them at first).Docs
guide/lockfiles.md,guide/sources.md,reference/settings.mdx,renovate/compatibility.md,renovate/departures.md.Follow-ups
CARGO_REGISTRIES_<NAME>_TOKEN), Go (.netrc), Composer (COMPOSER_AUTH) and Terraform (TF_TOKEN_<host>) tool credentials, on the same plumbing and trust model.${VAR}in.yarnrc.yml, so a Basic password containing${would make every credentialed Yarn run fail, with its output withheld. Secrets are read per batch, so settings validation cannot catch it;yarn_authcould refuse such an entry with a clear message.run-*/driver/homesurvive a SIGKILL or OOM kill (mode 0600, on the cache volume). Sweeping stalerun-*directories at startup would close this.toolsstop being a trust grant.