fix(twitterapiio): fail closed when webhook secret is missing - #607
fix(twitterapiio): fail closed when webhook secret is missing#607yuvanvk wants to merge 8 commits into
Conversation
|
@yuvanvk is attempting to deploy a commit to the corsair Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTwitterApiIO webhook authentication now fails when the signature or webhook secret is missing. Tests cover valid signatures, failed verification, missing secrets, and missing signature headers. ChangesTwitterApiIO webhook verification
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThe PR makes TwitterApiIO webhook authentication fail closed when signature credentials are absent and adds focused verification tests.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (3): Last reviewed commit: "Merge branch 'main' into fix/582-twitter..." | Re-trigger Greptile |
|
@coderabbitai the keybuilder throws error if invalid signature, preventing DB persists. |
|
Tip For best results, initiate chat on the files or code changes.
✏️ Learnings added
You are interacting with an AI system. |
|
@greptile-apps now the any type is replaced with WebhookRequest type |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@greptileai review |
ambikeesshh
left a comment
There was a problem hiding this comment.
lgtm. thanks @yuvanvk
Description
Fixes TwitterApiIO webhook signature handling so inbound webhook requests fail closed when webhook authentication is not configured correctly.
Changes include:
keyBuilderfail when no stored webhook signature is availableFixes #582
Checklist
Before submitting your PR, please verify the following:
pnpm lintand all checks passpnpm buildand all packages build successfullyScreenshots / Demos
Additional Notes
This addresses a fail-open webhook verification path where missing webhook credentials could allow handlers to proceed without a valid signature.
Summary by CodeRabbit
Bug Fixes
Tests