Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

Mutable action references (@v1, @master, @latest) allow code changes without review. If an action author is compromised, the entire CI/CD pipeline is compromised.

Changes

Pinned all GitHub Actions to immutable commit SHAs with inline version comments for reference:

Workflow files updated:

  • codeql.yml - actions/checkout, github/codeql-action (init, autobuild, analyze)
  • release.yml - actions/checkout, Adyen/release-automation-action
  • stale.yml - actions/stale
  • label_new_issues.yml - actions-ecosystem/action-add-labels
  • ruby.yml - actions/checkout, ruby/setup-ruby
  • rubygems_release.yml - actions/checkout, cadwallion/publish-rubygems-action

Example:

# Before
- uses: actions/checkout@v6

# After
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6

Total: 12 actions pinned across 6 workflows.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug]: Pin Workflow Actions</issue_title>
<issue_description>We have recently conducted a security scan of our GitHub repositories to ensure our CI/CD pipelines are secure. We identified misconfigurations in GitHub Actions workflows (e.g., injection risks, unpinned actions).

Steps to reproduce

Using tags like @v1, @master, or @latest allows the action code to change without your review. If the action author is compromised, your pipeline is compromised.
Pin to the immutable Commit SHA.

❌ Bad

uses: actions/checkout@v4

✅ Good

uses: actions/checkout@b4ffde6 # v4.1.1

All existing workflows shall be updated to pin the version of the actions to a specific commit SHA.
</issue_description>

<agent_instructions>Update all workflows to pin the actions to the corresponding SHA commit, instead of using the version number</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@sonarqubecloud
Copy link

Copilot AI changed the title [WIP] Update GitHub Actions workflows to pin actions Pin GitHub Actions to immutable commit SHAs Dec 30, 2025
Copilot AI requested a review from gcatanese December 30, 2025 09:52
@gcatanese gcatanese marked this pull request as ready for review December 30, 2025 10:00
@gcatanese gcatanese requested review from a team as code owners December 30, 2025 10:00
@gcatanese gcatanese added the Fix label Dec 30, 2025
Copy link
Contributor

@gcatanese gcatanese left a comment

Choose a reason for hiding this comment

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

Looks good

@gcatanese gcatanese merged commit 3b76e2d into main Jan 2, 2026
12 checks passed
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.

[Bug]: Pin Workflow Actions

3 participants