<commit_before># Klar
Integration of Clair and Docker Registry

@TODO add proper docs

Usage:

        CLAIR_ADDR=http://localhost CLAIR_THRESHOLD=10 ./klar docker-registry.optiopay.com/logstash:47c9e4e2e7

<commit_msg>Update documentation<commit_after># Klar
Integration of Clair and Docker Registry

Kalr is a simple tool to analyze images stored in a private Docker registry for security vulnerabilities using Clair https://github.com/coreos/clair. The current version doesn't support Registry authorization. Klar is designed to be used as an integration tool so it relies on enviroment variables.

Klar returns 0 if number of found high severity vulnerabilities in an image is less or equals than threshold (see below), otherwise it returns 1. 

Env vars:
* `CLAIR_ADDR` - address of Clair server, the most complete form is `http://host:port`
protocol and port may be omited, `http` and `6060` are used by default

* `CLAIR_THREHOLD` - how many high severity vulnerabilities Klar can tolerate. Default is 0

* `HTTPS_REGISTRY` - [yes|no] if the value is yes Klar will use HTTPS and port 443 to contact a Registry, otherwise HTTP and port 5000 is used. Defualt is yes.

Usage:

    CLAIR_ADDR=http://localhost CLAIR_THRESHOLD=10 ./klar docker-registry.optiopay.com/logstash:47c9e4e2e7


{'fraction_non_alphanumeric': 0.06283941039565555, 'fraction_numerical': 0.023273855702094646, 'mean_word_length': 4.608695652173913, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1389903', 'n_tokens_mistral': 422, 'n_tokens_neox': 374, 'n_words': 165}