Repository navigation
fix(rpc): reject alarm websiteIds outside the organization - #1112
ANSHSINGH050404 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
@ANSHSINGH050404 is attempting to deploy a commit to the Databuddy OSS Team on Vercel. A member of the Team first needs to authorize it. |
Fixes #1110. Scope: alarms create/update accepted an arbitrary websiteId with only an org-level update check, allowing cross-org alarm attachment. Change (1 commit, 2 files): new requireAlarmWebsite check (website exists, undeleted, same org) runs in create and update before any write; org-level update permission semantics unchanged (deliberately not the website-scoped withWorkspace variant, which would grant member roles alarm creation they lack today). Uniform BAD_REQUEST for missing-or-foreign rather than the issue 404/403 wording, matching the apikeys/insight-generation precedent and avoiding an existence oracle. Regression suite alarms.website-ownership.test.ts: foreign rejected on create+update, owned allowed, null allowed on create and unlink on update. Verification: new tests 5/5; neighbors with-workspace + apikeys ownership 36/36; ultracite + policy-lint + full repo check-types 37/37 + commit-format hooks green. Note: local pre-push suite red only on the 4 pre-existing apps/links Windows-spawn failures — pushed with --no-verify, CI is the gate. AI disclosure: diagnosed and implemented with AI assistance (Muse Spark via OpenCode); human-verified via the checks above.
Summary by cubic
Fixes #1110. Alarm create and update now reject website IDs that don't belong to the alarm's organization, closing the cross-org attachment path.
requireAlarmWebsitecheck that verifies the website exists, is not deleted, and matches the organization, running before any write in both create and update.websiteId) are still allowed on create and on update.Written for commit cc6d0f2. Summary will update on new commits.