-
Notifications
You must be signed in to change notification settings - Fork 936
feat: sign coder binaries with the release key using GPG #18774
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
base: main
Are you sure you want to change the base?
Conversation
3c01e7d
to
e80259c
Compare
scripts/sign_with_gpg.sh
Outdated
# | ||
# Usage: ./sign_with_gpg.sh path/to/binary | ||
# | ||
# On success, the input file will be signed using the GPG key. |
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.
Should probably say where the signature goes.
@@ -0,0 +1,62 @@ | |||
#!/usr/bin/env bash |
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.
Can you make the existing scripts/release/publish.sh
script call this script to do it's signing work?
scripts/sign_with_gpg.sh
Outdated
echo "Signature verification failed!" >&2 | ||
exit 1 |
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.
echo "Signature verification failed!" >&2 | |
exit 1 | |
error "Signature verification failed!" |
scripts/sign_with_gpg.sh
Outdated
echo "File not found: $FILE_TO_SIGN" | ||
exit 1 |
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.
echo "File not found: $FILE_TO_SIGN" | |
exit 1 | |
error "File not found: $FILE_TO_SIGN" |
scripts/sign_with_gpg.sh
Outdated
echo "Usage: $0 <file_to_sign>" | ||
exit 1 |
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.
echo "Usage: $0 <file_to_sign>" | |
exit 1 | |
error "Usage: $0 <file_to_sign>" |
90e69df
to
ddd2ada
Compare
Description
This PR introduces GPG signing for all Coder slim-binaries.
Detached signatures will allow users to verify the integrity and authenticity of the binaries they download.
Changes
scripts/sign_with_gpg.sh
: New script to sign a given binaryusing GPG. It imports the release key, signs the binary, and
verifies the signature.
scripts/build_go.sh
: Updated to callsign_with_gpg.sh
when theCODER_SIGN_GPG
environment variable is set to 1..github/workflows/release.yaml
: TheCODER_SIGN_GPG
environmentvariable is now set to 1 during the release build, enabling GPG
signing for all release binaries.
.github/workflows/ci.yaml
: TheCODER_SIGN_GPG
environmentvariable is now set to 1 during the CI build, enabling GPG
signing for all CI binaries.
Makefile
: Detached signatures are moved to the/site/out/bin/
directory