Anti-AIClone

Log date · Sat

How do you verify signed Git commits?

Verify commit signatures against authorized keys. We compare an authorized signature, an unknown key and an unsigned commit.

Is signing Git commits enough?

A commit signature is useful provenance evidence only when it is verified against a key the team authorizes. In our Git test of two commits, the authorized signature passed; the same signature failed against an empty authorization list, and the unsigned commit failed too. A signature alone does not establish that a change is safe or reviewed.

Results from our check
CaseResult or recommendation
Signed with authorized keyVerification passed
Same signature, empty authorization listVerification failed
Unsigned commitVerification failed

The question is prompted by v1 of A Multi-Month Study of Git Commit Signing, submitted at 14:07 UTC on 29 August 2026 by Abubakar Sadiq Shittu, John Sadik and Scott Ruoti. [1]

What the study found

Over three months, 22 senior undergraduate and graduate students, used as proxies for junior developers, independently set up signing, used it across four coursework projects, extended it to a second device, inspected an external repository containing anomalous commits and answered security-reasoning questions. Almost all signed every commit and rated routine signing positively, yet many encountered setup, second-device and repository-verification difficulties. [1]

Over a quarter found no anomalous commits, and nearly half expressed at least one misconception about signing guarantees or key management. The participants were students, so the findings do not directly generalize to experienced teams; the study did not isolate whether difficulties arose from tools, education or understanding. Our small experiment illustrates verification and authorization; it is not a replication of the study or a measurement of human performance.

One signature, two authorization results

We created an isolated repository and a disposable Ed25519 key, committed protection.conf unsigned, then changed it and signed the next commit with the SSH key. We ran Git 2.54.0 and OpenSSH 10.5p1 locally; the allowed signers file associated the test public key with developer@example.test. This controlled example uses no real project or team key.

The same commit produced different outcomes with the two authorization files. With the empty file the cryptographic signature was still reported as good, but no principal matched and verification exited nonzero. Searching output for Good alone would therefore be misleading. This is a contiguous excerpt from our transcript; a newly generated key has a different fingerprint.

Empty authorization list and unsigned commit results.
== signed with empty authorization file ==
Good "git" signature with ED25519 key SHA256:5ZoTiyP6uKskZgzgADxUVTLwj92demIGnOlIsDI9wco
No principal matched.
exit=nonzero
== unsigned commit ==
exit=nonzero

Git documents that the SSH allowedSignersFile associates principals with public keys, and verify-commit fails when the key is absent. [2][3] Protect changes to that file too: if anyone can add a key freely, a passing result no longer represents the team’s authorization decision.

What a signature establishes

Git signs a commit object and embeds the signature in its header. [4] Successful verification supports the conclusion that the corresponding private key signed that object and the signature matches it. Associating the key with a person and deciding whether that person was authorized at the time require separate identity checks and authorization records. An author name or email in a commit is not enough on its own.

Obfuscation configuration, keep rules and signing scripts affect the release build. Even with a valid signature, review the actual diff, test the release artifact and connect the approval record to the commit used for the build. A stolen key, a mistake or an incorrect configuration written by an authorized person does not become safe merely because it is signed.

Recommended checks and responses

These are workflow recommendations, not effects measured in our experiment. Define which commits and branches must pass verification, then give exceptions an owner and a resolution deadline.

Recommendations by case
CaseResult or recommendation
Valid signature and authorized keyStill review the change and link approval to the build commit.
Unsigned or unknown keyHold the merge and investigate identity and authorization.
Departure or lost deviceUpdate authorization and revocation records; examine affected commits and releases.
Protection configuration changeAssign a reviewer and test the final release build.

Keep auditable key validity and history for rotation, and document lost-device, revocation and offboarding procedures. Git also supports an SSH revocation file; how historical signatures are handled depends on team policy and tool configuration. [3] Rotation is more than changing a setting on one developer’s machine.

Check your own repository

First verify the identities and public keys in the team authorization file through a trusted channel, then replace the path below with your controlled file. These commands check the current commit. If a release includes multiple commits, verify each included commit under team policy; checking HEAD alone does not validate the whole history.

Replace the path with the team authorization file; the second command surveys the last two commits.
git -c gpg.format=ssh -c gpg.ssh.allowedSignersFile=/path/to/allowed_signers verify-commit HEAD
git log --format='%s: %G?' -2

With our authorization file, the history summary showed G for signed and N for unsigned. The display is a starting point for investigation: CI should check verification and exit status for each target commit and apply a predefined response to unknown, missing or invalid signatures.

History status from our sample.
== history signature status ==
signed: G
unsigned: N

Your checklist

  • Match signing keys to team-authorized identities.
  • Verify every target commit and check the exit status.
  • Hold and investigate unknown keys and unsigned commits.
  • Assign reviewers for protection configuration and test release builds.
  • Document rotation, lost-device and offboarding procedures.

Primary sources

All sources and reproduction status ↗