Skip to content

ci: limit workflow token permissions - #25

Merged
FlorianKoerner merged 1 commit into
4.xfrom
ci/harden-workflows
Nov 20, 2026
Merged

FlorianKoerner merged 1 commit into
4.xfrom
ci/harden-workflows

Conversation

@FlorianKoerner

Copy link
Copy Markdown
Member

Every workflow now sets contents: read at the top, so a job gets a read-only GITHUB_TOKEN unless it asks for more. The jobs that publish packages or push images keep their own permissions block.

actions/checkout runs with persist-credentials: false. Without it, the token sits in .git/config for the rest of the job, where any install script of a dependency can read it.

Third-party actions are pinned to a commit SHA, with the version in a comment, the same way the dicebear/dicebear workflows already do it. That way a moved tag cannot change what runs here.

actions/checkout in the test workflow also moves from v3 to v4.

Every workflow now sets contents: read at the top, so a job gets a read-only
GITHUB_TOKEN unless it asks for more. actions/checkout no longer stores the
token in .git/config, where install scripts of dependencies could read it.
Third-party actions are pinned to a commit SHA, with the version in a comment.
@FlorianKoerner
FlorianKoerner merged commit 9f1175b into 4.x Nov 20, 2026
3 checks passed
@FlorianKoerner
FlorianKoerner deleted the ci/harden-workflows branch November 20, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant