Repository navigation
⚡ Bolt: [성능 개선] #462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
⚡ Bolt: [성능 개선] #462
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,13 @@ | ||
| 🛡️ Sentinel: [CRITICAL] 파일 업로드 경로 조작(Path Traversal) 취약점 수정 | ||
| ⚡ Bolt: [성능 개선] | ||
|
|
||
| MultipartFile.getOriginalFilename()을 신뢰하여 발생할 수 있는 경로 조작 취약점을 수정했습니다. | ||
| StringUtils.cleanPath()를 사용하여 경로를 정규화하고 순수한 파일명만 추출하여 악의적인 페이로드(예: ../../../etc/passwd.hwp)로부터 시스템을 보호합니다. | ||
| 💡 What: | ||
| `ArtifactLinkService.parseAndVerify` 메서드에서 `String.split()`을 `indexOf()`, `lastIndexOf()`, `substring()`을 활용한 수동 파싱으로 대체했습니다. | ||
|
|
||
| 🎯 Why: | ||
| 기존의 `String.split()` 및 `Arrays.copyOf()`를 사용하는 구현은 고정된 길이의 구분된 토큰(JWT와 유사)에 대해 불필요한 문자열 배열 할당과 함수형 오버헤드를 발생시켜 GC(가비지 컬렉션) 압박을 증가시켰습니다. | ||
|
|
||
| 📊 Impact: | ||
| 토큰을 파싱하고 검증할 때 객체 할당과 GC 압박을 크게 줄여 아티팩트 토큰 유효성 검사의 핫 패스(hot path)를 최적화했습니다. | ||
|
|
||
| 🔬 Measurement: | ||
| `mvn clean test`를 실행하여 성능이나 기능 저하 없이 모든 테스트가 통과하는지 확인했습니다. 또한 포맷팅 및 정적 분석 테스트(`mvn checkstyle:check`)도 올바르게 통과합니다. | ||
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: ContextualWisdomLab/clearfolio
Length of output: 23051
🏁 Script executed:
Repository: ContextualWisdomLab/clearfolio
Length of output: 50388
성능 측정 주장을 실제 결과에 맞게 수정하세요.
mvn clean test와mvn checkstyle:check통과는 기능 회귀와 정적 분석만 보여 줍니다. 별도 JVM benchmark 또는 profiling 결과가 없으면 배열 할당과 GC 압박이 크게 감소했다는 주장을 삭제하고,Measurement를 테스트 통과로 제한하세요. 성능 주장을 유지하려면 before/after 수치와 JVM 실행 조건을 추가하세요.🤖 Prompt for AI Agents