Conversation
Signed-off-by: hgkim <hgkim@openerd.com>
Signed-off-by: hgkim <hgkim@openerd.com>
Signed-off-by: hgkim <hgkim@openerd.com>
Signed-off-by: hgkim <hgkim@openerd.com>
…nagement Signed-off-by: hgkim <hgkim@openerd.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances security by removing hardcoded API keys, refactors validation logic for clarity, adjusts transactional settings to allow writes, and adds development‐only database logging configuration.
- Remove embedded API keys and delete the environment file
- Simplify API key validation and update transactional annotation
- Introduce dev profile settings in
application-rdb.ymlfor SQL logging and formatting
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| profanity-storage/rdb/src/main/resources/application-rdb.yml | Add a dev profile block to enable SQL logging |
| profanity-domain/src/main/java/app/application/filter/DefaultProfanityHandler.java | Change @Transactional(readOnly = true) to default |
| profanity-domain/src/main/java/app/application/client/ClientMetadataReader.java | Replace Boolean.FALSE.equals(...) with ! check |
| http/동기식 비속어 검증 요청.http | Swap hardcoded API keys for {{api-key}} placeholders |
| http/http-client.env.json | Remove file containing sensitive API keys |
Comments suppressed due to low confidence (2)
profanity-domain/src/main/java/app/application/client/ClientMetadataReader.java:27
- Switching from
Boolean.FALSE.equals(...)to!validateApiKey(...)may throw a NullPointerException ifvalidateApiKeyreturns null; consider ensuring a non-null boolean or retaining the null-safe check.
if (!keyGenerator.validateApiKey(apiKey)) {
http/동기식 비속어 검증 요청.http:4
- The placeholder
{{api-key}}is introduced here buthttp-client.env.jsonwas deleted, so the variable may not be defined; please add or update an environment file, or document how to set this.
x-api-key: {{api-key}}
…ticationFilter Signed-off-by: hgkim <hgkim@openerd.com>
Signed-off-by: hgkim <hgkim@openerd.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces changes to improve the maintainability and security of the codebase by removing sensitive data, refactoring validation logic, and enhancing configuration for development environments. The most significant changes include the removal of hardcoded API keys, updates to transactional annotations, and the addition of development-specific settings in the
application-rdb.ymlfile.Security and Maintainability Improvements:
{{api-key}}) in thehttp/동기식 비속어 검증 요청.httpfile. [1] [2] [3]http/http-client.env.jsonfile, which contained hardcoded API keys and sensitive text data.Code Refactoring:
Validation logic update:
ClientMetadataReaderclass by replacingBoolean.FALSE.equals()with a more readable negation (!).Transactional annotation update:
@Transactionalannotation in theDefaultProfanityHandlerclass fromreadOnly = trueto the default configuration to allow for write operations.Development Configuration Enhancements:
profanity-storage/rdb/src/main/resources/application-rdb.ymlfile to include development-specific configurations, such as enabling SQL logging and formatting.