Class: Scanny::Checks::RandomNumbersCheck

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

Overview

Checks for indication that a low-entropy random number generator is used.

Instance Method Summary collapse

Methods inherited from Check

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

Instance Method Details

#check(node) ⇒ Object



13
14
15
# File 'lib/scanny/checks/random_numbers_check.rb', line 13

def check(node)
  issue :medium, warning_message, :cwe => 331
end

#patternObject



5
6
7
8
9
10
11
# File 'lib/scanny/checks/random_numbers_check.rb', line 5

def pattern
  [
    pattern_rand,
    pattern_seed,
    pattern_urandom
  ].join("|")
end