Skip to content

fix: verify GitHub webhooks using raw request body - #51

Merged
kaihere14 merged 1 commit into
developfrom
fix/webhook-HMAC-verification
Aug 24, 2026
Merged

fix: verify GitHub webhooks using raw request body#51
kaihere14 merged 1 commit into
developfrom
fix/webhook-HMAC-verification

Conversation

@kaihere14

Copy link
Copy Markdown
Owner

This pull request refactors how the GitHub webhook handler is registered and how webhook payloads are processed and verified. The main improvements are stricter payload handling for security, moving the webhook handler route to a dedicated endpoint, and ensuring signature verification is robust.

Webhook payload handling and security:

  • The verifyGithubSignature function now strictly requires req.body to be a Buffer and compares the signature and digest using timing-safe equality, reducing the risk of signature spoofing.
  • The webhook payload is now parsed from a Buffer using toString("utf8"), ensuring consistent and secure handling of incoming data.

Route registration and organization:

  • The webhook handler (githubWebhookHandler) is now registered directly in index.js at the endpoint /api/github/webhookhandler with express.raw({ type: "application/json" }), ensuring the payload is passed as a raw buffer for signature verification. [1] [2]
  • The webhook handler route is removed from github.routes.js, centralizing its registration and avoiding conflicts with JSON body parsing middleware.

These changes improve the security and reliability of GitHub webhook processing in the application.

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daemon-doc Ready Ready Preview Aug 24, 2026 12:09am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
read-it Skipped Skipped Aug 24, 2026 12:09am

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f37e08e-89d5-4cc7-988e-cd8e45376e3f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kaihere14
kaihere14 merged commit 8cb0a80 into develop Aug 24, 2026
8 checks passed
@kaihere14
kaihere14 deleted the fix/webhook-HMAC-verification branch August 24, 2026 00:10
kaihere14 added a commit that referenced this pull request Sep 3, 2026
* Feature/remove convex log store (#46)

* refactor: remove redundant Convex log storage

* chore: remove internal development plan

* feat: add CI checks and refresh Convex tooling

Remove keepalive workflow and obsolete task logging backend while adding
formatting, linting, typechecking, build scripts, and expanded Convex agent
skills.

* fix: add ESLint dependencies and Convex log reference

* feat: remove obsolete task API and log parameter

* fix: convex client usage for live updates

* fix: use Live Updates for Cleanup Recovery

* fix: remove unused Convex API routes

* feat: add DaemonDoc development and migration plan

Add `daemondoc-plan.md` outlining current blockers, the v1 patch
strategy,
and the full v2 rewrite roadmap to transition from the current setup to
a GitHub App-based architecture.

* fix: fix README cleanup bypasses the queue runs inline in the HTTP (#48)

request

Implement reactive README cleanup progress UI
Replace the static cleanup progress toast with a reactive system driven
by
Convex log messages. Added `cleanup-queue` worker support and logic to
handle job retries and recovery via `sharedLogId`.

* Fix/flag abandoned mid refactor (#49)

* fix: prevent duplicate ActiveRepo records on reactivation

* fix: refactor imports and resolve lint issues

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: update repo activity sync and fix deactivation logic

* fix: verify GitHub webhooks using raw request body (#51)

* Refactor LLM service and add full mode pipeline (#52)

* refactor: introduce LLM service orchestration layer

* feat: add full mode pipeline

* fix: pass AI SDK options directly to generateText

* refactor: remove legacy LLM service layer

* Improve repository scanning and LLM generation updates (#53)

* Improve repository scanning and LLM generation updates

* Format LLM and Git utility code consistently

* Replace OpenAI SDK with AI Google provider

* Cleanup/cleanup llm refactor code (#54)

* fix: improve README generation and cleanup flow

* fix: increase Gemini context and output limits

* Remove obsolete README cleanup service

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant