Container security auditor — check Docker/Podman images for vulnerabilities, misconfigurations, and best practice violations
Project description
dargslan-container-audit
Container Security Auditor — Audit Docker/Podman containers for privileged mode, root users, dangerous capabilities, sensitive volume mounts, and host network mode. Zero external dependencies.
Installation
pip install dargslan-container-audit
CLI Usage
# Full security report
dargslan-container report
# List all containers
dargslan-container list
# Check for privileged containers
dargslan-container privileged
# Check for root containers
dargslan-container root
# Check dangerous capabilities
dargslan-container caps
# Check sensitive volume mounts
dargslan-container volumes
# Check host network mode
dargslan-container network
# All issues as JSON
dargslan-container json
# Use Podman instead of Docker
dargslan-container report -r podman
Python API
from dargslan_container_audit import ContainerAudit
ca = ContainerAudit() # auto-detects Docker or Podman
# Full audit
issues = ca.audit()
# Specific checks
privileged = ca.check_privileged()
root = ca.check_root_containers()
caps = ca.check_capabilities()
volumes = ca.check_volumes()
network = ca.check_network_mode()
# Formatted report
ca.print_report()
Security Checks
| Check | Severity | Description |
|---|---|---|
| Privileged mode | Critical | Containers with --privileged flag |
| Root user | Warning | Containers running as root |
| Dangerous capabilities | High | SYS_ADMIN, NET_ADMIN, SYS_PTRACE, etc. |
| Sensitive mounts | High | /etc, /proc, /sys, docker.sock |
| Host network | Warning | Containers using --network host |
More from Dargslan
- Dargslan.com — Linux & DevOps eBook Store
- Free Cheat Sheets — 300+ downloadable PDFs
- Blog & Tutorials — 300+ in-depth articles
- All Python Tools — 20+ CLI packages
License
MIT — see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dargslan_container_audit-1.0.0.tar.gz.
File metadata
- Download URL: dargslan_container_audit-1.0.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d991f512d37e994fe91f32efd85fe89dc0dda56cbe889d7af56a73995e82892
|
|
| MD5 |
3f532d35c266fea527190d6e91840e77
|
|
| BLAKE2b-256 |
5480bf8c5ebb5f50b2c16d242c97addf74ba44454c412feeb12d249820219066
|
File details
Details for the file dargslan_container_audit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dargslan_container_audit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3ab4ef900ac6ca95ddfa031561c6b135e8a7e4b13753d62f56838f1b580a72e
|
|
| MD5 |
8654d6eb5cf929b12dcd955b01768338
|
|
| BLAKE2b-256 |
510c4719b4c52ac5708b4a21b81e9b23d48c0f90ace34ff4562147e51cd39a33
|