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

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.2

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.2
File Size Uploaded
vamp_docker_audit-1.2.tar.gz 41.1 kB Details

Built distribution (wheel)

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

Total release size: 83.7 kB

Release files / vamp_docker_audit-1.2.tar.gz

Download URL vamp_docker_audit-1.2.tar.gz
Size 41.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9d72ac4441d52b5c92237240bb90c2d47e1b63a289b0afdee136323dddf3f9ec
BLAKE2b-256 checksum
How to use checksums
08d826c8a80542786f778be3cb4143f8bbd2bd0b5d7c99a54b25a8858a71842c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

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

Download URL vamp_docker_audit-1.2-py3-none-any.whl
Size 42.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e442d1684a8b4aef59c1932b5da5fe8ab89981257f2a744ca257da7e4caa947
BLAKE2b-256 checksum
How to use checksums
a936abdbc05c7f60cd1bc51c607eb33833afe769587e80daf9c539324902bf5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.5.0

2 release files

1.4

2 release files

1.3

2 release files

This release

1.2 This release

2 release files

1.1

1 release file

1.0

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