Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix hardcoded payment gateway secrets#30

Open
ManupaKDU wants to merge 2 commits into
developmentfrom
sentinel/fix-hardcoded-payment-secrets-15755390146939339518
Open

πŸ›‘οΈ Sentinel: [CRITICAL] Fix hardcoded payment gateway secrets#30
ManupaKDU wants to merge 2 commits into
developmentfrom
sentinel/fix-hardcoded-payment-secrets-15755390146939339518

Conversation

@ManupaKDU

Copy link
Copy Markdown

🚨 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

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>
@google-labs-jules

Copy link
Copy Markdown

πŸ‘‹ 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

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

1 participant