How mubashir251-tech/docker-image-security-lab works
This repository is a hands-on container image security workflow: images are built or selected, scanned, summarized, and checked against configurable vulnerability thresholds. The README documents both a local multi-scanner path and a GitHub Actions path that uses Trivy and the policy gate. The policy gate source confirms its report parsing, threshold validation, severity counting, and exit-code behavior. Other implementation details and call relationships are based on README descriptions, not inspected source excerpts.
Main entry points: security-scan.yml GitHub Actions · reports JSON Reports · policy_gate.py Policy Gate · scan_images.sh Scan Automation
Components 13
Image Scanning
- Image Build
Dockerfile - Image List
images.txt - Scan Automation
scan_images.sh - Trivy
- Grype
Reporting
- JSON Reports
reports - Report Summary
summarize_reports.sh - Markdown Summary
reports/summary.md
Policy Enforcement
- Policy Thresholds
policy.yaml - Policy Gate
policy_gate.py
Workflow Automation
- GitHub Actions
.github/workflows/security-scan.yml - Workflow Verdict
Other components
- Developer
Connections 16
- Developer → GitHub Actions: triggers
README.md - Developer → Image Build: builds image
README.md - Image List → Scan Automation: selects images
README.md - Scan Automation → Trivy: scans images
README.md - Scan Automation → Grype: scans images
README.md - Trivy → JSON Reports: writes JSON
README.md - Grype → JSON Reports: writes JSON
README.md - JSON Reports → Report Summary: summarizes findings
README.md - Report Summary → Markdown Summary: writes Markdown
README.md - JSON Reports → Policy Gate: reads report
README.md - Policy Thresholds → Policy Gate: sets thresholds
README.md - Policy Gate → Workflow Verdict: returns verdict
README.md - GitHub Actions → Image Build: builds image
README.md - GitHub Actions → Trivy: runs scan
README.md - GitHub Actions → JSON Reports: uploads artifact
README.md - GitHub Actions → Policy Gate: enforces policy
README.md