thesp0nge / dawnscanner

Dawn is a static analysis security scanner for ruby written web applications. It supports Sinatra, Padrino and Ruby on Rails frameworks.
MIT License
737 stars 86 forks source link

File.exists is removed from ruby 3.2 (was deprecated in 2.7). #252

Closed dennistdk closed 1 year ago

dennistdk commented 1 year ago

/bundle_cache/ruby/3.2.0/gems/dawnscanner-1.6.9/lib/dawn/kb/pattern_match_check.rb:64:in block in vuln?: undefined method exists? for File:Class (NoMethodError)

matches = run(load_file(filename)) if File.exists?(filename) && File.file?(filename) && ! File.binary?(filename) && ! must_exclude?(filename)

Did you mean? exist?

puzzler7 commented 1 year ago

+1, getting the exact same issue trying to run Dawnscanner on one of the example repos.