Skip to main content

vamp-docker-audit

Python 3.9+ Platform License MIT VampSecure Labs

Overview

vamp-docker-audit is a CIS Docker Benchmark-aligned security auditor that inspects running Docker containers, their environment variables, images, networks, and volumes for misconfigurations and credential exposure. It operates entirely through the Docker CLI — no SDK dependency — making it portable across any Docker-capable host. A multi-phase architecture covers daemon access verification, per-container security checks, secret detection in environment variables, image freshness, and network driver analysis, with findings rated CRITICAL to INFO and exported to Console, JSON, or HTML.

Features

  • Phase 0: daemon access verification and Docker socket permission check (/var/run/docker.sock ownership and mode)
  • Container checks (DOCK-001 to DOCK-010): privileged mode (CRITICAL), dangerous Linux capabilities including CAP_SYS_ADMIN, CAP_NET_ADMIN, CAP_SYS_PTRACE (HIGH), root user inside container (MEDIUM), Docker socket mounted inside container (CRITICAL), host network mode (HIGH), sensitive bind mounts (/etc, /var/run, /proc, /sys, /root, /home) (MEDIUM), host PID namespace (HIGH), host IPC namespace (MEDIUM), unlimited restart policy (INFO), ports bound to 0.0.0.0 (LOW)
  • Environment variable secret scanning: variable names matching PASSWORD, PASSWD, SECRET, TOKEN, KEY, API_KEY, APIKEY, PRIVATE, CREDENTIALS, AUTH, DSN (HIGH); value patterns for sk_/pk_, ghp_, glpat-, xox[bpoa]-, Bearer, AKIA..., ey..., base64-encoded blobs (HIGH); connection string variables DATABASE_URL, MONGO_URL, REDIS_URL and variants (MEDIUM)
  • Image checks: :latest or <none> tag (LOW), images older than 90 days (INFO)
  • Network analysis: host-driver network inventory (INFO)
  • Volume inventory (INFO)
  • Selective container targeting with --containers (comma-separated names or IDs) or full-fleet scan
  • Stopped container inclusion with --include-stopped
  • ENV scan bypass with --no-env-scan for privacy-sensitive environments
  • Custom Docker socket path via --socket
  • Export to Console (Rich per-container panels), JSON, and HTML (dark-theme)

Requirements

  • Python 3.9 or later
  • rich >= 13.7.0
  • Docker CLI in PATH and a running Docker daemon
  • Optional: fpdf2 >= 2.7 for --report-pdf

Installation

git clone https://github.com/belky-me/vamp-docker-audit.git
cd vamp-docker-audit
python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt

Usage

python3 vamp_docker_audit.py --help
usage: vamp_docker_audit.py [-h]
                             [--socket PATH]
                             [--containers NAMES]
                             [--include-stopped]
                             [--no-env-scan]
                             [--json FILE] [--html FILE]
                             [--client CLIENT] [--engagement ENGAGEMENT]
                             [--auditor AUDITOR] [--report-scope SCOPE]
                             [--report-html FILE] [--report-pdf FILE]

vamp-docker-audit — Docker Security Auditor (VampSecure Labs)

Examples

# Audit all running containers on the local host
python3 vamp_docker_audit.py

# Audit specific containers by name
python3 vamp_docker_audit.py --containers web,api,db

# Include stopped containers in the audit
python3 vamp_docker_audit.py --include-stopped

# Audit without ENV variable secret scanning
python3 vamp_docker_audit.py --no-env-scan

# Use a non-standard Docker socket (e.g. rootless Docker)
python3 vamp_docker_audit.py --socket /run/user/1000/docker.sock

# Export findings to JSON and HTML
python3 vamp_docker_audit.py --json results.json --html report.html

# Generate client-ready engagement report (HTML + PDF)
python3 vamp_docker_audit.py \
    --client "Acme Corp" --engagement "Container Security Review Q3 2026" \
    --auditor "J. Smith" --report-html client_report.html --report-pdf client_report.pdf

CLI Reference

Flag Default Description
--socket PATH /var/run/docker.sock Path to Docker socket
--containers NAMES all running Comma-separated container names or IDs to target
--include-stopped off Include stopped containers in the audit
--no-env-scan off Skip environment variable secret scanning
--json FILE — Export results to JSON
--html FILE — Export dark-theme HTML report
--client TEXT — Client name for VSL engagement report
--engagement TEXT — Engagement title for VSL engagement report
--auditor TEXT — Auditor name for VSL engagement report
--report-scope TEXT — Scope description for VSL engagement report
--report-html FILE — Export unified VSL client report (HTML)
--report-pdf FILE — Export unified VSL client report (PDF, requires fpdf2)

Output Formats

Format Flag Description
Console (default) Rich panels per container with color-coded findings by severity
JSON --json FILE Machine-readable full result set
HTML --html FILE Dark-theme standalone report
Client HTML --report-html FILE Unified VampSecure Labs engagement report
Client PDF --report-pdf FILE PDF version of the VSL client report

Exit Codes

Code Meaning CI/CD Behavior
0 No critical or high findings Pipeline passes
1 High-severity findings detected Pipeline fails — review required
2 Critical-severity findings detected Pipeline fails — immediate action required

Legal Notice

Use exclusively on systems you own or for which you hold explicit written authorization from the system owner. VampSecure Studios assumes no liability for unauthorized use.

Part of VampSecure Labs Toolkit

vamp-docker-audit is one tool in the VampSecure Labs security research toolkit. For the full toolkit including the orchestrator that runs all tools in sequence and aggregates findings into a single engagement report, see:


© VampSecure Studios — VampSecure Labs Security Research Division

Metadata

Release files for vamp-docker-audit 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vamp-docker-audit 1.0
File Size Uploaded
vamp_docker_audit-1.0.tar.gz 31.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vamp-docker-audit 1.0
File Interpreter ABI Platform
vamp_docker_audit-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 65.1 kB

Release files / vamp_docker_audit-1.0.tar.gz

Download URL vamp_docker_audit-1.0.tar.gz
Size 31.8 kB
Tags Source
SHA-256 checksum
How to use checksums
50e469d20336a64b8739b71baff54a5c241e3908a17d3ab35b6552b2f2a479ac
BLAKE2b-256 checksum
How to use checksums
f6ed59a65ea31a2b4c48a58e5aaeb53842c49626e4ad65bbbfad331daaed3795
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / vamp_docker_audit-1.0-py3-none-any.whl

Download URL vamp_docker_audit-1.0-py3-none-any.whl
Size 33.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd917f4dc3a4a4286df0b0ace229c4113b71f2ac22c2ae97c527a7b1697b8ce5
BLAKE2b-256 checksum
How to use checksums
97c2e4e49bb7220cb9fa3f4ac6c9f4606e6a38ad2a42f7066992a9596c8cc44c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

1.5.0

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

1 release file

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page