diff --git a/ruby/ql/src/queries/security/cwe-352/CSRFProtectionDisabled.qhelp b/ruby/ql/src/queries/security/cwe-352/CSRFProtectionDisabled.qhelp index 7656a676d64..138ff588ac5 100644 --- a/ruby/ql/src/queries/security/cwe-352/CSRFProtectionDisabled.qhelp +++ b/ruby/ql/src/queries/security/cwe-352/CSRFProtectionDisabled.qhelp @@ -58,6 +58,11 @@ for example if parts of the session are memoized. Calling protect_from_forgery with: :exception can help to avoid this by raising an exception on an invalid CSRF token instead. + Note this remains true even in Rails version 5 and later: these versions + automatically run protect_from_forgery with: :exception + by default, but manually calling protect_from_forgery with + no with argument will still downgrade protection to null the + session rather than raise an exception.