Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Generate inline script SHA for Content-Security-Policy #3427
I imagine we can take some inspiration from (or use) https://bitbucket.org/atlassianlabs/csp-webpack-plugin and get SHA hashes of the inline scripts. This would render the
inline style elements also have the same problem
As I see it the attack vector is mainly from user-controlled input. So for example a markdown file with an inline script.
You mean something like this right?
(Without testing) I would say that the csp-webpack-plugin generates hash for every script, even evil ones. So it might not be a good inspiration