Skip to content

security: disable git credential persistence in checkout actions#281

Merged
chorrell merged 1 commit into
mainfrom
security/disable-git-credential-persistence
May 21, 2026
Merged

security: disable git credential persistence in checkout actions#281
chorrell merged 1 commit into
mainfrom
security/disable-git-credential-persistence

Conversation

@chorrell
Copy link
Copy Markdown
Owner

Description

Remediate zizmor security finding by setting persist-credentials: false on all actions/checkout usages across workflow files.

Security Motivation

By default, actions/checkout persists git credentials in the runner's git config. This increases the attack surface if the runner is compromised—an attacker could use the stored credentials to push malicious commits or access private repositories. Since these workflows don't require git push operations, credential persistence is unnecessary.

Changes

  • Set persist-credentials: false on all 6 checkout actions
  • Applied to:
    • dockerimage.yml (1 checkout action)
    • linting.yml (3 checkout actions)
    • update-current-image.yml (2 checkout actions)
  • Credentials remain available for the current job but aren't persisted after job completion

Related

Fixes zizmor finding: 'does not set persist-credentials: false'

Remediate zizmor security finding by setting persist-credentials: false on all
actions/checkout usages. This prevents unnecessary storage of git credentials
in the GitHub Actions runner environment, reducing the attack surface if the
runner is compromised.

Changes:
- Set persist-credentials: false on all 6 checkout actions across 3 workflows
- Applied to dockerimage.yml, linting.yml, and update-current-image.yml
- Credentials are still available for the current job but not persisted after
@chorrell chorrell merged commit 014798e into main May 21, 2026
5 checks passed
@chorrell chorrell deleted the security/disable-git-credential-persistence branch May 21, 2026 23: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.

1 participant