fix(calendar): bind connection lookup evidence to exact authority - #176
Conversation
|
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)
📝 WalkthroughWalkthrough
Changes연결 조회 범위 검증
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Security/data-integrity outcome
Prevent
PostgresCalendarConnectionRepository.getActiveConnection()from promoting a durable row whose opaque connection, workspace, or user identity differs from the exact lookup authority.Test-first sequence
calendar-connection-lookup-evidence-identity.test.tssupplies an otherwise valid active calendar row with a different UUIDv4connection_id. Against protected main5fdb8ee899991cbfd27c41ce59079648829b2a30, the repository would return it because the post-query evidence check validated lifecycle status only.connectionId,workspaceId, anduserIdto equal the already-validated lookup input before durable evidence can leave the persistence boundary.unknownbridge so the generic test client remains type-safe under strict TypeScript checking.The SQL query already scopes all three fields. This second boundary makes corrupted, incorrect, or alternate SQL-client adapters fail closed instead of relying on query intent as proof of returned identity.
Scope
Two-file persistence-integrity hardening only. No migration, OAuth, secret-handle, provider, public HTTP or synchronization semantics change.
Verification
Require unchanged exact head
8f463695d346ee80fbf041cdd5609dd406304addto pass calendar-service tests/typecheck/build, configured coverage/docstring gates, CI, AppGuardrail, SAST Semgrep, Security Scan, Commercial Readiness and all current review findings before merge. No predecessor evidence transfers.Refs #129.
Summary by CodeRabbit