Class: RuboCop::Cop::Sidekiq::SensitiveDataInArguments
- Includes:
- ArgumentTraversal
- Defined in:
- lib/rubocop/cop/sidekiq/sensitive_data_in_arguments.rb
Overview
Checks for sensitive data passed as Sidekiq job arguments.
Constant Summary collapse
- MSG =
'Avoid passing sensitive data in Sidekiq job arguments.'- DEFAULT_PATTERNS =
%w[ password passwd pwd token api_key secret credit_card card_number cvv ssn ].freeze
- RESTRICT_ON_SEND =
PerformMethods.all
Instance Method Summary collapse
- #on_send(node) ⇒ Object (also: #on_csend)
Methods included from Sidekiq::Language
#active_job_class?, #perform_call?, #sidekiq_include?, #sidekiq_options_call?
Instance Method Details
#on_send(node) ⇒ Object Also known as: on_csend
26 27 28 29 30 |
# File 'lib/rubocop/cop/sidekiq/sensitive_data_in_arguments.rb', line 26 def on_send(node) perform_call?(node) do check_arguments(node.arguments, allow_literal: true) end end |