New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate a secure container supply chain with Kestra: build a Docker image, fail on HIGH/CRITICAL CVEs via Trivy, push it, and sign it with cosign.
Ship containers through a secure software supply chain with a built-in vulnerability gate. This blueprint orchestrates Docker image build, Trivy CVE scanning, registry push, and cosign image signing in one declarative Kestra flow: build a Docker image, scan it for HIGH and CRITICAL vulnerabilities with Trivy, push only clean images to your container registry, and sign the published image with cosign so downstream consumers can verify provenance and attestation. It closes the gap most CI scripts leave open, where images get pushed to production registries before anyone checks them for known CVEs or signs them for supply chain integrity.
build uses io.kestra.plugin.docker.Build to build the image from an inline Dockerfile with push: false, tagging it as {{ inputs.image }} so nothing leaves the worker until it passes the gate.scan runs io.kestra.plugin.trivy.cli.TrivyCLI with trivy image --exit-code 1 --severity HIGH,CRITICAL, which fails the run and stops the pipeline if any qualifying CVE is found.push uses io.kestra.plugin.docker.Push to publish the scanned image to ghcr.io using REGISTRY_USERNAME and REGISTRY_PASSWORD credentials.sign runs io.kestra.plugin.scripts.shell.Commands on a bitnami/cosign Docker taskRunner and calls cosign sign --yes --key env://COSIGN_KEY to sign the pushed image.on_build_request io.kestra.plugin.core.trigger.Webhook trigger lets CI POST a request to build, scan, and publish a new image on demand.{{ inputs.image }}) that flows through build, scan, push, and sign.Docker, Trivy, and cosign each solve one step, but none of them sequence the steps, gate on results, or react to events. Kestra ties them into one declarative YAML pipeline: the Webhook trigger fires the flow on a CI event, failed scans short-circuit the run automatically, and you can add retries, alerting, and full execution lineage across every step. Plain build scripts give you none of the observability, replay, or event orchestration that the underlying CLIs cannot provide on their own.
REGISTRY_USERNAME and REGISTRY_PASSWORD: registry push credentials.COSIGN_PRIVATE_KEY and COSIGN_PASSWORD: cosign signing key and its password.DOCKER_BUILD_WEBHOOK_KEY: key guarding the webhook trigger.build task with your application's Dockerfile.image reference, or POST to the on_build_request webhook from CI.