Life-Pill / pharmacy-pos-main-backend

The Pharmacy POS System Backend is the server-side component of our comprehensive pharmacy management software. It is developed using Spring Boot, Java, Spring Security ,and Microservices Architecture
Apache License 2.0
5 stars 3 forks source link

Resolve Build Errors, Test Errors, and Bug Fixes in Redis Data Caching #116

Closed PramithaMJ closed 5 months ago

PramithaMJ commented 5 months ago

Pull Request: Resolve Build Errors, Test Errors, and Bug Fixes in Redis Data Caching

Title

Fix Build Errors, Test Failures, and Bugs in Redis Data Caching Implementation

Description

This pull request addresses build errors, test failures, and bugs found in the Redis data caching implementation. It includes fixes and improvements to ensure the reliability, correctness, and performance of the caching functionality.

Changes Made

Controller Endpoints:

Bug Fixes:

Test Coverage:

Test Plan

Test Scenarios:

  1. Retrieve all cached employer details and verify correctness.
  2. Retrieve cached employer details by email and ensure accuracy.
  3. Test error scenarios such as invalid email or missing cached details and verify proper error handling.

Related Issues

ScreenShot

Screenshot 2024-06-08 at 10 18 07 PM Screenshot 2024-06-08 at 10 17 56 PM Screenshot 2024-06-08 at 10 17 42 PM

Checklist

Conclusion

This pull request resolves build errors, test failures, and bugs in the Redis data caching implementation. Please review the changes and ensure they meet the project's requirements and quality standards.

Best regards,
Pramitha Jayasooriya, Backend Developer at LifePill, https://pramithamj.me

gitguardian[bot] commented 5 months ago

⚠️ GitGuardian has uncovered 6 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [11606926](https://dashboard.gitguardian.com/workspace/552633/incidents/11606926?occurrence=145876179) | Triggered | Username Password | 407cbb163ece1dc1b5396dffaada1d8ff4ad3627 | pos-system/src/test/resources/application.yml | [View secret](https://github.com/Life-Pill/pharmacy-pos-main-backend/commit/407cbb163ece1dc1b5396dffaada1d8ff4ad3627#diff-fc2933e0dd79dfa62d5c10c8ef4e1704a333061593da720aa4fe09148d10dc3bL6) | | [11606926](https://dashboard.gitguardian.com/workspace/552633/incidents/11606926?occurrence=145876181) | Triggered | Username Password | ba0c2d8bb0bdc5352d90aa262c752db4197bce45 | pos-system/src/test/resources/application.yml | [View secret](https://github.com/Life-Pill/pharmacy-pos-main-backend/commit/ba0c2d8bb0bdc5352d90aa262c752db4197bce45#diff-fc2933e0dd79dfa62d5c10c8ef4e1704a333061593da720aa4fe09148d10dc3bL6) | | [11606926](https://dashboard.gitguardian.com/workspace/552633/incidents/11606926?occurrence=145876182) | Triggered | Username Password | ba0c2d8bb0bdc5352d90aa262c752db4197bce45 | pos-system/docker-compose.yml | [View secret](https://github.com/Life-Pill/pharmacy-pos-main-backend/commit/ba0c2d8bb0bdc5352d90aa262c752db4197bce45#diff-a1ec48c8e840025bc9915cabaad988eb74da4b2e1d1b59e8a4a0c0b7ef4cab5aL13) | | [11606926](https://dashboard.gitguardian.com/workspace/552633/incidents/11606926?occurrence=145876184) | Triggered | Username Password | 407cbb163ece1dc1b5396dffaada1d8ff4ad3627 | pos-system/docker-compose.yml | [View secret](https://github.com/Life-Pill/pharmacy-pos-main-backend/commit/407cbb163ece1dc1b5396dffaada1d8ff4ad3627#diff-a1ec48c8e840025bc9915cabaad988eb74da4b2e1d1b59e8a4a0c0b7ef4cab5aR13) | | [11654556](https://dashboard.gitguardian.com/workspace/552633/incidents/11654556?occurrence=145876180) | Triggered | AWS Keys | 407cbb163ece1dc1b5396dffaada1d8ff4ad3627 | pos-system/src/test/resources/application.yml | [View secret](https://github.com/Life-Pill/pharmacy-pos-main-backend/commit/407cbb163ece1dc1b5396dffaada1d8ff4ad3627#diff-fc2933e0dd79dfa62d5c10c8ef4e1704a333061593da720aa4fe09148d10dc3bR31) | | [11654556](https://dashboard.gitguardian.com/workspace/552633/incidents/11654556?occurrence=145876183) | Triggered | AWS Keys | 0a69f23fd2ff88526df77d422a09fbba51b2123a | pos-system/src/test/resources/application.yml | [View secret](https://github.com/Life-Pill/pharmacy-pos-main-backend/commit/0a69f23fd2ff88526df77d422a09fbba51b2123a#diff-fc2933e0dd79dfa62d5c10c8ef4e1704a333061593da720aa4fe09148d10dc3bL31) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secrets safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate these secrets](https://docs.gitguardian.com/secrets-detection/secrets-detection-engine/detectors/generics/username_password#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation.

🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

sonarcloud[bot] commented 5 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud