Video in progress
For supply chain trust in the origin of code, should signing of commits and tags be rolled out across the organization?
A signature says "this very key owner created this commit", while user.email can be forged at will. I make signing of release tags mandatory, and roll out commit signing so that it is checked on the server side, while keeping key management simple.
📖 Answer
Git has no author verification: if you write git config user.email cto@company.uz, the commit is "from the CTO". The platform knows only the account that pushed, not the author of the commit.
The options:
- GPG is old and widespread, but key management is heavy and developers dislike it;
- SSH signing (Git 2.34+): the SSH key you already have is enough, and it is the easiest to start with;
- Sigstore/gitsign: a short-lived certificate through SSO, with no need to store a key; the signature is written to a public transparency log.
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_ed25519.pub
git config --global commit.gpgsign true
git config --global tag.gpgsign true
I roll it out step by step: first release tags (few people, big impact), then "only signed commits" on protected branches. With a squash merge, the platform itself signs the commit, so the claim "every commit on main is signed" really means "the platform signed it".
But a signature is only one link in the chain. If CI builds with different code, or anyone can write to the artifact store, a signed commit gives little. For the full picture you also need build provenance (SLSA levels), signed artifacts and images, and dependency checks. I propose signing as part of that larger plan, not as a goal on its own.
Sign up to mark studied questions and save your progress.