
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
SpagettiSquash is the story of me making better an app with page after page of interlinked ActiveRecord callbacks triggering them.
Add this line to your application's Gemfile:
gem 'spaghetti_squash', group: :development
And then execute:
$ bundle
Or install it yourself as:
$ gem install spaghetti_squash
Right now, all it does it log the beginning and end of all they callbacks, so you can see what's going on.
For example
% rails c ✹
Loading development environment (Rails 4.1.4)
(development on MarketMaker) irb(main):001:0> User.last.save
User Load (18.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
(0.8ms) BEGIN
User Exists (14.5ms) SELECT 1 AS one FROM "users" WHERE ("users"."email" = 'example@example.com' AND "users"."id" != 1) LIMIT 1
starting callback: save [:standardize_for_search] {}
finishing callback
(0.3ms) COMMIT
=> true
(development on MarketMaker) irb(main):002:0>
It should only log callbacks that originate from your code, but this might break if you vendor gems or your Rails.root is somewhere strange.
It probably slows down your app a lot.
I'm developing this against Rails 4.1, but I'd accept bugs against any Rails 4 version.
Printing out a tree structure, and counting call backs per-request (or save, or something).
Some tools to help you pull callbacks into seperate objects that can, one hopes, be refactored away.
Who knows.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that spaghetti_squash 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.