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

Pin GHA action versions using specific versions and hashes #7055

Open
mhucka opened this issue Feb 10, 2025 · 0 comments
Open

Pin GHA action versions using specific versions and hashes #7055

mhucka opened this issue Feb 10, 2025 · 0 comments
Labels
area/ci kind/health For CI/testing/release process/refactoring/technical debt items

Comments

@mhucka
Copy link
Contributor

mhucka commented Feb 10, 2025

Google's security practices for GitHub Actions states the following:

When using a third-party action (one not hosted in a Google-managed org), a fixed version of the action MUST be used by specifying a specific commit, rather than a branch like "main", or a tagged release, which can be overwritten by any maintainer of the action. Docker and GitHub runner images should always be run at a fixed version rather than "latest".

We need to do this for our GitHub Actions workflows.

I found a tool, frizbee, that can be used to update a workflow to use commit hashes for actions. There's also a companion GitHub Actions workflow that can be installed in a repository to automate checks and updates.

In addition to using commit hashes, we have to replace runner names like ubuntu-latest with specific versions like ubuntu-24.04. There is a table of available runner images at https://github.com/actions/runner-images

@mhucka mhucka added the kind/health For CI/testing/release process/refactoring/technical debt items label Feb 10, 2025
@mhucka mhucka added the area/ci label Feb 10, 2025
@mhucka mhucka changed the title Pin GHA action versions to commit hashes Pin GHA action versions hashes Feb 10, 2025
@mhucka mhucka changed the title Pin GHA action versions hashes Pin GHA action versions using specific versions and hashes Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci kind/health For CI/testing/release process/refactoring/technical debt items
Projects
Status: No status
Development

No branches or pull requests

1 participant