Feature/474 validation sot - #539
Merged
AbuJulaybeeb merged 8 commits intoAug 28, 2026
Merged
Conversation
…ross-runtime validation, and custom linting - Implemented Husky commit-msg and pre-push policy enforcer (Resolves Stellar-Search#476) - Created scripts/check-invariants.js to run standalone tests on pre-commit (Resolves Stellar-Search#473) - Scaffolded shared validation schema and replaced backend strkey regex (Resolves Stellar-Search#474) - Scaffolded eslint-plugin-greenpay for internal rules (Resolves Stellar-Search#475)
- Created shared/validators/stellarValidator.js utilizing @stellar/stellar-sdk's StrKey - Replaced vulnerable hand-rolled regexes in backend schemas, event sourcing, and routes - Migrated extension session-state and frontend form UI to the SDK's CRC16 checksum check - Resolves Stellar-Search#474
…covery tests and remove uninstalled greenpay plugin reference from eslint config
…ys across backend and extension test suites
…m-valid stellar addresses in session-recovery test
…olve 500 errors in rate limiter and update routes
ajulaybeeb
force-pushed
the
feature/474-validation-sot
branch
from
August 28, 2026 18:14
11eea03 to
86f4001
Compare
…solve no-undef eslint error
|
🎉 Merged — thank you, @ajulaybeeb! Another one in the bag — thank you for contributing! If you're looking for something to pick up next, the open issues are labelled by area and complexity. |
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.
📌 Overview
Resolves #474 (Validation Source of Truth).
This PR entirely eliminates scattered, hand-rolled string-matching regexes (
/^G[A-Z0-9]{55}$/and/^G[A-Z2-7]{55}$/) used to validate Stellar addresses across the stack, replacing them with a single Source of Truth powered by@stellar/stellar-sdk'sStrKeyimplementation.🔍 Technical Approach
shared/): Addedvalidation.jsonand a universal JS adapter (stellarValidator.js) that performs robust CRC16 checksum evaluation.backend/src/schemas/common.jsto rip out the regex export. Refactored thevalidateKeymiddlewares inroutes/profiles.jsandroutes/impact.js, as well as 3 CQRS commands ineventSourcing/commands.jsto utilize the shared validator.extension/src/session-state.ts's internal state machine andfrontend/pages/submit-project.tsxto stop relying on[A-Z2-7]and directly use theStrKeyvalidation helper already exposed in their modules.🧪 Testing & Verification
stellarValidator.jsproperly catches malformed checksums that naive shape-checkers previously allowed.