Version control for image vulnerability scanning involves tracking changes to container images and their associated vulnerability scan results over time. This ensures you can identify when vulnerabilities were introduced, monitor remediation progress, and maintain a secure image lifecycle.
Image Tagging & Versioning
Use immutable, semantic version tags (e.g., v1.2.3) instead of mutable tags like latest. This helps correlate scans with specific image versions.
Scan & Store Results
Perform vulnerability scans (e.g., for CVEs) using tools like Trivy, Clair, or Tencent Cloud’s Container Image Security Scanning (integrated with Tencent Container Registry (TCR)). Store scan results with timestamps and image digests.
Track Changes
Maintain a log of:
Automate Workflows
Integrate scans into CI/CD pipelines (e.g., Tencent Cloud DevOps Toolchain) to block deployments of images with critical vulnerabilities.
app:v1.0 and scan it via TCR’s vulnerability scanning. The scan finds CVE-2023-1234 (High).app:v1.0 (immutable).app:v1.1, and rescan. If fixed, deploy v1.1.By combining versioned images with scanned results, you ensure accountability and faster vulnerability resolution.