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

Write a new CSP that is neither too restrictive nor too open #23

Open
dhruvkb opened this issue Dec 19, 2019 · 1 comment
Open

Write a new CSP that is neither too restrictive nor too open #23

dhruvkb opened this issue Dec 19, 2019 · 1 comment
Assignees

Comments

@dhruvkb
Copy link
Member

dhruvkb commented Dec 19, 2019

The current NGINX CSP doesn't have much thought put into it. It can sometimes be too restrictive while at the same time having serious holes. A thoughtful, balanced CSP needs to drafted for NGINX as stated by @shaddygarg in #22.

@algomaster99
Copy link
Member

I was able to engineer this CSP using the aforementioned tool

default-src * blob: data: 'unsafe-eval' 'unsafe-inline' always;
object-src 'none';
script-src 'none';

The only problem it suggested was the script execution so I disabled it using script-src and then somehow it also allowed all sources.

I don't know if I am right but just trying to discuss this more 😅

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

No branches or pull requests

3 participants