How jhon287/docker-registry-scanner works
Docker Registry Scanner enumerates registry images and tags, filters them, then scans each tag with Trivy. It reports status to standard output and writes a JSON results file. src/main.py orchestrates the workflow; configuration, registry access, scan options, and scanning are the main internal layers. Trivy and the registry are external dependencies. Relationships shown here are supported by the README or excerpts; unsampled implementation details are omitted.
Main entry points: main.py Scan workflow · scanner.py Image scanner · logger.py Logging · docker_registry_client.py Registry client
Components 12
Workflow orchestration
- Scan workflow
src/main.py - Runtime configuration
src/config.py
Registry access
- Registry client
src/docker_registry_client.py - Docker registry
Image scanning
- Scan options
src/scanner_options.py - Database download
src/scanner.py - Image scanner
src/scanner.py - Trivy scanner
Results reporting
- Logging
src/logger.py - Standard output
- JSON report file
src/main.py
Other components
- Operator
Connections 16
- Operator → Scan workflow: starts scan
README.md - Scan workflow → Runtime configuration: reads settings
src/main.py - Scan workflow → Registry client: creates client
src/main.py - Registry client → Docker registry: requests catalog and tags
src/docker_registry_client.py - Scan workflow → Scan options: builds options
src/main.py - Scan workflow → Database download: downloads database
src/main.py - Database download → Trivy scanner: runs database download
src/scanner.py - Scan workflow → Image scanner: creates and runs scanner
src/main.py - Image scanner → Trivy scanner: runs image scans
src/scanner.py - Image scanner → Scan options: uses options
src/scanner.py - Scan workflow → Logging: logs progress
src/main.py - Scan workflow → Standard output: displays statuses
README.md - Scan workflow → JSON report file: writes JSON report
src/main.py - Registry client → Logging: logs redirects
src/docker_registry_client.py - Image scanner → Logging: logs scans
src/scanner.py - Logging → Runtime configuration: reads log level
src/logger.py