security: fail closed on either organization tenant signal - #148
Merged
Conversation
📝 WalkthroughWalkthrough조직 계정 범위 또는 조직 검토 사유가 있는 후보에 테넌트 권한 증명 검증을 추가했습니다. TypeScript 리뷰 큐와 Rust 전송 게이트가 증명 누락 또는 모순된 신호를 차단합니다. 회귀 테스트와 정책 문서를 추가했습니다. Changes조직 테넌트 권한 검증
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Candidate
participant CloudReviewQueue
participant RustTransferGate
participant TenantAuthority
Candidate->>CloudReviewQueue: 계정 범위와 검토 사유 제출
CloudReviewQueue->>TenantAuthority: 테넌트 권한 증명 확인
TenantAuthority-->>CloudReviewQueue: 확인 마커 반환
CloudReviewQueue->>RustTransferGate: 승인 결정 전달
RustTransferGate->>TenantAuthority: 영속 전송 권한 재검증
TenantAuthority-->>RustTransferGate: 유효성 결과 반환
RustTransferGate-->>Candidate: 전송 허용 또는 차단
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
seonghobae
marked this pull request as ready for review
August 10, 2026 00:41
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@src-tauri/tests/cloud_transfer_tenant_authority_gate.rs`:
- Around line 95-148: Add a test case for an organization-scoped candidate with
a valid attestation marker and an explicit Approved decision, then pass that
decision to candidate_blockers_with_review. Assert that the resulting blockers
do not include organization-tenant-authority-attestation-required, verifying the
organization-only approval path does not require an additional canonical review
reason.
🪄 Autofix
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 Plus
Run ID: 5c85e1b8-f92b-4138-a71a-4cb54282a782
📒 Files selected for processing (8)
CHANGELOG.mddocs/architecture/cloud-review-tenant-authority.mdsrc-tauri/src/cloud_eviction.rssrc-tauri/src/cloud_transfer.rssrc-tauri/src/naruon_lineage.rssrc-tauri/tests/cloud_transfer_tenant_authority_gate.rssrc/lib/cloudReviewQueue.authorization.test.tssrc/lib/cloudReviewQueue.ts
This was referenced Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Close a fail-open organization-tenant authorization gap: organization authority must be required when either the destination account scope is organization-owned or the canonical organization-sensitive review reason is present. Contradictory/missing attributes and
requires_review = falsemust never make an organization-sensitive candidate less restrictive.Test-first implementation
The existing branch preserves the TypeScript authorization regressions, public durable Rust transfer-gate regressions, narrow production fix, fixture alignment, doctoring, and changelog evidence from the reviewed security slice. CodeRabbit's prior request for the valid organization-only approval path was addressed before this reconciliation.
Current evidence identity
Current exact source head:
d0c32637fa808afa1052c95451ca25e9a6402b6a.Current independently resolved protected
maintip and branch merge base:63e931aa6b55873797091f4bc0cd2b96f0a66703.The reconciliation commit is a non-forced two-parent merge that preserves the prior tenant-authority head while integrating protected main's #146 Tauri CSP change. Its tree is current protected main plus only the eight tenant-authority files.
CHANGELOG.mdexplicitly preserves both security entries. No predecessor check/review/approval evidence transfers to this head.Current bounded diff remains:
CHANGELOG.md;docs/architecture/cloud-review-tenant-authority.md;src-tauri/src/cloud_eviction.rs;src-tauri/src/cloud_transfer.rs;src-tauri/src/naruon_lineage.rs;src-tauri/tests/cloud_transfer_tenant_authority_gate.rs;src/lib/cloudReviewQueue.authorization.test.ts;src/lib/cloudReviewQueue.ts.Security invariant
Only a candidate with neither signal uses the ordinary approval contract. Approved decisions still require exact fingerprints, human attribution, rationale, the backend-defined organization-tenant marker, copy-approval freshness, destination/provider/account binding, and the exact confirmation phrase.
Required before merge
Merge only after the unchanged current head receives fresh current-base Test, Release, Security Scan, SAST and all actually applicable repository/governance evidence, with zero valid unresolved current-head findings. Cancelled, queued, pending, stale-head/base, predecessor, synthetic-only, rate-limited, or failed evidence is not success. Code-owner approval gates remain on hold per protected-main repository governance and must not be manufactured.
No database migration, version bump, or release is introduced.
Summary by CodeRabbit
보안 강화
문서
테스트