Class: Scanny::Checks::Sql::FindMethodCheck

Inherits:
SqlCheck show all
Defined in:
lib/scanny/checks/sql_injection/find_method_check.rb

Overview

Check for methods executing external params on database engine

Instance Method Summary collapse

Methods inherited from Check

#compiled_pattern, #issue, #strict?, #visit

Instance Method Details

#check(node) ⇒ Object



17
18
19
# File 'lib/scanny/checks/sql_injection/find_method_check.rb', line 17

def check(node)
  issue :low, warning_message, :cwe => 89
end

#patternObject



9
10
11
12
13
14
15
# File 'lib/scanny/checks/sql_injection/find_method_check.rb', line 9

def pattern
  [
    pattern_find_by_sql_and_execute_on_models,
    pattern_find_by_with_params,
    pattern_find_by_with_conditions
  ].join("|")
end