✨ server: decouple panda webhook verification from api key - #1317
nfmelendez wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 3e1f653 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe Panda webhook now receives comma-separated secret keys from runtime configuration and verifies request signatures inside the hook. The previous Panda utility header validator is removed, and tests cover the new verification path. ChangesPanda webhook verification
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant RuntimeEnv
participant serverIndex
participant pandaHook
participant verifySignature
RuntimeEnv->>serverIndex: Provide PANDA_WEBHOOKS_KEY
serverIndex->>pandaHook: Pass parsed pandaWebhookKeys
pandaHook->>pandaHook: Validate header and read body
pandaHook->>verifySignature: Verify signature with each key
verifySignature-->>pandaHook: Return verification result
pandaHook-->>pandaHook: Return error or continue
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The changed webhook verification path has no established remaining failure or security risk requiring resolution before merge. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 3bbf021f-1817-4c97-aca4-5932b88c79c1
📒 Files selected for processing (9)
.changeset/quiet-otters-rotate.md.do/app.yamlserver/hooks/panda.tsserver/index.tsserver/test/hooks/panda.test.tsserver/test/mocks/panda.tsserver/utils/panda.tsserver/utils/verifySignature.tsserver/vitest.config.mts
💤 Files with no reviewable changes (1)
- server/utils/panda.ts
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
9382d17 to
ef8392c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef8392cfa1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
ef8392c to
fb51b90
Compare
fb51b90 to
1183590
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1317 +/- ##
==========================================
- Coverage 72.14% 71.57% -0.58%
==========================================
Files 279 279
Lines 11278 10977 -301
Branches 3806 3680 -126
==========================================
- Hits 8137 7857 -280
+ Misses 2895 2882 -13
+ Partials 246 238 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary by CodeRabbit
New Features
Bug Fixes
Tests