ERROR probot: signature does not match event payload and secret

Created by Minh Vo, Modified on Mon, 22 May 2023 at 12:09 PM by Minh Vo

TABLE OF CONTENTS

Problem


One of the key features of GuardRails is its ability to trigger automatic scans when a new Pull Request is created. However, if you have deployed GuardRails on-premise and are facing issues triggering automatic scans, you may encounter an error message that reads "ERROR probot: signature does not match event payload and secret" when checking the probot logs with the command "kubectl logs -f <probot_pod>". 

07:42:48.048Z ERROR probot: signature does not match event payload and secret
  Error: signature does not match event payload and secret
      at verifyAndReceive (/app/node_modules/@octokit/webhooks/middleware/verify-and-receive.js:9:19)
      at /app/node_modules/@octokit/webhooks/middleware/middleware.js:46:14
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)


This error occurs when the webhook secret used by GuardRails does not match the one set in your GitHub. In this guide, we will show you how to troubleshoot this error and get GuardRails up and running smoothly


Solution

Step 1: Update the Webhook Secret

The first step to resolving the error is to verify that the webhook secret set in your GitHub repository matches the one used by GuardRails. To do this, follow these steps:

  1. Log in to your GitHub account and navigate to the installed GuardRails configuration.
  2. Locate the Webhook secret and click on Edit to retrieve the current value
  3. Log in to GuardRails Admin Interface and navigate to the Config tab
  4. Scroll down to the GitHub App Webhook Secret section and update the webhook secret matches the one you got from GitHub

Step 2: Deploy the updated configuration

After updating the webhook secret, you need to:

  1. Change the Version hash, then Save config
  2. Deploy the updated configuration

Step 3: Verify the changes

The deployment may take some minutes to complete. After that, you can:

  1. Execute "kubectl get pods" to verify all services/pods are running properly
  2. Check the log of probot pod again to make sure the error is gone

Step 4: Contact GuardRails Support

If the issue persists, it may be necessary to contact GuardRails support (https://support.guardrails.io) for further assistance. Gather all relevant information related to the error, including the error message and logs, and provide it to the support team for analysis. They may be able to provide additional troubleshooting steps or resolve the issue for you.


Conclusion

In conclusion, the "signature does not match event payload and secret" error in GuardRails Probot can be an issue when deploying GuardRails on-premise. However, by following the above steps, you can troubleshoot and resolve this issue and get GuardRails up and running smoothly. Remember to double-check your webhook secret, update it if necessary, verify the GuardRails configuration, and contact support if the issue persists.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article