Skip to content

security: Chainalysis API key exposed via window global #442

Description

@nanaf6203-bit

Summary

src/utils/security/blockchainSecurity.ts reads (window as any).__CHAINALYSIS_API_KEY__ from global window, making the key trivially extractable from the bundle / runtime.

Affected area

src/utils/security/blockchainSecurity.ts end of file

Steps to reproduce / impact

Browser users can extract API keys via DevTools, exposing third-party services to quota theft and abuse.

Expected behaviour

Move API keys to a Next.js API route that proxies requests; the browser should never see the key. If a key is unavoidable, restrict by domain and rotate regularly.

Acceptance criteria

  • Provide an /api/security/address-check proxy.
  • Browser code calls the proxy only.
  • Add CI grep that fails if a hardcoded __ global is shipped.

Activity

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

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programpriority/p0P0 — drop everything, ship hotfixsecuritySecurity issue or hardening opportunity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions