News for hackers. Stuff that matters.
Re:Signing Git commits with your SSH key (2021) by whitepirate20 on Tuesday September 13, 2022 @09:43PM (#32832339)
This is nice. At my company, some “bad actors” were pushing commits to git repositories that impersonated a bunch of employees at the company to repos that were essentially targeted hate crimes. I definitely recommend something like this.
Re:Signing Git commits with your SSH key (2021) by wyldfire on Tuesday September 13, 2022 @11:07PM (#32832860)
Note that signing commits doesn't bar bad actors from pushing unsigned commits with forged identities.

Also note that until you can individually get the good actors' public key you can't verify their commits. So it's not enough to distribute the instructions in this webpage, you also have to have a trusted key exchange. Everyone who wants to verify commits will need a copy of everyone who might sign commits' public keys.

If you trust github then you can use them as a key broker like the "User SSH Keys from GitHub" section suggests, if all of your committers are github users.

Re:Signing Git commits with your SSH key (2021) by shagie on Wednesday September 14, 2022 @12:28AM (#32833318)
> Note that signing commits doesn't bar bad actors from pushing unsigned commits with forged identities.

This would need to be coupled with a "reject unsigned commits" policy on push. For example - https://docs.gitlab.com/ee/user/project/repository/push_rule...

And note that the caveats that it has would require the person to log in to gitlab to not need to push (by using the webIDE instead) which leaves an audit trail there.

Similar functionality can be crafted with a pre-receive commit hook - https://docs.github.com/en/[email protected]/admin/polic...

An example of such a hook - https://github.com/github/platform-samples/blob/master/pre-r...

Re:Signing Git commits with your SSH key (2021) by echohack5 on Wednesday September 14, 2022 @12:01AM (#32833198)
> If you trust github then you can use them as a key broker like the "User SSH Keys from GitHub" section suggests, if all of your committers are github users.

Additionally you can enable "Vigilant Mode" to make it obvious when commits are untrusted.

https://github.blog/changelog/2021-04-28-flag-unsigned-commi...

Re:Signing Git commits with your SSH key (2021) by nonethewiser on Tuesday September 13, 2022 @10:23PM (#32832584)
Commits such as?
Re:Signing Git commits with your SSH key (2021) by wyldfire on Tuesday September 13, 2022 @10:33PM (#32832650)

    commit 3c2f202543b31e9d7e2fff92a211a0f37ebcca9b (HEAD -> master)
    Author: Dave <[email protected]>
    Date:   Tue Sep 13 21:32:41 2022 -0500

        I am not smart.
Re:Signing Git commits with your SSH key (2021) by whitepirate20 on Tuesday September 13, 2022 @10:45PM (#32832717)
Just code contributions to some trans hating repo or something, don’t remember the details.
Re:Signing Git commits with your SSH key (2021) by nukemandan on Tuesday September 13, 2022 @11:20PM (#32832966)