Class: Scanny::Checks::SetSessionKeyCheck

Inherits:
Check
  • Object
show all
Defined in:
lib/scanny/checks/insecure_config/set_session_key_check.rb

Overview

Checks for places where :session_key hash key is set.

Instance Method Summary collapse

Methods inherited from Check

#compiled_pattern, #issue, #visit

Instance Method Details

#check(node) ⇒ Object



14
15
16
# File 'lib/scanny/checks/insecure_config/set_session_key_check.rb', line 14

def check(node)
  issue :info, "Setting :session_key."
end

#patternObject

:session_key



6
7
8
9
10
11
12
# File 'lib/scanny/checks/insecure_config/set_session_key_check.rb', line 6

def pattern
  <<-EOT
    HashLiteral<
      array = [any{even}, SymbolLiteral<value = :session_key>, any{odd}]
    >
  EOT
end

#strict?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/scanny/checks/insecure_config/set_session_key_check.rb', line 18

def strict?
  true
end