test: Webhook registration requires master key#10255
test: Webhook registration requires master key#10255mtrezza merged 2 commits intoparse-community:alphafrom
Conversation
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
📝 WalkthroughWalkthroughAdded a vulnerability-focused test block in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@spec/vulnerabilities.spec.js`:
- Around line 3754-3820: Update the assertions to check for the exact auth
failure instead of any rejection: call the same request(...) for each endpoint
(POST /hooks/functions, PUT /hooks/functions/ssrf_probe, POST /hooks/triggers)
and assert response.status === 403 and that the response body/error message
indicates "master key required"; for the PUT /hooks/functions/ssrf_probe test
seed/create the webhook first (use POST /hooks/functions with functionName
'ssrf_probe' and a safe URL) so the subsequent PUT actually hits auth validation
rather than a "not found" error; replace generic expectAsync(...).toBeRejected()
checks with explicit status and message assertions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e8261f8d-b589-4b37-9171-174aa338872b
📒 Files selected for processing (1)
spec/vulnerabilities.spec.js
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## alpha #10255 +/- ##
==========================================
- Coverage 92.55% 92.54% -0.01%
==========================================
Files 192 192
Lines 16399 16399
Branches 221 221
==========================================
- Hits 15178 15177 -1
- Misses 1202 1203 +1
Partials 19 19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
🎉 This change has been released in version 9.6.0-alpha.44 |
Issue
Webhook registration requires master key (GHSA-8pjv-59c8-44p8)