-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Sign Windows release binary and installer #1746
Conversation
.github/workflows/all.yml
Outdated
@@ -307,13 +307,23 @@ jobs: | |||
Expand-Archive -Path ".\dist\k6-$env:VERSION-win64.zip" -DestinationPath .\packaging\ | |||
move .\packaging\k6-$env:VERSION-win64\k6.exe .\packaging\ | |||
rmdir .\packaging\k6-$env:VERSION-win64\ | |||
- name: Add signtool to PATH | |||
run: echo "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This static path is concerning if it ever changes, but I haven't found a way to determine it dynamically. :-/ I guess a find would work, but not sure if we should bother...
This GitHub Action also hardcodes it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that signtool is an x86 program, and we're using it to sign an x64 executable... 😕 🤷♂️
In any case, I have two requests... Can you please delete k6.pfx
at the end of the task, just in case our VM is not properly cleaned up between builds? And also rename the CERTIFICATE
secret to something more descriptive, WIN_SIGN_CERTIFICATE
or something like that? It's not unlikely that we'll want to add other certificates in the CI process in the future.
@na-- I changed the secret to I haven't tested a full build yet, but I can do that tomorrow, or we can merge this as is since I'll test a full deployment before the next release anyway. |
Codecov Report
@@ Coverage Diff @@
## master #1746 +/- ##
=======================================
Coverage 71.40% 71.40%
=======================================
Files 178 178
Lines 13751 13751
=======================================
Hits 9819 9819
Misses 3320 3320
Partials 612 612
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hmm @imiric I think that we should also upload the signed .msi package to the github releases as well... As a separate PR of course, but if we have the .msi in there as well, it will probably make it easier to implement the |
I'll create a new one, merge this and close the new one 😅 |
Closes #1034
I tested this in my fork and you can download the signed MSI from here. As explained in this comment, I chose to not use any 3rd-party extensions to avoid any security issues. As noted there, this won't remove the "Windows protected your PC" warning, but should eventually if we reach a certain "trust" level with Microsoft, which is gained by a lot of people choosing to run the app anyway.
Two secrets were added to the GitHub repo for this:
WIN_SIGN_CERT
andWIN_SIGN_PASS
. Information about both can be found in the password manager.Note that currently this only signs the binary in the MSI package and the MSI itself that are uploaded to Bintray. The binary that is uploaded to GitHub and available as release assets is not signed, as that would be more convoluted to setup, since
signtool.exe
is Windows-only and the build stage happens on Linux. I suppose we could overwrite the assets from Windows, but I didn't test this.