Repository navigation
feat(lockfiles): give Bundler, dotnet, uv and Poetry registry credentials, and say lockfile tools run code - #180
Merged
Conversation
…ials, and say lockfile tools run code Lockfile tools run repository and package code: Bundler evaluates the Gemfile, dotnet MSBuild, uv and Poetry build sdists, and Yarn and npm prepare git dependencies. The Count runs them unsandboxed, so leaving four of them out of `tools` credentials protected nothing. They now get them in the form each reads: - Bundler: `BUNDLE_<HOST>`, by host. - dotnet: `NuGetPackageSourceCredentials_<key>` for each `nuget.config` source under a tools entry. - uv: `~/.netrc`, by host. - Poetry: `POETRY_HTTP_BASIC_<NAME>_USERNAME` and `_PASSWORD` for each `[[tool.poetry.source]]` under a tools entry. The lockfile guide now says plainly that lockfile tools run repository and package code with the Count's access, and that `tools` and `allowedInstallations` are not a boundary. Install scripts stay skipped because a lockfile needs none. Refs #157
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 1fc144e | Commit Preview URL Branch Preview URL |
Nov 04 2026, 09:15 AM |
…ler and Poetry credentials
- Name-keyed sources come as lists, so a key given twice in one file is a
conflict, and NuGet keys that differ only in case are one key. dotnet reads
every `nuget.config` in the tree, since a project can name any of them.
- Poetry may read `~/.netrc`, so a run with one withholds its output, and
inline `source = [{ … }]` arrays count.
- Bundler takes no dotless host, whose variable could be a Bundler setting,
and no credentials it could not put in a URL as they are.
- The docs say which tools match by host whatever the scheme or port, and
no longer say that no lifecycle script ever runs.
… credentials for an unreadable config - Names are grouped by the fragment the tool makes of them, folded in full Unicode case, and a name that is not plain still counts, so one a tool folds onto a credentialed name (Poetry's `acmeſ` onto `ACMES`) keeps it from being given. - NuGet gives no source credentials when any `nuget.config` in the tree, in any case, cannot be read, as it could define any key. - Poetry withholds its failure output whenever `~/.netrc` exists. - Bundler takes only credentials made of characters a URL's user part holds unescaped. - The docs name the lockfile tools that get no credentials.
…nfig as NuGet does `Cargo.lock` now records the new dependency, which `--locked` builds need. NuGet elements and attributes match in any case or namespace, and Bundler credentials leave out `+`, which a form decoder reads as a space.
Merged
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. Follows #178 and #179.
Why
Several lockfile tools run repository and package code:
The tools run unsandboxed as the Count's user, so excluding four of them from
toolscredentials while the others got them was inconsistent, and protected nothing. The decision: code may run, there is no sandbox, and the docs say so.What
BUNDLE_<HOST>(.→__,-→___)NuGetPackageSourceCredentials_<key>=Username=…;Password=…;ValidAuthenticationTypes=basicnuget.configsource, from the project up to the root~/.netrcPOETRY_HTTP_BASIC_<NAME>_USERNAME/_PASSWORD[[tool.poetry.source]]Runner::named. A name gets the entry its URL falls under, by the same longest-prefix match as lookups. The URL must be written in its normal form, and a name defined two ways gets nothing.Docs
guide/lockfiles.mdhas a new danger callout: lockfile tools run repository and package code with the Count's access (environment, settings secrets, GitHub App credentials, concurrent runs), so run it only for repositories you trust that far.toolsnorallowedInstallationsis a boundary.yarnPath/pluginshandling is now explained by what the scratch tree lacks, not by safety.sources.md,settings.mdx,PatchulaSettings.pkl,compatibility.mdanddepartures.mdare updated to match.Review rounds
Three Sonnet rounds. Fixes from them:
nuget.configin the tree counts, read in any case or namespace.~/.netrcit may read now counts as holding credentials.acmeſontoACMES). A folded or non-plain name poisons its group, so it never inherits another name's credentials.BUNDLE_PATH), and only URL-safe userinfo characters are accepted.a-banda_bdefinitions get nothing), never looser.Cargo.lock: updated for the newroxmltreedependency.