Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Content Security Policy #61

Open
krzysztofrewak opened this issue Sep 15, 2020 · 4 comments
Open

Content Security Policy #61

krzysztofrewak opened this issue Sep 15, 2020 · 4 comments
Assignees
Labels
environment All environment-related things question Further information is requested
Projects

Comments

@krzysztofrewak
Copy link
Contributor

Question: do we want set up Content Security Policy? It's a security standard helping with all bad stuff bad people could do with a website, including clickjacking, malicious XSS and other. I was really encouraged to implement it on my last year web security workshops, but honestly I have no experience with that other than this workshop.

Implementation would be extremely easy, just adding one line to server in nginx config:

add_header Content-Security-Policy "default-src 'self';";

Adjusting current codebase wouldn't be hard too. Mostly because we don't have a lot of code right now. ;)

@krzysztofrewak krzysztofrewak added question Further information is requested environment All environment-related things labels Sep 15, 2020
@krzysztofrewak krzysztofrewak added this to To do in Environment via automation Sep 15, 2020
@mlencki
Copy link
Member

mlencki commented Sep 15, 2020

We can try. What exactly we need to change in the current codebase?

@krzysztofrewak
Copy link
Contributor Author

In our part? Probably even anything (as soon #49 will be merged to develop) but there'll be a problem with Nova. I opened first Nova file included into our project (resources/views/nova/telescope-link.php) and in second line (!) there is a inline javascript call to opening new window. We can (and should) replace it with <a target="_blank" probably, but there're plenty of shit in Nova vendor files and I don't now how to handle them. Maybe disabling CSP on dashboard routes would be an option?

Btw, nice article: https://sekurak.pl/wszystko-o-csp-2-0-content-security-policy-jako-uniwersalny-straznik-bezpieczenstwa-aplikacji-webowej/

@mateuszchodor
Copy link
Member

If there is an option, we should definitely try to implement it.

@krzysztofrewak
Copy link
Contributor Author

Clipboard: https://github.com/spatie/laravel-csp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
environment All environment-related things question Further information is requested
Projects
Environment
  
To do
Development

No branches or pull requests

4 participants