-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request from GHSA-45hq-g76r-46wv
Problems: - We were automatically creating an integration when a webhook was received, this integration didn't have a secret set. - The identifier of integrations (or better said, their URL) is really easy to guess. And for those created manually, the URL is the only protection they have. Solutions and improvements: - No longer create integrations automatically. - All integrations are created with a secret attached to it. - Use django's get_random_string to generate the secret, and generate one on save if the integration doesn't have one. - Show the integration's secret in the detail view. - Bitbucket now allows attaching a secret to their webhooks! https://bitbucket.org/blog/enhanced-webhook-security - Use the sha256 signature to validate payloads from github (the sha1 version is deprecated) - This doesn't break the gitea workaround, since they also support using a shared secret and use the same header as github to attach the signature. - Old integrations that don't have a secret attached to them are still valid, but their functionality has been reduced to just trigger builds on existing versions, in order to trigger builds from PRs, and update the default branch, the webhook needs to be re-created with a secret. Ref GHSA-45hq-g76r-46wv
- Loading branch information
Showing
14 changed files
with
423 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.