Feature request: make CyberChef ready for strict content-security-policy
- Dominant language
- JavaScript
- Stars
- 35.8k
- Forks
- 4.1k
- Avg merge
- 2d 26m
- Merged PRs (30d)
- 33
Description
**Is your feature request related to a problem? Please describe.**
ChyberChes is intended for mangling security related data which potentially contain some malicious stuff. Currently the application contains a lot of inline styles and at least 2 inline scripts, which prevent to serve it with strict security policy inplace. This potentially makes some room to execute some XSS or CSRF code from the input.
**Describe the solution you'd like**
1) add http-equiv to the src/web/html/index.html and add the equivalent of the Content-Security-Policy header.
ideal target would be something like:
```
```
Currently somehow working policy would be
```
```
2) move the static script from src/web/html/index.html to some file location like assets/loader.js
3) change the inline styles to proper style classes to avoid excluding them from a policy using hashes
**Describe alternatives you've considered**
Alternative is setting the .htaccess or similar configuration and using the 'unsafe-hashes', but as hashes would be changing with each version this is quite cumbersome to update.
**Additional context**
This is what happens currently in Chrome browser if you attemtp to use the CyberChef with strict Content-Security-Policy
```
```

Contributor guide
Assessment
This issue has not been assessed yet.