Skip to content

fix: move id-token: write to job-level for Scorecard API compliance - #455

Merged
shenxianpeng merged 1 commit into
mainfrom
fix/scorecard-id-token-permissions
Jul 3, 2026
Merged

fix: move id-token: write to job-level for Scorecard API compliance#455
shenxianpeng merged 1 commit into
mainfrom
fix/scorecard-id-token-permissions

Conversation

@shenxianpeng

Copy link
Copy Markdown
Member

Problem

The OpenSSF Scorecard workflow is failing with:

workflow verification failed: global perm is set to write: permission for id-token is set to write

The Scorecard Action v2.4.3 enforces workflow restrictions when publish_results: true:

No workflow level write permissions — only the job containing ossf/scorecard-action may use id-token: write.

The workflow had id-token: write at the top-level permissions block, which the Scorecard API treated as a global write permission and rejected with a 400 Bad Request.

Fix

Move id-token: write from the top-level permissions to the job-level permissions under the analysis job, keeping only contents: read at the top level.

Verification

  • git diff shows only the expected permission scope change
  • ✅ Pre-commit hooks passed (yaml lint, codespell, commit message checks)

The OpenSSF Scorecard API rejects workflows with global write permissions
when publish_results: true. Move id-token: write from the top-level
permissions block to the analysis job-level permissions to comply with
the action's workflow restrictions.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner July 3, 2026 09:05
@netlify

netlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit 2709a85
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6a477b409f171e000819e444
😎 Deploy Preview https://deploy-preview-455--commit-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@shenxianpeng, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 49 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c41017a7-4baf-4e8f-9d16-2cfc3eec4160

📥 Commits

Reviewing files that changed from the base of the PR and between c724181 and 2709a85.

📒 Files selected for processing (1)
  • .github/workflows/scorecard.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/scorecard-id-token-permissions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Jul 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2026

Copy link
Copy Markdown

@shenxianpeng
shenxianpeng merged commit fe94a5b into main Jul 3, 2026
12 of 13 checks passed
@shenxianpeng
shenxianpeng deleted the fix/scorecard-id-token-permissions branch July 3, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant