Repository navigation
Fix/security hardening - #353
Merged
Merged
Conversation
- Compare webhook signatures in constant time, return false instead of throwing when eventTimestamp is missing, and add an overload that rejects webhooks outside a timestamp tolerance to limit replays. - Exclude secret keys, card numbers, CVCs, POS passwords and 3DS keys from Lombok generated toString() output so they do not leak into logs. - Require an https base URL (plain http only for loopback hosts). - Pin GitHub Actions to commit SHAs, restrict releases to master, pass secrets through env instead of interpolating them into scripts, remove the decrypted signing key after publishing, give the CI workflow read-only permissions and verify the Gradle distribution checksum.
Hide cardUserKey, cardToken, expireYear, expireMonth, cardHolderName, encryptedCard, posUsername and apiKey in the Lombok generated toString() of request and response classes so they do not end up in logs.
…d Clock isWebhookVerified(key, signature, data) behaves exactly as before again (a missing eventTimestamp still throws); only the signature comparison is now constant time. The tolerance overload reads the system clock directly.
outbound-api retries failed webhooks for up to ~44 minutes and re-sends from the merchant panel reuse the original event time, so a timestamp tolerance would reject legitimate deliveries. Only the constant time signature comparison is kept.
Drop @ToString.Exclude from request and response classes for now; it will be revisited separately. The base URL tests move to BaseUrlValidationTest.
Craftgate accepts any base URL again, as on master.
lemiorhan
approved these changes
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.