upvote
Physical second factor on pushes would be a good place to begin with. Perhaps also GPG signing the commits with yubikey.

On-demand requests to elevate the required permissions for any higher risk actions, some of which require multiple humans physically intervening.

reply
Commit signing isn't really a security thing, at least to prevent anything. All it does is attest how the commit was made, not that it's correct or valid or should be allowed.
reply
Not on its own. But if you are providing your employees with yubikeys for which you know the public key, and you verify commits signed by the author came from their yubikey's key, it becomes an additional layer of verification that the person allowed to commit was present when the commit was signed.
reply
And an external system to verify the commit signatures.
reply
[dead]
reply
Assume you have a malicious employee. Use protected branches, which prevent direct pushes to main. Require only main has ability to deploy to production. OIDC and Github Environments can help you make these assertions. Don't use static credentials.
reply
I can believe this isn't standard practice. Seeing that the guy was able to push and deploy malicious code without it being caught is whats worried me on this.
reply
Prevent push to main or release branches or tags, require >0 non-author approvals (or >1 for bot PRs) for main or release merges.

Breakglass scenarios become the main issue. You could Limit accounts with breakglass permissions to 2 non-personal account that ideally require some form of JIT to gain access to.

But JIT controls are difficult in non-enterprise environments. It's easy to lock yourself out and require support intervention and it becomes a verification nightmare.

reply