Skip to content

Add explicit permissions to GitHub Actions workflows#784

Open
szachovy wants to merge 1 commit into
mainfrom
security/workflow-permissions
Open

Add explicit permissions to GitHub Actions workflows#784
szachovy wants to merge 1 commit into
mainfrom
security/workflow-permissions

Conversation

@szachovy
Copy link
Copy Markdown
Contributor

@szachovy szachovy commented May 7, 2026

Summary

Following security best practices (supply chain hardening), add explicit top-level permissions to all GitHub Actions workflows to enforce the principle of least privilege.

Changes

  • build.yml — added permissions: contents: read
  • reuse.yml — added permissions: contents: read
  • changelogs.yml — added permissions: contents: read + pull-requests: write (needed for comment creation)
  • git-checks.yml — added permissions: contents: read
  • vulncheck.yml — added permissions: contents: read
  • mingo_build.yml — added permissions: contents: read
  • prebuilt_devcontainer.yml — moved job-level permissions to top-level

Workflows that already had correct top-level permissions (checks.yml, golangci-lint.yml) were left unchanged.

Context

This addresses the GitHub Actions permissions requirements from the Rancher Security Team supply chain risk scan, following the same pattern as uyuni-project/uyuni-docs-helper#70.

References:

Following security best practices (supply chain hardening), add explicit
top-level permissions to all GitHub Actions workflows to enforce the
principle of least privilege. Moved job-level permissions to top-level
where applicable.

This addresses the GitHub Actions permissions requirements from the
Rancher Security Team supply chain risk scan.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
2 New issues
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

name: Changelogs

permissions:
contents: read

permissions:
contents: read
pull-requests: write
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