Skip to content

mise: rework the #254 stack before merge (control name, codes, trusted* keys, lockfile URL) #678

Description

@Exypte

Is your feature request related to a problem? Please describe.

Part of #254. Reviewing the mise stack (#665 lockfile, #666 versions, #669 sources, #670 tasks) before it merges showed that the control, its codes and its config keys don't say clearly enough what they check. This issue lists the changes to make in the stack, plus the feedback Thomas gave on it.

Nothing here is released yet, so codes, keys and names can still change without a migration.

Describe the solution you'd like

1. Rename the control

packageManagersMustBeCompliant is too generic. Rename it to mise-en-place.

2. Codes: numbered in sequence, with a subject

  • Codes stay ISSUE-xxxx in the 10xx block, but each new code takes the next number, whatever check it belongs to. The 1001 / 1011 / 1021 / 1031 sub-blocks go away.
  • Each code gets a subject key (lockfile, versions, sources, tasks) so the codes can be grouped and filtered by check.
  • Every title says it's about mise and states the defect plainly.
Today Subject New meaning
ISSUE-1001 lockfile Tools are declared in a mise.toml and its lockfile is not committed
ISSUE-1002 lockfile Lockfiles are off for that project
ISSUE-1003 lockfile A tool is not locked
ISSUE-1004 lockfile A tool is locked without a checksum
ISSUE-1005 lockfile A tool is locked with an untrusted provenance
new lockfile A tool is locked without a provenance
ISSUE-1006 lockfile A required platform is not locked
ISSUE-1007 lockfile The lockfile format is older than expected
ISSUE-1008 lockfile A tool is declared in asdf's .tool-versions; migrating it to mise only is better
ISSUE-1009 — Removed, see point 3
ISSUE-1011 versions A tool uses a forbidden version
new versions A tool uses a version that can't be read statically
ISSUE-1021 sources An untrusted tool is used (point 5)
ISSUE-1022 sources A tool comes from an untrusted registry (point 6)
ISSUE-1023 sources A tool comes from an untrusted replacement (point 7)
new sources A tool comes from an untrusted option (point 8)
ISSUE-1031 tasks Required tasks are missing (point 9)

The final numbers are given in sequence once the list is settled.

3. An unreadable mise file is a CLI error, not a finding

A mise config or lockfile that can't be read or parsed stops the run with an error instead of raising ISSUE-1009. Plumber reads every mise file first, then fails once and lists every file that failed.

Today ISSUE-1009 also covers a symlink that leaves the repository or points at a device, and a file over 2 MiB. Those become CLI errors too.

4. .tool-versions only for ISSUE-1008

asdf's .tool-versions is read only to raise ISSUE-1008. Every other check ignores it (today the sources check judges its entries too).

5. trustedTools instead of authorizedSources

The list is matched against the tool's full mise name (aqua:jqlang/jq, github:my-org/*, core:*), so it's a list of trusted tools.

6. trustedRegistries instead of authorizedRegistries, checked on the lockfile

Rework the registry check around the url that mise.lock records for each platform, which is the URL mise install --locked downloads. This covers #668.

7. New key trustedReplacement

Check whether settings.url_replacements and/or MISE_URL_REPLACEMENTS are used, and whether each replacement value is in the trusted list.

Tested on mise 2026.11.16: the lockfile keeps the original https://github.com/... URL, and mise install --locked still sends the request to the replacement host first. So the lockfile alone doesn't show a replacement, and point 6 doesn't cover it.

8. New key trustedOptions

Check whether tools.* options are set with a URL, and whether each URL is in the trusted list.

9. Required tasks as a list

mise.tasks takes a plain list of required tasks.

Configuration in .plumber.yaml

A sketch with the names above. Defaults and the exact shape are decided during implementation.

mise:
  enabled: true
  lockfile:
    enabled: true
    requireChecksums: true
    requireProvenance: ["aqua:*"]
  versions:
    enabled: true
    forbiddenVersions: [latest, lts, ...]
  sources:
    enabled: true
    trustedTools: ["core:*", "aqua:*", "github:my-org/*"]
    trustedRegistries: ["https://github.com/*", "https://nodejs.org/*"]
    trustedReplacement: []
    trustedOptions: []
  tasks:
    enabled: true
    required: [lint, test]
  exemptPackages: []
  exemptPaths: []

Feedback from Thomas

  1. Check the download URL recorded in mise.lock (mise sources: the download URL locked in mise.lock is never checked #668). Today a change to mise.lock alone can point a tool at any URL while the sources check stays green. This has to be in the current stack, otherwise authorizedSources is not a real allowlist. The lockfile is already parsed by feat(control): mise-en-place control: lockfile, versions, sources and tasks checks, local and remote (ISSUE-1001 to ISSUE-1019) #665. (Point 6 above.)
  2. Required tasks must be run in the workflow. mise.tasks.required only checks that the tasks are declared in the mise project. Add an option that also checks the workflow actually runs them (mise run <task>). It should apply to the required tasks, not to every declared task, because repos usually declare dev-only tasks that CI never runs.
  3. mise must be present. Add an option "mise must be present". Today a repo with no mise file is reported as not applicable, and with the option it becomes a finding.

Implementation Hints

  • Codes 1001 to 1009 are consecutive today, but removing ISSUE-1009 and adding the new codes renumbers most of the list. Since every PR of the stack adds codes, each one changes, and the example repo's issue-NNNN/ directories are renamed to match.
  • Today ISSUE-1022 also reads [plugins] URLs, the build repos (python.pyenv_repo, ruby.ruby_build_repo, ruby.ruby_install_repo), the mirror settings and the [env] index variables (GOPROXY, PIP_INDEX_URL, NPM_CONFIG_REGISTRY, ...). Point 6 moves the check to the lockfile URL. The [env] variables redirect backends (go, pipx, npm) whose lock entries record no per-platform URL, and plugins and build repos are git repositories mise clones (whether the lockfile records them is not checked yet). Decide whether they stay in a code or are dropped.
  • Related: mise lockfile: MISE_LOCKFILE=0 in the CI file turns locking off and is never checked #675 (MISE_LOCKFILE=0 in the CI file) and mise versions: a version set from the pipeline (MISE_<TOOL>_VERSION, mise use tool@latest) is never checked #676 (versions set from the pipeline). MISE_URL_REPLACEMENTS in point 7 is set the same way, in the CI file.

Why It's Valuable

The stack is about to merge. After a release, codes become durable keys on the platform and config keys become user-facing, so this is the last cheap moment to rename them, and #668 is the gap that keeps authorizedSources from being a real allowlist.

Activity

  1. added theissue type on Dec 2, 2026
  2. self-assigned this
    on Dec 2, 2026
  3. Exypte commented on Dec 2, 2026

    @Exypte
    ContributorAuthor

    I'm working on this one, a PR is on the way.

  4. Exypte commented on Dec 2, 2026

    @Exypte
    ContributorAuthor

    The final code list. Each PR of the stack adds its codes in this order, so the numbers stay in sequence from #665 to #670.

    Code Subject Title Today PR
    ISSUE-1001 lockfile mise: tools are declared in a mise.toml and its lockfile is not committed ISSUE-1001 #665
    ISSUE-1002 lockfile mise: lockfiles are turned off ISSUE-1002 #665
    ISSUE-1003 lockfile mise: a tool is not locked ISSUE-1003 #665
    ISSUE-1004 lockfile mise: a tool is locked without a checksum ISSUE-1004 #665
    ISSUE-1005 lockfile mise: a tool is locked with an untrusted provenance ISSUE-1005 #665
    ISSUE-1006 lockfile mise: a tool is locked without a provenance new #665
    ISSUE-1007 lockfile mise: a required platform is not locked ISSUE-1006 #665
    ISSUE-1008 lockfile mise: the lockfile format is older than the minimum ISSUE-1007 #665
    ISSUE-1009 lockfile mise: a tool is declared in asdf's .tool-versions ISSUE-1008 #665
    ISSUE-1010 presence mise: the repository has no mise config new ("mise must be present") #665
    ISSUE-1011 versions mise: a tool uses a forbidden version ISSUE-1011 #666
    ISSUE-1012 versions mise: a tool version can't be read statically new #666
    ISSUE-1013 sources mise: a tool is not trusted ISSUE-1021 #669
    ISSUE-1014 sources mise: a locked download URL is not a trusted registry ISSUE-1022 #669
    ISSUE-1015 sources mise: a URL replacement is not trusted ISSUE-1023 #669
    ISSUE-1016 sources mise: a tool option sets an untrusted URL new #669
    ISSUE-1017 tasks mise: required tasks are missing ISSUE-1031 #670

    Today's ISSUE-1009 (unreadable file) is removed. An unreadable or unparseable mise file, a symlink out of the repository or to a device, and a file over 2 MiB become a CLI error.

    The sources check no longer reads [plugins] URLs, the build repos (python.pyenv_repo, ruby.ruby_build_repo, ruby.ruby_install_repo), the mirror settings, aqua.registries or the [env] index variables (GOPROXY, PIP_INDEX_URL, NPM_CONFIG_REGISTRY, ...). ISSUE-1014 checks the URL that mise.lock records, which is what mise install --locked downloads.

    Checking that the workflow runs the required tasks (mise run <task>) moves to its own issue: #679.

  5. Exypte commented on Dec 2, 2026

    @Exypte
    ContributorAuthor

    The final code list, as implemented in the stack. It adds two codes to the list above: ISSUE-1018 and ISSUE-1019, both from the review of #665.

    Code Subject Finding Key PR
    ISSUE-1001 lockfile Tools are declared in a mise config and its lockfile is not committed #665
    ISSUE-1002 lockfile Lockfiles are off (lockfile = false, also inherited from a parent config) #665
    ISSUE-1003 lockfile A tool is not locked #665
    ISSUE-1004 lockfile A tool is locked without a checksum requireChecksums #665
    ISSUE-1005 lockfile A tool is locked with an untrusted provenance trustedProvenance #665
    ISSUE-1006 lockfile A tool is locked without a provenance requireProvenance #665
    ISSUE-1007 lockfile A required platform is not locked requiredPlatforms #665
    ISSUE-1008 lockfile The lockfile format is older than the minimum minimumLockfileVersion #665
    ISSUE-1009 lockfile A tool is declared in asdf's .tool-versions #665
    ISSUE-1010 presence The repository has no mise config required #665
    ISSUE-1011 versions A tool uses a forbidden version forbiddenVersions #666
    ISSUE-1012 versions A tool version can't be read statically #666
    ISSUE-1013 sources A tool is not trusted trustedTools #669
    ISSUE-1014 sources A locked download URL is not a trusted registry trustedRegistries #669
    ISSUE-1015 sources A URL replacement is not trusted trustedReplacement #669
    ISSUE-1016 sources A tool option sets an untrusted URL trustedOptions #669
    ISSUE-1017 tasks A project misses a required task required (a list) #670
    ISSUE-1018 lockfile A tool is locked without a download URL or checksum requireChecksums #665
    ISSUE-1019 lockfile A mise local config (*.local.toml) is committed #665

    Choices made during the work:

    • trustedProvenance defaults to every kind mise records (slsa, github-attestations, cosign, minisign). trustedRegistries left out means the locked URLs aren't checked, and [] trusts none. trustedReplacement and trustedOptions trust nothing when absent or empty.
    • required: true is a top-level mise key. A .tool-versions file alone does not count as using mise.
    • An unreadable mise file stops the run with one error listing every file. A file every configuration exempts through exemptPaths doesn't stop it.
    • ISSUE-1018 covers a lock entry with nothing to verify a download against: a binary backend (aqua, github, gitlab, ubi, http) with no platform table, or a platform with neither url nor checksum.
    • ISSUE-1019 only reports a local config git tracks, so a developer's own mise.local.toml is never reported.
    • MISE_URL_REPLACEMENTS set in the CI file goes with mise lockfile: MISE_LOCKFILE=0 in the CI file turns locking off and is never checked #675. Checking that the workflow runs the required tasks is mise tasks: check that the workflow runs the required tasks (mise run <task>) #679.

    The example repo has one directory per code, grouped by subject, on feature/678-by-subject. It goes to main once the stack merges.

  6. added a commit that references this issue on Dec 3, 2026
    4070b97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions