Skip to content

[Security][AI] Fix GitHub Actions security vulnerabilities by pinning actions to commit SHAs #4

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

code-scanning-autofixes[bot]
Copy link

@code-scanning-autofixes code-scanning-autofixes bot commented Jul 31, 2025

Description

This pull request was automatically generated by the code-mend service to address a security vulnerability detected in the codebase. While the identification of the issue is deterministic, this fix is not guaranteed to be correct and has not been fully tested. Please review the changes carefully to ensure they are correct, secure, and function as intended before merging.

Fix Description

This pull request addresses GitHub Actions security vulnerabilities by pinning all third-party actions to specific commit SHAs to prevent supply chain attacks. The changes include:

  • Updated deprecated hashicorp/packer-github-actions@master to hashicorp/setup-packer@1aa358be5cf73883762b302a3a03abd66e75b232 (v3.1.0)
  • Pinned canonical/has-signed-canonical-cla to commit SHA 1399a98cde76a66912c1a75b23f6f306ea814f1c (v2)
  • Pinned actions/checkout to commit SHA f43a0e5ff2bd294095638e18286ca9a3d1956744 (v3)
  • Updated packer workflow to use the new setup-packer action interface while maintaining identical functionality

All actions are now pinned to verified commit SHAs, eliminating the security risks associated with mutable references like @master or @v2 tags.

Next Steps

  • Review the changes in this pull request to ensure they are correct and secure.
  • If the changes are correct, merge this pull request to apply the fix.
  • Please reach out to #code-scanning with any questions or feedback.

Generated by code-mend job a66ca988-4354-423f-a1b8-7b8e82436b17.

For more information, see the associated ASR ticket.

…ll third-party actions to specific commit SHAs. Updated deprecated hashicorp/packer-github-actions@master to hashicorp/setup-packer@1aa358b while maintaining same functionality, and pinned canonical/has-signed-canonical-cla@1399a98. Also pinned actions/checkout for complete security hardening.

This vulnerability involved two GitHub Actions workflows using third-party actions that weren't pinned to specific commit SHAs, creating supply chain attack risks. The hashicorp/packer-github-actions@master action was deprecated and moved to hashicorp/setup-packer, requiring both a security fix and functional update. I pinned all actions to verified commit SHAs: setup-packer to v3.1.0 (1aa358be5cf73883762b302a3a03abd66e75b232), has-signed-canonical-cla to v2 (1399a98cde76a66912c1a75b23f6f306ea814f1c), and actions/checkout to v3 (f43a0e5ff2bd294095638e18286ca9a3d1956744). The packer workflow was updated from the old action's interface (with command/arguments parameters) to the new setup-packer action followed by a manual packer command, maintaining identical functionality while improving security.
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.

0 participants