Course contentsShow
← Cloud and Infrastructure
Lesson 1074 of 2,98921. Container RegistriesFree lesson

Scan Timing and Triggers

When to scan images: on push, on schedule, continuous monitoring, and pre-deployment gates for security assurance.

Scan Timing and Triggers

What you'll learn: You'll understand when to scan container images for vulnerabilities—and why timing matters for security.

Why Timing Matters

Knowing how to scan images is only half the story—knowing when to scan is what keeps your infrastructure secure. Think of it like medical checkups: a single test at birth isn't enough; you need regular exams throughout life, especially before major life events.

Four Key Scanning Triggers

On Push (Build-Time Scanning)
Scan images immediately when pushed to your registry. This catches vulnerabilities before they enter your distribution pipeline. It's your first line of defense—like airport security before you board.

Scheduled Scanning
Run scans on a regular cadence (daily, weekly) on all stored images. New vulnerabilities are discovered constantly, so an image that was "clean" last month might have critical issues today. This is your continuous health monitoring.

Continuous Monitoring
Some advanced registries watch vulnerability databases in real-time and automatically re-scan images when new CVEs (Common Vulnerabilities and Exposures) are published. The system alerts you the moment your existing images become vulnerable.

Pre-Deployment Gates
Scan images right before deploying to production, even if they were scanned earlier. This is your final checkpoint—like a pilot's pre-flight check—ensuring nothing slipped through and no new vulnerabilities emerged since the last scan.

Combining Strategies

Most organizations layer multiple triggers: scan on push to catch issues early, schedule weekly scans for dormant images, and gate production deployments. This defense-in-depth approach ensures vulnerabilities are caught regardless of when they're discovered.

Key Takeaway: Effective container security requires scanning at multiple points—on push, on schedule, continuously, and pre-deployment—because vulnerabilities can emerge at any time during an image's lifecycle.