fix(github): use GITHUB_TOKEN for attestation verification#7446
Merged
Conversation
Pass the GitHub token to sigstore_verification::verify_github_attestation to avoid API rate limiting when verifying GitHub attestations.
Contributor
There was a problem hiding this comment.
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
envmodule to accessGITHUB_TOKEN - Pass
env::GITHUB_TOKEN.as_deref()toverify_github_attestationinstead ofNone
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Hyperfine Performance
|
| 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% |
1 task
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
Pass
GITHUB_TOKENtosigstore_verification::verify_github_attestationto avoid GitHub API rate limiting when verifying attestations.Previously the code explicitly passed
Nonefor the token parameter, causing unauthenticated API requests which have lower rate limits.Test plan
🤖 Generated with Claude Code
Note
Passes
GITHUB_TOKENto GitHub attestation verification to use authenticated API and avoid rate limits.env::GITHUB_TOKEN.as_deref()tosigstore_verification::verify_github_attestationinsrc/backend/github.rs.use crate::env;import to access the token.Written by Cursor Bugbot for commit 48df59b. This will update automatically on new commits. Configure here.