Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cvan/secinv

Suite of tools to build a security inventory database
https://github.com/cvan/secinv

Last synced: 7 days ago
JSON representation

Suite of tools to build a security inventory database

Awesome Lists containing this project

README

        

SecInv
======
SecInv consists of a Django backend, a simple XML-RPC server, and
an XML-RPC client.

# Dependencies

* Apache 2 w/ mod_python (or similar)
* MySQL 5 (or similar)

# Dependencies Installed via pip

* MySQLdb-1.2.3c1 (must be 1.2.1p2 or newer)
* Django 1.2
* django-reversion 1.3.1
* pygments 1.3.1

# Installing Packages on RedHat
To get started:


yum install httpd mysql python-devel git

# Installing Packages on Ubuntu

If you're running a recent version of Ubuntu, you can [install the required
dependencies automatically](apt:python-dev,python-virtualenv,libmysqlclient-dev).
Otherwise, the following command will install the required dependencies:


sudo aptitude install python-dev python-virtualenv libmysqlclient-dev

# Installing Packages on Mac OS X

First, download and install [Homebrew](http://github.com/mxcl/homebrew), then
[Xcode](http://developer.apple.com/technologies/xcode.html).
Finally, you should install these following packages:


brew install python mysql git

# MySQL

Initialize your MySQL environment using the following command:


mysql_install_db

Then follow the instructions to start the MySQL daemon.

Log in using `mysql -u root -p`, and create a database:


> CREATE DATABASE secinv;
> exit;

# Virtualenv

Using `easy_install`, grab `virtualenv` so we can create an isolated Python
environment for development:


sudo easy_install virtualenv

# Virtualenvwrapper

Get `virtualenvwrapper` so we can easily activate and deactivate virtual
environments from the shell.


curl http://bitbucket.org/dhellmann/virtualenvwrapper/raw/f31869779141/virtualenvwrapper_bashrc -o ~/.virtualenvwrapper
mkdir ~/.virtualenvs

And, add this to your ~/.bashrc:


export WORKON_HOME=$HOME/.virtualenvs
source $HOME/.virtualenvwrapper

Finally, `exec bash`.

# Mac OS X Virtualenv

Designate a directory to keep your projects. I prefer `~/Sites/virtualenvs`.


mkdir ~/Sites/virtualenvs
cd ~/Sites/virtualenvs

Use `git` to grab the latest copy of the development branch:


mkvirtualenv --python=/usr/bin/python2.6 --no-site-packages secinv
git clone git://github.com/cvan/secinv.git
cd secinv/

Now let's use `pip` to conveniently download and install all the remaining
dependencies:


pip install -r requirements.txt

# Django

Change directories to the Django root project directory.


cd secinv/

Modify the `settings.py` file as you see fit (namely, the `BASE_PATH` and
database credentials).

Sync the Django database models (and set up the Django admin authentication):


python manage.py syncdb

Any time you want to run the development server:


python manage.py runserver

# Creating a self-signed SSL certificate for XML-RPC server


cd ~/
openssl genrsa -des3 -out server.key 4096
openssl req -new -key server.key -out server.csr
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

# XML-RPC Server

Modify the `server/settings.conf` file as you see fit (namely, the SSL key &
certificate files and the database credentials).