[HSC-416] security filter 검증 통과 endpoint 추가#268
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 Pull Request는 애플리케이션의 모니터링 및 운영 효율성을 높이기 위해 Spring Boot Actuator 엔드포인트에 대한 접근 권한을 조정합니다. 이를 통해 시스템 상태 및 성능 지표를 외부에서 쉽게 확인할 수 있도록 하여, 서비스의 안정적인 운영에 기여합니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
🧪 Test Coverage Report (JaCoCo)
Package line spark (sample): 📦 Package coverage (worst 10)
🧨 Lowest coverage classes (worst 10)
🧩 Changed files coverage breakdown (1 files)
🔎 HTML 리포트: Actions → Artifacts → |
There was a problem hiding this comment.
Code Review
이 PR은 Spring Boot Actuator 엔드포인트들을 보안 화이트리스트에 추가합니다. 하지만 이 변경으로 인해 info, metrics, prometheus와 같은 민감한 Actuator 엔드포인트가 인증 없이 외부에 노출되어 심각한 정보 유출 위험이 발생합니다. 또한, 기존 화이트리스트 설정에서 /api/v1/admin/** 경로가 permitAll() 처리되어 관리자 API 전체가 노출되는 치명적인 보안 취약점이 발견되었습니다.
| "/actuator/health", | ||
| "/actuator/health/**", | ||
| "/actuator/info", | ||
| "/actuator/metrics", | ||
| "/actuator/metrics/**", | ||
| "/actuator/prometheus", |
There was a problem hiding this comment.
[Critical] 심각한 보안 위험: 민감 정보 유출 및 관리자 API 공개
이 WHITE_LIST에 Actuator 엔드포인트를 추가하는 것과 관련하여 두 가지 중요한 보안 문제를 발견했습니다.
-
민감한 Actuator 엔드포인트 공개 (Severity: High)
info,metrics,prometheus엔드포인트는 애플리케이션 내부 동작과 관련된 상세 정보를 포함합니다. (예: 사용된 라이브러리, JVM 메모리 상태, DB 커넥션 풀 상태 등). 이 정보가 인증 없이 외부에 공개되면, 공격자가 시스템의 취약점을 파악하고 공격을 계획하는 데 악용될 수 있는 정보 유출(Information Disclosure) 취약점이 됩니다.
헬스 체크를 위한/actuator/health를 제외한 나머지 민감한 엔드포인트는WHITE_LIST에서 제거해야 합니다. -
관리자 API 인증 우회 (Severity: Critical)
더 심각한 문제로, 현재WHITE_LIST에/api/v1/admin/**이 포함되어 있습니다. Spring Security 설정에서permitAll()규칙이hasRole('ADMIN')보다 먼저 적용되므로, 모든 관리자 API가 인증을 우회하여 외부에 완전히 노출된 상태입니다. 이는 즉시 수정해야 하는 치명적인 보안 허점입니다. 이 PR에서 함께 수정하는 것을 강력히 권고합니다.
[해결 제안]
아래와 같이 헬스체크 목적의 health 엔드포인트만 WHITE_LIST에 남기고, 정보 유출 위험이 있는 다른 Actuator 엔드포인트는 제거하는 것을 제안합니다. 또한, 언급된 관리자 API 노출 문제도 반드시 해결해야 합니다.
| "/actuator/health", | |
| "/actuator/health/**", | |
| "/actuator/info", | |
| "/actuator/metrics", | |
| "/actuator/metrics/**", | |
| "/actuator/prometheus", | |
| "/actuator/health", | |
| "/actuator/health/**", |
📝작업 내용
👀변경 사항
🎫 Jira Ticket
#️⃣관련 이슈