Skip to content

ci: GHA workflow security cleanup#3383

Open
emptyhammond wants to merge 3 commits into
mainfrom
worktree-fixup-workflows
Open

ci: GHA workflow security cleanup#3383
emptyhammond wants to merge 3 commits into
mainfrom
worktree-fixup-workflows

Conversation

@emptyhammond
Copy link
Copy Markdown
Contributor

Routine hygiene pass over the GitHub Actions workflow in this repo, addressing findings from a workflow security audit. Changes are split into three commits, one per finding type:

  • Disable credential persistence on actions/checkout so the default GITHUB_TOKEN is not left in the local git config after checkout.
  • Add a top-level permissions: {} so the GITHUB_TOKEN is granted no scopes by default; the job continues to declare only the contents/deployments/pull-requests scopes it actually
    needs.
  • Pin all third-party actions to commit SHAs (with the tag preserved as a comment) so an upstream tag move can't silently change what runs in CI.

No behavioural changes intended - the workflow runs the same checks against the same inputs.

Set persist-credentials: false on actions/checkout so the default
GITHUB_TOKEN is not left in the local git config after checkout.
Identified by a routine workflow security audit.
Add a top-level permissions: {} so the GITHUB_TOKEN is granted no scopes
by default; the job continues to declare only the contents/deployments/
pull-requests scopes it actually needs. Identified by a routine workflow
security audit.
Pin actions/checkout, actions/github-script, and
fastruby/manage-heroku-review-app to commit SHAs with the tag preserved
as a trailing comment, so an upstream tag move cannot silently change
what runs in CI. Identified by a routine workflow security audit.
@emptyhammond emptyhammond requested a review from m-hulbert May 26, 2026 13:44
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 26, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6c84fd81-4594-4c18-885a-c333bc959075

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-fixup-workflows

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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