forked from Hackmanit/HTTP-Secure-Header-Scanner
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Implement Tests for the Feature-Policy: Header.
A web platform API which gives a website the ability to allow and deny the use of browser features in its own frame, and in iframes that it embeds.
Browser Support:
https://caniuse.com/#feat=feature-policy
Further information:
https://developers.google.com/web/updates/2018/06/feature-policy
https://docs.google.com/document/d/1k0Ua-ZWlM_PsFCFdLMa8kaVTo32PeNZ4G7FFHqpFx4E/edit#
https://github.com/WICG/feature-policy/blob/master/features.md
Suggestion:
Although the Feature-Policy Header is not standardized and implemented in all web browsers, we can implement a test for this new header.
- We can test if this header is set.
1.1 If it's not set, the test will get a score of 50, because the default browser values are used. - Site admins should only allow features that are used / useful to reduce a possible attack surface.
2.1 If wildcards (*) are used, we should set a score of 0, because that's a bad practice.
2.2 Otherwise the header gets a good score.
If possible features are not used anyway, they can get disabled to reduce the potential attack surface.