v3: retire the VERIFY_TOKEN signing-key fallback - #3
Conversation
WEBHOOK_HMAC_SECRET is now the only signing key for X-HookMyApp-Signature-256. The VERIFY_TOKEN fallback was a compat bridge for env files written before the verify-token/HMAC split; the CLI has exported WEBHOOK_HMAC_SECRET from both sandbox env and channels env since 0.12.x. VERIFY_TOKEN keeps its one real role: the verify-GET handshake body for your own webhook URL. - .env.example: WEBHOOK_HMAC_SECRET is the uncommented signing key; VERIFY_TOKEN moves to a commented channels-env-only line - boot warning now names only WEBHOOK_HMAC_SECRET and points old .env files at re-pulling with the CLI - README/AGENTS: fallback language removed; sandbox key list corrected - version 3.0.0 + changelog (Unreleased folded in)
📝 WalkthroughWalkthroughWebhook signature verification now relies only on ChangesWebhook signing v3
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
CHANGELOG.md (1)
27-38: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winChangelog "Changed" entry contradicts the "Breaking" section above it.
Line 29-30 says signature verification "now keys on
WEBHOOK_HMAC_SECRET, falling back toVERIFY_TOKENwhen unset (a compat bridge...)", but the Breaking section (lines 7-9) states the opposite: verification "no longer falls back toVERIFY_TOKEN" as of this same 3.0.0 release. This reads like leftover text from an earlier (v2) changelog entry that was never updated to reflect the v3 fallback removal, and it's inconsistent with the actual behavior insrc/index.jsand the AGENTS.md/README.md updates in this PR.📝 Proposed fix
### Changed -- Signature verification now keys on `WEBHOOK_HMAC_SECRET`, falling back to - `VERIFY_TOKEN` when unset (a compat bridge: sandbox sessions and channels - created before the verify-token/HMAC split export the signing secret under - `VERIFY_TOKEN`). `VERIFY_TOKEN` itself is only the webhook verify-GET - handshake response. A missing secret now logs a boot warning instead of - exiting. +- `VERIFY_TOKEN` itself is only the webhook verify-GET handshake response. A + missing `WEBHOOK_HMAC_SECRET` logs a boot warning instead of exiting. - The Instagram provider reads the sandbox or real-channel base URL with `INSTAGRAM_ACCOUNT_ID`, so the kit runs against a connected Instagram channel without a code change.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@CHANGELOG.md` around lines 27 - 38, Update the “Changed” entry in CHANGELOG.md to remove the claim that signature verification falls back to VERIFY_TOKEN, and describe the v3.0.0 behavior consistently with the Breaking section and implementation: use WEBHOOK_HMAC_SECRET only, with a missing secret producing a boot warning rather than exiting.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@CHANGELOG.md`:
- Around line 27-38: Update the “Changed” entry in CHANGELOG.md to remove the
claim that signature verification falls back to VERIFY_TOKEN, and describe the
v3.0.0 behavior consistently with the Breaking section and implementation: use
WEBHOOK_HMAC_SECRET only, with a missing secret producing a boot warning rather
than exiting.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f6bb5222-72ff-4a81-8e30-f007bc212b29
📒 Files selected for processing (7)
.env.exampleAGENTS.mdCHANGELOG.mdREADME.mdpackage.jsonsrc/index.jstest/routes.test.js
…ing-fallback v3: retire the VERIFY_TOKEN signing-key fallback
Signature verification now keys only on
WEBHOOK_HMAC_SECRET— the|| VERIFY_TOKENfallback is removed (breaking, hence v3). The fallback was a compat bridge for .env files written before the verify-token/HMAC split; the CLI has exportedWEBHOOK_HMAC_SECRETfrom bothsandbox envandchannels envsince 0.12.x, so a freshhookmyapp sandbox env --write .env(orchannels env) is the migration.VERIFY_TOKENkeeps its one remaining role: the body echoed on the one-time webhook verification GET (channels flow)..env.example, README, AGENTS.md, the boot warning, and the tests are updated to match; 43/43 tests pass.Tracked as AIT-126 in Linear.
Summary by CodeRabbit
WEBHOOK_HMAC_SECRET./chat./logssummaries for inbound Instagram webhooks.+prefix.