Skip to content

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

Open
gaganhr94 wants to merge 1 commit intooperator-framework:masterfrom
gaganhr94:fix/token-permissions
Open

fix: adding required permissions to top level and jobs in the workflow#7091
gaganhr94 wants to merge 1 commit intooperator-framework:masterfrom
gaganhr94:fix/token-permissions

Conversation

@gaganhr94
Copy link
Copy Markdown

Description of the change:

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.

Fixes #7090

Motivation for the change:

Improves the OpenSSF Scorecard Token-Permissions check from 0 to 10 by adding minimal top-level permissions (contents: read) to all GitHub Actions workflows, and keeping any write permissions scoped to the specific jobs that need them. This hardens the CI supply chain by following the principle of least privilege for GITHUB_TOKEN.

Checklist

If the pull request includes user-facing changes, extra documentation is required:

Signed-off-by: Gagan H R <hrgagan4@gmail.com>
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

1 participant