
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Our development team wanted a way to distribute our test suite to many machines to reduce the total run time. Remote Run is intended to be a simple way to run a list of shell scripts on a pool of hosts until all have completed.
When two Remote Runs are in progress, the runners will compete to lock machines until all tasks are complete.
require 'rubygems'
require 'remote_run'
require 'benchmark'
hosts = ["broadway", "wall"]
setup = "source ~/.profile; rvm use ree; bundle install;"
tasks = [
"#{setup} bundle exec rspec spec/models",
"#{setup} bundle exec rspec spec/controllers"
]
# configure runner
runner = Runner.new do |config|
config.hosts = hosts
config.tasks = tasks
config.before_task = lambda do |host, task, remote_runner|
puts "#{host.hostname} is running '#{task.command}' "
end
config.around_task = lambda do |&block|
time = Benchmark.measure do
block.call
end
puts time
end
end
# kick off the run
runner.run
Required:
hosts - hostnames of remote machines.
tasks - a string that is a shell script to be run on one of the hosts.
Optional:
local_path - the local path to be rsync'd (default: working directory)
temp_path - the location where the working directory is cached on the local machine when starting a run (default: /tmp/remote)
remote_path - the location to rsync files to on the remote host. (default: /tmp/remote/<local_hostname>)
exclude - directories to exclude when rsyncing to remote host (default: [])
login_as - the user used to log into ssh (default: current user)
Callbacks (optional):
before_run and after_run - the code to be executed before and after the run respectively, receives the remote_run instance as a paramater
before_task and after_task - the code to be executed before and after each task respectively, receives host, task and the remote_run instance as paramaters
around_run - the code to execute around the run, receives the block to call
around_task - the code to execute around each task, receives the block to call
local_hostname - your computer's hostname
identifier - a unique identifier for your test run
MIT
FAQs
Unknown package
We found that remote_run demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.