Skip to content

fix(security): strengthen referral-code generation (currently 8-char UUID prefix, enumerable) #305

Description

Summary

incentives/service.go:549-552 derives the referral code from the first 8 chars of the user UUID - a ~32-bit, predictable/enumerable space enabling code enumeration/claim abuse.

Acceptance Criteria

  • Generate high-entropy codes (cryptographically random, collision-safe)
  • Enforce uniqueness with retry
  • Tests for entropy + collision handling

Complexity

Medium-High.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programhigh-complexityHigh-complexity backend task requiring deep architectural worksecuritySecurity vulnerability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions