Repository navigation
fix: record PR evidence when a commit is signed by a GitHub App - #1275
Merged
Merged
Conversation
GitHub types a commit signature's signer as User. For a commit signed by a GitHub App such as Renovate it returns a null signer plus a field error, and shurcooL/graphql turns any error into a failed query, so the whole PR attestation failed. Signers are now looked up in a separate nodes(ids:) query. The client decodes partial data before returning the error, so a field error that came with data is ignored and that commit keeps verified, signature_state and signed_by_platform with an empty signer_username. The lookup is not retried, since a bot signature errors on every try.
Contributor
|
Claude finished @dangrondahl's task in 1m 29s —— View job PR review: fix: record PR evidence when a commit is signed by a GitHub App
Earlier review threads: both fixed
FindingsI found no blocking issues. Some small notes, none of which need to change before merge:
What's done well
SummaryThe fix is well scoped and well tested, and both earlier review points are handled cleanly. Looks good to merge once CI is green. |
A 502, a timeout or a data:null reply on the signer lookup failed the whole PR attestation, since it was the only request in the flow without retries. It now goes through the same retry ladder, but a field error that comes with data is accepted on the first attempt, so a commit signed by a GitHub App still costs one request. The error accepted with data is logged under --debug: the client drops the error's path, so it cannot be narrowed to the signer field, and a different field error would otherwise look exactly like a bot signer. Also covers batching past 100 signed commits and makes the signer fixture's node order and error paths deterministic.
The reported failing commit was signed with GitHub's own key (wasSignedByGitHub: true) and still came back with a null signer and a NOT_FOUND error, so the V2 test now uses that shape and checks the commit keeps verified, signature_state and signed_by_platform.
dangrondahl
marked this pull request as ready for review
October 20, 2026 09:34
FayeSGW
approved these changes
Oct 20, 2026
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.
Fixes #1274.
Since v2.48.0 the commit queries in
PREvidenceByPRNumberandPREvidenceForCommitV2ask forsignature { signer { login } }. GitHub typessignerasUser, and for some commits created by a GitHub App (e.g. Renovate) it answers withsigner: nullplus an entry inerrors.shurcooL/graphqlturns anyerrorsentry into a failed query, so the whole PR attestation fails.signernow leaves the commit queries andsignerLoginslooks it up on its own withnodes(ids:), only for signed commits, 100 per request. The client decodes the data before returning the error, so an error that comes with data is accepted: that commit keepsverified,signature_stateandsigned_by_platform, with an emptysigner_username, and the error is logged under--debug. A reply with no data is retried like the other queries in this flow, and fails the attestation once retries run out.Cost: one extra GraphQL request per PR with signed commits.
Confirmed against a real failing response. It carried
"type": "NOT_FOUND","message": "Not Found"and apathending insignature.signer, with the rest of the data present, which matches the test fixture. The commit hadwasSignedByGitHub: true, so GitHub's own key signed it and the signer still couldn't be resolved.TestPREvidenceForCommitV2_RecordsACommitSignedByAnAppnow uses that shape.Checklist
charts/k8s-reporter/) updated, if needed. Note: these changes live in a separate PR