fix: verify provenance during lock#9945
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to refresh tool metadata by allowing already installed versions to re-run the installation path. This is primarily used to ensure that checksums and provenance information, such as GitHub Attestations or SLSA, are correctly captured in the lockfile. A critical issue was identified where the logic for enabling provenance checks does not account for whether the GitHub API actually supports attestations on specific instances, such as GitHub Enterprise. This oversight could lead to infinite reinstallation loops, and a code suggestion was provided to incorporate an explicit support check into the logic.
Greptile SummaryThis PR removes the
Confidence Score: 4/5Safe to merge with awareness that tools lacking attestations or SLSA will trigger a fresh provenance check on every The core provenance detection and verification logic changes are consistent and the new src/backend/github.rs and src/backend/aqua.rs — specifically the interaction between removing the sentinel and the install-time guard that decides whether to re-run verification for already-installed tools. Important Files Changed
Reviews (8): Last reviewed commit: "fix: verify provenance during lock" | Re-trigger Greptile |
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.10 x -- echo |
18.5 ± 0.9 | 16.8 | 23.3 | 1.00 |
mise x -- echo |
18.8 ± 1.2 | 16.9 | 30.7 | 1.02 ± 0.08 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.10 env |
18.5 ± 0.8 | 16.6 | 21.7 | 1.00 |
mise env |
18.9 ± 1.1 | 17.0 | 24.8 | 1.02 ± 0.07 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.10 hook-env |
19.5 ± 0.9 | 17.7 | 25.5 | 1.00 |
mise hook-env |
19.9 ± 0.9 | 17.8 | 24.0 | 1.02 ± 0.07 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.5.10 ls |
16.0 ± 0.9 | 14.3 | 21.7 | 1.00 |
mise ls |
16.2 ± 0.8 | 14.7 | 20.8 | 1.01 ± 0.07 |
xtasks/test/perf
| Command | mise-2026.5.10 | mise | Variance |
|---|---|---|---|
| install (cached) | 134ms | 137ms | -2% |
| ls (cached) | 59ms | 62ms | -4% |
| bin-paths (cached) | 64ms | 68ms | -5% |
| task-ls (cached) | 124ms | 127ms | -2% |
e27f978 to
a0f40a6
Compare
a0f40a6 to
8aa3002
Compare
90089cc to
eff095c
Compare
bc8c5ee to
74d1394
Compare
74d1394 to
a8a6403
Compare
a8a6403 to
afc517d
Compare
afc517d to
87a038c
Compare
87a038c to
e30fb17
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e30fb17. Configure here.
e30fb17 to
258e64e
Compare

Summary
mise lock, instead of forcing already-installed tools through the install path.github_attestations = "unavailable"as lockfile state. Legacy entries still parse, but are dropped on write.provenance_api_failures_fatalso GitHub attestation API failures are blocking by default and can be made warn-only when needed.Root Cause
Restored or older lockfiles could contain checksum-only entries or the old
github_attestations = "unavailable"sentinel. Reusing that sentinel meantGitHub attestation availability could stay stale after cache restore or API
failure.
mise lockis the right place to refresh that metadata: it can query releaseassets, download artifacts when needed for lock-time provenance verification,
and update the lockfile without deleting or reinstalling a working tool.
Validation
target/debug/mise lockcargo test -p mise github::sigstore::tests::test_is_api_failure_excludes_malformed_payloadscargo test -p mise backend::vfox::testcargo fmt --checkcargo clippy -p mise --all-targets -- -D warningsNote
Medium Risk
Changes provenance detection/verification paths for
mise lockand installs, which can affect whether tool installs fail vs. proceed when remote provenance services are unavailable. Also modifies lockfile serialization semantics, so existing lockfiles may be rewritten differently and alter caching/downgrade behavior.Overview
mise locknow actively verifies and records provenance (GitHub attestations and SLSA) at lock time for the current platform, rather than relying on install-time verification or persisting negative attestation cache state.Adds a new setting
provenance_api_failures_fatal(defaulttrue, envMISE_PROVENANCE_API_FAILURES_FATAL) to control whether remote provenance API failures abort; when disabled, API failures warn and fall back/skip, while malformed/verification errors remain fatal.Removes writing/preserving
github_attestations = "unavailable"in lockfiles (legacy values still parse but are dropped on write), simplifyingPlatformInfomerging/serialization and updatingmise.lockaccordingly.Reviewed by Cursor Bugbot for commit 258e64e. Bugbot is set up for automated code reviews on this repo. Configure here.