Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔒 Security(.github/workflows): Pin 3rd party actions to specific commit hash to avoid supply chain attacks #480

Open
KemingHe opened this issue Jan 5, 2025 · 0 comments · May be fixed by #481

Comments

@KemingHe
Copy link
Contributor

KemingHe commented Jan 5, 2025

Vulnerability

Current usage of 3rd-party actions in .github/workflows uses broad versions instead of specific commit hashes, example:

uses: pnpm/action-setup@v4

Though unlikely, this exposes the project to supply chain attacks in case latest major version is compromised at the time of workflow run.

Solution

Pinning all 3rd party actions to commit hash corresponding to latest stable release, example:

- name: Setup pnpm
  uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
  # Pinned to commit hash of release v4.0.0 on 05/07/24.
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 a pull request may close this issue.

1 participant