Class: Scanny::Checks::Sql::FindMethodWithParamsCheck

Inherits:
SqlCheck
  • Object
show all
Defined in:
lib/scanny/checks/sql_injection/find_method_with_params_check.rb

Overview

Check for methods executing external parameters on database engine with params attribute

Instance Method Summary collapse

Methods inherited from Check

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

Instance Method Details

#check(node) ⇒ Object



16
17
18
# File 'lib/scanny/checks/sql_injection/find_method_with_params_check.rb', line 16

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

#patternObject



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

def pattern
  [
    pattern_find_by_sql_and_execute_on_models_with_params,
    pattern_find_with_conditions_and_params_or_limit
  ].join("|")
end