Problem
isValidStellarAddress() exists in src/shared/stellar.ts but is never called anywhere. POST /v1/registry validates targetAddress with only z.string().min(1) (src/api/routes/registry.ts), and fileReport() (src/registry/reports.ts) only checks truthiness. Garbage addresses can be filed, endorsed, confirmed, and propagated to the scan cache / anchored on-chain via anchorRegistryFlag, polluting the registry and wasting an on-chain anchor transaction.
Location
src/api/routes/registry.ts (fileReportSchema)
src/registry/reports.ts (fileReport)
- Unused:
src/shared/stellar.ts#isValidStellarAddress
Suggested fix
Validate targetAddress with isValidStellarAddress() in the route's Zod schema (e.g. .refine(isValidStellarAddress)) before it ever reaches fileReport.
Problem
isValidStellarAddress()exists insrc/shared/stellar.tsbut is never called anywhere.POST /v1/registryvalidatestargetAddresswith onlyz.string().min(1)(src/api/routes/registry.ts), andfileReport()(src/registry/reports.ts) only checks truthiness. Garbage addresses can be filed, endorsed, confirmed, and propagated to the scan cache / anchored on-chain viaanchorRegistryFlag, polluting the registry and wasting an on-chain anchor transaction.Location
src/api/routes/registry.ts(fileReportSchema)src/registry/reports.ts(fileReport)src/shared/stellar.ts#isValidStellarAddressSuggested fix
Validate
targetAddresswithisValidStellarAddress()in the route's Zod schema (e.g..refine(isValidStellarAddress)) before it ever reachesfileReport.