Skip to content

fix: adding required permissions to top level and jobs in the workflow#1639

Merged
jabrown85 merged 1 commit intobuildpacks:mainfrom
gaganhr94:fix/token-permissions
Apr 29, 2026
Merged

fix: adding required permissions to top level and jobs in the workflow#1639
jabrown85 merged 1 commit intobuildpacks:mainfrom
gaganhr94:fix/token-permissions

Conversation

@gaganhr94
Copy link
Copy Markdown
Contributor

Summary

Currently the score for the Token Permissions is 0 because the top level permissions and a few job level permissions are missing in the workflows. With this change, the score will move to 10, since the workflow jobs will run with the minimal permissions. The PR retains conditions like write only at the job level, where it is necessary.

Release notes

  • Release notes not applicable: this change only tightens GitHub Actions workflow permissions and does not affect end users.

Related

Resolves #1638

Fixes #1638


Context

This PR addresses the OpenSSF Scorecard Token-Permissions check by:

  • Adding permissions: contents: read at the top level of workflows that were missing top-level permissions (build.yml, check-latest-release.yml, draft-release.yml, post-release.yml, test-s390x.yml).
  • Retaining elevated permissions (e.g. contents: write) only at the specific job level where they are required (e.g. the draft-release job).

More details on the check: https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

Signed-off-by: Gagan H R <hrgagan4@gmail.com>
@gaganhr94 gaganhr94 requested a review from a team as a code owner April 19, 2026 12:00
@jabrown85 jabrown85 merged commit e56927a into buildpacks:main Apr 29, 2026
6 checks passed
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.

Improve OSSF Scorecard Token-Permissions check by tightening GitHub Actions permissions

2 participants