views:

66

answers:

3

I'd like to build a trusted path for software development. This means that every change in to code must be signed by the author and one reviewer, before being accepted. These signatures for the changes must be verifiable at release time, or there must be some other means of making sure the repository can not have been tampered, or additional changes added.

The version control system that I am expecting to use for this is git, but other options are also accepted. Signing can be via GnuPG or SSL certificates.

The workflow I am thinking would be roughly:

  1. Current verified trunk is branched
  2. Changes are developed in the branch by one or more developers
  3. One or more developers sign the changes made by the branch
  4. A reviewer reviews and tests the changes
  5. Reviewer signs the changes made by the branch
  6. Branch is "merged" in to current verified trunk

Merging does not have to be foolproof such as that unreviewed changes would need to be unmergeable to trunk - just that before a release, there needs to be a way to check if there are any unreviewed (unsigned) changes in trunk. And in general, tampering need not be prevented, only detected.

I'd like a short guide on how to set this up and how each operation is done. Once I get some pointers, I can figure out the specifics myself.

Also, I already know about 'git tag -s' technically, but I am unsure how to apply it to this particular problem.

A: 
VonC
I do not understand your explanation. How is each commit already signed? Sure, the commit contains the SHA1 for all of the repo, but nothing says the commit is made by the author given in the commit. I am unaware of any digital signatures being made to the commit?
Nakedible
@Nakedible: sorry, I did forget the `-s` option on the commit. Remember this is a very light-weight signed-off process (see the link I added in my answer, no "digital signatures" involved at this point, unlike `tag -s`)
VonC
A: 

You can sign your tag with your GPG key with -s option in tag git tag -s v0.1.0:

-s

   Make a GPG-signed tag, using the default e-mail address's key

But you can't signed a commit.

shingara
As I said in my original question, I already know the -s option in git tag, but that does not solve the entire problem.
Nakedible
sorry for repeat
shingara
+1  A: 

The changes will not be signed until you tag. Anything before that point can be verified by the author or by another out-of-band mechanism, but not from within git.

git can verify that a change's heritage is correct, but only the signed tag can verify the change itself is correct.

For your workflow, you may just find yourself tagging a lot.

Dustin
It seems I will have to find out the concrete solution myself.
Nakedible