You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use this plugin within a static website is opening security holes by default.
For example if we follow #53, it will add static nonces on a static website.
I would recommend to disable nonces by default, and let the user enable them on when they know that they wont pack a static website
What type of issue is this? (place an x in one of the [ ])
bug
enhancement (feature request)
question
documentation related
testing related
discussion
Requirements (place an x in each of the [ ])
I've read and understood the Contributing guidelines and have done my best effort to follow them.
Description
Trying to use this plugin within a static website is opening security holes by default.
For example if we follow #53, it will add static nonces on a static website.
I would recommend to disable nonces by default, and let the user enable them on when they know that they wont pack a static website
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
slackhq/csp-html-webpack-plugin version: 5.1.0
Steps to reproduce:
npx create-react-app my-app --template typescript
npm install react-app-rewired csp-html-webpack-plugin --save-dev
config-overrides.js
react-app-rewired build
build/index.html
fileExpected result:
Nonces are not static. At the very least, they should be generated by an inline script and injected
Actual result:
Static nonces are generated.
Uploading this to a CDN will allow anyone to grab the nunce and re-use it, bypassing the CSP
The text was updated successfully, but these errors were encountered: