How hany-hosny/enterprise-docker-security-scanning-isolation works
This repository is a small container-security lab: an operator reaches a Python HTTP app, which exposes liveness, readiness, and persistent visit-counter behavior backed by MariaDB. The Compose topology and image definitions apply the isolation and hardening controls; MariaDB state persists in a named volume. Separate operational capabilities generate Trivy reports and validate static configuration or a running deployment. The app-to-database calls are visible in app.py; deployment, scanner, and validation relationships are documented in the README, while their implementations were not sampled.
Main entry points: app.py HTTP counter app · compose.yaml MariaDB service · verify-runtime.py Runtime inspection · Dockerfile Hardened image build
Components 14
Lab runtime
- HTTP counter app
app.py - MariaDB service
compose.yaml - Persistent DB volume
compose.yaml
Container hardening
- Compose topology
compose.yaml - Hardened image build
Dockerfile - Runtime secrets
scripts/compose.sh
Security operations
- Image scanner
scripts/scan-images.sh - Trivy reports
- Finding summary
scripts/summarize-trivy.py
Validation
- Static validation
scripts/validate-static.sh - Compose checks
scripts/validate-compose.py - Runtime inspection
scripts/verify-runtime.py - HTTP smoke test
scripts/smoke-test.sh
Other components
- Host operator
Connections 13
- Host operator → HTTP counter app: sends HTTP requests
README.md - HTTP counter app → MariaDB service: queries counter
app.py - MariaDB service → Persistent DB volume: persists data
README.md - Compose topology → HTTP counter app: configures service
README.md - Compose topology → MariaDB service: configures service
README.md - Hardened image build → HTTP counter app: builds runtime
README.md - Runtime secrets → Compose topology: supplies secrets
README.md - Image scanner → Trivy reports: writes reports
README.md - Finding summary → Trivy reports: reads reports
README.md - Static validation → Compose checks: runs checks
README.md - Runtime inspection → HTTP counter app: inspects container
README.md - Runtime inspection → MariaDB service: inspects container
README.md - HTTP smoke test → HTTP counter app: tests endpoints
README.md