Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

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

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

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

Conversation

@jkim-notion

Copy link
Copy Markdown

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

Previously, there was a security incident where a Github action we use got compromised to expose our secrets. ref https://dev.notion.so/notion/sec-ir-20250315-tj-actions-1b7b35e6e67f8105b1e9e5b1a46c6515

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>

@jkim-notion
jkim-notion deleted the jkim--pin-github-actions-commit-hash branch September 26, 2025 23:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant