Skip to content

feat(web): stop GitHub merge commits reading as Unverified - #701

Merged
PastaPastaPasta merged 2 commits into
masterfrom
t3/verify-imported-commit-signatures
Nov 24, 2026
Merged

PastaPastaPasta merged 2 commits into
masterfrom
t3/verify-imported-commit-signatures

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

A repository imported from GitHub showed every merge commit as Unverified. GitHub signs merges and edits made on github.com with its web-flow key. That is an RSA key, which can't go on a Forge profile: it doesn't fit a 300-byte entry, and the verifier only accepts Ed25519/ECDSA anyway. So no maintainer could fix the badge, and imported history looked tampered with.

What this changes:

  • Signed by GitHub (neutral). When a signature names GitHub's current web-flow key (968479A1…BB952194), the browser checks it with OpenPGP.js against the key GitHub publishes at github.com/web-flow.gpg, which is now bundled. A signature that names the key but does not check reads as a bad signature (red). The panel says GitHub signed it, not which member made it, and that GitHub does not vouch for the author shown.
  • GitHub's 2017 key (4AEE18F83AFDEB23) is deliberately not trusted. GitHub retired it in a precautionary rotation, and a signature's date is the signer's to set, so a backdated forgery made with it would still check.
  • A key on nobody's profile reads neutral. "Signed" for SSH, because the signature is checked against the key it carries. "Unknown key" for OpenPGP, because Forge can't check it without the key. Other failures still read "Unverified".
  • Display only. The shared verdict (lib/rules/signature.ts, its Rust twin, the vectors, and dg verify-commit) is unchanged, and the guide says so.

Tests: unit tests on real commit bytes cover:

The full web unit suite, typecheck, lint and copy lint all pass.

UI proof

The commit list of the mainnet dash-forge repo, with the owner's signing keys on their profile.

Before (live site, master):

before

After (this branch, same repo and data):

after

The panel on a GitHub-signed merge:

after panel

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Commit signature badges now distinguish verified signatures, unverified signatures, and signatures with keys not linked to a member profile. Unknown-key SSH signatures show “Signed,” while unknown-key OpenPGP signatures show “Unknown key.”
    • Signatures verified with GitHub’s current web-flow key are labeled “Signed by GitHub,” with details clarifying that this identifies GitHub rather than the repository member who authored the item.
  • Documentation
    • Updated the signed-commit guide to explain these statuses and note that GitHub’s retired 2017 key is not trusted.

PastaPastaPasta and others added 2 commits November 24, 2026 10:01
History imported from GitHub showed every merge as a red-flag "Unverified":
GitHub signs web merges with its RSA web-flow key, which no profile can list.

- A signature naming GitHub's web-flow key is checked against the keys GitHub
  publishes (bundled); one that checks reads "Signed by GitHub", one that
  does not is a bad signature.
- A signature by a key on nobody's profile reads "Signed", neutral, and says
  Forge can't name the signer.

The shared verdict (lib/rules/signature.ts, dg verify-commit) is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ey for unchecked OpenPGP

An OpenPGP signature by a key on nobody's profile is never checked, so it
reads "Unknown key" rather than "Signed". GitHub's 2017 key is dropped: it
was retired in a precautionary rotation and a signature's date is the
signer's to set. The service check re-checks the signature type and hash.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change checks eligible unknown OpenPGP signatures against GitHub’s web-flow key. The hook adds service attribution to signature verdicts. The badge displays distinct statuses for unknown keys and GitHub signatures, with updated tests and documentation.

Changes: GitHub web-flow signature attribution

Layer / File(s) Summary
Recognize GitHub web-flow signatures
forge-web/lib/repo/github-web-flow-keys.ts, forge-web/lib/repo/well-known-signers.ts, forge-web/hooks/use-commit-signatures.ts, forge-web/lib/repo/well-known-signers.test.ts
The service-signature check verifies eligible unknown-key signatures against GitHub’s current key. The hook adds the recognized service to the verdict and marks failed service checks as bad_signature. Tests cover the current and retired keys, altered commits, and SSH signatures.
Display and document signature statuses
forge-web/components/repo/signature-badge.tsx, forge-web/components/repo/signature-badge.test.tsx, docs/guides/identity-and-keys.md, forge-web/components/signing-keys-section.tsx
The badge shows “Signed” for unknown-key SSH signatures, “Unknown key” for unknown-key OpenPGP signatures, and “Signed by GitHub” for recognized GitHub signatures. Tests and documentation cover these statuses. The signing-key removal message now says affected commits no longer show Verified.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant useCommitSignatures
  participant judge
  participant verifyCommitSignature
  participant serviceSignature
  useCommitSignatures->>judge: Check commit signature
  judge->>verifyCommitSignature: Verify commit
  verifyCommitSignature-->>judge: Return signature verdict
  judge->>serviceSignature: Check eligible verdict against service key
  serviceSignature-->>judge: Return github, bad, or null
Loading
Merge Risk: Minimal · up to ac409

This change labels GitHub-signed commits as "Signed by GitHub" and uses neutral labels for unknown keys, in the web UI only. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(web): stop GitHub merge commits reading as Unverified" matches the main change. The PR adds a "Signed by GitHub" status for GitHub web-flow signatures, bundles GitHub's current key, an…
Description check Passed The description explains the problem, the approach, and the scope of the change. It covers what changes, why the 2017 key is not trusted, the display-only scope, and the tests run. It includes UI scre…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(web): stop GitHub merge commits reading as Unverified" matches the main change. The PR adds a "Signed by GitHub" status for GitHub web-flow signatures, bundles GitHub's current key, and changes how keys absent from profiles display. The title names the primary user-visible effect and the scope. It is concise and specific.

Full details: Description check

Explanation

The description explains the problem, the approach, and the scope of the change. It covers what changes, why the 2017 key is not trusted, the display-only scope, and the tests run. It includes UI screenshots. It does not follow the repository template. It has no "What and why" or "How it was tested" headings. The checklist items for make check-rust, make check-web, rule vectors, and guide updates are not addressed. The checklist includes a rule-vector item, but the description says the shared verdict and vectors are unchanged. The template also asks for before and after screenshots at 390 px in both themes. The provided screenshots show a desktop dark theme only.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e9860f23-42d2-45f5-b83f-39be49932be6
Commits

Reviewing files that changed from the base of the PR and between e14bf8d and ac409e8.

Files selected for processing: 8

  • docs/guides/identity-and-keys.md
  • forge-web/components/repo/signature-badge.test.tsx
  • forge-web/components/repo/signature-badge.tsx
  • forge-web/components/signing-keys-section.tsx
  • forge-web/hooks/use-commit-signatures.ts
  • forge-web/lib/repo/github-web-flow-keys.ts
  • forge-web/lib/repo/well-known-signers.test.ts
  • forge-web/lib/repo/well-known-signers.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@PastaPastaPasta
PastaPastaPasta merged commit fd716c2 into master Nov 24, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant