Skip to content

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

Open
gaganhr94 wants to merge 1 commit into
longhorn:masterfrom
gaganhr94:fix/token-permissions
Open

fix: adding required permissions to top level and jobs in the workflow#12951
gaganhr94 wants to merge 1 commit into
longhorn:masterfrom
gaganhr94:fix/token-permissions

Conversation

@gaganhr94

Copy link
Copy Markdown

Which issue(s) this PR fixes:

Issue #12950

Fixes #12950

What this PR does / why we need it:

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.

Special notes for your reviewer:

This change only touches .github/workflows/*.yml / .yaml files to add permissions: blocks (top-level contents: read by default, with elevated write permissions kept only at the job level where needed). No application code, docs, helm chart, or CHANGELOG changes are required.

Additional documentation or context

@gaganhr94 gaganhr94 requested a review from a team as a code owner April 19, 2026 12:00

@derekbit derekbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @gaganhr94

@derekbit derekbit force-pushed the fix/token-permissions branch from 4aeb489 to c2e23fc Compare April 27, 2026 14:21
@derekbit derekbit self-requested a review April 27, 2026 14:21
@derekbit derekbit force-pushed the fix/token-permissions branch from c2e23fc to a3a2375 Compare May 10, 2026 11:56
@derekbit

Copy link
Copy Markdown
Member

I will review the changes again later to ensure no workflows are impacted.

@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions Bot added the stale label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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