Skip to content

fix: ensure we're not persisting credentials after checkouts#122

Merged
jmeridth merged 2 commits intomainfrom
jm_checkout_do_not_persist_credentials
Sep 16, 2025
Merged

fix: ensure we're not persisting credentials after checkouts#122
jmeridth merged 2 commits intomainfrom
jm_checkout_do_not_persist_credentials

Conversation

@jmeridth
Copy link
Member

@jmeridth jmeridth commented Sep 12, 2025

This PR adds security configuration to GitHub Actions workflows by setting persist-credentials: false for checkout actions. This prevents GitHub credentials from being persisted in the Git configuration after repository checkout, reducing potential security risks from credential exposure.

  • Added persist-credentials: false to all actions/checkout@v5 steps across multiple workflow files
  • Ensures credentials are not available to subsequent steps that don't explicitly need them
  • Maintains existing workflow functionality while improving security posture

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth self-assigned this Sep 12, 2025
Copilot AI review requested due to automatic review settings September 12, 2025 19:03
@github-actions github-actions bot added the fix label Sep 12, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds security hardening to GitHub Actions workflows by preventing credential persistence after checkout operations. The change ensures that Git credentials are not left accessible in the workspace after the initial checkout, reducing potential security risks.

  • Adds persist-credentials: false to all actions/checkout steps across workflow files
  • Applies this security measure consistently to CI, linting, release, site deployment, and post-merge workflows

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/site.yml Adds credential non-persistence to site deployment workflow checkout
.github/workflows/release.yml Adds credential non-persistence to release workflow checkout
.github/workflows/post-merge.yml Adds credential non-persistence to post-merge workflow checkout
.github/workflows/lint.yml Adds credential non-persistence to lint workflow checkout
.github/workflows/ci.yml Adds credential non-persistence to both CI and acceptance test job checkouts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jmeridth jmeridth requested a review from a team September 16, 2025 14:59
@jmeridth jmeridth merged commit 8112e67 into main Sep 16, 2025
7 checks passed
@jmeridth jmeridth deleted the jm_checkout_do_not_persist_credentials branch September 16, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants