StabilityNexus / StabilityNexus/WalletLink

Support CSP nonce for the injected connect-UI stylesheet

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
22h
Merged PRs (30d)
7

Description

The connect UI injects its styles as a single inline <style> tag at runtime (injectWalletLinkStyles in src/components/styles.ts). An app served with a strict nonce-based style-src Content Security Policy will block that inline style, leaving the connect UI unstyled.

Deferred from the connect-UI PR review (raised by CodeRabbit). No StabilityNexus consumer sets a strict CSP today, so this is not urgent, but we should support it before a consumer needs it.

Possible shapes to decide when we pick this up:

  • an optional nonce prop on the components that is forwarded to the injected tag,
  • a single global config call set once at startup, or
  • also exporting the raw CSS as a string so a strict-CSP consumer can ship it as their own static stylesheet instead of relying on runtime injection.

No API decision is made yet; that is part of the work.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/components/styles.ts at injectWalletLinkStyles and inspect how the single inline style tag is created. Compare the optional nonce prop, global configuration, and exported CSS approaches described in the issue, then choose and document an API. Done means the connect UI can be used under a strict nonce-based style-src CSP without losing its styles.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.