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.
vagrant-list
adds a command to the Vagrant CLI to list both all VMs known to VirtualBox, as well as any that are running. It's handy for seeing what all your VMs are up to.
If you are using the packaged version of vagrant
from the Vagrant homepagehttp://downloads.vagrantup.com/) then you simply install this gem as a plugin by entering the following command in your terminal:
vagrant plugin install vagrant-list
If you have vagrant installed from Rubygems, then you need to do a little more work - first, you can install the gem from Rubygems:
gem install vagrant-list
Next, you need to tell Vagrant about this plugin, by adding to your project's Vagrantfile
:
Vagrant.require_plugin "vagrant-list"
If you are still using a gem version though, it's worth considering the package upgrade, as that seems to be the preferred way for end-users to install Vagrant nowadays and will probably be better supported than a gem install.
If you are using a version of Vagrant older than 1.1.x, then you need to install an older version of this gem from Rubygems - only 0.0.5 and below will work with Vagrant 1.0.x:
gem install vagrant-list --version "0.0.5"
Please note that versions older than 0.0.5 will not work with Vagrant 1.1.x and above.
vagrant-list
adds just one command to vagrant - list
.
For example, this following command will list the VMs:
vagrant list
will output:
[vagrant] ALL:
[vagrant] 35279736-412a-47b0-aa09-b1aef373a9c7: IE7 (Windows Vista)
[vagrant] ebb807dd-64d6-4a17-87f8-1d6d80a3f467: IE8 (Windows 7)
[vagrant] 4db11a4d-0a97-48c4-8b23-9cb2ca4fcb93: IE9 (Windows 7)
[vagrant] 508bf5cd-dcce-48f6-b19d-287fba4306d6: Windows XP (Windows XP)
[vagrant] 729322cf-e11d-438c-b9dc-6b1d31e9a56d: Python Development (Windows XP)
[vagrant] RUNNING:
[vagrant] ebb807dd-64d6-4a17-87f8-1d6d80a3f467: IE8 (Windows 7)
If you need to acquire the same sort of list that the vagrant list
command does, but programmatically, feel free to leverage a gem module that wraps around a couple of VBoxManage
shell commands, like this:
require 'vagrant-list'
Vagrant::List::VirtualBox::List.all # Returns all VMs
Vagrant::List::VirtualBox::List.running # Returns only running VMs
The two methods above return an array of UUIDs. If you want to gather further information about a VM, you may also use another class - Vagrant::List::VMInfo
, like so:
require 'vagrant-list`
Vagrant::List::VirtualBox::List.all.map do |uuid|
puts Vagrant::List::VMInfo.new(uuid).inspect
end
Tests for this type of gem are slightly problematic, since much of the core functionality involves shelling out, which is inherently difficult to test, however there are tests to ensure that methods are called as designed, and that helper classes function the way they should.
To run the tests, follow the steps below:
git clone https://github.com/joshmcarthur/vagrant-list.git
bundle install
Test
and boot it uprake spec
** Remember, in order for the specs to pass, it is required that you have a VM called 'Test' running when the specs are run. It doesn't matter what this VM is (XP, Ubuntu etc.), just as long as it's there**
vagrant list
to test: rake build && vagrant plugin install pkg/vagrant-list-#{version}.gem && vagrant list
.feature
or bugfix
branch to Github.This open source software is licensed under the MIT License. For more details, see ./LICENSE.txt
.
FAQs
Unknown package
We found that vagrant-list 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.