Skip to content

ci: set persist-credentials: false on checkout steps#33

Merged
leMaur merged 1 commit into
mainfrom
chore/checkout-persist-credentials
Jun 18, 2026
Merged

ci: set persist-credentials: false on checkout steps#33
leMaur merged 1 commit into
mainfrom
chore/checkout-persist-credentials

Conversation

@leMaur

@leMaur leMaur commented Jun 18, 2026

Copy link
Copy Markdown
Owner

What

Set persist-credentials: false on every actions/checkout step across the CI and release workflows.

Why

By default actions/checkout writes the job token into the workspace .git/config as an auth header. Persisting it only widens the attack surface: any later step in the same job (a compromised action, or a malicious transitive dependency pulled in during install) could read the token from disk. Setting persist-credentials: false keeps it out of the checkout and shrinks the blast radius.

Scope

Now includes the release changelog workflow. That job pushes its branch via create-pull-request, which authenticates with the token it is given as an input rather than the credentials persisted by checkout, so persist-credentials: false is the recommended setup there (it also ensures the action's own token, not the one baked into git config by checkout, is used for the push).

@leMaur leMaur force-pushed the chore/checkout-persist-credentials branch from 3a5fe79 to 3423275 Compare June 18, 2026 15:39
actions/checkout persists the job token into the workspace .git/config by
default. These jobs never push or fetch with it, so persisting it only lets
a later compromised step in the same job read the token from disk. Setting
persist-credentials: false keeps it out of the checkout.
@leMaur leMaur force-pushed the chore/checkout-persist-credentials branch from 3423275 to 6da9fdb Compare June 18, 2026 16:19
@leMaur leMaur merged commit 89e995e into main Jun 18, 2026
27 checks passed
@leMaur leMaur deleted the chore/checkout-persist-credentials branch June 18, 2026 16:36
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