Skip to main content

AI-Powered Docker Security Analyzer

Project description

OWASP OWASP project-docksec Build Status
OpenSSF Best Practices

License Last Commit Contributors

Forks Stars PyPI Downloads

Issues Pull Requests

CREATED

DockSec Logo
OWASP Logo

DockSec

AI-powered Docker security scanner that explains vulnerabilities in plain English


What is DockSec?

DockSec is an OWASP Incubator Project that bridges the gap between complex security scan results and actionable developer fixes. It integrates industry-standard scanners (Trivy, Hadolint, Docker Scout) with advanced AI to provide context-aware security analysis.

Instead of overwhelming you with a list of 200+ CVEs, DockSec:

  • Prioritizes what actually affects your specific container setup.
  • Explains vulnerabilities in plain English, not just security jargon.
  • Suggests specific, line-by-line fixes for your Dockerfile.
  • Generates professional, interactive security reports for your team.

Think of it as having a security expert sitting right next to you, reviewing your Dockerfiles in real-time.


How It Works

DockSec Workflow

DockSec workflow: From scanning to actionable insights

DockSec follows a robust four-stage pipeline:

  1. Scan: Runs Trivy, Hadolint, and Docker Scout locally on your environment.
  2. Analyze: AI correlates findings across all scanners to remove noise and assess real-world impact.
  3. Recommend: Generates human-readable explanations and specific remediation steps.
  4. Report: Exports actionable results in JSON, PDF, HTML, or Markdown formats.

Leaders

DockSec is led by a dedicated team committed to making container security accessible.

For questions or discussions, please join the #project-docksec channel on OWASP Slack.


Quick Start

GitHub Action

Integrate DockSec into your GitHub Actions workflow:

- name: Run DockSec AI Scanner
  uses: OWASP/DockSec@main
  with:
    dockerfile: 'Dockerfile'
    openai_api_key: ${{ secrets.OPENAI_API_KEY }}

CLI Usage

# Install DockSec
pip install docksec

# Scan a Dockerfile (AI-powered)
# Reports will be saved to ~/.docksec/results/
docksec Dockerfile

# Scan Dockerfile + Docker image
docksec Dockerfile -i myapp:latest

# Scan a Docker Compose file and all its services
docksec --compose docker-compose.yml

# Scan only a Docker image
docksec --image-only -i myapp:latest

# Fast scan only (no AI)
docksec Dockerfile --scan-only

Features

  • Smart Analysis: AI explains what vulnerabilities mean for your specific setup.
  • Multi-LLM Support: Use OpenAI, Anthropic Claude (4.x), Google Gemini (1.5+), or local models via Ollama.
  • Docker Compose Scanning: Detect orchestration-level misconfigurations and scan all services in a compose file.
  • Deep Integration: Combines Trivy (vulnerabilities), Hadolint (linting), and Docker Scout.
  • Security Scoring: Get a 0-100 score to track your security posture over time.
  • Centralized Reporting: All reports are neatly organized in ~/.docksec/results/ by default.
  • Rich Formats: Professional exports in HTML (interactive), PDF, JSON, and CSV.
  • CI/CD Ready: Designed for easy integration into GitHub Actions and build pipelines.
  • GitHub Action: Available on the GitHub Marketplace for automated security scans.

How DockSec Compares

Here is a comparison of how DockSec relates to other container security tools.

Capability DockSec Trivy (standalone) Snyk Container Aikido
License and cost Free, open source (MIT) Free, open source (Apache 2.0) Commercial (limited free tier) Commercial (limited free tier)
Governance OWASP Incubator Project, vendor neutral Open source, maintained by Aqua Single vendor Single vendor
Detects CVEs and Dockerfile misconfigurations Yes Yes Yes Yes
Contextual, line level Dockerfile remediation Yes (line specific rewrites with explanation) No (detection only) Yes (base image upgrade advice, fix PRs) Yes (AI AutoFix PRs)
Runs fully offline / air gapped Yes (local LLM via Ollama, scan only mode, no API key) Yes for scanning (no remediation layer) No (cloud platform) No (hosted platform)
Your image data stays on your network Yes Yes No No
Bring your own LLM / model choice Yes (OpenAI, Anthropic, Gemini, or local Ollama) Not applicable No (proprietary AI) No (proprietary AI)
Self hostable, no platform deployment Yes Yes No No
Vendor lock in None None Yes Yes
Security score (0 to 100) and multi format reports (HTML, PDF, JSON, CSV, Markdown) Yes Partial (machine formats, no remediation report) Partial (dashboard reports) Partial (dashboard reports)

DockSec is the only one of these that pairs contextual, line level Dockerfile remediation with a fully open source, OWASP governed, locally runnable design. Snyk and Aikido offer capable AI remediation, but only as commercial cloud platforms that send your data to their service. Trivy is open source and local but stops at detection and does not help you fix anything. DockSec fills the gap for developers and for regulated or air gapped teams who need both the fix guidance and full control of their data, at no cost.


Contributing

DockSec thrives on community contributions. Whether you are a developer, designer, or security enthusiast, there are many ways to get involved:

  • Code Contributions: Fix bugs or add new features.
  • Documentation: Improve guides or create tutorials.
  • Issue Reporting: Identify and report bugs.
  • Feedback: Share your experience and suggestions.

To get started, check out our Contributing Guidelines, Code of Conduct, and Sponsorship Guide.


Community and Social Media


If DockSec helps you, give it a ⭐ to help others discover it!
Built with ❤️ by Advait Patel and the OWASP community.

Project details


Download files

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

Source Distribution

docksec-2026.6.11.tar.gz (66.4 kB view details)

Uploaded Source

Built Distribution

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

docksec-2026.6.11-py3-none-any.whl (71.6 kB view details)

Uploaded Python 3

File details

Details for the file docksec-2026.6.11.tar.gz.

File metadata

  • Download URL: docksec-2026.6.11.tar.gz
  • Upload date:
  • Size: 66.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docksec-2026.6.11.tar.gz
Algorithm Hash digest
SHA256 d84bb7b329699367c43f37c7efedb92440e8fdc6ad992112dd21acfa1ff98a07
MD5 ae9099142bc91717b833427cae2e6bc5
BLAKE2b-256 587ba3645d44e5302dcf6b68b3c13683c610ef9e1931a4d54688eff6d7ca8d1a

See more details on using hashes here.

File details

Details for the file docksec-2026.6.11-py3-none-any.whl.

File metadata

  • Download URL: docksec-2026.6.11-py3-none-any.whl
  • Upload date:
  • Size: 71.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docksec-2026.6.11-py3-none-any.whl
Algorithm Hash digest
SHA256 08fcb9850d3441488270a2a67e0b7b8aa8c955b6c968e3793d1f9e36b6a588b8
MD5 fdaef9d4b6525d8dd47d5a3ebb1ee950
BLAKE2b-256 40f01b56a96ab0938e9d5d2f0e5b8a54315c237d2359bdc5bbc93c39272c3967

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