Support CSP nonces in `workflow inspect runs --web`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- express, react, typescript
Research direction
Start with startServer(port) in the @workflow/web package, which builds the Express app internally, and with the server-rendered HTML that inlines <script> tags carrying per-request router state. Check how the React renderer is called, since it accepts a nonce but none is passed. The issue leaves open whether to add a nonce option or hook to startServer or to export the Express app, so confirm the direction with a maintainer first. Done means every inline <script> gets the per-request nonce and the page runs under a nonce-based CSP without 'unsafe-inline'.
Written by the indexing model from the issue text.
Description
workflow inspect runs --web serves the @workflow/web app (4.1.21) with no way to run it under a nonce-based Content-Security-Policy.
What happens
workflow inspect runs --webcallsstartServer(port)from@workflow/web, which builds the Express app internally and does not expose it, so there is no place to add middleware.- The server-rendered HTML contains inline
<script>tags that carry per-request router state. Their content differs on every request, so a hash-basedscript-srccannot allow them. - The React build supports a nonce, but none is passed to it.
Effect
A deployment that requires script-src 'self' with a nonce (for example, a security scan that fails on script-src 'unsafe-inline') has to allow 'unsafe-inline' for scripts and styles in front of the inspector.
Request
Support a CSP nonce in workflow inspect runs --web, for example:
- an option or hook on
startServerthat returns a per-request nonce, which the server passes to the React renderer and adds to every inline<script>it emits; or - export the Express app so callers can mount their own middleware and pass the nonce themselves.
Happy to open a PR if a direction is preferred.
- Dominant language
- TypeScript
- Stars
- 2.5k
- Forks
- 401
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 201
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
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.
More from vercel/workflow
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
node-module-esbuild-plugin: getImportedIdentifier only checks the first named import when locating a violationPossibly taken @div-cowboy claimed this 5 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vercel/workflow#5057 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
code-transform.mdx §ID Generation omits the package-shipped `name@version` ID formPossibly taken @Mohith26 claimed this 113 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
Similar issues
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysPossibly taken @pcbeingused333 claimed this today. OpenBug db: d1-sqlite Payload OSS
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
payloadcms/payload#19766 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
device-management-toolkit/sample-web-ui#3711 ·
Maintainers usually reply within 1 day
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
elastic/kibana#306401 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agentes-chat/agentes-chat#927 ·
Maintainers usually reply within 1 day
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tabPossibly taken @seenimohamed claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ardia-browser/ardia#2769 ·
Maintainers usually reply within 1 day