fix(api): validate tenantId and environment in BlobTemplateStore.load - #75
fix(api): validate tenantId and environment in BlobTemplateStore.load#75patoperpetua wants to merge 1 commit into
Conversation
Reject unsafe tenant path segments before blob access so blob names stay within the documented per-tenant prefix shape. Closes the defence-in-depth gap tracked in #59. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthrough
ChangesTenant path validation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change rejects unsafe tenant and environment values before blob access, with the supplied test plan reporting all API tests passing; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description includes the linked issue, summary, and basic test results. It omits the required Feedback focus and Automated checks sections, and its test plan does not provide the required setup, user-oriented steps, or expected results. Full details: Linked Issues checkExplanation The changes satisfy issue
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Summary
validateTenantIdandvalidateEnvironmentguards toBlobTemplateStore.load, matching the publisher'sassertSafeTenantId/assertSafeEnvironmentrulesTemplateStoreError(INVALID_TEMPLATE) before any blob storage accessTest plan
pnpm testinapps/api— all 166 tests passCloses #59
Made with Cursor
Summary by CodeRabbit
INVALID_TEMPLATEerror.