-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
This is a very handy solution, but I read this while learning about CSPs:
"Don't create a middleware that replaces all script tags with "script nonce=..." because attacker-injected scripts will then get the nonces as well. You need an actual HTML templating engine to use nonces." (from https://cheatsheetseries.owasp.org/cheatsheets/Content_Security_Policy_Cheat_Sheet.html)
My understanding is that this package uses edge functions as a form of middleware to add the nonces, so presumably is open to this vulnerability.
Do OWASP's concerns apply in this case? If not, can you explain why not?
Does netlify have any alternative solutions which might mitigate the above issue? e.g. one which uses hashes?
Thanks for your attention!
Metadata
Metadata
Assignees
Labels
No labels