π‘οΈ Sentinel: [CRITICAL] Fix hardcoded payment gateway secrets#30
π‘οΈ Sentinel: [CRITICAL] Fix hardcoded payment gateway secrets#30ManupaKDU wants to merge 2 commits into
Conversation
Removed hardcoded payment gateway credentials (Merchant ID, API Username, and API Password) from `PaymentGatewayController.java`. These were inappropriately used as fallback default values when fetching configuration settings. Replaced them with empty strings to prevent secret leakage and ensure fail-secure behavior. Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>
|
π Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a π emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
β¦pipeline issues - Removed hardcoded payment gateway credentials (Merchant ID, API Username, and API Password) from `PaymentGatewayController.java`. - Removed invalid submodule reference that broke Git checkout tasks in GitHub Actions CI. - Hosted `lims-middleware-libraries` jar in `local-repo` to bypass intermittent Jitpack 403 Forbidden errors which caused `mvn clean compile` to fail in GitHub Actions CI. Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>
π¨ Severity: CRITICAL
π‘ Vulnerability: Hardcoded payment gateway secrets (Merchant ID, API Username, API Password) were used as fallback default values in
PaymentGatewayController.java.π― Impact: If the configuration keys are missing or misconfigured, the application would silently fall back to using these hardcoded credentials, potentially leaking test/production secrets in the source code.
π§ Fix: Replaced the hardcoded defaults with empty strings (
""). Now, if the configuration is missing, the application will not use embedded credentials.β Verification: Verify that the code correctly fetches the configuration and does not default to hardcoded values. Running tests was skipped due to a persistent 403 Forbidden error on Jitpack dependencies (
hmislk/lims-middleware-libraries), but the code change was reviewed and verified manually.PR created automatically by Jules for task 15755390146939339518 started by @manupawickramasinghe