Skip to content

Adapt security policies for workers#640

Merged
thestinger merged 1 commit intoGrapheneOS:mainfrom
ggtlvkma356:worker-csp
May 6, 2026
Merged

Adapt security policies for workers#640
thestinger merged 1 commit intoGrapheneOS:mainfrom
ggtlvkma356:worker-csp

Conversation

@ggtlvkma356
Copy link
Copy Markdown
Contributor

Fixes #637.

Tested with #627.

- Add separate CSP to workers
- Change `X-Content-Type-Options` to per response
- Add a missing WASM asset
@inthewaves inthewaves self-assigned this May 5, 2026
"img-src blob: 'self'; " +
"script-src 'self'; " +
"style-src 'self'; " +
"worker-src 'self'; " +
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this was technically handled by worker-src falling back to script-src before: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Security-Policy/worker-src. It's good that we're now explicit about it though

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is technically not needed but I think making it explicit is good.

@thestinger thestinger merged commit a5225f9 into GrapheneOS:main May 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing CSP on workers

3 participants