You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if "signed commits" are required in branch protection there is no good way to have actions update code using the token provided for use with github actions and the current repository. Seems like github actions should provide a way for changes made by actions@github.com to be signed and show as verified through the interface.
Reacted by Brian Surowiec, Christopher Lane, Michael St Clair, Thiago Marback, Daniel Willcocks, b1f6c1c4, Shivam Rathore, Gary Crye, Thulio Ferraz Assis, Lachann and 340 more
Reacted by Muhammad Rendra, Rick Staa, Philipp Litzenberger, Alexander Dedunovich, Władysław Raczek, Art Shendrik, simone ragonesi, Alex Martossy, Ajay Jadhav, Bastian Zimmermann and 3 more
I have been using the following action. Once the action runs any git commands in following steps will use the signature. It does require storing secrets with GPG info though.
Reacted by William Desportes, Krzysztof Szyper, Egil Hansen, Atreya, Jesse Youngblood, Diogo Teixeira, forrestlunasec, joe-aulner, Adrian Środoń, GP and 11 more
@timharris777 Even if you use the above GitHub action, it doesn't work with actions@github.com right? I can confirm it works with my personal email address. If I export a secret using actions@github.com it still shows as unverified in the GitHub web UI.
@timharris777 Even if you use the above GitHub action, it doesn't work with actions@github.com right? I can confirm it works with my personal email address. If I export a secret using actions@github.com it still shows as unverified in the GitHub web UI.
@atreya2011 , yes you are correct. But we created a service account just for github actions that we then use to sign commits. It's the best thing we could do until github supports this.
@atreya2011 , yes you are correct. But we created a service account just for github actions that we then use to sign commits. It's the best thing we could do until github supports this.
Thank you for the confirmation @timharris777! By a service account do you mean that you created a new user account? That would be adding a seat and getting charged 4 USD a month.
@atreya2011 , yes you are correct. But we created a service account just for github actions that we then use to sign commits. It's the best thing we could do until github supports this.
Thank you for the confirmation @timharris777! By a service account do you mean that you created a new user account? That would be adding a seat and getting charged 4 USD a month.
That's correct. It is just a new user account that unfortunately takes up a license.
We created a centralized process with terraform to manage our github repos - it was working great until we enforced signed commits as part of this. Now we're stuck with either removing the security feature entirely or using a workaround.
Please support verified commits with github actions!
Reacted by Diogo Teixeira, Lotte, Muhammad Rendra, Bret Mogilefsky, Eric Ramsay, Alessandro Aiezza and Andrew Backer
Hey all, I hope you are doing well. @timharris777, thanks for sharing your experience, it actually enabled us to follow in your footsteps and deploy the same strategy!
Reacted by S. Shahriar, Nate Dobbs and Alessandro Aiezza
Is there any traction at all from github? This is crucial for us as signed commits have been made mandatory for our repositories and creating and managing non-human accounts is not really trivial. In my eyes signed commits need to be supported by github actions directly rather than us having to jump through hoops.
Reacted by Rob van der Leek, Stephen Hodgson, Harvey Peachey, Anthony S, Tim Harris, Ralph Bragg, Diogo Teixeira, Brian Surowiec, Jesse Youngblood, Greg Rearden and 29 more
What's the cryptographic purpose for this?
If any action can create signed commits under actions@github.com, then what does the signature indicate, that the commit was made on GitHub Actions rather than on humans' local machine?
The actual feature we should propose is to recognize myname+actions@github.com as a non-human account associated with me, and can be verified by my GPG keys. All I need is to store a private key as actions secret and use it for signing the commits.
Reacted by Momo Kornher, Tim Harris, Matthew Leather, Atreya, GP, Lef Filippakis, Philipp Waller, Dakota Clark, AKIMOTO Takumi, Jefferson Bledsoe and 30 more
Commits generated through the GraphQL API's createCommitOnBranch mutation are signed by github's web-flow GPG key. We created ghcommit and ghcommit-action to take advantage of this in our GHA workflows (and avoid GPG keys in GHA).
Reacted by Drew Hess, Tom Kay, Vincent Tjianattan, Jon Vassbø, Jeferson, rsp4jack, Arun, DanJBower, Eric McDonald and zack-is-cool
GraphQL API can not set the 'author' or 'committer' account, it automatically uses the account to which TOKEN belongs, when using GITHUB_TOKEN the corresponding account is github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>, if you use PAT or Fine-grained PAT, the corresponding account is the person to whom TOKEN belongs.
If you use PAT or fine-grained PAT, you can also bypass the branch protection rule. (#25305)
Maybe because the certificate is only around for ten minutes...? I don't know. But if it's verifiable long enough to help pass branch protection rules requiring signed commits, that seems worth it.
Thank you @josecelano and @mogul for your comments. I'm not sure if I read it before there or just stopped at chainguard-dev/actions/setup-gitsign README. But for sure, I didn't understand the "short time" part. Now I see why it isn't verified. Let's hope Github can improve the integration with Gitsign, as they say that the verification part is on the GitHub side.
There's not really a good way to attribute this commit to an imaginary "GitHub Workflow" user. In any case, I'm using github-actions[bot] to be able to see its little profile picture in the list of commits and I'm signing this commit to be able to verify it later.
This works wonderfully, except that the signature doesn't actually belong to that account.
What if there was a way for repositories to mark these commits as verified? For example, GitHub signs commits I make with GitHub's signature, not mine, so there's already some switcheroo going on behind the scenes.
Proposal: .github/authorized_keys file.
Similar to CODEOWNERS, a file that would allow specifying that some commits can be signed by a specific signature.
This file should be compatible with Git's ways of verifying signatures with this kind of files (AUTHORIZED_KEYS_FILE_FORMAT). Here's some docs on the subject:
I created an action to create signed commits the beauty of this action it's just an drop-in replacement of git commit you still can use the git push command as you're used to. Feel free to have a look at https://github.com/qoomon/actions--create-commit
Reacted by David Costa
Reacted by GP, Matthew H. Irby, Javier Chacana and Frederic ALEX
Activity
lanecm commentedon Aug 19, 2020
Yes, agreed. This is needed.
lceni commentedon Nov 5, 2020
+1
nathanbirrell commentedon Feb 2, 2021
Does anyone have a workaround for this?
timharris777 commentedon Feb 8, 2021
I have been using the following action. Once the action runs any git commands in following steps will use the signature. It does require storing secrets with GPG info though.
atreya2011 commentedon May 1, 2021
@timharris777 Even if you use the above GitHub action, it doesn't work with
actions@github.comright? I can confirm it works with my personal email address. If I export a secret usingactions@github.comit still shows asunverifiedin the GitHub web UI.timharris777 commentedon May 5, 2021
@atreya2011 , yes you are correct. But we created a service account just for github actions that we then use to sign commits. It's the best thing we could do until github supports this.
atreya2011 commentedon May 6, 2021
Thank you for the confirmation @timharris777! By a
service accountdo you mean that you created a new user account? That would be adding a seat and getting charged 4 USD a month.timharris777 commentedon May 6, 2021
That's correct. It is just a new user account that unfortunately takes up a license.
atreya2011 commentedon May 7, 2021
Very unfortunate that this seems to be the only way now. Hope GitHub supports signed commits by
actions@github.comsoon 🙏🏼ndobbs commentedon May 19, 2021
We created a centralized process with terraform to manage our github repos - it was working great until we enforced signed commits as part of this. Now we're stuck with either removing the security feature entirely or using a workaround.
Please support verified commits with github actions!
dgteixeira commentedon Sep 13, 2021
Hey all, I hope you are doing well.
@timharris777, thanks for sharing your experience, it actually enabled us to follow in your footsteps and deploy the same strategy!
instinct-vfx commentedon Oct 1, 2021
Is there any traction at all from github? This is crucial for us as signed commits have been made mandatory for our repositories and creating and managing non-human accounts is not really trivial. In my eyes signed commits need to be supported by github actions directly rather than us having to jump through hoops.
RalphBragg commentedon Oct 8, 2021
Any response from GitHub enterprise customers?
liyishuai commentedon Oct 11, 2021
What's the cryptographic purpose for this?
If any action can create signed commits under
actions@github.com, then what does the signature indicate, that the commit was made on GitHub Actions rather than on humans' local machine?The actual feature we should propose is to recognize
myname+actions@github.comas a non-human account associated with me, and can be verified by my GPG keys. All I need is to store a private key as actions secret and use it for signing the commits.12 remaining items
KurtLehnardt commentedon Sep 28, 2023
FWIW this is the solution we've implemented.
https://httgp.com/signing-commits-in-github-actions/
fharper commentedon Sep 28, 2023
I did kinda the same, but I needed to create a PR, so the usage of the GPG key is a bit different: if that can help others, check https://github.com/kubefirst/docs/blob/main/.github/workflows/release.yml .
joemiller commentedon Oct 2, 2023
Commits generated through the GraphQL API's
createCommitOnBranchmutation are signed by github's web-flow GPG key. We created ghcommit and ghcommit-action to take advantage of this in our GHA workflows (and avoid GPG keys in GHA).franzliedke commentedon Oct 24, 2023
@joemiller Thanks so much for pointing that out. That works beautifully for us! 👏🏼
vincenttjia commentedon Nov 8, 2023
@joemiller, thanks for ghcommit-action. Work flawlessly
maboloshi commentedon Nov 26, 2023
I have an example of using the
createCommitOnBranchmutation of theGraphQL APIhere.script/ci_commit_with_signature.sh
GitHub action section
.github/workflows/CI.yml
GraphQL APIcan not set the 'author' or 'committer' account, it automatically uses the account to whichTOKENbelongs, when usingGITHUB_TOKENthe corresponding account is github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>, if you use PAT or Fine-grained PAT, the corresponding account is the person to whomTOKENbelongs.If you use PAT or fine-grained PAT, you can also bypass the branch protection rule. (#25305)
mogul commentedon Jan 24, 2024
I'm not sure where I found this awesome solution using GitSign, but I think it should be noted here!
gmeligio commentedon Jan 24, 2024
Thank you for pointing that out, @mogul, because it helps with signing. Unfortunately, I use that solution, but it doesn't show as verified.
gmeligio/flutter-docker-image#148

mogul commentedon Jan 24, 2024
Maybe because the certificate is only around for ten minutes...? I don't know. But if it's verifiable long enough to help pass branch protection rules requiring signed commits, that seems worth it.
josecelano commentedon Jan 25, 2024
@gmeligio It's documented on their README:
https://github.com/sigstore/gitsign?tab=readme-ov-file#why-doesnt-github-show-commits-as-verified
gmeligio commentedon Jan 25, 2024
Thank you @josecelano and @mogul for your comments. I'm not sure if I read it before there or just stopped at
chainguard-dev/actions/setup-gitsignREADME. But for sure, I didn't understand the "short time" part. Now I see why it isn't verified. Let's hope Github can improve the integration with Gitsign, as they say that the verification part is on the GitHub side.xnox commentedon May 24, 2024
Especially since https://github.blog/2024-05-02-introducing-artifact-attestations-now-in-public-beta/ it would be nice for gitsign verification support for commits.
NatoBoram commentedon May 26, 2024
Proposal: a
.github/authorized_keysfile to verify commitsSay I want to change the version number in a GitHub Workflow, similar to this:
There's not really a good way to attribute this commit to an imaginary "GitHub Workflow" user. In any case, I'm using
github-actions[bot]to be able to see its little profile picture in the list of commits and I'm signing this commit to be able to verify it later.This works wonderfully, except that the signature doesn't actually belong to that account.
What if there was a way for repositories to mark these commits as verified? For example, GitHub signs commits I make with GitHub's signature, not mine, so there's already some switcheroo going on behind the scenes.
Proposal:
.github/authorized_keysfile.Similar to
CODEOWNERS, a file that would allow specifying that some commits can be signed by a specific signature.This file should be compatible with Git's ways of verifying signatures with this kind of files (AUTHORIZED_KEYS_FILE_FORMAT). Here's some docs on the subject:
qoomon commentedon Aug 2, 2024
I created an action to create signed commits the beauty of this action it's just an drop-in replacement of
git commityou still can use thegit pushcommand as you're used to. Feel free to have a look at https://github.com/qoomon/actions--create-commitpeter-evans commentedon Sep 3, 2024
I've updated create-pull-request to support commit signing with bot-generated tokens (
GITHUB_TOKENor GitHub Apps). It might help for some use cases.