SQL injection in ActiveRecord
Interpolated strings passed to where, order, joins, pluck, find_by_sql, exec_query and similar, fixed with placeholders or hash conditions. Queries sanitized with sanitize_sql aren’t reported.
Mallace follows Rails params, cookies and request data, and method arguments, into the Ruby calls that cause the most damage, and proves every finding with a Minitest test on Ruby 3.4 before anything changes.
Interpolated strings passed to where, order, joins, pluck, find_by_sql, exec_query and similar, fixed with placeholders or hash conditions. Queries sanitized with sanitize_sql aren’t reported.
User input reaching system and other shell calls, fixed with argument lists or Shellwords escaping.
User input reaching eval, instance_eval, class_eval or module_eval.
Marshal.load, YAML.load/unsafe_load and Oj.load on attacker-controlled data. If your Psych version already loads YAML safely, the test passes and Mallace leaves it alone.
Regression tests use Minitest in a sandboxed Ruby 3.4 container with no network, and can use the gems in your Gemfile. Your Gemfile.lock is also checked for known-vulnerable gems.
A good fit if
Rails apps, Sinatra and Rack services, and Ruby scripts and gems, on GitHub.
Not a fit if
Front-end issues like XSS in ERB templates aren’t covered by Mallace’s rules yet.
How it works: product overview · Questions: FAQ · Cost: pricing