Permissive callback disable configuration

Description

When using except for disabling a callback, there is a high chance of skipping important access control logic by accident.

Remediations

✅ Prefer enumerating all of the actions using only:

skip_before_action :access_control, only: %i[public_action1 public_action2]

Associated CWE

OWASP Top 10

Configuration

To skip this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --skip-rule=ruby_rails_insecure_disabling_of_callback

To run only this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --only-rule=ruby_rails_insecure_disabling_of_callback

Ready to take the next step? Learn more about Bearer Cloud.