Skip to content

hotfix:20250617 - #62

Merged
Whale0928 merged 8 commits into
releasefrom
main
Jun 17, 2025
Merged

hotfix:20250617#62
Whale0928 merged 8 commits into
releasefrom
main

Conversation

@Whale0928

Copy link
Copy Markdown
Owner

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.yml file.

Security and Maintainability Improvements:

  • Removal of hardcoded API keys:
    • Removed sensitive API keys and replaced them with placeholders ({{api-key}}) in the http/동기식 비속어 검증 요청.http file. [1] [2] [3]
    • Deleted the http/http-client.env.json file, which contained hardcoded API keys and sensitive text data.

Code Refactoring:

  • Validation logic update:

    • Simplified the ClientMetadataReader class by replacing Boolean.FALSE.equals() with a more readable negation (!).
  • Transactional annotation update:

    • Changed the @Transactional annotation in the DefaultProfanityHandler class from readOnly = true to the default configuration to allow for write operations.

Development Configuration Enhancements:

  • Added development-specific settings:
    • Updated the profanity-storage/rdb/src/main/resources/application-rdb.yml file to include development-specific configurations, such as enabling SQL logging and formatting.

Signed-off-by: hgkim <hgkim@openerd.com>
…nagement

Signed-off-by: hgkim <hgkim@openerd.com>
Copilot AI review requested due to automatic review settings June 17, 2025 15:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.yml for 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 if validateApiKey returns 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 but http-client.env.json was 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}}

hgkim-openerd and others added 3 commits June 18, 2025 00:27
@Whale0928
Whale0928 merged commit e6b88b3 into release Jun 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants