Skip to content

chore(ci): declare explicit permissions for read-default rollout#136

Merged
zdenko-kovac merged 1 commit into
mainfrom
chore/explicit-permissions-generate
May 26, 2026
Merged

chore(ci): declare explicit permissions for read-default rollout#136
zdenko-kovac merged 1 commit into
mainfrom
chore/explicit-permissions-generate

Conversation

@zdenko-kovac
Copy link
Copy Markdown
Member

What

Declare explicit permissions: contents: write on .github/workflows/generate.yaml so the workflow continues to push regenerated artifacts after the org-wide flip to read-default GITHUB_TOKEN.

Why

OSPO hardening — Finding 1: restrict_default_workflow_permissions = true will be enabled fleet-wide on the SAP CS-DevOps OSPO repo set. This workflow performs git push using the default GITHUB_TOKEN from actions/checkout; without an explicit permissions block it will start failing under the read-only default.

Risk

Low. We narrow the token's effective scope (currently implicit write-everything; becomes read all + write contents) instead of broadening it. No behavior change on the happy path — the workflow continues to push as before. Same change already merged on cert-manager-cop (PR #129).

Test plan

  • Confirm the next Renovate-driven run still pushes regenerated artifacts.

The generate.yaml workflow runs 'git push' using the default GITHUB_TOKEN
provided by actions/checkout. Once the org-wide flip to read-default
GITHUB_TOKEN lands, that push will fail unless the workflow explicitly
declares contents: write.

This narrows the token's effective scope (was implicit write-everything;
becomes read all + write contents) without changing happy-path behavior.
@zdenko-kovac zdenko-kovac merged commit ff28a34 into main May 26, 2026
6 checks passed
@zdenko-kovac zdenko-kovac deleted the chore/explicit-permissions-generate branch May 26, 2026 19:33
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