Class: Scanny::Checks::CSRFCheck
- Defined in:
- lib/scanny/checks/csrf_check.rb
Overview
Checks for use of the “protect_from_forgery” method.
Instance Method Summary collapse
- #check(node) ⇒ Object
-
#pattern ⇒ Object
protect_from_forgery.
- #strict? ⇒ Boolean
Methods inherited from Check
#compiled_pattern, #issue, #visit
Instance Method Details
#check(node) ⇒ Object
10 11 12 |
# File 'lib/scanny/checks/csrf_check.rb', line 10 def check(node) issue :info, "The \"protect_from_forgery\" method is used.", :cwe => 352 end |
#pattern ⇒ Object
protect_from_forgery
6 7 8 |
# File 'lib/scanny/checks/csrf_check.rb', line 6 def pattern "Send<receiver = Self, name = :protect_from_forgery>" end |
#strict? ⇒ Boolean
14 15 16 |
# File 'lib/scanny/checks/csrf_check.rb', line 14 def strict? true end |