lib/brakeman/processors/alias_processor.rb in brakeman-lib-5.1.1 vs lib/brakeman/processors/alias_processor.rb in brakeman-lib-5.1.2

- old
+ new

@@ -322,10 +322,16 @@ if node_type? target, :hash exp = hash_values(target) end when :values_at if node_type? target, :hash - exp = hash_values_at target, exp.args + res = hash_values_at target, exp.args + + # Only convert to array of values if _all_ keys + # are present in the hash. + unless res.any?(&:nil?) + exp = res + end end end exp end