Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next 12 with 'strict-dynamic': Some ideas for an integration #36

Closed
1 task done
nibtime opened this issue Jan 29, 2022 · 0 comments
Closed
1 task done

Next 12 with 'strict-dynamic': Some ideas for an integration #36

nibtime opened this issue Jan 29, 2022 · 0 comments
Assignees
Labels
needs: triage Waiting for a contributor to triage type: feature New feature or request

Comments

@nibtime
Copy link

nibtime commented Jan 29, 2022

Is your feature request related to a problem? Please describe.

The ideas communicated here are related to #12 and #5

Describe the solution you'd like

I am pretty much done with this and came to a solution I like.

Published to NPM package: https://www.npmjs.com/package/@next-safe/middleware

Try the package in StackBlitz: https://github.com/nibtime/demo-next-safe-middleware

Preliminary OSS project (hopefully to be unified with next-safe): https://github.com/nibtime/next-safe-middleware

Describe alternatives you've considered

https://github.com/vercel/next.js/tree/canary/examples/with-strict-csp
This is confusing, as this is not strict as it is supposed to be. If you add the 'strict-dynamic' directive to this configuration, the 'self' will be ignored by CSP3 supporting browsers and then all Next.js framework scripts will be prevented from loading as they are not trusted.

guydumais/next-strict-csp#5 (comment)

Additional context

https://web.dev/strict-csp/
https://owasp.org/www-pdf-archive/2017-04-20-OWASPNZ-SpagnuoloWeichselbaum.pdf

https://csp.withgoogle.com/docs/strict-csp.html
https://content-security-policy.com/strict-dynamic/

CSP Evaluator Chrome Extension: https://chrome.google.com/webstore/detail/csp-evaluator/fjohamlofnakbnbfjkohkbdigoodcejf

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage Waiting for a contributor to triage type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants