A Practical DevSecOps Checklist for Containerized Applications

A practical DevSecOps checklist covering image scanning, CI/CD gates, secrets management, runtime protection, and compliance.

A Practical DevSecOps Checklist for Containerized Applications

Securing containerized applications isn't a single step — it's a continuous practice woven into every phase of the software lifecycle. From the moment you write a Dockerfile to the moment your container runs in production, each stage introduces risks that demand a different security response.

Without a structured checklist, teams often skip critical checks — resulting in containers running with known vulnerabilities, hardcoded secrets, or overly permissive runtime configurations. This article provides a practical, phase-by-phase DevSecOps checklist that any team can adopt, with specific tooling recommendations and implementation guidance for each stage.

Container supply chain security diagram showing CI/CD pipeline gates
Figure 1: Container supply chain security gates from development to production.

Phase 1: Image Build & Dependency Security

The foundation of container security starts in the Dockerfile. As documented byDocker's official build security guide, using minimal base images, pinning versions, and avoiding unnecessary packages drastically reduces the attack surface. Every additional package in your image is a potential CVE waiting to be discovered — distroless images, which contain only your application and its runtime dependencies, eliminate entire classes of vulnerabilities by removing shells, package managers, and system utilities entirely.

Multi-stage builds are equally critical. By compiling or downloading dependencies in an intermediate stage and copying only the final artifacts into a clean runtime image, you ensure that build tools, source code, and temporary files never reach production. Combined with SBOM generation — a Software Bill of Materials that catalogs every component in your image — you gain full visibility into your software supply chain, which is now a requirement under frameworks likeCISA's SBOM mandate.

  • Use distroless or slim base images— Prefer distroless, Alpine, or Chainguard images. For Go applications, usegcr.io/distroless/static-debian12. For Node.js, use node:20-alpine over node:20.
  • Pin image tags and package versions— Never use:latest. Pin base images by SHA256 digest and use lockfiles (package-lock.json, requirements.txt with ==) for all dependencies.
  • Multi-stage builds— Compile or download in an intermediate stage, thenCOPY --from=builder only the final binary or artifacts into the runtime image.
  • SBOM generation— Usesyft or trivy image --format spdx to generate SBOMs in SPDX or CycloneDX format. Store them alongside your images for audit and compliance.
  • Layer hygiene— Chain RUN commands with&& to reduce layers. Clean up package caches (apt-get clean && rm -rf /var/lib/apt/lists/*) in the same layer to prevent secrets or build artifacts from persisting.

Phase 2: CI/CD Pipeline Security Gates

Embedding automated security checks directly into your pipeline transforms security from a manual review into an enforceable gate. According toOWASP's Container Security Cheat Sheet, scanning should happen at every stage where code or artifacts are validated — not just as a pre-release checkbox. A CI/CD security gate that fails the build on critical CVEs creates an immediate feedback loop that developers can act on within seconds, rather than discovering the issue days later in a periodic audit.

The most effective pipelines run multiple scanners in parallel: SAST tools likehadolint or checkov catch misconfigurations in Dockerfiles and Kubernetes manifests, while vulnerability scanners like Trivy or Grype compare your image's installed packages against known CVE databases. Secret scanners such as trufflehog and gitleaks catch credentials before they reach the registry — a critical defense given that exposed credentials remain the number one initial access vector in cloud breaches.

  • Static analysis (SAST)— Scan Dockerfiles withhadolint and K8s manifests with checkov or kube-linter on every pull request. Block merges on critical findings.
  • Image vulnerability scanning— Runtrivy image on every build. Configure a severity threshold — fail the pipeline on CRITICAL and HIGH CVEs that have a known fix available.
  • Secret scanning— Runtrufflehog filesystem . or gitleaks detect as a pre-commit hook and in CI. Rotate any exposed credential immediately — scanning alone is not enough.
  • Deployment gate— Require a passing scan and an approved remediation plan for any unfixed critical CVE before an image can be promoted to production.
  • Signature verification— Sign images withcosign sign and enforce signature verification in your admission controller using cosign verify or a policy engine.
DevSecOps checklist with numbered steps
Figure 2: Practical DevSecOps checklist phases with specific tooling for each stage.

Phase 3: Secrets & Configuration Management

Hardcoded secrets remain one of the most persistent and dangerous vulnerabilities in containerized applications. Research shows that secrets exposed in container images and public repositories are discovered within minutes by automated scanning tools. Never bake credentials, API keys, or tokens into container images — even in private registries, they represent a latent risk if the registry is ever compromised or if the image is accidentally shared.

The modern approach uses external secret stores injected at runtime.Kubernetes Secretsprovide native integration, but for production workloads, tools like HashiCorp Vault, AWS Secrets Manager, or the External Secrets Operator offer encryption at rest with fine-grained access control and automatic rotation schedules. A non-negotiable rule: secrets should never appear in environment variables, where they are easily leaked through debugging endpoints, error logs, or process listings. Mount them as volumes instead.

  • External secret stores— Use Vault, AWS Secrets Manager, Azure Key Vault, or the External Secrets Operator with Kubernetes.
  • Environment-specific config— Use ConfigMaps for non-sensitive settings and mount secrets in a separate volume path from application code.
  • No secrets in env vars— Mount secrets as files in a tmpfs volume. Use memory-backed volumes so secrets never touch disk.
  • Audit and rotate— Log every secret access attempt. Implement a 90-day rotation policy for all credentials and automate where possible.

Phase 4: Runtime Security & Monitoring

Static analysis and pipeline scanning address threats before deployment, but runtime protection is your last line of defense when an attacker has already gained a foothold. The principle of least privilege applies at runtime: containers should run with the minimum permissions necessary to function. Running as non-root is not optional — a container running as root that gets compromised gives the attacker root access on the host in many default configurations.

Beyond user context, seccomp and AppArmor profiles restrict which system calls a container can make, preventing exploits that rely on kernel-level vulnerabilities. SettingreadOnlyRootFilesystem: true prevents attackers from writing malicious binaries or modifying configurations. Resource limits prevent denial-of-service attacks where a compromised container exhausts cluster resources. Finally, runtime monitoring tools like Falcodetect anomalous behavior — unexpected process spawning, file access patterns, or network connections — and alert your team in real time.

  • Non-root execution— AddUSER 1000 to every Dockerfile. Use runAsNonRoot: true in pod security contexts.
  • Read-only root filesystem— SetreadOnlyRootFilesystem: true and use emptyDir volumes for paths that need write access.
  • Seccomp/AppArmor profiles— Apply restrictive seccomp profiles that blockptrace, mount, and other rarely-needed syscalls. Kubernetes supports custom seccomp profiles as of v1.19.
  • Resource limits— Always setresources.limits.cpu and resources.limits.memory. A container without limits can starve neighboring workloads.
  • Runtime monitoring— Deploy Falco as a DaemonSet to monitor syscalls cluster-wide. Integrate with your alerting stack to catch anomalies within seconds.

Phase 5: Compliance & Audit Trail

Security without evidence is assumption. Compliance frameworks like SOC 2, PCI DSS, and HIPAA require demonstrable proof that security controls are in place and functioning. For containerized environments, this means maintaining immutable records of every scan, every approval, and every deployment — ideally for 90 days or longer depending on your regulatory requirements.

Policy-as-code tools likeOpen Policy Agent (OPA)and Kyverno enforce compliance rules automatically, rejecting deployments that don't meet your organization's security standards. CIS benchmarks provide a well-established baseline: run CIS Docker Benchmark and CIS Kubernetes Benchmark scans monthly and treat any non-conformant finding as a remediation task. An immutable image registry ensures that once an image passes all gates and is signed, it cannot be modified or overwritten — preserving the integrity of your audit trail.

  • Immutable image registry— Enable tag immutability in your container registry. Once scanned and signed, an image tag should never be overwritten.
  • Scan history retention— Store all scan reports for at least 90 days. Use a centralized platform or artifact repository with long-term retention.
  • Policy-as-code— Use OPA Gatekeeper or Kyverno to enforce policies like "all images must be signed" and "no privileged pods." Version-control your policies alongside your application code.
  • CIS benchmarks— Rundocker-bench-security and kube-bench monthly. Integrate results into your compliance dashboard.

Conclusion

A DevSecOps checklist transforms security from an afterthought into an automated, repeatable process that every team member can follow. The key insight is that security is not a final gate — it's a series of small, automated checks distributed across the entire software delivery lifecycle, each one catching what the previous stage might have missed. Start with the highest-impact items: pin your base images, run a CVE scanner in CI, and enforce non-root execution. Then add more layers as your team matures.Analyze your Dockerfile with ShieldOpsand get a comprehensive security report with actionable remediation steps in minutes — a practical first step toward automating your container security checklist.

Frequently Asked Questions

What is DevSecOps for containers?

DevSecOps integrates security into every phase of the container lifecycle — building, deploying, and running — rather than treating it as a final gate before release. It shifts security left by embedding automated checks into developer workflows and CI/CD pipelines.

How often should I scan container images?

At minimum: on every CI build, before every deployment, and weekly for newly discovered CVEs. New vulnerabilities are published daily — an image that was clean last week may have critical CVEs today. Tools like Trivy, Grype, and Docker Scout support scheduled scanning.

What is the most critical container security practice?

Running containers as non-root with a read-only filesystem eliminates the most common attack vectors. If an attacker compromises a non-root container, they have significantly fewer privileges to escalate or move laterally within your cluster.

Do I need a separate secrets management tool?

Yes — never bake secrets into container images. Kubernetes Secrets are the baseline, but for production workloads, tools like HashiCorp Vault or cloud-native secret managers (AWS Secrets Manager, GCP Secret Manager) provide encryption at rest, fine-grained access policies, and automatic rotation that K8s native secrets lack.

What is a deployment gate?

A deployment gate is an automated policy check that evaluates whether an image is allowed to reach production based on criteria like scan results, signature validity, and compliance status. If the image fails — for example, due to a critical unpatched CVE — the pipeline blocks deployment and notifies the team with the specific reason and required remediation.

Ready to apply these concepts?

Try ShieldOps AI and start scanning your infrastructure right away.

Start Free Scan

Your take

Rate this article or leave a comment

🤖