diff --git a/functions/owasp/check_security_test.go b/functions/owasp/check_security_test.go index 0d4ec052..ccfdb1f0 100644 --- a/functions/owasp/check_security_test.go +++ b/functions/owasp/check_security_test.go @@ -250,6 +250,8 @@ paths: /secure: put: responses: {} + security: + - BasicAuth: [] components: securitySchemes: BasicAuth: @@ -277,9 +279,7 @@ components: res := CheckSecurity{}.RunRule(nil, ctx) - assert.Len(t, res, 2) + assert.Len(t, res, 1) assert.Equal(t, "`security` was not defined for path `/insecure` in method `put`", res[0].Message) assert.Equal(t, "$.paths['/insecure'].put", res[0].Path) - assert.Equal(t, "`security` was not defined for path `/secure` in method `put`", res[1].Message) - assert.Equal(t, "$.paths['/secure'].put", res[1].Path) }