Skip to content

security: audit & replace all Math.random in transaction / id / hash generation #438

Description

@nanaf6203-bit

Summary

Use of Math.random() in IDs, hashes, and security-sensitive contexts (covered in #1) has been found in many call sites; consolidate as a security hardening epic.

Affected area

Search for Math.random in src/** and tests/e2e/**.

Steps to reproduce / impact

See issue #1. Aggregating all sites into one issue makes the impact visible.

Expected behaviour

Replace every Math.random (especially substr-based id generation) with crypto.randomUUID or crypto.getRandomValues.

Acceptance criteria

  • Close sub-issues once the corresponding Math.random is replaced.
  • Add a CI grep check that fails if a new Math.random is added in security-sensitive paths.

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programpriority/p1P1 — high priority, fix soonrefactorCode health / refactor (no behaviour change)securitySecurity issue or hardening opportunity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions