Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Content-Security-Policy-Header #5177

Closed
1 task done
t-heuser opened this issue Jul 8, 2024 · 3 comments
Closed
1 task done

FEATURE: Content-Security-Policy-Header #5177

t-heuser opened this issue Jul 8, 2024 · 3 comments
Labels

Comments

@t-heuser
Copy link

t-heuser commented Jul 8, 2024

Is there an existing issue for this topic?

  • I have searched the existing issues

Description

I'd love to see the Content-Security-Policy-Header (CSP) to be implemented in the Neos core for backend and frontend.

It would make Neos projects more secure per default, it could mitigate XSS-attacks for example.

Possible Solution

There is already an existing package for Neos which adds CSP, but it's very old and not working anymore. But I guess it will be very useful for some inspiration.

I tried to repair the package by myself but they were issues with nonces and cache, like others described in this slack thread.

@bwaidelich
Copy link
Member

Just one note (as mentioned before):
Whatever the implementation is, it should not be based on Fusion in my opinion because that bakes the CSP rules into the content cache (which in turn means that caches have to be flushed whenever they change – unless we manage to put them into some dedicated cache segment)

@t-heuser
Copy link
Author

We just created a package which addresses this issue: https://github.com/Flowpack/Flowpack.ContentSecurityPolicy
We talked about whether it should be included in the core but this would be hard to implement as we would potentially break a lot of websites as every website has unique requirements for its CSP.
So we created a package, which will be available via composer very soon :)

@t-heuser
Copy link
Author

The package is available now :)
https://packagist.org/packages/flowpack/content-security-policy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants