Repository navigation
Conversation
github.head_ref is the PR author's branch name and was expanded straight into run: scripts in the benchmark and coverage jobs. Pass it, base_ref and the build action's target input through environment variables and quote them, as GitHub's hardening guide recommends. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a fork PR the head branch exists only in the fork, so 'git checkout <head_ref>' failed with 'pathspec did not match' and the coverage and benchmark jobs failed for every outside contributor (prooflinedev#259 too). Return to $GITHUB_SHA, the commit actions/checkout already fetched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Two related fixes in
ci.yml, plus one in the build action:1. Coverage and benchmarks fail on every fork PR. After benchmarking or measuring the base, the jobs went back with
git checkout ${{ github.head_ref }}. On a fork PR that branch exists only in the fork, so the step fails withpathspec '<branch>' did not match any file(s) known to git. #259 fails this way, and so did this PR's first run. They now return to$GITHUB_SHA, the commitactions/checkoutalready fetched.2. PR refs were expanded straight into shell scripts.
github.head_refis the PR author's branch name.github.base_refand the build action'sinputs.targetnow go throughenv:and are quoted, as GitHub's hardening guide recommends, andhead_refis no longer used. This is hardening, not a live vulnerability: the jobs run onpull_request, so a fork PR has no secrets and a read-only token.Checked with
actionlint(the two "github.head_refis potentially untrusted" errors are gone; the existingdetermine-changeswarnings are unrelated) andzizmor(the 12template-injectionerrors in these files are gone).The dependency advisories in
Cargo.lockare already covered by #261, so this PR leaves them out.🤖 Generated with Claude Code