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

Verify that SRI is used for all elements ("require-sri") #14

Open
rugk opened this issue Apr 11, 2018 · 4 comments
Open

Verify that SRI is used for all elements ("require-sri") #14

rugk opened this issue Apr 11, 2018 · 4 comments

Comments

@rugk
Copy link

rugk commented Apr 11, 2018

I already mentioned this in another issue, but here again.

You can use "require-sri" in the CSP to instruct recent browser to load stuff only with sri. (Or was it still a draft??)

You should suggest this to software devs using this add-on. That should include it as a meta-tag in the source, so it is covered by the signature (in contrast to http headers).

@tasn
Copy link
Owner

tasn commented Apr 16, 2018

I think it's still a draft, but I don't know. Is require-sri even allowed in meta tags? I don't think so. I think it can only be included in HTTP headers.

Even if allowed, I don't think it should forced to be in meta, but I think having it checked / detected by the extension, so sites with insecure (no sri) inclusions would warn with a different icon or an warning message.

@rugk
Copy link
Author

rugk commented Apr 16, 2018

but I think having it checked / detected by the extension

Yeah, that should definitively be done. However, if it is easier, you could also just check the CSP header. That may likely be easier (and, as such, more resistant against potential errors/bypasses). Of course, you could provide a fallback version, if CSP is not used on the site.

@tasn
Copy link
Owner

tasn commented Apr 16, 2018

Forcing CSP is problematic because not everyone can control these headers.
Consider for example anyone hosting on github pages. They can't control the headers, but they can control the HTML and can make sure it has SRI.

@rugk
Copy link
Author

rugk commented Apr 16, 2018

Yeah, good point, I just say you can use CSP first, and fallback to "manual" validation that SRI is used for each element if it is not present. Such a thing may also be good for performance reasons, as users are likely better to verify require-sri than some browser add-on.

@rugk rugk changed the title Suggest software producers to include csp Verify that SRI is used for all elements Apr 16, 2018
@rugk rugk changed the title Verify that SRI is used for all elements Verify that SRI is used for all elements ("require-sri") Dec 8, 2018
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

2 participants