
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Provides Wisper with asynchronous event publishing using Sidekiq.
gem 'wisper-sidekiq', '~> 1.0'
gem 'wisper-sidekiq', '~> 0.0'
publisher.subscribe(MyListener, async: true)
The listener must be a class (or module), not an object. This is because Sidekiq can not reconstruct the state of an object. However a class is easily reconstructed.
Additionally, you should also ensure that your methods used to handle events under MyListener
are all declared as class methods:
class MyListener
def self.event_name
end
end
When publishing events the arguments must be simple as they need to be
serialized. For example instead of sending an ActiveRecord
model as an argument
use its id instead.
See the Sidekiq best practices for more information.
In order to define custom sidekiq_options you can add sidekiq_options
class method in your subscriber definition - those options will be passed to Sidekiq's set
method just before scheduling the asynchronous worker.
In order be able to schedule jobs to be run in the future following Scheduled Jobs you can add sidekiq_schedule_options
class method in your subscriber definition - those options will be passed to Sidekiq's perform_in
method when the worker is called.
This feature is not as powerfull as Sidekiq's API that allows you to set this on every job enqueue, in this case you're able to set this for the hole listener class like:
class MyListener
#...
def self.sidekiq_schedule_options
{ perform_in: 5 }
end
#...
end
Or you can set this per event (method called on the listener), like so:
class MyListener
#...
def self.sidekiq_schedule_options
{ event_name: { perform_in: 5 } }
end
def self.event_name
#...
end
#...
end
In both cases there is also available the perform_at
option.
The same Ruby versions as Sidekiq are offically supported, but it should work with any 2.x syntax Ruby including JRuby and Rubinius.
See the build status for details.
scripts/sidekiq
bundle exec rspec
To run sidekiq use scripts/sidekiq
. This wraps sidekiq in rerun
which will restart sidekiq when specs/dummy_app
changes.
FAQs
Unknown package
We found that wisper-sidekiq demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.