Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Marcopolo is a Rack middleware for use in Rails applications (currently) to aid in debugging HTTP requests and responses by logging them raw (including headers and body).
Add this line to your application's Gemfile:
gem 'marcopolo'
And then execute:
$ bundle
By simply including the gem in your Gemfile, your Rails app will automatically start logging raw incoming HTTP requests and your app's responses to your Rails log. That being said, you can choose a different log location if you wish.
Configure the logger settings in a Rails initializer like so:
Marcopolo.options[:logger] = Logger.new(File.join(Rails.root, 'log', "#{Rails.env}-http-raw.log"))
Marcopolo.options[:severity] = Logger::Severity::DEBUG
Consider adding logrotate rules to your application server to prevent these extremely verbose logs from blowing up your storage.
Also, be mindful of cleaning up these logs appropriately, as sensative information like authorization headers and cookies will not be filtered out automatically (hence "raw").
You may want to filter out noisy requests, such as health checks. Create a proc that takes a Rack::Request object and returns true
if the request is desirable and false
if the request should be excluded from the log.
Marcopolo.options[:filter] = Proc.new do |request|
# exclude all options requests
request.request_method != 'OPTIONS'
end
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that marcopolo 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.