-
Notifications
You must be signed in to change notification settings - Fork 521
Update GitHub Actions to use specific versions #66
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
GoldMinerN
wants to merge
1
commit into
junjiem:main
Choose a base branch
from
GoldMinerN:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: junjiem/dify-plugin-repackaging
Length of output: 215
🏁 Script executed:
Repository: junjiem/dify-plugin-repackaging
Length of output: 672
🌐 Web query:
GitHub Actions pinning versions commit SHA vs tag best practices security💡 Result:
Best practice: Pin GitHub Actions third-party (and any high-risk) dependencies to full, immutable commit SHAs (not tags), and (optionally) enforce this with GitHub Actions policies. 1) Why commit SHA pinning is preferred over tags - GitHub explicitly states: “Pin actions to a full-length commit SHA” is currently “the only way to use an action as an immutable release,” and that it helps mitigate the risk of a bad actor adding a backdoor to the action’s repository (they’d need to generate a SHA-1 collision for a valid Git object payload). [1] - GitHub also notes that tag pinning is less secure because a tag can be moved or deleted if a bad actor gains access to the action’s repository; commit SHAs are immutable references to a specific repository state. [1] 2) What GitHub recommends you do in practice - Use full-length commit SHAs in the workflow
uses:value (for example:owner/repo@<40+ hex chars>). [1] - When selecting the SHA, verify it is from the action’s repository and not a repository fork. [1] - If you still use a tag, GitHub recommends only doing so when you trust the creator, while noting the risk that tags can be moved or deleted. [1] 3) Security governance: enforce SHA pinning at the org/repo level - GitHub’s changelog says administrators can enforce SHA pinning through the allowed actions policy; the policy checks for a full commit SHA and workflows that attempt to use an action that isn’t pinned will fail. [2] 4) Commit SHA vs tag: quick rule - For supply-chain resistance/immutability: prefer full commit SHA pinning. [1] - For convenience: tags are widely used, but they’re mutable and therefore less secure. [1] 5) How teams maintain/update pinned SHAs - A common maintainability pattern is pinning to a SHA while retaining the original version/tag as an inline comment (e.g.,actions/checkout@<sha> # v4.1.1) so updates are understandable. [3] If you share a few of your currentuses:lines, I can show how to convert each from a tag to the corresponding full commit SHA pin and keep the version comments.Citations:
Pin third-party actions by commit SHA, not tag, for immutable builds.
v4.2.2/v5.3.0is better than major tags, but GitHub's security documentation confirms that tags can be moved or deleted if a bad actor gains access. For supply-chain integrity and reproducibility, pinuses:to full commit SHAs instead.Suggested change
🤖 Prompt for AI Agents