Skip to main content

Import a Docker image layers to Clair for security analysis

Project description

# Clair

Clair is an open source project for the static analysis of vulnerabilities in appc and docker containers (

This Python package provides methods to analyse a local Docker image and injects image layers to a Clair server.

# License

All code is under Apache 2.0 or more.

Copyright 2015 Olivier Sallou <>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

# Example

cfg = {
'': '',
'docker.connect': 'tcp://'
log = logging.getLogger(__name__)

test = Clair(cfg)
layers = test.analyse('')

layer_ids = []
for layer in layers:
vulnerabilities = test.get_layers_vulnerabilities(layer_ids)


0.2: Fix packaging
0.1: First release

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for clair, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size clair-0.3.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page