Container Image Security Pipeline: Scanning, SBOMs, Signing, and Promotion Gates
container-securitydockersbomimage-signingdevsecops

Container Image Security Pipeline: Scanning, SBOMs, Signing, and Promotion Gates

PPreprod Cloud Editorial Team
2026-11-18
8 min read

A practical container image security checklist covering scanning, SBOMs, signing, registry controls, Kubernetes admission, exceptions, and promotion.

A secure container image pipeline should make risk visible before deployment and make approved artifacts difficult to alter afterward. This checklist explains how to select base images, scan vulnerabilities, generate an SBOM, sign images, enforce registry and Kubernetes policies, handle exceptions, and promote the same verified image from preproduction to production.

Overview

Container image security is a chain of controls rather than a single scanner. A practical workflow starts when a Dockerfile selects a base image and ends only when the exact image digest is admitted to a production cluster. Each stage should produce evidence that the next stage can use: a pinned build input, scan results, an SBOM, a signature, policy decisions, and a promotion record.

The central principle is to promote an immutable image, not to rebuild separately for each environment. If a team rebuilds for preproduction and then rebuilds again for production, the two images may differ even when the source commit is the same. Instead, build once, identify the image by digest, test it in preproduction, and promote that digest after the required checks pass. This approach works well alongside an established staging, preproduction, and production promotion strategy.

A complete container image security pipeline normally includes these stages:

  1. Select and pin a maintained base image.
  2. Build with a reproducible, minimal context.
  3. Scan the image and its software dependencies.
  4. Generate and retain a machine-readable SBOM.
  5. Sign the image and, where supported, its related attestations.
  6. Push to a controlled registry and apply repository policies.
  7. Deploy the same digest to preproduction for functional, security, and operational checks.
  8. Verify signatures and policy requirements at deployment admission.
  9. Promote the digest to production with an auditable approval or automated gate.

Checklist by scenario

Before building an image

  • Record the base image repository, version, and digest where practical. A mutable tag such as latest does not identify a stable build input.
  • Prefer a base image with a documented maintenance process and only the runtime components the application needs.
  • Remove build tools, package caches, credentials, and source files from the final runtime layer.
  • Use a lockfile or equivalent dependency constraint and review changes to it as part of code review.
  • Keep secrets out of Dockerfile arguments, build logs, image layers, and the build context.
  • Define an ownership path for the image: someone must be responsible for rebuilding it when its base image or dependencies change.

During CI build and scanning

  • Build the image in an isolated CI runner with a restricted credential scope.
  • Scan both the operating-system packages and application dependencies. A clean operating-system result does not establish that the application is free of vulnerable libraries.
  • Record the scanner name, configuration, scan timestamp, image digest, and vulnerability-database context with the result.
  • Separate fixable findings from findings that are not reachable, not applicable, or awaiting a vendor fix. The decision should be documented rather than silently ignored.
  • Set gates by severity and exploitability context, but define the rule in a version-controlled policy file so it is reviewable.
  • Fail the pipeline for clearly disallowed conditions, such as a prohibited package, an unacceptable severity under the team policy, or a missing scan result.

When generating an SBOM

  • Generate the SBOM from the built artifact or an equivalent build result, not only from the source manifest.
  • Choose a supported format that fits the receiving systems. SPDX and CycloneDX are common formats; consistency matters more than choosing a format for appearance.
  • Include the image digest, build identifier, component versions, and generation time where the tooling supports those fields.
  • Store the SBOM beside the image or as a registry-associated attestation, with access controls appropriate to the information it contains.
  • Use the SBOM for vulnerability response and inventory, but do not treat its presence as proof that the image passed every security gate.

When signing and publishing

  • Sign the immutable image digest after the final build and scan steps, not merely the source tag.
  • Protect signing credentials using a suitable key-management approach. Limit who and what can sign release images.
  • Publish provenance or SBOM attestations separately when your registry and deployment tooling support them.
  • Prevent unauthorized pushes or overwrites in release repositories. Development repositories should not automatically have production publishing rights.
  • Retain the signature, scan result, SBOM, and approval record long enough to support incident investigation and release review.

During preproduction and production promotion

  • Deploy by digest and confirm that the running workload uses the expected digest.
  • Use preproduction to validate runtime behavior, permissions, network access, startup configuration, and observability—not only application tests.
  • Verify the signature and required attestations before admission to a protected cluster.
  • Apply the same policy to every deployment path, including manual manifests, scheduled jobs, rollback commands, and emergency procedures.
  • Promote the tested digest rather than copying a tag and hoping it still points to the tested artifact.

For related release controls, see the preproduction environment checklist and the preproduction observability guide.

Comparison of common control choices

ControlOptions to evaluateDecision guidanceTypical enforcement point
Image scanningRegistry-integrated, CI-integrated, or standalone scannerCheck OS packages, language dependencies, configuration, and the scanner's update and suppression workflow.Pull request, build, registry, and scheduled rescans
SBOM formatSPDX or CycloneDXChoose the format accepted by your inventory, compliance, and vulnerability-response processes.Build or release stage
SigningKey-based signing or identity-based keyless signingCompare key custody, identity verification, recovery, auditability, and integration with your registry.After build; verify before deployment
Registry policyPrivate repositories, immutable tags, retention, and role-based accessEnsure developers can build without gaining unintended production-publish rights.Image push and pull
Kubernetes verificationAdmission controller, policy engine, or platform-native verificationRequire trusted signatures and approved registries for protected namespaces.API admission

Command syntax varies by tool and deployment model. A representative workflow might look like this:

docker build -t registry.example/team/app:${GIT_SHA} .
docker push registry.example/team/app:${GIT_SHA}
# Scan the pushed digest with the selected scanner
# Generate an SPDX or CycloneDX SBOM for the final image
# Sign the immutable digest with the approved signing workflow
# Deploy the digest to preproduction and verify admission

For a real implementation, pin the action or tool version, document required permissions, and test failure behavior. A pipeline that reports security results but still publishes or deploys after a failed gate is not enforcing the policy.

What to double-check

  • Digest consistency: Confirm that the digest scanned is the digest signed, tested, promoted, and running. Tags alone are insufficient evidence.
  • Scanner interpretation: A vulnerability database may change after an image was built. Record when the result was produced and schedule rescans of retained images.
  • False-positive handling: Every suppression should identify the finding, rationale, owner, scope, and review date. Do not create a broad permanent exception for an individual package.
  • Runtime exposure: Check whether a vulnerable component is installed, loaded, reachable, or required by the application. Risk decisions need application context.
  • Admission coverage: Test that policy applies to all relevant namespaces, service accounts, workload types, and deployment tools.
  • Rollback behavior: A rollback image should still satisfy signature, registry, and vulnerability policies. Emergency access should be logged and reviewed.
  • Configuration and secrets: An image can be approved while its deployment configuration is unsafe. Review secret handling using the preproduction secrets and configuration workflow.

Reusable image-release policy template

Image scope: [repositories and environments]
Build identity: [CI project, workflow, or service account]
Base-image rule: [approved sources, pinning requirement, update owner]
Required checks: [OS scan, dependency scan, configuration scan, tests]
Blocking conditions: [severity, prohibited packages, missing SBOM, failed signature]
SBOM: [format, storage location, retention]
Signing: [method, trusted identity or key, verification rule]
Registry: [approved repositories, push permissions, tag policy]
Promotion: [digest-only promotion, preproduction checks, approval rule]
Exceptions: [owner, reason, expiration, compensating control]
Audit evidence: [logs, attestations, scan reports, deployment records]

Common mistakes

  • Scanning only during the build: New vulnerability intelligence can change the risk assessment of an existing image. Scheduled rescans and rebuild ownership are necessary.
  • Using tags as release identity: A tag can be moved or reused. Record and deploy the digest.
  • Generating an SBOM but not using it: Store it where responders can find it and connect it to the image digest.
  • Signing too early: If the image changes after signing, the signature no longer describes the final artifact.
  • Relying on CI gates alone: A manually submitted manifest or compromised pipeline may bypass build-time checks. Add registry and admission controls.
  • Allowing permanent exceptions: Exceptions should expire or be reviewed when the base image, application, scanner, or threat context changes.
  • Ignoring operational signals: A secure image that fails health checks, logging, or resource expectations still creates release risk. Use deployment and incident signals as part of the promotion decision; the blue-green and canary deployment guide provides related rollout context.

When to revisit

Review this container image security pipeline before seasonal planning cycles, during a new registry rollout, and whenever workflows or tools change. It also deserves an explicit review when a base image reaches a maintenance milestone, a vulnerability response exposes a process gap, a new cluster or namespace is introduced, or a deployment path is added.

At each review, trace one image from Dockerfile to production and verify that its digest, scan results, SBOM, signature, approvals, and runtime deployment record remain connected. Re-test a deliberately unsigned or unapproved image to confirm that admission rejects it, then test the documented emergency path and its audit trail. Finally, remove stale exceptions and confirm that owners understand who rebuilds, who approves risk, and who can promote an image.

The practical starting point is small: choose one production repository, define its release policy, enforce digest-based promotion, and add verification at the production boundary. Expand to additional repositories after the evidence and failure behavior are clear. This creates a maintainable security control rather than another unchecked item in a CI/CD pipeline.

Related Topics

#container-security#docker#sbom#image-signing#devsecops
P

Preprod Cloud Editorial Team

DevOps and Cloud Infrastructure Editors

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.