iluwatar / java-design-patterns

Design patterns implemented in Java
https://java-design-patterns.com
Other
90.06k stars 26.61k forks source link

Fixed severity posed by sonarqube #3061

Open PALASH2201 opened 1 month ago

PALASH2201 commented 1 month ago

What problem does this PR solve?

This PR addresses the security concern of hardcoding MongoDB credentials directly into the codebase. Storing credentials in the code can expose sensitive information, especially when working in a shared or open-source repository.

The .env file has been introduced to securely store MongoDB credentials, which are then fetched within the application. Additionally, the test cases have been modified accordingly to ensure that they work seamlessly with this new environment-based credential setup.

Close #2865

PALASH2201 commented 1 month ago

@iluwatar Can you add mongo db secrets in this repo image So that they can be accessed in github action