Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Dependo is a very simple Dependency Injection framework for Ruby. Some say you don't need dependency injection when you're using Ruby. Maybe they're right, but I've come across some places where I need it.
For example, in my apps using Sinatra and Sequel, I need to be able to log, using a single Logger instance, from both my Sinatra app and from within my Sequel models. I'm not about to pass that Logger around as a parameter anywhere, and I don't want to instantiate it in every class that needs to log.
So, injecting the Logger is the easiest, best solution.
Dependo doesn't depend on anything. In test, it relies on rspec and either rcov (Ruby 1.8) or simplecov (Ruby 1.9).
Install the gem: gem install dependo-(version).gem
rake spec
rake gem:build
rake gem:install
Dependo::Registry[:log] = Logger.new(STDOUT)
This makes it easy to use your injected dependencies as instance methods:
class MyThing
include Dependo::Mixin
end
thing = MyThing.new
thing.log.info "I'm logging!"
This makes it easy to use your injected dependencies as class methods:
class MyThing
extend Dependo::Mixin
end
MyThing.log.info "I'm logging!"
##License
See the LICENSE file. Licensed under the Apache 2.0 License
FAQs
Unknown package
We found that dependo 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.