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

14.4.3 Should Content Security Policy be L1 or should it be higher? #1297

Closed
tghosth opened this issue Jun 21, 2022 · 6 comments
Closed

14.4.3 Should Content Security Policy be L1 or should it be higher? #1297

tghosth opened this issue Jun 21, 2022 · 6 comments
Assignees
Labels
Community wanted We would like feedback from the community to guide our decision otherwise we will progress _5.0 - prep This needs to be addressed to prepare 5.0

Comments

@tghosth
Copy link
Collaborator

tghosth commented Jun 21, 2022

CSP is not super easy to implement.

Do we definitely believe it should be Level 1? Current requirement:

14.4.3

[MODIFIED] Verify that a Content Security Policy (CSP) response header is in place that helps mitigate impact for XSS attacks like HTML, DOM, CSS, JSON, and JavaScript injection vulnerabilities.

@tghosth tghosth added help wanted _5.0 - prep This needs to be addressed to prepare 5.0 Community wanted We would like feedback from the community to guide our decision otherwise we will progress labels Jun 21, 2022
@tghosth tghosth changed the title Should Content Security Policy be L1 Should Content Security Policy be L1 or should it be higher? Jun 21, 2022
@elarlang
Copy link
Collaborator

I support level 1. It's not some nuclear science. It's a "smell of security", if you don't have even CSP set, then usually it correlates well with general quality.

@elarlang elarlang changed the title Should Content Security Policy be L1 or should it be higher? 14.4.3 Should Content Security Policy be L1 or should it be higher? Jun 21, 2022
@danielcuthbert
Copy link
Collaborator

I'm with @elarlang here, it is a good indicator of the basics and not hard to implement and for me, sets the tone for a lot moving forward.

@elarlang
Copy link
Collaborator

Additional point of view - if you think, that something in CSP declaration is too advanced for level one, we can split the requirement with clear goals. Like level 1 should take care that all the external sources are allow-listed with *-src or nonced, etc and level 2+ is for SRI checks (but it's covered with 14.2.3).

@tghosth
Copy link
Collaborator Author

tghosth commented Jul 10, 2022

I guess the question is, how easy is it to backport for older applications? Is there a risk that by making this level1 we are stopping this level from being accessible to older applications that rely on functionality which would normally be blocked using CSP?

@Sjord
Copy link
Contributor

Sjord commented Aug 13, 2022

14.4.3 does not really specify how well the CSP should protect against XSS. If you want a CSP that actually blocks all XSS, that could be next to impossible for legacy applications. If you slap a CSP: script-src=unsafe-inline on your legacy application, you have a CSP but have only minimal protection against XSS. But even that provides some protection, is easy to implement, and makes people think about which resources need to be permitted. I think requiring a CSP that is not necessarily watertight is OK for level 1, and achievable.

@tghosth
Copy link
Collaborator Author

tghosth commented Sep 13, 2022

Seems to be support for keeping as L1

@tghosth tghosth closed this as completed Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community wanted We would like feedback from the community to guide our decision otherwise we will progress _5.0 - prep This needs to be addressed to prepare 5.0
Projects
None yet
Development

No branches or pull requests

5 participants