codefloe/forgejo-codefloe
Watch
4
12
Fork
You've already forked forgejo-codefloe
0

feat(asymkey): credit instance signatures to the signing account #183

Merged
pat-s merged 1 commit from feat/instance-signer-account into v16.0/forgejo-codefloe 2026-09-30 09:29:39 +00:00
Owner

Commits signed with the instance SSH key show "Signed by: CodeFloe" with a placeholder avatar and no link, because upstream builds a placeholder signer from SIGNING_NAME and SIGNING_EMAIL (models/asymkey/ssh_key_object_verification.go).

This change will:

  • credit a verified instance-key signature to the account that owns SIGNING_EMAIL, so "Signed by" links to it and shows its avatar
  • resolve an organization's no-reply address ([email protected]) to that organization through the existing GetUserByEmail no-reply lookup
  • keep the signature trusted under the committer trust model, since signer and committer are then the same account
  • look the account up only after the instance key has verified the signature, so unrelated commits pay no extra query
  • report SIGNING_EMAIL as the signer email, so the account's own (possibly private) email never reaches the file API
  • keep upstream's placeholder signer when no account owns the address

The fork diff to the upstream file is one line; the logic lives in ssh_key_object_verification_codefloe.go.

Paired with an IaC change that sets SIGNING_EMAIL to the codefloe org's no-reply address.

Tests

  • TestInstanceSignatureAttribution covers the organization address (signer, reason, email and trusted status), an address without an account (placeholder kept) and a signature from another key (no attribution); it fails without the call site
  • go test ./models/asymkey/ and make lint-go pass
Commits signed with the instance SSH key show "Signed by: CodeFloe" with a placeholder avatar and no link, because upstream builds a placeholder signer from `SIGNING_NAME` and `SIGNING_EMAIL` (`models/asymkey/ssh_key_object_verification.go`). This change will: - credit a verified instance-key signature to the account that owns `SIGNING_EMAIL`, so "Signed by" links to it and shows its avatar - resolve an organization's no-reply address (`[email protected]`) to that organization through the existing `GetUserByEmail` no-reply lookup - keep the signature trusted under the committer trust model, since signer and committer are then the same account - look the account up only after the instance key has verified the signature, so unrelated commits pay no extra query - report `SIGNING_EMAIL` as the signer email, so the account's own (possibly private) email never reaches the file API - keep upstream's placeholder signer when no account owns the address The fork diff to the upstream file is one line; the logic lives in `ssh_key_object_verification_codefloe.go`. Paired with an IaC change that sets `SIGNING_EMAIL` to the `codefloe` org's no-reply address. ## Tests - `TestInstanceSignatureAttribution` covers the organization address (signer, reason, email and `trusted` status), an address without an account (placeholder kept) and a signature from another key (no attribution); it fails without the call site - `go test ./models/asymkey/` and `make lint-go` pass
pat-s force-pushed feat/instance-signer-account from 24f51bd493
Some checks failed
testing / frontend-checks (pull_request) Successful in 1m30s
testing / test-remote-cacher (redis) (pull_request) Has been skipped
testing / test-mysql (pull_request) Has been cancelled
testing / test-e2e (pull_request) Has been cancelled
testing / backend-checks (pull_request) Successful in 5m20s
testing / test-pgsql (pull_request) Has been cancelled
testing / test-sqlite (pull_request) Has been cancelled
testing / test-unit (pull_request) Failing after 12m37s
testing / test-remote-cacher (valkey) (pull_request) Has been skipped
testing / test-remote-cacher (garnet) (pull_request) Has been skipped
to 6dd1dfe56b
All checks were successful
testing / backend-checks (pull_request) Successful in 5m0s
testing / frontend-checks (pull_request) Successful in 2m20s
testing / test-unit (pull_request) Successful in 10m44s
testing / test-remote-cacher (redis) (pull_request) Successful in 2m3s
testing / test-remote-cacher (garnet) (pull_request) Successful in 2m29s
testing / test-remote-cacher (valkey) (pull_request) Successful in 2m33s
testing / test-mysql (pull_request) Successful in 40m44s
testing / test-e2e (pull_request) Successful in 37m15s
testing / test-pgsql (pull_request) Successful in 1h2m6s
testing / test-sqlite (pull_request) Successful in 57m4s
issue-labels / backporting (pull_request_target) Has been skipped
milestone / set (pull_request_target) Has been skipped
2026-09-30 07:42:03 +00:00
Compare
pat-s merged commit 80181c370f into v16.0/forgejo-codefloe 2026-09-30 09:29:39 +00:00
pat-s deleted branch feat/instance-signer-account 2026-09-30 09:29:39 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
codefloe/forgejo-codefloe!183
No description provided.