ci: bump actions/attest-build-provenance from 4.1.1 to 4.2.2 - #76
Merged
Conversation
Pins 4d101475d8b20a2381f78447822ac1eab6504dd8, checked against the GitHub API as the commit the v4.2.2 tag points at — the one thing worth verifying by hand on a pinned action, since a SHA that does not match the tag beside it is what a compromise would look like. Since v4 the action is a wrapper over actions/attest, and the whole change is its inner pin, 4.1.1 to 4.2.1, itself a SHA, so the chain stays verifiable end to end. The inputs are unchanged: subject-path, which this workflow passes artifacts/*.nupkg, is still there, and id-token: write with attestations: write are still the permissions it asks for. What moved is inside actions/attest: reading subjects from GITHUB_ARTIFACTS_LIST, SHA-2 subject digests, a line-ending fix for checksums on Windows, and stripping the OCI tag when pushing an attestation to a registry, which this workflow does not do. Carried here rather than merged from #48 because a Dependabot pull request cannot pass this repository's required Sonar check: the run gets the dependabot secret scope, so sonar.token arrives empty and the scanner exits 1. The workflow's own guard anticipates a fork, whose head repository differs; Dependabot's branch is in this repository, so the guard lets it through to fail on the missing secret instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
The change #48 proposes, carried on a branch that can actually pass the required checks. One line in
.github/workflows/release.yml: the pinned SHA ofactions/attest-build-provenance, v4.1.1 → v4.2.2.What was verified
v4.2.2tag points at4d101475d8b20a2381f78447822ac1eab6504dd8, typecommit— the same SHA the diff pins. On a pinned action this is the one check worth doing by hand: a SHA that does not match the tag written beside it is exactly what a compromise would look like.actions/attest, and the whole change between the two commits is its inner pin, 4.1.1 → 4.2.1, itself a SHA. Two files differ,action.ymlby one line.subject-pathis still an input, andid-token: writewithattestations: writeare still the permissions the action asks for.actions/attest: reading subjects fromGITHUB_ARTIFACTS_LIST, SHA-2 subject digests, a line-ending fix for checksums on Windows, and stripping the OCI tag when pushing an attestation to a registry — which this workflow does not do. Nothing breaking for an explicitsubject-path.Why not just merge #48
A Dependabot pull request cannot pass this repository's required
SonarQube Cloud analysischeck, so #48 is unmergeable for a reason that has nothing to do with its content:GitHub serves Dependabot-triggered runs a separate
dependabotsecret scope, sosecrets.SONAR_TOKENarrives empty.sonar.ymlalready guards the case it anticipated —— but Dependabot's branch lives in this repository, so
head.repo.full_name == github.repositoryholds, the job runs, and it fails on the missing secret instead. The guard covers forks; it does not cover Dependabot.That is structural: no Dependabot pull request can be merged while that check is required. Worth fixing separately — either by extending the guard (and handling what a skipped required check means for merging), or by adding
SONAR_TOKENto the Dependabot secret scope, which has its own trade since for apull_requestevent the workflow definition comes from the PR's own branch.#48 can be closed in favour of this.
Type of change
Testing
dotnet build -c Release— not run: no code changes; the diff is oneuses:line in a workflowdotnet test -c Release— sametests/PackageSmokeTest/run.sh— sameThe action itself only runs on the release workflow, which this pull request does not trigger. It runs on a dry run too, deliberately, so a dry run after merging is what confirms the new pin end to end.
Public API
Documentation
docs/updatedCHANGELOG.mdanddocs/for-users/CHANGELOG.fr.mdboth updatedThe changelog documents the packages; the version of a workflow action is not something a consumer meets.
Related issues
Supersedes #48.
🤖 Generated with Claude Code
https://claude.ai/code/session_01M5U2BZXpHQr7YcfNHVx9dA
Generated by Claude Code