fix(integration): bind event authority to exact request - #190
Conversation
|
Warning Review limit reached
Next review available in: 49 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough이벤트 준비 요청의 신뢰 컨텍스트 검증을 v2 HMAC 방식으로 변경했습니다. 서명을 HTTP 메서드와 경로에 결합했습니다. 잘못된 서명 형식, 요청 바인딩, 워크스페이스, 시간 및 비밀키를 검증하는 테스트를 추가했습니다. Changes이벤트 컨텍스트 권한 검증
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Event caller
participant Event preparation handler
participant requireTrustedEventWorkspaceContext
Event caller->>Event preparation handler: POST /v1/events/prepare with signed headers
Event preparation handler->>requireTrustedEventWorkspaceContext: headers, secret, request binding
requireTrustedEventWorkspaceContext-->>Event preparation handler: trusted workspace context or HTTP error
Event preparation handler-->>Event caller: preparation response or validation error
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/integration-service/src/integration-controller-authority.test.ts (1)
167-214: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win입력 형식 분기를 테스트에 추가하십시오.
requireTrustedEventWorkspaceContext는 비문자열 헤더와 각 패턴 불일치 입력을 아직 테스트하지 않습니다. 해당 fail-closed 동작을 검증하는 케이스를 추가하십시오.integration-service에는 현재 100% 커버리지 게이트가 설정되어 있지 않으므로, 커버리지 게이트 요구사항이라는 설명은 제거하십시오.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/integration-service/src/integration-controller-authority.test.ts` around lines 167 - 214, Extend the parameterized “fails closed for $name” tests around requireTrustedEventWorkspaceContext with cases for non-string headers and inputs that do not match each accepted header pattern, asserting the corresponding fail-closed status and error code. Remove any wording or references claiming this change is required by an integration-service 100% coverage gate.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/integration-service/src/integration-controller-authority.test.ts`:
- Around line 167-214: Extend the parameterized “fails closed for $name” tests
around requireTrustedEventWorkspaceContext with cases for non-string headers and
inputs that do not match each accepted header pattern, asserting the
corresponding fail-closed status and error code. Remove any wording or
references claiming this change is required by an integration-service 100%
coverage gate.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b9419cab-953a-40d6-b700-9d2a0fd4786b
📒 Files selected for processing (3)
apps/integration-service/src/integration-controller-authority.test.tsapps/integration-service/src/main.tsapps/integration-service/src/plugin-contract.integration.test.ts
|
@opencode-agent @cwl-noema-review Formal review-only request for exact current head |
Security outcome
The Integration event-preparation boundary no longer accepts a reusable workspace-only
life-os.workspace.v1proof. It now requires canonical short-livedlife-os.integration-event-context.v2HMAC evidence bound to the exact workspace, timestamp, HTTP method, and route path before tenant identity reaches plugin event preparation.Test-first evidence
Scope
Only
apps/integration-servicerequest authority and its tests are changed. No plugin installation, outbound delivery, secret-store, database, or cross-repository authority is introduced.Refs #130. Merge only after unchanged exact-head CI, AppGuardrail, SAST Semgrep, Security Scan, Commercial Readiness, CodeRabbit/current review findings, and current-live-main compatibility satisfy live policy.
Summary by CodeRabbit
보안 강화
테스트