-
Notifications
You must be signed in to change notification settings - Fork 2
application.properties 파일 내 민감 정보 분리 #26
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
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
You can disable this status message by setting the WalkthroughThe changes update the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SpringBootApp
participant GoogleOAuth
participant Database
participant Redis
participant GmailSMTP
participant Cloudinary
User->>SpringBootApp: Initiate request (login, API, etc.)
SpringBootApp->>GoogleOAuth: OAuth2 authentication (client ID, secret)
GoogleOAuth-->>SpringBootApp: Auth code/token
SpringBootApp->>Database: Connect using datasource properties
SpringBootApp->>Redis: Connect using Redis properties
SpringBootApp->>GmailSMTP: Send email via SMTP config
SpringBootApp->>Cloudinary: Upload media using API credentials
SpringBootApp-->>User: Respond with result
Possibly related PRs
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.gitignore (1)
36-39: Sensitive-config workflow is now tracked – double-check review gates.
application.propertiesis no longer ignored, so future commits risk leaking hard-coded secrets if a developer forgets to keep placeholders.
Make sure the repository has:
- A pre-commit or CI secret-scanner (e.g., GitGuardian, Trufflehog).
- A CODEOWNERS rule forcing at least one security reviewer on any change to
application.properties.Without these gates, it’s easy to regress and push live credentials.
src/main/resources/application.properties (2)
10-16: Duplicate/invalid Hibernate charset property.
spring.jpa.properties.hibernate.connection.charSetis not a recognised Hibernate setting and is redundant because…characterEncoding=UTF-8is already declared on L15.
Drop L13 to avoid confusion.- spring.jpa.properties.hibernate.connection.charSet=UTF-8
42-44: Expose fewer hard-coded vendor identifiers.Although Cloudinary’s
cloud-nameis not secret, externalising it keeps environments symmetric and avoids accidental drift.-cloudinary.cloud-name=dr6jccdxm +cloudinary.cloud-name=${CLOUDINARY_CLOUD_NAME}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.gitignore(1 hunks)src/main/java/com/project/Haru_Mail/domain/diary/Diary.java(0 hunks)src/main/resources/application.properties(1 hunks)
💤 Files with no reviewable changes (1)
- src/main/java/com/project/Haru_Mail/domain/diary/Diary.java
🔇 Additional comments (2)
src/main/resources/application.properties (2)
17-22: Custom JWT keys: verify they match code constants.
jwt.*keys are application-specific. Ensure the code actually reads these exact property names; Spring won’t map them automatically.
28-35: Same whitespace issue for SMTP properties.Remove spaces before
=to ensure keys bind correctly.-spring.mail.host = smtp.gmail.com -spring.mail.port = 587 -spring.mail.username=${MAIL_USERNAME} -spring.mail.password=${MAIL_PASSWORD} -spring.mail.properties.mail.smtp.auth = true -spring.mail.properties.mail.smtp.starttls.enable = true -spring.mail.properties.mail.smtp.ssl.trust=smtp.gmail.com +spring.mail.host=smtp.gmail.com +spring.mail.port=587 +spring.mail.username=${MAIL_USERNAME} +spring.mail.password=${MAIL_PASSWORD} +spring.mail.properties.mail.smtp.auth=true +spring.mail.properties.mail.smtp.starttls.enable=true +spring.mail.properties.mail.smtp.ssl.trust=smtp.gmail.comLikely an incorrect or invalid review comment.
| spring.redis.host = localhost | ||
| spring.redis.port = 6379 | ||
| spring.redis.password=${REDIS_PASSWORD} | ||
| spring.redis.timeout = 6000 | ||
|
|
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.
🛠️ Refactor suggestion
Whitespace breaks property keys & hard-coded local Redis host.
Trailing spaces before = become part of the key, so Spring will fail to bind.
Also, hard-coding localhost defeats containerised / cloud deploys; prefer an env placeholder.
- spring.redis.host = localhost
- spring.redis.port = 6379
- spring.redis.password=${REDIS_PASSWORD}
- spring.redis.timeout = 6000
+spring.redis.host=${REDIS_HOST:localhost}
+spring.redis.port=${REDIS_PORT:6379}
+spring.redis.password=${REDIS_PASSWORD}
+spring.redis.timeout=${REDIS_TIMEOUT:6000}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| spring.redis.host = localhost | |
| spring.redis.port = 6379 | |
| spring.redis.password=${REDIS_PASSWORD} | |
| spring.redis.timeout = 6000 | |
| spring.redis.host=${REDIS_HOST:localhost} | |
| spring.redis.port=${REDIS_PORT:6379} | |
| spring.redis.password=${REDIS_PASSWORD} | |
| spring.redis.timeout=${REDIS_TIMEOUT:6000} |
🤖 Prompt for AI Agents
In src/main/resources/application.properties around lines 23 to 27, remove any
trailing spaces before the '=' in the Redis property keys to ensure Spring can
bind them correctly. Replace the hard-coded 'localhost' value for
spring.redis.host with an environment variable placeholder like ${REDIS_HOST} to
support containerized and cloud deployments.
📝 작업 내용
Azure SQL 관련 설정 컬럼 제거
application.properties 파일 내 민감 정보 분리
🛠️ PR 유형
어떤 변경 사항이 있나요?
📸스크린샷 (선택)
💬 공유사항 to 리뷰어
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.
Summary by CodeRabbit
Chores
Refactor