Skip to content

fix(github): use GITHUB_TOKEN for attestation verification#7446

Merged
jdx merged 1 commit intomainfrom
fix/github-attestation-token
Dec 19, 2025
Merged

fix(github): use GITHUB_TOKEN for attestation verification#7446
jdx merged 1 commit intomainfrom
fix/github-attestation-token

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Dec 19, 2025

Summary

Pass GITHUB_TOKEN to sigstore_verification::verify_github_attestation to avoid GitHub API rate limiting when verifying attestations.

Previously the code explicitly passed None for the token parameter, causing unauthenticated API requests which have lower rate limits.

Test plan

  • Install a tool with GitHub attestations when GITHUB_TOKEN is set

🤖 Generated with Claude Code


Note

Passes GITHUB_TOKEN to GitHub attestation verification to use authenticated API and avoid rate limits.

  • GitHub backend
    • Pass env::GITHUB_TOKEN.as_deref() to sigstore_verification::verify_github_attestation in src/backend/github.rs.
    • Add use crate::env; import to access the token.

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

Pass the GitHub token to sigstore_verification::verify_github_attestation
to avoid API rate limiting when verifying GitHub attestations.
Copilot AI review requested due to automatic review settings December 19, 2025 04:40
Copy link
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 GitHub API rate limiting issues during attestation verification by passing the GITHUB_TOKEN environment variable instead of explicitly using None. Previously, the code forced unauthenticated API requests which are subject to much lower rate limits.

Key changes:

  • Import the env module to access GITHUB_TOKEN
  • Pass env::GITHUB_TOKEN.as_deref() to verify_github_attestation instead of None

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

@jdx jdx merged commit 3b9b058 into main Dec 19, 2025
25 checks passed
@jdx jdx deleted the fix/github-attestation-token branch December 19, 2025 04:41
@github-actions
Copy link

Hyperfine Performance

mise x -- echo

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.12 x -- echo 19.5 ± 0.4 18.9 22.8 1.00
mise x -- echo 19.7 ± 0.7 18.9 30.9 1.01 ± 0.04

mise env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.12 env 19.1 ± 0.3 18.4 22.9 1.00
mise env 19.3 ± 0.7 18.5 25.4 1.02 ± 0.04

mise hook-env

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.12 hook-env 19.3 ± 0.5 18.6 26.3 1.00 ± 0.03
mise hook-env 19.3 ± 0.3 18.6 20.6 1.00

mise ls

Command Mean [ms] Min [ms] Max [ms] Relative
mise-2025.12.12 ls 16.8 ± 0.3 16.1 18.0 1.00
mise ls 17.0 ± 0.7 16.3 29.1 1.02 ± 0.04

xtasks/test/perf

Command mise-2025.12.12 mise Variance
install (cached) 109ms 110ms +0%
ls (cached) 66ms 66ms +0%
bin-paths (cached) 72ms 72ms +0%
task-ls (cached) 279ms 287ms -2%

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.

2 participants