Skip to content

ci: pin all GitHub Actions to commit SHAs and add minimal permissions#732

Merged
dlevy-msft-sql merged 1 commit intomainfrom
ci/supply-chain-hardening
Apr 13, 2026
Merged

ci: pin all GitHub Actions to commit SHAs and add minimal permissions#732
dlevy-msft-sql merged 1 commit intomainfrom
ci/supply-chain-hardening

Conversation

@dlevy-msft-sql
Copy link
Copy Markdown
Contributor

Problem

Several GitHub Actions workflows use unpinned tag references (e.g. \�ctions/checkout@v6) which are vulnerable to supply chain attacks (CWE-829). A compromised tag could inject malicious code into CI runs. Additionally, some workflows lack explicit \permissions\ blocks, granting broader token scope than necessary.

Solution

  • Pin \�ctions/checkout\ to \de0fac2e...@v6.0.2\ in golangci-lint, pr-validation, and security workflows
  • Pin \�ctions/setup-go\ to \4a360112...@v6.4.0\ in pr-validation and security workflows
  • Update \�ctions/setup-go\ from v6.2.0 to v6.4.0 in golangci-lint
  • Add \permissions: contents: read\ to golangci-lint and pr-validation workflows
  • Remove stale verify comments from golangci-lint

Changes

File Change
.github/workflows/golangci-lint.yml\ Pin checkout to SHA, update setup-go to v6.4.0, add permissions block
.github/workflows/pr-validation.yml\ Pin checkout and setup-go to SHAs, add permissions block
.github/workflows/security.yml\ Pin checkout and setup-go to SHAs

Testing

  • Verified SHAs match latest release tags via \gh api\
  • No functional changes to workflow behavior

@dlevy-msft-sql dlevy-msft-sql marked this pull request as ready for review April 13, 2026 19:27
@dlevy-msft-sql dlevy-msft-sql merged commit 10e1a5d into main Apr 13, 2026
8 checks passed
@dlevy-msft-sql dlevy-msft-sql deleted the ci/supply-chain-hardening branch April 13, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants