fix(security): fail closed on malformed reviewer source bytes - #166
Merged
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)
📝 WalkthroughWalkthroughGitHub 변경 파일 콘텐츠의 UTF-8 디코딩을 엄격하게 처리합니다. 잘못된 바이트는 빈 콘텐츠와 증거 실패로 기록합니다. 다른 파일 처리는 계속합니다. 해당 동작을 검증하는 회귀 테스트를 추가합니다. ChangesUTF-8 증거 처리
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 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 |
seonghobae
marked this pull request as ready for review
August 11, 2026 13:22
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.
Closes #165.
RCA / remedy
Protected
maindecoded exact current-head GitHub contents bytes withdecode("utf-8", errors="replace"). Malformed bytes were therefore silently normalized to U+FFFD and supplied to the reviewer as if they were exact source evidence.The narrow repair makes changed-file text decoding strict UTF-8. A malformed current-head blob is retained as an empty changed-file context plus an explicit
evidence_failuresentry, so the reviewer cannot produce an approval from lossy reconstructed source while normal UTF-8 and unavailable/deleted-content handling remain unchanged.Exact test-first proof
09e2618126c12ecf7be294f2fd2d22cb957d94b8:reviewer-cirun31494975898checked out that exact head and failed onlytest_invalid_utf8_changed_file_is_not_normalized_into_review_evidence; actual source evidence wasbefore�afterinstead of the required empty fail-closed context. 120 other reviewer tests passed. The RED head's application CI and central scan do not override the failing reviewer gate.4889ad1d0a8d513014e63a26820d305d4f4ae926: applicationci31495630113,reviewer-ci31495630235, and protected-base eligible centralSecurity Scan31495630128all completedsuccess.mainc85d710804139c0697d7ef8fa47d02b1389e6d84.Evidence boundary
This repair protects reviewer source integrity only. It is not production/release/legal/acquisition evidence and does not relax the repository's live governance or independent-review requirements.
Summary by CodeRabbit
버그 수정
테스트