Skip to content

security: harden GitHub Actions workflow permissions#934

Draft
matthiasbruns wants to merge 1 commit into
mainfrom
security/harden-workflow-permissions
Draft

security: harden GitHub Actions workflow permissions#934
matthiasbruns wants to merge 1 commit into
mainfrom
security/harden-workflow-permissions

Conversation

@matthiasbruns
Copy link
Copy Markdown
Contributor

@matthiasbruns matthiasbruns commented May 27, 2026

What this PR does / why we need it

Hardens GitHub Actions workflow permissions to follow the principle of least privilege, addressing two security findings:

  1. Remove unused pull-requests: write from check-manifest-generation-diff.yaml — this workflow only runs git diff and never writes to a PR, so the permission was excessive.

  2. Add top-level permissions: {} to release.yaml, codeql.yml, and trigger-blackduck-scan.yaml — without a top-level block, any job added in the future without its own permissions entry would silently inherit the repository default (typically write-all). All existing job-level permissions are unchanged and workflows remain fully functional.

Which issue(s) this PR fixes

No linked issue — addresses security findings reported externally.

Testing

How to test the changes

No functional changes. Verify workflows trigger and complete as normal after merge.

Verification
  • I have added/updated tests for my changes (see Test Requirements)
  • Tests pass locally (task test and task test/integration if applicable)
  • If touching multiple modules, go work is enabled (see go.work)
  • My changes do not decrease test coverage
  • I have tested the changes locally by running ocm

@matthiasbruns matthiasbruns requested a review from a team as a code owner May 27, 2026 16:52
@matthiasbruns matthiasbruns marked this pull request as draft May 27, 2026 18:03
@matthiasbruns matthiasbruns force-pushed the security/harden-workflow-permissions branch from 775627d to f4d2f53 Compare May 27, 2026 18:06
Signed-off-by: Matthias Bruns <git@matthiasbruns.com>
@matthiasbruns matthiasbruns force-pushed the security/harden-workflow-permissions branch from f4d2f53 to f73e2c7 Compare May 27, 2026 18:07
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.

1 participant