Skip to content

Commit 51b0b87

Browse files
source-control: add rationale for signing commits
1 parent 3248e4d commit 51b0b87

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- os: install sudo & add user to sudo group
2020
- os: starship prompt in command-line shell
2121
- os: command-line commands section
22+
- source-control: add rationale for signing commits
2223

2324
### Changed
2425

docs/source-control/git-configuration.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,24 @@ Add Git SSH key passphrase to Operating System keychain to avoid typing in the p
187187

188188
## Commit signing with SSH Key
189189

190-
The SSH key can be registered with your GitHub account as a signing key, as opposed to an authorization key used to access a remote repository securely.
190+
Automatic signing each commit with the authors private key ensures traceability of all changes in the Git repository (prevents commit spoofing). Every company that deals with sensitive data should ensure all commits are signed to provide accountability for all code and configuration commits.
191+
192+
> [SEGAS-00009](https://engineering.homeoffice.gov.uk/standards/signing-code-commits/) is a United Kingdom Home Office engineering standard that requires all commits be signed.
193+
194+
A public SSH key can be registered with a GitHub account as a signing key which is used to validate commits cryptographically signed by the corresponding private key.
195+
196+
??? INFO "SSH Key for Authorization and Signing"
197+
An SSH key can be registered as both an authorization key used to access a remote repository securely and a signing key to validate commits.
198+
199+
For extra security, use a separate SSH key for authorization and signing.
191200

192201
Use an existing SSH key to sign commits and tags, or generate a new one specifically for signing.
193202

194-
Configure Git client to use SSH to sign commits and tags for all local repositories
203+
Configure Git client to use SSH to sign commits and tags for all local repositories.
204+
205+
Add the public keys used for signing commits to an [allowed-signatures](#allowed-ssh-keys) file to see confirmation of the private key used for signing the commit. Most Git clients will show this information.
195206

196-
??? EXAMPLE "Git Configuration SSH Key sigining"
207+
??? EXAMPLE "Git Configuration SSH Key signing"
197208
```config
198209
## ------ Git Behaviour ------ ##
199210
[commit]

0 commit comments

Comments
 (0)