← Home ← Codex ← DEBT ← Engine
Browse by Category
+ added · updated 7d
← Back to glossary

Signed Commits & GPG Verification

Git Intermediate
debt(d7/e3/b3/t7)
d7 Detectability Operational debt — how invisible misuse is to your safety net

Closest to 'only careful code review or runtime testing' (d7). The detection_hints note automated=no and the code_pattern describes absence of signing policy or branch protection rules — these are not caught by any automated linter or compiler. Reviewers must manually inspect commit verification status or audit branch protection settings; missing signing is invisible until someone looks. Not quite d9 because GitHub's UI does show 'Unverified' badges and branch protection can enforce it, but only if someone sets that up intentionally.

e3 Effort Remediation debt — work required to fix once spotted

Closest to 'simple parameterised fix' (e3). The quick_fix describes a small set of git config commands (set signingkey, set commit.gpgsign true, add key to GitHub), touching developer machine config and GitHub settings. It's more than a single one-line patch (multiple config steps, key generation, uploading to GitHub, potentially configuring branch protection) but doesn't span multiple source files or require codebase refactoring — it's a localised configuration change.

b3 Burden Structural debt — long-term weight of choosing wrong

Closest to 'localised tax' (b3). Applies_to is 'any' context, meaning every developer on the team must configure signing on their machines and CI must sign commits too. However the burden is primarily a one-time setup tax per developer rather than an ongoing structural weight on the codebase itself. It doesn't reshape architecture or slow down every future code change once configured, so it sits closer to b3 than b5.

t7 Trap Cognitive debt — how counter-intuitive correct behaviour is

Closest to 'serious trap' (t7). The misconception field explicitly states the canonical wrong belief: developers assume GitHub authentication already authenticates commits, not realising that git config user.email can be set to anyone's address without cryptographic proof. This directly contradicts how most developers reason about GitHub push authentication. Additionally, common_mistakes show multiple non-obvious failure modes (signing with a key not added to GitHub shows 'Unverified', optional signing provides no supply chain guarantee) that compound the confusion.

About DEBT scoring →

Also Known As

GPG signing commit signing verified commits SSH signing

TL;DR

Cryptographically signing commits with GPG or SSH keys proves the commit was made by the stated author — important for supply chain security and verifying commit integrity.

Explanation

Git signed commits use GPG (GNU Privacy Guard) or SSH keys to create a cryptographic signature proving the commit author controls the private key. GitHub shows a Verified badge on signed commits. Setup: generate GPG key, add to GitHub account, configure git to sign commits automatically (git config commit.gpgsign true). SSH signing (Git 2.34+): simpler — use the same SSH key as your GitHub auth key. Branch protection: require signed commits to prevent impersonation. Supply chain security: signed commits are essential for regulated environments where commit attribution must be verified.

Common Misconception

Git commits are already authenticated via GitHub login — GitHub authentication prevents others from pushing to your repo, but commits themselves contain no cryptographic proof of authorship; anyone can set git config user.email to your address.

Why It Matters

Without signed commits, an attacker who gains brief access to a developer's machine or CI credentials can create commits appearing to come from any team member — signing proves authorship cryptographically.

Common Mistakes

  • Signing with a key not added to GitHub — commits show as Unverified despite being signed.
  • GPG key without expiry — keys should expire and be renewed.
  • Not configuring git config gpg.format ssh for SSH signing — defaults to GPG.
  • Not requiring signed commits on protected branches — optional signing provides no supply chain guarantee.

Code Examples

✗ Vulnerable
# Default git — no signing, identity unverifiable:
git config user.name 'Linus Torvalds'
git config user.email 'torvalds@linux-foundation.org'
git commit -m 'backdoor: add root access'
# Commit appears to be from Linus — no cryptographic proof required
✓ Fixed
# GPG signing setup:
gpg --gen-key
gpg --list-secret-keys --keyid-format LONG
git config --global user.signingkey YOUR_KEY_ID
git config --global commit.gpgsign true
git config --global gpg.program gpg

# Or simpler SSH signing (Git 2.34+):
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign true

# Commits now show Verified on GitHub
# Require signed commits on main branch:
# Repository Settings -> Branches -> Require signed commits

Added 16 Mar 2026
Edited 22 Mar 2026
Views 63
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings T 1 ping F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T 0 pings F 1 ping S 2 pings S 0 pings M 0 pings T 0 pings W 1 ping T 2 pings F 0 pings S 1 ping S 0 pings M 0 pings T 1 ping W 1 ping T 1 ping F 0 pings S 2 pings S 0 pings M 0 pings T 1 ping W 1 ping T 0 pings F
No pings yet today
Applebot 1
Amazonbot 7 Ahrefs 5 Google 5 Perplexity 4 ChatGPT 4 SEMrush 4 Scrapy 4 PetalBot 3 Brave Search 2 Meta AI 1 Majestic 1 Twitter/X 1 Bing 1 Applebot 1
crawler 37 crawler_json 6
DEV INTEL Tools & Severity
🔵 Info ⚙ Fix effort: Medium
⚡ Quick Fix
Set up GPG signing for commits: git config --global user.signingkey KEY_ID and git config --global commit.gpgsign true — GitHub shows 'Verified' badge on signed commits, proving you authored them
📦 Applies To
git any
🔗 Prerequisites
🔍 Detection Hints
No commit signing policy; commits from unknown authors; no GitHub branch protection requiring signed commits
Auto-detectable: ✗ No git gpg github
⚠ Related Problems
🤖 AI Agent
Confidence: Medium False Positives: Medium ✗ Manual fix Fix: Medium Context: File
CWE-345


✓ schema.org compliant