Skip to content

build: add top-level token permissions for workflows#7795

Merged
johanfylling merged 2 commits intoopen-policy-agent:mainfrom
timothyklee:tklee/token-permissions-scorecard
Jul 24, 2025
Merged

build: add top-level token permissions for workflows#7795
johanfylling merged 2 commits intoopen-policy-agent:mainfrom
timothyklee:tklee/token-permissions-scorecard

Conversation

@timothyklee
Copy link
Copy Markdown
Contributor

Why the changes in this PR are needed?

This continues the effort in #6938 to improve the OpenSSF Scorecard score by adding top-level token permissions to all workflows. The guideline for token permissions is here, but essentially consists of:

Set top-level permissions as read-all or contents: read as described in GitHub's documentation.
Set any required write permissions at the job-level. Only set the permissions required for that job; do not set permissions: write-all at the job level.

The most impact would be from ensure all workflows have top level permissions, as the scoring metric assigns a 0 even if one workflow is lacking a top-level permission.

What are the changes in this PR?

Add top level permissions where missing and include write permissions at the job level where needed.

Part of #6938

Notes to assist PR review:

None

Further comments:

None

Signed-off-by: Timothy Lee <tklee@google.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 23, 2025

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit c3e8a51
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/6881fe9a8082170008e6bf8a
😎 Deploy Preview https://deploy-preview-7795--openpolicyagent.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.

@timothyklee timothyklee marked this pull request as ready for review July 23, 2025 21:29
Copy link
Copy Markdown
Contributor

@johanfylling johanfylling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👍

@johanfylling johanfylling merged commit d0c0ae9 into open-policy-agent:main Jul 24, 2025
31 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.

2 participants