Skip to content

[HSC-416] security filter 검증 통과 endpoint 추가#268

Merged
tkv00 merged 1 commit into
mainfrom
hotfix/HSC-416
Mar 23, 2026
Merged

[HSC-416] security filter 검증 통과 endpoint 추가#268
tkv00 merged 1 commit into
mainfrom
hotfix/HSC-416

Conversation

@tkv00
Copy link
Copy Markdown
Contributor

@tkv00 tkv00 commented Mar 23, 2026

📝작업 내용


👀변경 사항


🎫 Jira Ticket

  • Jira Ticket: HSC-416

#️⃣관련 이슈


@tkv00 tkv00 added 🗂️ area: BE 백엔드 영역 🚑 hotfix 프로덕션 긴급 수정(우회/긴급 패치 포함) 🔥 priority: P0 즉시 처리 필요(서비스/데모 블로커) 🏷️ release 릴리즈 준비/버전 태깅/릴리즈 노트/릴리즈 브랜치 작업 release:patch 버전 patch bump: X.Y.(Z+1) deploy:api-server 배포 대상: customer-api labels Mar 23, 2026
@tkv00 tkv00 merged commit 306fe55 into main Mar 23, 2026
9 checks passed
@github-actions github-actions Bot changed the title security filter 검증 통과 endpoint 추가 [HSC-416] security filter 검증 통과 endpoint 추가 Mar 23, 2026
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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

  • Actuator 엔드포인트 허용: Spring Boot Actuator의 헬스 체크, 정보, 메트릭스, 프로메테우스 관련 엔드포인트들이 보안 필터를 통과하도록 허용 목록에 추가되었습니다.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Copy Markdown

🧪 Test Coverage Report (JaCoCo)

overall__line overall__branch changed__line changed__branch

기준(soft, workflow는 실패 안 함): Overall line 70% / branch 50%, Changed line 80% / branch 60% · Generated: 2026-03-23 15:37 UTC

Scope Line Branch Line Graph Branch Graph Verdict
Overall 41.0% 30.3% ████████░░░░░░░░░░░░ ██████░░░░░░░░░░░░░░ ⚠️⚠️
Changed N/A N/A ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░ ✅✅

Package line spark (sample): ▃▂▁▂▂▄▄·▇█▁▆▆▆·▆▁▁▆█▇▅▁▁▁██▁▁▃
Package branch spark (sample): ▃▁·▁▁·▁·▇··▅▆▅·▅▁▁▅▇▇▃▁·▁·█▁▁▁

📦 Package coverage (worst 10)

Rank Package Line Branch Lines Line Graph Branch Graph
1 site.holliverse.customer.application.usecase.log 0.0% 0.0% 98 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
2 site.holliverse.infra.kafka.consumer 0.0% 0.0% 79 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
3 site.holliverse.customer.coupon.application 0.0% 0.0% 61 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
4 site.holliverse.customer.integration.fastapi 0.0% 0.0% 28 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
5 site.holliverse.customer.integration.external 0.0% 0.0% 28 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
6 site.holliverse.customer.application.usecase.counsel 0.0% 0.0% 14 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
7 site.holliverse.customer.coupon.web 0.0% 0.0% 12 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
8 site.holliverse.shared.config.runtime 0.0% N/A 11 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
9 site.holliverse.customer.web.util 0.0% 0.0% 8 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
10 site.holliverse.auth.handler 0.0% N/A 8 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░

🧨 Lowest coverage classes (worst 10)

Rank Class Line Branch Lines Line Graph Branch Graph
1 site.holliverse.customer.application.usecase.log.UserLogService 0.0% 0.0% 81 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
2 site.holliverse.infra.kafka.consumer.RecommendationKafkaConsumer 0.0% 0.0% 79 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
3 site.holliverse.shared.monitoring.CustomerMetrics 0.0% N/A 50 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
4 site.holliverse.admin.application.usecase.CalculateLogChurnScoreService 0.0% 0.0% 38 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
5 site.holliverse.admin.application.usecase.CalculateChurnScoreService 0.0% 0.0% 37 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
6 site.holliverse.customer.coupon.application.UseMemberCouponUseCase 0.0% 0.0% 34 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
7 site.holliverse.admin.application.usecase.ChurnRiskReason$ReasonCode 0.0% 0.0% 31 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
8 site.holliverse.customer.integration.fastapi.FastApiRecommendationClient 0.0% 0.0% 28 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
9 site.holliverse.customer.integration.external.AdminLogFeaturesClient 0.0% 0.0% 28 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
10 site.holliverse.customer.coupon.application.GetMemberCouponsUseCase 0.0% 0.0% 27 ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░
🧩 Changed files coverage breakdown (1 files)
File Line Branch Lines Verdict Line Graph Branch Graph
src/main/java/site/holliverse/shared/security/SecurityConfig.java N/A N/A 0 ✅✅ ░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░

🔎 HTML 리포트: Actions → Artifacts → jacoco-html · XML: jacoco-xml

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 Spring Boot Actuator 엔드포인트들을 보안 화이트리스트에 추가합니다. 하지만 이 변경으로 인해 info, metrics, prometheus와 같은 민감한 Actuator 엔드포인트가 인증 없이 외부에 노출되어 심각한 정보 유출 위험이 발생합니다. 또한, 기존 화이트리스트 설정에서 /api/v1/admin/** 경로가 permitAll() 처리되어 관리자 API 전체가 노출되는 치명적인 보안 취약점이 발견되었습니다.

Comment on lines +36 to +41
"/actuator/health",
"/actuator/health/**",
"/actuator/info",
"/actuator/metrics",
"/actuator/metrics/**",
"/actuator/prometheus",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-critical critical

[Critical] 심각한 보안 위험: 민감 정보 유출 및 관리자 API 공개

WHITE_LIST에 Actuator 엔드포인트를 추가하는 것과 관련하여 두 가지 중요한 보안 문제를 발견했습니다.

  1. 민감한 Actuator 엔드포인트 공개 (Severity: High)
    info, metrics, prometheus 엔드포인트는 애플리케이션 내부 동작과 관련된 상세 정보를 포함합니다. (예: 사용된 라이브러리, JVM 메모리 상태, DB 커넥션 풀 상태 등). 이 정보가 인증 없이 외부에 공개되면, 공격자가 시스템의 취약점을 파악하고 공격을 계획하는 데 악용될 수 있는 정보 유출(Information Disclosure) 취약점이 됩니다.
    헬스 체크를 위한 /actuator/health를 제외한 나머지 민감한 엔드포인트는 WHITE_LIST에서 제거해야 합니다.

  2. 관리자 API 인증 우회 (Severity: Critical)
    더 심각한 문제로, 현재 WHITE_LIST/api/v1/admin/**이 포함되어 있습니다. Spring Security 설정에서 permitAll() 규칙이 hasRole('ADMIN')보다 먼저 적용되므로, 모든 관리자 API가 인증을 우회하여 외부에 완전히 노출된 상태입니다. 이는 즉시 수정해야 하는 치명적인 보안 허점입니다. 이 PR에서 함께 수정하는 것을 강력히 권고합니다.

[해결 제안]
아래와 같이 헬스체크 목적의 health 엔드포인트만 WHITE_LIST에 남기고, 정보 유출 위험이 있는 다른 Actuator 엔드포인트는 제거하는 것을 제안합니다. 또한, 언급된 관리자 API 노출 문제도 반드시 해결해야 합니다.

Suggested change
"/actuator/health",
"/actuator/health/**",
"/actuator/info",
"/actuator/metrics",
"/actuator/metrics/**",
"/actuator/prometheus",
"/actuator/health",
"/actuator/health/**",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Team 🗂️ area: BE 백엔드 영역 deploy:api-server 배포 대상: customer-api 🚑 hotfix 프로덕션 긴급 수정(우회/긴급 패치 포함) 🔥 priority: P0 즉시 처리 필요(서비스/데모 블로커) release:patch 버전 patch bump: X.Y.(Z+1) 🏷️ release 릴리즈 준비/버전 태깅/릴리즈 노트/릴리즈 브랜치 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant