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

Use secure default to disable logging job arguments #65

Open
eliotsykes opened this issue Nov 18, 2019 · 0 comments
Open

Use secure default to disable logging job arguments #65

eliotsykes opened this issue Nov 18, 2019 · 0 comments

Comments

@eliotsykes
Copy link
Owner

eliotsykes commented Nov 18, 2019

log_arguments option added in Rails 6.0.1 (or 6.0.2?): rails/rails#37660

Job arguments are logged by default, meaning sensitive job arguments (e.g. tokens, passwords, PII) could be written to logs.

Avoid this by setting log_arguments to false by default in ApplicationJob. If you need to re-enable logging in a particular job, it can be done in that job's class.

class ApplicationJob < ActiveJob::Base
  # Disable argument logging
  self.log_arguments = false
end
class NoSensitiveArgsJob < ApplicationJob
  # Enable argument logging for this job only.
  self.log_arguments = true
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

1 participant