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.
This is still under active development and is subject to change
Conman is a simple server configuration management library. The core concepts are around:
Ingredients should ensure that they are idempotent. Public Recipes may include setting up a LAMP system for example.
gem install conman
Our ingredient library can be found at: github.com/moocode/ingredients
An ingredient is a simple Ruby Class whose name ends with Ingredient and (optionally) subclasses Ingredient. The Ingredient superclass just provides some helper methods if you wish to use them. Because they are just Ruby classes they can be tested using any test framework you like. See our ingredients repository for some examples.
class FileIngredient < Ingredient
def create(options={})
`touch #{options[:path]}` unless exists? :path => options[:path]
end
def exists?(options={})
File.exists? options[:path]
end
end
class MyRecipe < Recipe
file :create, :path => '/tmp/foo.txt'
end
conman ships with a binary for running your recipes. It takes a path to a folder of ingredients and a recipe file:
conman -i /path/to/ingredients /path/to/recipes/my_recipe.rb
Alternatively you can run them from a script (handy for testing)
Conman.init :ingredients => '/path/to/ingredients/'
Conman.run '/path/to/recipes/my_recipe.rb'
Here's an example of a TestUnit test for an ingredient:
require 'test/unit'
require 'rubygems'
require 'mocha'
require 'conman'
class FileIngredientTest < Test::Unit::TestCase
def setup
@@conman ||= Conman.init(:ingredients => '/path/to/ingredients/file.rb')
@file = FileIngredient.new
end
def test_create
FileIngredient.any_instance.expects(:create).returns('touch /tmp/moo.txt')
@file.create :path => '/tmp/moo.txt'
end
end
First you need to install all the pre-requisites (ruby, rubygems, conman, git-core)
apt-get install ruby git-core -y
ruby -v
cd /tmp
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar zxf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb --no-ri --no-rdoc
cd /tmp
rm -rf rubygems-1.3.7
ln -sf /usr/bin/gem1.8 /usr/bin/gem
gem -v
gem install conman
FAQs
Unknown package
We found that conman 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.