ci: harden GitHub Actions workflows#2645
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the repository’s GitHub Actions workflows against supply-chain and credential exposure risks by pinning third-party actions and reducing token persistence, plus addressing an expression-to-shell interpolation risk in the image publishing workflow.
Changes:
- Pin GitHub Actions
uses:references to specific commit SHAs (instead of mutable tags). - Set
persist-credentials: falseonactions/checkoutsteps to reduce token exposure. - Avoid direct
${{ ... }}interpolation into bash inpublish-image.ymlby passing step outputs viaenv:.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/test.yml | Pins checkout/setup-ruby actions and disables persisted checkout credentials. |
| .github/workflows/publish-image.yml | Pins Docker/GitHub actions, disables persisted checkout credentials, and routes metadata output through env to avoid expression injection into bash. |
| .github/workflows/dependabot-sync-saas-lockfile.yml | Pins actions and disables persisted checkout credentials (but this workflow also pushes commits). |
| .github/workflows/ci-checks.yml | Pins checkout/setup-ruby actions and disables persisted checkout credentials across jobs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
using `pinact`
cb22554 to
469c656
Compare
469c656 to
e0c1855
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
suppress artipacked warning in dependabot lockfile sync workflow
e881e11 to
5813827
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
5813827 to
fa12aca
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Summary
Hardening the GitHub Actions workflows per recommendations from `zizmor` and `pinact`: