Repository navigation
fix(mise): fail package-backend lookups the project could redirect - #176
Merged
Merged
Conversation
The Count lists mise tool versions in a sandbox without the project's configuration, but mise installs a tool with it. A tool whose backend installs from a package registry (npm, pypi/pipx, cargo, gem, dotnet, written explicitly or through mise's registry) now fails its lookup where committed settings could send it elsewhere: a mise configuration in its folder, above or below with registry variables in [env], any MISE_* variable, files loaded through _, backend [settings] or url_replacements; a mise configuration the Count cannot read; or the project's own .npmrc or .yarnrc.yml naming a registry, Python index settings, Cargo source replacement or NuGet feeds other than nuget.org's. Those settings files are read whenever mise is enabled. Which backends a short name uses comes from the registry snapshot the mise crate already carries.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | 8c8278e | Commit Preview URL Branch Preview URL |
Nov 04 2026, 04:38 AM |
Review found redirects the denylist missed: configuration under other names mise reads (mise.local.toml, .config/mise/, conf.d, .miserc), tool aliases, settings like [settings.pipx], options on a tool's own entry, settings files below the tool, unreadable .npmrc placeholders, Cargo's registry.default and task files' including configuration. Now every mise configuration name is read; a configuration with any top-level table but the plain ones, any setting but a few plain ones, a MISE_* variable, or a .miserc fails every tool it governs; options beyond version and os on a tool's own entry fail that tool; [env] registry variables and file-loading directives fail package backends; and the project's own registry settings count above and below the tool, an unreadable one included. _.path and _.python are fine.
- [env] variables that move where tools read configuration or download from (HOME, PATH, XDG homes, mirrors, dist servers, proxies, *_CONFIG, *RC) fail every tool; GO* variables fail go: tools; COREPACK_* npm. - A backend's own [settings] table fails its tools only, and a core tool's (such as [settings.python]) that tool only. - Options beyond version and os on a tool's entry count in every related configuration, in task files and in array form. - mise configurations, .npmrc, .yarnrc.yml and pip files become unreadable placeholders when a working tree holds them as symlinks or non-text, so they fail closed there too.
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.
Last per-ecosystem fix from the registry audit, after Bundler (#168), Composer (#170), NuGet (#171), Maven/Gradle (#173), Cargo (#174) and Go (#175).
The gap
The Count lists a mise tool's versions with
mise ls-remotein a sandbox, with no project configuration (MISE_NO_CONFIG,MISE_NO_ENV). mise installs the tool with the project's configuration, though. For a tool whose backend installs from a package registry, that configuration can point the backend somewhere else. Then the Count lists the public package of that name while mise installs another one.The rule
A tool whose backend is
npm,pypi/pipx,cargo,gemordotnetfails its lookup when committed settings could redirect that backend. The backend can be written explicitly or come from mise's registry:aws-cdkisnpm:aws-cdk, taken from the registry snapshot the mise crate already carries. The settings that count:[env]:NPM_CONFIG_*/YARN_*,PIP_*/UV_*/PIPX_*,CARGO_*,GEM_*/BUNDLE_*,NUGET_*/DOTNET_*;MISE_*variable, or files loaded through_directives;[settings], orurl_replacements,env_fileandenv_files..npmrcor.yarnrc.ymlnaming a registry;uv.toml,pip.conf/pip.ini, or apyproject.tomlwith index settings;cargo::replaced);nuget::Feeds::origin).These settings files are read whenever mise is enabled, even if the matching manager is off.
Core tools and the GitHub and aqua backends fail only on
MISE_*variables, settings for their own backend, orurl_replacements.Policy: visible evidence
The rule became allowlists after review. Every mise configuration name is read, including
mise.local.toml,.config/mise/,conf.dand.miserc. Any top-level table or setting outside a short plain list fails every tool. Options beyondversionandoson a tool's entry fail it.[env]stays a list of known patterns, because environment variables feed whatever mise runs and no list can be complete. That's the same visible-evidence policy as Maven/Gradle in #173. Matching variables include:GO*,COREPACK_*,MISE_*;*_CONFIGand*RC.Follow-ups
_.file.envfails every package backend;registrytext in an.npmrccounts, whatever scope it names;CARGO_TERM_COLORorUV_LINK_MODE, fail their backends.mise.locknaming artifact URLs isn't read.