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

Script-Src-Elem missing from CSP directives #8284

Open
crustamet opened this issue Dec 3, 2023 · 2 comments
Open

Script-Src-Elem missing from CSP directives #8284

crustamet opened this issue Dec 3, 2023 · 2 comments
Labels
enhancement PRs that improve existing functionalities

Comments

@crustamet
Copy link
Contributor

Hello i was looking into this CSP feature more and more and i found out that codeigniter does not have this option inside the CSP file & config, can we get this into the master also please ?

image

https://github.com/codeigniter4/CodeIgniter4/blob/develop/system/HTTP/ContentSecurityPolicy.php#L701

just missing style-src-elem and in the App/config/CSP

@kenjis kenjis added the enhancement PRs that improve existing functionalities label Dec 3, 2023
@kenjis
Copy link
Member

kenjis commented Dec 3, 2023

CSP3 directives are not implemented in CI4.
Ref https://forum.codeigniter.com/showthread.php?tid=88753

@crustamet
Copy link
Contributor Author

No one is working on this, as these headers are miracles for the security and for the future of web development.

I know that these new directives CSP3 are hard to understand for most of the people :)
I have tried to implement this with raw PHP on a demo site, it is just crazy :)
When adding a domain to the CSP allowing it with script-src-elem they need more directives to allow only certain stuff i guess that is why it is called Content Security Policy Level 3 because it has 3 levels of allowances or something.

So for me this CSP3 is out of my understanding...
As i posted this "issue" in 2023, even now in 2025 still this CSP3 is not supported on all browsers.
so from 2023 this directive "script-src-elem" is changed to "script-src-attr-elem" what is that all about ?

Eighter way is worth having it implemented ? I guess not.. Until it will be fully supported across most of the browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement PRs that improve existing functionalities
Projects
None yet
Development

No branches or pull requests

2 participants