Skip to content
Mallace for ruby on rails teams

Ruby on Rails security fixes, proved by tests

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.

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.

Command injection

User input reaching system and other shell calls, fixed with argument lists or Shellwords escaping.

Code injection

User input reaching eval, instance_eval, class_eval or module_eval.

Unsafe deserialization

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.

Tests that run your code

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

Scan your repository free.