checker: align X-XSS-Protection severities with OWASP
Absent is now OK (OWASP recommends leaving it unset or set to 0), and filtering mode (bare 1 or 1; report=...) is Warn since selective script rewriting can itself introduce XSS. 1; mode=block stays Info.
This commit is contained in:
parent
f4b8941a3d
commit
a652692ba4
3 changed files with 8 additions and 6 deletions
|
|
@ -260,9 +260,11 @@ func TestXXSSProtectionRule(t *testing.T) {
|
|||
want sdk.Status
|
||||
code string
|
||||
}{
|
||||
{"", sdk.StatusInfo, "http.x_xss_protection.absent"},
|
||||
{"", sdk.StatusOK, "http.x_xss_protection.absent"},
|
||||
{"0", sdk.StatusOK, "http.x_xss_protection.disabled"},
|
||||
{"1; mode=block", sdk.StatusInfo, "http.x_xss_protection.enabled"},
|
||||
{"1", sdk.StatusWarn, "http.x_xss_protection.filtering"},
|
||||
{"1; report=https://example.com/r", sdk.StatusWarn, "http.x_xss_protection.filtering"},
|
||||
}
|
||||
for _, c := range cases {
|
||||
p := httpsProbe("a:443")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue