ci: pin HashiCorp custom Actions to full commit SHAs to prevent supply-chain attacks#13660
Closed
XananasX7 wants to merge 1 commit into
Closed
Conversation
Collaborator
|
Thanks for creating the PR. This has been fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build.ymlandcreate-release-branch.ymlreference HashiCorp's own GitHub Actions using mutable version tags and a branch reference (@v1,@v2,@main). Even first-party actions in separate repositories should be pinned — a compromised signing key or a supply-chain incident in any of thehashicorp/actions-*repos would immediately affect Packer's build and release pipelines.The
build.ymlworkflow generates release artifacts for multiple platforms (Linux, macOS, Windows) and Docker images, making it a high-value target.Actions pinned
hashicorp/actions-set-product-version@v1@e2c49d61aff17b1280ddfe7bb031331d02ca0140hashicorp/actions-generate-metadata@main@a43468dfb100445f2c2aa52cdc3d57b2c982a0f3hashicorp/actions-go-build@v1@dd7ca5a30c402c933e1fe61e0ff7165e5c4ee9e4hashicorp/actions-packaging-linux@v1@006298649be64cee63e7f94a54dfcf3e14766bf6hashicorp/actions-docker-build@v2@e12557abf02a40557313ab2839d6cd2c6705261ehashicorp/actions-create-release-branch@v1@96a01e83eb1055a66f2097029b50801ff926fea3Vulnerability class
Supply-chain attack via mutable Action tag/branch references (CWE-829).