Skip to content

Codebuild Webhook fails due to invalid secret

0

I created a codebuild project with a webhook on push event on a specific branch from gitlab to start a build through terraform. This was working until a couple of days ago where the webhook gets disabled with Failed to connect showing.

When I test the push event webhook from gitlab, it returns the response HTTP 400 {"message":"Invalid Webhook request received: Webhook secret does not match. Try recreating webhook."}

While recreating the webhook does work. I'm looking to investigate on why the webhook secret would change. No one has updated the secret value in gitlab side, but I am wondering under what circumstances would the webhook secret change on codebuild?

asked 2 years ago194 views

1 Answer
0

The webhook secret for an AWS CodeBuild project can change if the webhook is recreated, updated, or refreshed by CodeBuild itself. It is not supposed to rotate automatically, but certain actions, like modifying the project’s source settings, re-applying Terraform, or AWS performing a backend refresh, will generate a new secret. That’s why GitLab suddenly sees a mismatch even though you didn’t touch the GitLab side.

EXPERT

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.