StabilityNexus / StabilityNexus/WalletLink
Support CSP nonce for the injected connect-UI stylesheet
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
nonceprop 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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