Skip to main content
Talk

Dockerize Java Securely: SBOMs + Attestations + Cosign

Containerizing Java applications is easy. Containerizing them securely is not. This talk shows how to strengthen Java Docker builds with SBOMs extracted at every stage of a multi-stage build, BuildKit attestations, OCI 1.1 referrers, Docker Hardened Images, and Cosign signing — told through the narrative of the Docker Commandos in Asgard.

October 15, 2026
BaselOne 2026 · Basel, Switzerland
Dockerize Java Securely: SBOMs + Attestations + Cosign

Welcome to the Halloween edition of Dockerize Securely at BaselOne 2026, in the Markthalle Basel, Switzerland. The Black Forest Commandos are defending Asgard—and our Java container supply chains.

The companion article above contains the full story, Java Dockerfile, explanations, and security caveats. Use this page as a quick reference during the session.

TL;DR: SIP It Before You Ship It

Sandbox → Lock → Harden → Attest → Scan. Isolate agents, lock dependencies, use hardened multi-stage builds, generate attestations, and scan before promotion. Verify signatures before deployment.

Inspect an image

git clone https://github.com/ContainerSecurity-dev/dockerize-java-securely.git
cd dockerize-java-securely

# After the build steps in the linked runbook:
export IMAGE=127.0.0.1:15000/dockerize-java-securely:hardened

docker scout sbom "$IMAGE" --format list
docker scout cves --only-severity critical,high "$IMAGE"

Build with attestations

Use the sample repository and live-demo runbook to start the local registry and build from the provided Dockerfile. Use secret mounts for credentials; maximum-level provenance can expose build arguments.

docker login dhi.io

docker buildx build \
  --platform linux/amd64 \
  --metadata-file results/hardened-build-metadata.json \
  --sbom=true \
  --provenance=mode=max \
  --push \
  -t "$IMAGE" .

Scan and verify before promotion

Read the pushed digest from the build metadata. Verification requires the trusted public key and an image already signed using the runbook. The measured hardened sample still has 3 critical and 5 high Java findings, so the vulnerability gate is expected to return 1.

export DIGEST_IMAGE="127.0.0.1:15000/dockerize-java-securely@$(python3 -c 'import json; print(json.load(open("results/hardened-build-metadata.json"))["containerimage.digest"])')"

trivy image \
  --scanners vuln \
  --severity CRITICAL,HIGH \
  --exit-code 1 "$DIGEST_IMAGE"

cosign verify --key .demo-keys/cosign.pub "$DIGEST_IMAGE"

Repositories and Hands-On Materials

Meet the Commandos in My Books

Meet the entire team and explore their missions.

A Swiss Break: Play Jass

Since we're in Basel, take a break with Swiss Jass: Commandos Edition, a Commandos-themed take on the Swiss card game.

SIP it before you ship it.

Invite Me to Speak

Available for conferences, workshops, corporate training, and meetups. I can present remotely or travel to your event.