-
Notifications
You must be signed in to change notification settings - Fork 561
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
chore: introduce gpg signed shasums #3168
Conversation
227c5fb
to
25c28ea
Compare
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 we add a step in the Release
job in CI to validate the signature? Maybe as part of validate-checksums.sh
(could be renamed to validate-release.sh
)
README.md
Outdated
|
||
```bash | ||
# 68BFBCCEB7794E6FC06A2044A29C32E91F4B9569 is the key belonging to code-signing@snyk.io | ||
# Copy of this public key is also in this repository /release-scripts/snyk-code-signing-public.pgp |
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.
To avoid customers relying on our source repo and directory structure, should we upload this key to S3/CDN and link there instead?
Or even use the openpgp URL https://keys.openpgp.org/vks/v1/by-fingerprint/68BFBCCEB7794E6FC06A2044A29C32E91F4B9569
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.
I was considering it, but introducing signing should help in case someone would tamper with data on the CDN. So that's a no on the CDN/static.snyk.io
And we are already trusting a 3rd party (openpgp.org) - they could be down, compromised or something. I wanted to introduce another place where key could be obtained. The commit with the key is signed and could be reviewed, and GitHub is trustworthy enough.
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.
Tying us to GitHub's endpoints has caused problems in recent past and no doubt we'll move this key in the future as "release-scripts" doesn't seem like the place for a public key. Maybe a top-level public
directory would be clearer so we don't accidently move stuff during source migrations.
We are already validating individual shasums and we fail if there would be anything off. So I'd say it doesn't add much. |
The main reason we have validate-checksums in the Release job is to ensure the transfer of files between CircleCI jobs via workspaces (which now includes the sig file) hasn't corrupted anything before release. So I think it will add confidence in our pre-release process. Though, yes, it's minor and only useful when CircleCI has a bug (version and release.json aren't validated at that point either). |
eeb851f
to
f9958d8
Compare
|
f9958d8
to
96b1b73
Compare
Updated the commit. Moved secrets to a PGP-related context. Moved the public key to the help directory https://github.com/snyk/cli/tree/chore/introduce-pgp-signed-shasums/help/_about-this-project#about-snyk-cli-documenting-design-decisions and added a pgp signature validation step |
Signed-off-by: Jakub Mikulas <jakub@snyk.io>
96b1b73
to
82de6b1
Compare
Reopening for cla bot |
This PR creates a new artifact containing GPG signed shasums
Sample file:
Added notes on signature verification to the readme.