DEVOPS

Block staging promotion when a pushed image has Critical CVEs

When a new container image is pushed to the registry, scan it for vulnerabilities and only promote it to the staging environment if no Critical CVEs are found.

CategoryDevOps
Enginesim
Difficultyintermediate
Triggerevent
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerImage pushed to GitHub container registryGitHubGitHub
  • ActionScan image digest for CVEs (Trivy)Shell
  • LogicBranch: Critical CVE count == 0?
  • ActionRetag image staging-ready and deployGitHubGitHub
  • OutputPage on-call with blocked image + CVE listPagerDutyPagerDuty

What it does

Gates the staging deploy on a clean vulnerability scan. Every freshly built image is scanned before it is allowed to move from the build registry into staging, so a Critical CVE never lands on a shared environment by accident.

When to use it

Run this when your CI pushes images on every merge to `main` and you want an automated security checkpoint between build and staging — without a human manually reading scan reports.

How it works

  1. 1A GitHub package (container registry) push event fires the workflow with the new image digest and tag.
  2. 2A shell step runs your scanner (e.g. `trivy image --severity CRITICAL --format json`) against the digest and emits structured findings.
  3. 3A logic branch checks the Critical count: zero means proceed, one or more means block.
  4. 4On a clean scan, an action promotes the image by retagging it `staging-ready` and triggering the staging deploy.
  5. 5On a failed scan, PagerDuty is paged with the image, CVE IDs, and the GitHub run link so on-call can triage immediately.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect ShellRun sandboxed commands inside the workspace.
  3. 3
    Connect PagerDutyIncidents, on-call, escalations.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.