-
Notifications
You must be signed in to change notification settings - Fork 697
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
Limit X-Content-Type-Options
usage to scripts and stylesheets
#767
Comments
If I understand correctly the issue you point, |
Yes something like that. Will need to look into things to better understand what needs to be updated. |
X-Content-Type-Options: nosniff
for images X-Content-Type-Options
usage to scripts and stylesheets
It seems there is a misunderstanding here, I'm just not sure whether it is mine or yours. Per my understanding the issue is the opposite. If you are serving a script file with content type So, again per my understanding, this header must be present on files that are not scripts or stylesheets. Like https://sonarwhal.com/docs/user-guide/rules/x-content-type-options/ says, the goal is to prevent a user uploading (as an example) a PNG file that contains JavaScript and then instructing other users' browsers to load that file as a script file and execute it (even though it is served as |
Yes, we can make the rule smarter in that sense and not require the header if
Yes, we need to update a bit the documentation and provide better server configs. However regarding the server configs I don't think there is a way to target only files that are specified inside |
Temporary remove the server configs examples for the `x-content-type-options` rule until we better figure out things. - - - - - - - - - - - - - - - - - - - - - - - - - - - Ref #767
We might have to look into CORB |
|
In conjunction to nosniffing CSS and JS (per "Should response to request be blocked due to nosniff?"), the section "Determining whether a response is CORB-protected" in the Google CORB explainer says:
Should probably track the progress of adding more CORB-protected MIME-Types in whatwg/fetch#860 (comment) and whatwg/fetch#721 (in any case where the concluded MIME-Type to protect would also require the |
Ref whatwg/fetch#395
The text was updated successfully, but these errors were encountered: