Skip to content

Pin github workflows to a commit hash instead of version tag for security purpose - #24

Open
jkim-notion wants to merge 1 commit into
masterfrom
jkim--pin-github-actions-commit-hash
Open

Pin github workflows to a commit hash instead of version tag for security purpose#24
jkim-notion wants to merge 1 commit into
masterfrom
jkim--pin-github-actions-commit-hash

Conversation

@jkim-notion

@jkim-notion jkim-notion commented Sep 26, 2025

Copy link
Copy Markdown

This PR pins Github workflows to a specific commit hash instead of version tag, for security purpose.

By pinning Github workflows to a specific commit hash, we should be able to restrict deployment of potentially compromised Github actions in the future. If you have any questions, please reach out to #sec-team-appsec.

Note: If you ever need to manually look up the commit hash for a given action version (tag), you can run:

git ls-remote https://github.com/<owner>/<repo>.git <tag>

Replace <owner>, <repo>, and <tag> with the appropriate values (for example, actions/checkout and v3). The output will show the commit SHA corresponding to the tag. Use that SHA in your workflow file, e.g.:

uses: actions/checkout@<sha> # <tag version>

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.

1 participant