scribe/scribevulnpolicy
Zack Mullaly fb71baf557 Fixed the error field in shortVulnResponse 2018-07-11 15:53:14 -04:00
..
README.md add a README for scribevulnpolicy 2017-07-19 10:15:24 -05:00
centos.go Replacing database interactions with a much simpler naming scheme and calls through the Clair API 2018-06-29 17:59:49 -04:00
client.go Fixed the error field in shortVulnResponse 2018-07-11 15:53:14 -04:00
main.go Document types and public functions; use public vs private to improve readability a bit 2018-06-29 18:08:52 -04:00

README.md

scribevulnpolicy

scribevulnpolicy is a tool that can be used to generate scribe policies that perform vulnerability scans of a given target platform.

The tool integrates with clair, more specifically the database clair maintains and uses this as a source of vulnerability data for various platforms. clair does an excellent job of keeping this database up to date from the various distributions, and scribevulnpolicy then queries this to create scan policies.

Quickstart

Get clair running

To get things up and running, first you will need a running instance of clair. clair is available as a docker image which can be used for this purpose.

Follow the instructions to get clair running with docker-compose.

Modify docker-compose configuration to expose database

Modify docker-compose.yml so the Postgres database used by clair is accessible to scribevulnpolicy. This can be done by just adding a new ports entry to docker-compose.yml for the postgres container.

Set environment variables

Set the required environment variables to access the Postgres instance.

export PGUSER=postgres
export PGPASSWORD=password
export PGHOST=127.0.0.1
export PGDATABASE=postgres

Generate policy

The list of available platforms can be determined by running scribevulnpolicy with the -V flag.

$ $GOPATH/bin/scribevulnpolicy -V
centos6
centos7

Not all platforms clair maintains vulnerability data for may be available in scribevulnpolicy, some require support to be added.

Finally, the policy can be generated.

$ $GOPATH/bin/scribevulnpolicy centos6 > centos6.json

This policy can then be run directly on the system using scribecmd, or through an integrated scanning tool such as mig where it will return any identified vulnerabilities on the system.