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.
An SSHKit backend that allows you to execute interactive commands on your servers. Remote commands that you might want to use this for:
less
Add this line to your application's Gemfile:
gem 'sshkit-interactive'
And then execute:
$ bundle
If you're using Capistrano, add the following to your Capfile:
require 'sshkit/interactive'
Running interactive commands will make a system call to ssh
under the hood.
Using the DSL, simply put the command within the run_interactively
block. In Capistrano, it might look something like this:
namespace :rails do
desc "Run Rails console"
task :console do
run_interactively primary(:app) do
execute(:rails, :console)
end
end
end
It is also possible to set directory and user the Capistrano way:
namespace :rails do
desc "Run Rails console"
task :console do
run_interactively primary(:app) do
within current_path do
as user: :foobar do
execute(:rails, :console)
end
end
end
end
end
And it is possible to set the shell to be used:
namespace :foo do
task :bar do
run_interactively primary(:app), shell: '/bin/bash' do
...
end
end
end
### Manually setting the backend
Use the [interactive backend](lib/sshkit/interactive/backend.rb) and execute commands as normal:
```ruby
SSHKit.config.backend = SSHKit::Interactive::Backend
hosts = %w{my.server.com}
on hosts do |host|
execute(:vim)
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 sshkit-interactive 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.