Skip to main content

A command line interface for scanning configuration files with CoGuard

Project description

Coguard Logo

CoGuard

Why CoGuard

Infrastructure as Code (IaC) is here to stay. The versioning and continuous scanning of every layer of your IT (on premise and cloud) infrastructure is crucial.

CoGuard's team observed that there are a lot of policy checks on the layers communicating to the cloud, but the configurations inside specific compute devices such as physical servers, virtual machines or containers are mostly neglected, or have silo-ed solutions at best.

In order to have static analysis practices for IaC that go as deep as the available tools for code, every layer needs to be equally addressed.

In our practice, we observed that, at times, even an awareness of locations of configuration files is lacking. This is why we created a command line tool helping with discovering those configurations, and scanning them.

As an initial starting point for the CLI, we chose Docker images. Modern container scanners check for versions of software and libraries installed on those containers, and establish if there are common known vulnerabilities and exposures (CVEs). The CoGuard CLI is trying to find known configuration files for e.g. web servers or databases, and scans these for security and best practice. Additionally, the last Docker file used to create an image is analyzed as well.

Introduction to the CoGuard CLI

CoGuard is a comprehensive static analysis tool for IT infrastructure configurations (cloud and on-premise).

This project is the command line interface to CoGuard, with additional auto-discovery functionality.

In its current release, it scans Docker images and its contents. In particular, it searches for known configuration files of different software packages (like webservers, databases, etc.), and scans these configurations for security and best practice.

How to install it

CoGuard CLI can either be pulled from this repository and used directly, or installed via pip:

pip install coguard-cli

Keep in mind that it is a requirement to have Docker installed locally.

How to use it

After installing the CoGuard CLI, you can run a scan on your local images using

coguard docker-image [<YOUR-IMAGE-NAME-OR-ID>]

If you omit the image ID parameter, CoGuard will scan all the images currently stored on your device.

This step requires you to create a CoGuard account. After completion, this image check will return the findings of CoGuard on this particular image.

Here is a screenshot of a sample scan:

Current support and future plans

The currently supported auto-discovery of configuration files inside Docker containers is limited to the finders in this folder. This list will expand in the future. In addition, we are scanning the Dockerfile used to create the images, and will add some Linux configuration files in the near future.

Learn more

Project details


Release history Release notifications | RSS feed

This version

0.1.6

Download files

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

Source Distribution

coguard-cli-0.1.6.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coguard_cli-0.1.6-py3-none-any.whl (59.8 kB view details)

Uploaded Python 3

File details

Details for the file coguard-cli-0.1.6.tar.gz.

File metadata

  • Download URL: coguard-cli-0.1.6.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for coguard-cli-0.1.6.tar.gz
Algorithm Hash digest
SHA256 f1e951e061c163f9d95da88d5bd7a409a0baaafe65a50c2fb653097f2e9ab314
MD5 75c7cd9d2c0416d9d4b077dcab065588
BLAKE2b-256 d104869bb3dfbef70f9431e92a51732b665fa184401a98eaf489ead7bed2aaed

See more details on using hashes here.

File details

Details for the file coguard_cli-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: coguard_cli-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 59.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for coguard_cli-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0df69ef0d673806e7543241d7575862985caaffd207a2f72ae779065f228a6ed
MD5 eb3e06f83935ce58fea92ceaf0819da2
BLAKE2b-256 317ec1a8ab02dccca066ae92139ff10217137dbadb8d33b5ef7acc4c4348e556

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page