Container
Security Toolkit

trivy image --severity CRITICAL nginx:latest

Filterable reference for container security: image scanning, build linting, registry ops, image signing, runtime threat detection, and supply chain.

15 tools
6 phases
OCI, Sigstore, SLSA
Phase 15 tools shown
ToolPhaseKey commandsUse case
trivy (image) image
trivy image nginx:latest trivy image --severity CRITICAL,HIGH --exit-code 1 myapp:latest trivy image --ignore-unfixed myapp:latest trivy image --format sarif -o results.sarif myapp:latest trivy image --scanners vuln,secret,misconfig myapp:latest trivy image --platform linux/arm64 myapp:latest
CVE, secret, and misconfiguration scanning in one pass. --ignore-unfixed cuts noise to actionable findings only. SARIF output integrates with GitHub Code Scanning.
grype image
grype myapp:latest grype myapp:latest --only-fixed grype myapp:latest -o json | jq '.matches[] | select(.vulnerability.severity=="Critical")' grype sbom:./sbom.spdx.json grype dir:./src
Anchore's vulnerability scanner: faster DB updates than trivy, strong SBOM-first workflow. sbom: scheme scans a pre-generated SBOM rather than re-analysing the image.
dive image
dive myapp:latest dive myapp:latest --ci dive myapp:latest --ci --lowestEfficiency=0.95 # CI fails if wasted space > 5% or efficiency < 0.95 docker build -t myapp . && dive myapp
Layer-by-layer image explorer: shows exactly what each layer adds/removes and identifies wasted space (files added then deleted). --ci mode gates builds on image efficiency.
dockle image
dockle myapp:latest dockle --exit-code 1 --exit-level warn myapp:latest dockle -f json myapp:latest | jq '.details[] | select(.level=="FATAL")' dockle --ignore CIS-DI-0006 myapp:latest
CIS Docker Benchmark checks against a built image: root user, sensitive env vars, HEALTHCHECK presence, ADD vs COPY, unnecessary setuid bits. Complements hadolint (which is pre-build).
hadolint build
hadolint Dockerfile hadolint --ignore DL3008 Dockerfile hadolint -f json Dockerfile | jq '.[] | select(.level=="error")' hadolint --failure-threshold error Dockerfile find . -name Dockerfile\* | xargs hadolint
Dockerfile linter against best practices and shell script rules (via shellcheck). Catches pinned digest recommendations, apt-get without --no-install-recommends, and layer consolidation issues.
docker buildx build
docker buildx build --sbom=true --provenance=true -t myapp:latest . docker buildx build --platform linux/amd64,linux/arm64 -t myapp:latest --push . docker buildx imagetools inspect myapp:latest docker buildx imagetools inspect myapp:latest --format '{{json .SBOM}}'
Build with embedded SBOM and SLSA provenance attestations in one step. --provenance=true generates a signed build provenance record attached to the image manifest.
crane registry
crane ls registry.example.com/myapp crane digest myapp:latest crane copy myapp:latest registry2.example.com/myapp:latest crane manifest myapp:latest | jq '.layers[].digest' crane pull myapp:latest myapp.tar crane mutate myapp:latest --label version=1.0 -t myapp:labeled
Registry manipulation without a Docker daemon: list tags, copy images across registries, inspect manifests, mutate labels. Ideal for CI environments and air-gapped registry mirroring.
skopeo registry
skopeo inspect docker://nginx:latest skopeo copy docker://nginx:latest docker://registry.example.com/nginx:latest skopeo copy docker://myapp:latest oci:/tmp/myapp-oci skopeo sync --src docker --dest dir nginx:latest /tmp/mirror/ skopeo delete docker://registry.example.com/old:tag
Registry inspection and image copy across formats (docker, oci, dir) without pulling. sync mirrors entire repos: the correct tool for air-gapped environments and registry promotions.
cosign signing
cosign generate-key-pair cosign sign --key cosign.key myapp@<digest> cosign verify --key cosign.pub myapp:latest cosign attach sbom --sbom sbom.spdx.json myapp:latest cosign attest --key cosign.key --predicate sbom.spdx.json myapp@<digest> cosign tree myapp:latest
Sigstore image signing: sign by digest (never by tag), verify before deploy. attest attaches SBOM or SLSA provenance as a signed attestation. tree shows all signatures and attestations on an image.
policy-controller signing
# install via Helm: helm install policy-controller sigstore/policy-controller -n cosign-system # ClusterImagePolicy to require signed images: kubectl apply -f cluster-image-policy.yaml kubectl get clusterimagepolicies kubectl describe clusterimagepolicy require-signed
Kubernetes admission controller that enforces cosign signature and attestation policies at deploy time. Blocks unsigned images cluster-wide: the enforcement layer for your signing pipeline.
falco runtime
falco -r /etc/falco/falco_rules.yaml falco --list | grep container falco -o json_output=true 2>&1 | jq 'select(.priority=="Critical")' # example custom rule: # - rule: Shell in container # condition: spawned_process and container and shell_procs falcoctl rule install --tag latest falco-rules
eBPF-based runtime threat detection: alerts on shell spawns in containers, unexpected outbound connections, privilege escalations, sensitive file reads. Rules are YAML and version-controlled.
docker bench runtime
docker run --rm --net host --pid host --userns host --cap-add audit_control \ -v /etc:/etc:ro -v /lib/systemd:/lib/systemd:ro \ -v /usr/bin/containerd:/usr/bin/containerd:ro \ -v /var/lib:/var/lib:ro -v /var/run/docker.sock:/var/run/docker.sock:ro \ docker/docker-bench-security # target specific sections: ./docker-bench-security.sh -c container_images ./docker-bench-security.sh -c docker_daemon_configuration
CIS Docker Benchmark against host daemon config and running containers: daemon TLS, seccomp defaults, user namespaces, AppArmor profiles, container resource limits.
amicontained runtime
docker run --rm r.j3ss.co/amicontained # run inside a suspect container: kubectl exec -it <pod> -- amicontained
Container introspection: reports capabilities, seccomp profile, namespaces, and whether you can escape. Run inside a container to verify its actual security posture at runtime, not just what the manifest claims.
syft supply chain
syft myapp:latest syft myapp:latest -o spdx-json > sbom.spdx.json syft myapp:latest -o cyclonedx-json > sbom.cdx.json syft dir:./src -o spdx-json > sbom.spdx.json syft myapp:latest -o table
SBOM generation from images, directories, or archives in SPDX or CycloneDX format. Output feeds directly into grype for vuln scanning or cosign attest for signed attestations.
syft → grype pipeline supply chain
# generate SBOM once, scan repeatedly without re-pulling: syft myapp:latest -o spdx-json > sbom.spdx.json grype sbom:./sbom.spdx.json --only-fixed # sign and attach the SBOM: cosign attest --key cosign.key --predicate sbom.spdx.json myapp@$(cosign triangulate myapp:latest) # verify SBOM attestation before deploying: cosign verify-attestation --key cosign.pub --type spdxjson myapp:latest | jq '.payload | @base64d | fromjson'
Full supply chain pipeline: generate SBOM → scan for vulns → sign and attach as attestation → verify at deploy time. Decouples image pulling from vuln scanning: scan the SBOM, not the image, in CI.
No tools match this filter.