LC-2841 USER 가이드북 상페 API 연동#2156
Hidden character warning
Conversation
- 유저: 자료 정보 없이 /guidebooks/{id} 기반 fetchPublicGuidebookData 사용
- 어드민: 기존 /guidebook/{id} 기반 상세/수정/복제 플로우 유지
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! 이 PR은 가이드북 상세 조회 기능을 사용자 역할에 따라 분리하여 데이터 접근 제어를 강화합니다. 일반 사용자는 자료 정보가 제외된 공개용 API를 통해 가이드북 정보를 조회하고, 관리자는 기존 API를 통해 모든 정보를 관리할 수 있도록 합니다. 이를 통해 보안을 개선하고 API의 목적을 명확히 하여 코드의 유지보수성을 높입니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request integrates a new API (fetchPublicGuidebookData) for fetching guidebook details and updates the related UI. It successfully replaces mock data with a real API, enhances error handling, and improves separation of concerns by introducing the mapPublicGuidebook function for UI model mapping. However, a critical security vulnerability has been identified: the fetchPublicGuidebookData function lacks input validation for the guidebookId parameter, which is used to construct a URL for a server-side fetch call. This could expose the API server to path traversal or Server-Side Request Forgery (SSRF) attacks. Additionally, a potential bug exists in the price calculation logic, which might incorrectly handle cases where the final price is 0.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
연관 작업