Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lukeify opened this issue Jan 25, 2024 · 1 comment
Open
Assignees

Comments

@lukeify
Copy link

lukeify commented Jan 25, 2024

We have these lines of code in our backend_base variant:

gsub_file "config/initializers/filter_parameter_logging.rb", /\[:password\]/ do
"%w[password secret session cookie csrf]"
end

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:

  • How many of our filter_parameters are valid in 2024?
  • How many of our filter_parameters are devise-related?
  • Do we want to append to the existing Rails configuration instead of performing a gsub?
  • What is the intent behind the ssn in the Rails vanilla config? (Social Security Number?)
  • Does Sentry look at this file to determine its own parameter filtering?
    • If no, should we align our Sentry and logging parameterization filtering?
@G-Rath
Copy link
Contributor

G-Rath commented Jan 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants