forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
ci: hash all depends recipe inputs #7543
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
Merged
PastaPastaPasta
merged 1 commit into
dashpay:develop
from
PastaPastaPasta:codex/fix-depends-cache-key
Aug 4, 2026
Merged
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
Oops, something went wrong.
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.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: dashpay/dash
Length of output: 50368
🏁 Script executed:
Repository: dashpay/dash
Length of output: 30887
🌐 Web query:
GitHub Actions template injection inputs context in shell environment variable source documentation💡 Result:
Template injection in GitHub Actions occurs when untrusted data—such as issue titles, pull request bodies, or branch names—is directly interpolated into a workflow's run command using the
${{ }}expression syntax [1][2][3]. Because the GitHub Actions runner evaluates these expressions and substitutes them with raw text before executing the shell script, an attacker can supply malicious input containing shell control characters (e.g., quotes, semicolons, or backticks) to break out of the intended command and execute arbitrary code on the runner [1][4][3]. The authoritative mitigation for this vulnerability is to never place untrusted input directly within a run script [5][6]. Instead, you should pass the input into the step's environment variables and then reference that variable within your script [5][2][7]. Recommended pattern: - name: Securely handle untrusted input env: # Set the untrusted input to an environment variable UNTRUSTED_INPUT: ${{ github.event.issue.title }} run: | # Reference the variable using standard shell syntax echo "The input is: $UNTRUSTED_INPUT" By storing the input in an environment variable, the value is treated as data rather than as part of the script's template, which prevents the shell from interpreting the content as executable commands [2][4][7]. Additionally, always use double quotes when referencing environment variables in shell scripts to prevent word splitting and other unexpected shell behaviors [2][6][7]. Other security best practices include: - Applying the principle of least privilege by restricting GITHUB_TOKEN permissions [6][8][3]. - Using static analysis tools like CodeQL to detect potential injection sinks in your workflow files [3]. - Treating all contexts that accept external input (e.g., github.event, inputs) as potentially malicious [1][5].Citations:
Use output values instead of caller inputs in the shell script.
This reusable workflow receives
inputs.*from the caller viaworkflow_call; passing them directly lets the caller supply shell metacharacters such as quotes, command substitution, or newlines in the generated Bash script..github/workflows/build.ymlalready passes internalneeds.check-skip.outputs.base-image-digestandneeds.check-skip.outputs['runner-amd64']values, so use those instead of.github/workflows/build.ymlinputs in the shell source.🧰 Tools
🪛 zizmor (1.28.0)
[error] 77-77: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[error] 77-77: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
[error] 77-77: code injection via template expansion (template-injection): may expand into attacker-controllable code
(template-injection)
🤖 Prompt for AI Agents
Source: Linters/SAST tools