Repository navigation
[Fix] 취약점 파일 경로를 저장소 상대경로로 정규화 - #49
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
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 |
boogiewooki02
left a comment
Contributor
There was a problem hiding this comment.
고생하셨습니다!
코드리뷰 확인 부탁드려요~
| def repository_relative_path(value: str, repo_root: str | Path) -> str: | ||
| if not value or "\x00" in value: | ||
| raise InvalidFindingPath("missing or invalid file path") | ||
| value = value.replace("\\", "/") |
Contributor
There was a problem hiding this comment.
\를 전부 /로 바꾸면 Linux에서 파일명 자체에 \가 포함된 경우에도 경로가 변경됩니다. 따라서 실제 파일과 다른 위치를 가리킬 수 있을 것 같은데, 스캐너가 반환하는 경로 형식에 따라 변환 여부를 구분하면 어떨까요?
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.
close #46
🔎 개요
취약점 filePath에 임시 clone 절대경로가 표시되는 문제를 수정합니다. clone root 기준 상대경로로 정규화한 뒤 중복 제거와 callback을 수행합니다.
📝 작업 내용
👀 변경 사항
📸 스크린샷 (Optional)
해당 없음. 화면 변경 없이 callback의 filePath를 수정합니다.
✅ 체크리스트
검증: unittest 전체 72개 통과(skip 없음), git diff --check 통과. 실제 외부 API/운영 서버/DB 호출 없이 검증했습니다. CodeQL은 SARIF fixture로 검증했으며 실제 CodeQL CLI 분석과 배포 후 API/화면 확인은 수행하지 않았습니다. Semgrep이 PATH에 없으면 CLI integration test만 skip됩니다.
💬 고민사항 및 리뷰 요구사항 (Optional)