Skip to content

fix(intercom): fail closed on missing webhook secret - #753

Draft
MikeGatsby wants to merge 1 commit into
corsairdev:mainfrom
MikeGatsby:fix/issue-711-intercom-webhook-secret-guard
Draft

fix(intercom): fail closed on missing webhook secret#753
MikeGatsby wants to merge 1 commit into
corsairdev:mainfrom
MikeGatsby:fix/issue-711-intercom-webhook-secret-guard

Conversation

@MikeGatsby

Copy link
Copy Markdown

Description

verifyIntercomWebhookSignature computed an HMAC signature against an empty
secret instead of rejecting the request outright when no secret was
configured. Every other webhook plugin in this repo (typeform, stripe,
notion, spotify, gitlab, mailchimp, and ~25 others) already fails closed on
a missing secret with the same { valid: false, error: 'Missing webhook secret' } shape — Intercom (and Vercel, tracked separately in #712) were
the two outliers.

Fixes #711

Checklist

  • I have run pnpm typecheck and there are no TypeScript errors
    (scoped to @corsair-dev/intercom)
  • I have run pnpm test and all tests pass (scoped to
    @corsair-dev/intercom; pre-existing unrelated failures in
    api.test.ts come from live Intercom API calls needing real
    credentials, confirmed present before this change via git-stash A/B)
  • I have added tests for the new guard
  • Full-repo pnpm lint/pnpm build not run (no lint script exists
    at the package level; a full monorepo build was out of scope for a
    2-file fix — happy to run it if a maintainer wants it before merge)

Additional Notes

No behavior change to the signature comparison path — only adds the
missing-secret guard before the HMAC is computed, matching the repo's
established pattern exactly.

verifyIntercomWebhookSignature computed an HMAC with an empty secret
instead of rejecting the request outright, matching the fail-closed
guard already used by every other webhook plugin in the repo
(typeform, stripe, notion, spotify, etc).

Closes corsairdev#711
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
www Skipped Skipped Aug 13, 2026 7:50pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

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: ab1acd48-0a66-4ea8-9d39-a69b08fe9eae

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.

@github-actions github-actions Bot added the plugin Changes inside a plugin package label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin Changes inside a plugin package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(intercom): return error when webhook secret is missing

1 participant