ackama / rails-template

Application template for Rails 7 projects; preloaded with best practices for TDD, security, deployment, and developer productivity.
Other
294 stars 15 forks source link

Check our parameter sanitisation and filtering for logging & sentry #529

Open lukeify opened 7 months ago

lukeify commented 7 months ago

We have these lines of code in our backend_base variant:

https://github.com/ackama/rails-template/blob/89c633c72044c37ebc89bc4f675fbb1ad70a3d12/variants/backend-base/config/template.rb#L20-L22

These have not been touched in several years and now differs from what Rails provides. We should re-establish what our baseline is here compared to vanilla Rails. Some questions:

G-Rath commented 7 months ago

This is what I currently have locally to address this:

gsub_file "config/initializers/filter_parameter_logging.rb", /\+= \[\n/ do
  "+= [:password, :secret, :session, :cookie, :csrf,\n"
end