Security hardening reduces exploitable weaknesses by restricting configuration and removing unnecessary capabilities. In container workflows, inspect both image contents and deployment artifacts, then balance each fix against application compatibility. section 17.2
A practical hardening workflow includes:
- Scan Dockerfiles, Kubernetes manifests, Helm charts, and infrastructure-as-code files for misconfiguration. section 17.2
- Prefer non-root containers and read-only filesystems when the application supports them, then verify the change with end-to-end tests. section 17.2
Try it now
Run Trivy against a repository with the misconfiguration scanner and restrict results to high- and critical-severity findings. Investigate each result before changing the deployment configuration.

