Skip to content

security: narrow the release token to the job that needs it - #33

Merged
9t29zhmwdh-coder merged 1 commit into
mainfrom
security/token-permissions
Jul 29, 2026
Merged

security: narrow the release token to the job that needs it#33
9t29zhmwdh-coder merged 1 commit into
mainfrom
security/token-permissions

Conversation

@9t29zhmwdh-coder

Copy link
Copy Markdown
Owner

Was

release.yml hielt contents: write für den gesamten Lauf. Das Recht wandert in den einen Job, der das Release veröffentlicht, alles andere läuft mit contents: read.

Warum das messbar zählt

OpenSSF Scorecard bewertet den Check Token-Permissions mit 0 von 10, sobald irgendein Workflow ein Schreibrecht auf oberster Ebene trägt, unabhängig davon, wie wenig des Laufs es braucht.

Beleg aus dem eigenen Portfolio: agent-governance-console und ServiceLLM setzen das Recht bereits auf Job-Ebene und sind die einzigen beiden Repos mit Token-Permissions 10 von 10. Sie führen auch die Gesamtwertung an.

Umfang

Diese Änderung geht durch 26 Repos. Die Platzierung wurde pro Workflow aus dessen Job-Struktur bestimmt: bei geteilten Workflows bekommt nur der Release-Job das Recht, der Build-Job lädt lediglich Artefakte hoch und braucht es nicht. Jede Datei wurde nach der Änderung als YAML validiert.

The workflow held contents: write for its whole run. It now runs with
contents: read and grants write only to the job that publishes the
release.

OpenSSF Scorecard scores Token-Permissions 0 out of 10 whenever any
workflow carries a top-level write permission, however little of the run
needs it. This one line was what held the check at zero.

Co-Authored-By: Claude Opus 5 <[email protected]>
@9t29zhmwdh-coder
9t29zhmwdh-coder merged commit 0a37bb4 into main Jul 29, 2026
7 checks passed
@9t29zhmwdh-coder
9t29zhmwdh-coder deleted the security/token-permissions branch July 29, 2026 22:25
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