Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Request the last git commit to be signed #29

Open
hoh opened this issue Apr 11, 2024 · 4 comments · May be fixed by #64
Open

[Feature request] Request the last git commit to be signed #29

hoh opened this issue Apr 11, 2024 · 4 comments · May be fixed by #64

Comments

@hoh
Copy link

hoh commented Apr 11, 2024

Since comin can update it's own configuration from a git repository, trust in the repository seems absolute and a compromise of the forge could lead to a compromise of the machine.

Requiring the last git commit to be signed with a GPG key would add an extra security, requiring an adversary to not only compromise the forge and/or the repository, but obtaining the private key of one of the approved committers as well.

This would also allow unauthorized committers to publish to the repository while only commits signed with an preauthorized key would trigger an update of the system.

Requiring updates to be upstream the current configuration would help avoiding unauthorized rollbacks, preventing replay attacks.

@nlewo
Copy link
Owner

nlewo commented Apr 14, 2024

Requiring the last git commit to be signed with a GPG key

That's definitively planned and I actually created comin to replace a deployment bach script that checks Git commit are signed. This should be implemented in the two next releases.

Requiring updates to be upstream the current configuration would help avoiding unauthorized rollbacks, preventing replay attacks.

I'm sorry but I don't understand what you mean.
But, in order to avoid unauthorized rollbacks, comin already do not allow hard reset on the main branches.

Also, i actually didn't clean correctly the code base since there are some currently dead code ;)

@hoh
Copy link
Author

hoh commented Apr 15, 2024

That's great, looking forward to it !

Not allowing hard resets on the main branches solves the unauthorized rollbacks, good to read that this is handled already.

@Luflosi
Copy link

Luflosi commented Jan 8, 2025

Also, i actually didn't clean correctly the code base since there are some currently dead code ;)

The code you linked looks like it already does check the signature of commits. Does this mean, that this feature is mostly implemented already and "just" needs to be wired up (e.g. config option for the key to use)?

@nlewo nlewo linked a pull request Jan 22, 2025 that will close this issue
2 tasks
@nlewo
Copy link
Owner

nlewo commented Jan 22, 2025

I wrote a draft in #64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants