Skip to content

fix(github): use version_prefix when fetching release for SLSA verification#7391

Merged
jdx merged 2 commits intomainfrom
fix/slsa-version-prefix
Dec 18, 2025
Merged

fix(github): use version_prefix when fetching release for SLSA verification#7391
jdx merged 2 commits intomainfrom
fix/slsa-version-prefix

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Dec 18, 2025

Summary

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.

Before: Looking for v0.7.1 → 404 Not Found
After: Looking for grain-v0.7.1 → Found ✓

Fix

Use the existing try_with_v_prefix helper which properly handles version_prefix options, instead of manually trying version/v{version}.

Tested with

  • mise test-tool grain
  • mise test-tool bitwarden-secrets-manager

Test plan

  • mise test-tool grain passes
  • mise test-tool bitwarden-secrets-manager passes

🤖 Generated with Claude Code


Note

Use version_prefix-aware lookup when fetching the GitHub release during SLSA provenance verification.

  • Backend (GitHub SLSA verification):
    • Replace manual version/v{version} lookup with try_with_v_prefix to honor custom version_prefix when retrieving releases.
    • Simplify error handling path for failed release retrieval.

Written by Cursor Bugbot for commit 345c48f. This will update automatically on new commits. Configure here.

…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]>
Copilot AI review requested due to automatic review settings December 18, 2025 16:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_prefix helper function
  • Added extraction of version_prefix from tool options to properly construct release tags

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

xtasks/test/perf

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%

@jdx jdx merged commit 84381b0 into main Dec 18, 2025
40 of 45 checks passed
@jdx jdx deleted the fix/slsa-version-prefix branch December 18, 2025 17:33
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants