fix(webhooks): always verify manual webhook signatures

GitHub, Gitea and Bitbucket manual webhooks accepted any signature when
APP_ENV=local. GitLab and the GitHub App webhook already did not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2026-09-28 10:13:20 +02:00
co-authored by Claude Opus 5.5
parent 9c7f2dc412
commit e755f4c9e0
4 changed files with 31 additions and 3 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ class Github extends Controller
continue;
}
$hmac = hash_hmac('sha256', $request->getContent(), $webhook_secret);
if (! hash_equals($x_hub_signature_256, $hmac) && ! isDev()) {
if (! hash_equals($x_hub_signature_256, $hmac)) {
auditLogWebhookFailure('github', 'invalid_signature', [
'application_uuid' => $application->uuid,
'application_name' => $application->name,