Skip to content

ci: Pin GitHub Actions to immutable commit SHAs - #2402

Merged
utksh1 merged 1 commit into
utksh1:mainfrom
AnzalKhan16:feature/pin-actions-shas
Aug 4, 2026
Merged

ci: Pin GitHub Actions to immutable commit SHAs#2402
utksh1 merged 1 commit into
utksh1:mainfrom
AnzalKhan16:feature/pin-actions-shas

Conversation

@AnzalKhan16

Copy link
Copy Markdown
Contributor

Description

This PR addresses software supply chain security risks by replacing all mutable version tags (e.g., @v4, @v5) used in our GitHub Actions workflows with their corresponding immutable commit SHAs.

Previously, workflows relied on mutable tags which could be modified by the action authors, potentially introducing breaking changes or malicious code unexpectedly. By pinning dependencies to strict commit hashes, we ensure that every execution of the CI pipeline is exactly reproducible and resilient to untracked upstream modifications. As a standard best practice, the original version tags have been retained as comments (e.g., # v4) alongside the SHAs to improve readability and maintainability for future dependency updates.

Related Issues

#2401

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update / Security / Maintenance

How Has This Been Tested?

The change has been validated by successfully resolving the target commits associated with the used tags for each action in the repository (such as actions/checkout, actions/setup-python, aquasecurity/trivy-action, etc.). A comprehensive audit script was used to fetch the SHAs directly from the official remote repositories using git ls-remote, ensuring accurate mappings for all integrations without altering their underlying behavior.

Checklist

  • My code follows the code style of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

@utksh1 utksh1 added area:ci CI, tooling, or automation work level:intermediate 35 pts difficulty label for moderate contributor PRs type:security Security work category bonus label labels Aug 4, 2026

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Approved after reviewing the focused diff and passing required checks.

@utksh1
utksh1 merged commit 5dabf25 into utksh1:main Aug 4, 2026
37 checks passed
@utksh1 utksh1 added gssoc:approved Admin validation: approved for GSSoC scoring quality:clean Contributor score x1.2; mentor +5 pts labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, tooling, or automation work gssoc:approved Admin validation: approved for GSSoC scoring level:intermediate 35 pts difficulty label for moderate contributor PRs quality:clean Contributor score x1.2; mentor +5 pts type:security Security work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants