fix(github): use version_prefix when fetching release for SLSA verification#7391
Merged
fix(github): use version_prefix when fetching release for SLSA verification#7391
Conversation
…cation
The SLSA verification was failing for tools with custom version_prefix
(e.g., grain with `version_prefix=grain-v`, bitwarden-secrets-manager
with `version_prefix=bws-v`) because it was only trying `version` and
`v{version}` instead of respecting the configured prefix.
Fix by using the existing `try_with_v_prefix` helper which properly
handles version_prefix options.
Fixes tools like:
- grain (version_prefix=grain-v)
- bitwarden-secrets-manager (version_prefix=bws-v)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes SLSA verification failures for GitHub-backed tools that use custom version_prefix configurations (e.g., grain with grain-v, bitwarden-secrets-manager with bws-v). The fix ensures that when fetching releases for verification, the system respects the configured version prefix instead of only attempting the bare version and v{version} patterns.
Key changes:
- Replaced manual version/v-prefix fallback logic with the existing
try_with_v_prefixhelper function - Added extraction of
version_prefixfrom tool options to properly construct release tags
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
| Command | mise-2025.12.11 | mise | Variance |
|---|---|---|---|
| install (cached) | 111ms | 112ms | +0% |
| ls (cached) | 67ms | 68ms | -1% |
| bin-paths (cached) | 74ms | 74ms | +0% |
| task-ls (cached) | 287ms | 298ms | -3% |
jekis913
added a commit
to jekis913/mise
that referenced
this pull request
Dec 19, 2025
* upstream/renovate/lockfile-maintenance: chore(deps): lock file maintenance fix(ci): improve GHA cache efficiency and fix registry-ci bug (jdx#7404) feat(tera): add haiku() function for random name generation (jdx#7399) feat: implement independent versioning for subcrates (jdx#7402) docs: add comprehensive glossary (jdx#7401) docs: improve installation documentation (jdx#7403) test: add token pool integration for rate limit distribution (jdx#7397) docs: add link to COPR package page for Fedora/RHEL test: rename duplicate 'ci' job names for clarity (jdx#7398) registry: add github backend for swiftformat (jdx#7396) chore: rename mise-tools to mise-versions chore: release 2025.12.12 (jdx#7386) fix(github): use version_prefix when fetching release for SLSA verification (jdx#7391) refactor(vfox): remove submodules, embed plugins directly (jdx#7389) test(registry): add final ci job as merge gate (jdx#7390) test: split unit job to speed up macOS CI (jdx#7388) feat(backend): add security features to github backend (jdx#7387)
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.
Summary
The SLSA verification was failing for tools with custom
version_prefix(e.g.,grainwithversion_prefix=grain-v,bitwarden-secrets-managerwithversion_prefix=bws-v) because it was only tryingversionandv{version}instead of respecting the configured prefix.Before: Looking for
v0.7.1→ 404 Not FoundAfter: Looking for
grain-v0.7.1→ Found ✓Fix
Use the existing
try_with_v_prefixhelper which properly handlesversion_prefixoptions, instead of manually trying version/v{version}.Tested with
mise test-tool grain✓mise test-tool bitwarden-secrets-manager✓Test plan
mise test-tool grainpassesmise test-tool bitwarden-secrets-managerpasses🤖 Generated with Claude Code
Note
Use version_prefix-aware lookup when fetching the GitHub release during SLSA provenance verification.
version/v{version}lookup withtry_with_v_prefixto honor customversion_prefixwhen retrieving releases.Written by Cursor Bugbot for commit 345c48f. This will update automatically on new commits. Configure here.