Fix(#50): GSB API 키가 httpx INFO 로그에 노출되는 문제 - #51
Conversation
Google Safe Browsing API는 키를 URL 쿼리 파라미터로 요구하는데, httpx는 INFO 레벨에서 요청 URL 전체를 그대로 로깅한다. INFO 이상 로깅이 켜지는 환경(로컬 디버깅, 임시 스크립트 등)에서 키가 로그에 그대로 노출될 수 있어, 이 클라이언트를 임포트하는 시점에 httpx/httpcore 로거를 WARNING 이상으로 고정한다. VirusTotal은 헤더 인증(x-apikey)이라 해당 없음.
|
Warning Review limit reached
Next review available in: 38 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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 |
📝 개요
Google Safe Browsing API 키가 httpx의 INFO 레벨 요청 로그를 통해 그대로 노출되는 문제를 수정합니다. GSB API는 키를 URL 쿼리 파라미터로 요구하는데, 저장소에 httpx 로거를 억제하는 설정이 없어 INFO 이상 로깅이 켜지는 환경(로컬 디버깅, 임시 스크립트 등)에서 키가 로그에 그대로 찍힙니다. 벤치마크 테스트 스크립트 작업 중 실제로 발견했습니다.
🔗 관련 이슈
🎯 주요 변경 사항
app/infrastructure/google_safe_browsing/client.py: 모듈 임포트 시점에httpx/httpcore로거를 WARNING 이상으로 고정. 앱 진입점(app.main)뿐 아니라 이 클라이언트를 직접 임포트하는 임시 스크립트에서도 동일하게 보호되도록 클라이언트 모듈 자체에 배치.x-apikey)이라 해당 없음, 별도 수정 불필요.📸 사진
생략
✅ PR 체크리스트
uvicorn구동 또는 테스트 코드)를 통과했습니다. (215건 통과)이미 노출된
GOOGLE_SAFE_BROWSING_API_KEY는 이 PR과 별개로 재발급(rotate)이 필요합니다.