Dagweave catalog

Sign a container image

cosign-signv1.0.0updated 2026-10-181 version

Sign a container image in its registry with a cosign key pair, so that anyone with the public key can check it came from you. The private key and its password come from a Kubernetes Secret.

Install v1.0.0

Installs the template into your Argo namespace. The URL is pinned to this version.

kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/cosign-sign/1.0.0/template.yaml

Or with the Argo CLI:

argo template create -n argo https://catalog.dagweave.com/api/v1/items/cosign-sign/1.0.0/template.yaml

Facts

Category
CI/CD
Tags
ci-cd cosign
Entrypoint
sign
Template SHA-256
dfb5f1419a7c22d55330e29937b459cc51fd39c2d8ba2ea60ebc5f40f82b5e1e
Source
cosign-sign at catalog commit 67458f7
API
item document, latest template.yaml

Images and provenance

Every image is pinned by digest, so a rebuilt tag can never change what this version runs.

RepositoryTagDigest
cgr.dev/chainguard/cosignlatestsha256:35b607c4eba6e914b3b8b80f5f8a63ce2eccd48617717d5edd572dd62f0cdf66

Parameters

NameDescriptionDefault
image required Image to sign, by digest so the signature covers exactly the bytes you built.
Example registry.example.com/team/app@sha256:0123...
none
docker-config-secret-key Key in that Secret that holds the config.json. .dockerconfigjson
docker-config-secret-name Name of the Kubernetes Secret that holds a Docker config.json for the registry. docker-config
key-secret-name Name of the Kubernetes Secret that holds the cosign private key and its password. cosign-key
password-key Key in that Secret that holds the key's password. Leave the key out of the Secret if the key has no password. cosign.password
private-key-key Key in that Secret that holds the private key. cosign.key

WorkflowTemplate

Download template.yaml

apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: cosign-sign
  labels:
    dagweave.io/catalog-item: cosign-sign
  annotations:
    dagweave.io/catalog-version: "1.0.0"
    dagweave.io/catalog-category: "CI/CD"
spec:
  entrypoint: sign
  volumes:
    - name: docker-config
      secret:
        secretName: "{{inputs.parameters.docker-config-secret-name}}"
        optional: true
        items:
          - key: "{{inputs.parameters.docker-config-secret-key}}"
            path: config.json
  templates:
    - name: sign
      inputs:
        parameters:
          - name: image
          - name: key-secret-name
            default: "cosign-key"
          - name: private-key-key
            default: "cosign.key"
          - name: password-key
            default: "cosign.password"
          - name: docker-config-secret-name
            default: "docker-config"
          - name: docker-config-secret-key
            default: ".dockerconfigjson"
      retryStrategy:
        limit: "2"
        retryPolicy: OnError
        backoff:
          duration: 10s
          factor: "2"
          maxDuration: 2m
      container:
        # cgr.dev/chainguard/cosign:latest
        image: cgr.dev/chainguard/cosign@sha256:35b607c4eba6e914b3b8b80f5f8a63ce2eccd48617717d5edd572dd62f0cdf66
        command: [cosign]
        args:
          - sign
          - --yes
          - --key
          - env://COSIGN_PRIVATE_KEY
          - "{{inputs.parameters.image}}"
        env:
          - name: COSIGN_PRIVATE_KEY
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.key-secret-name}}"
                key: "{{inputs.parameters.private-key-key}}"
          - name: COSIGN_PASSWORD
            valueFrom:
              secretKeyRef:
                name: "{{inputs.parameters.key-secret-name}}"
                key: "{{inputs.parameters.password-key}}"
                optional: true
          - name: DOCKER_CONFIG
            value: /docker-config
        resources:
          requests:
            cpu: 50m
            memory: 64Mi
          limits:
            memory: 256Mi
        volumeMounts:
          - name: docker-config
            mountPath: /docker-config
            readOnly: true

Version history

Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.

  1. 1.0.0 latest 2026-10-18

    Initial release.

    kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/cosign-sign/1.0.0/template.yaml
    argo template create -n argo https://catalog.dagweave.com/api/v1/items/cosign-sign/1.0.0/template.yaml

    version document, template.yaml

Run it once

After installing, from the command line.

argo submit -n argo --from workflowtemplate/cosign-sign \
  -p image=registry.example.com/team/app@sha256:0123...

Workflow that references it

A Workflow with the required parameters filled from the examples.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: cosign-sign-
spec:
  workflowTemplateRef:
    name: cosign-sign
  arguments:
    parameters:
      - name: image
        value: "registry.example.com/team/app@sha256:0123..."

As a step of a larger workflow

steps:
  - - name: cosign-sign
      templateRef:
        name: cosign-sign
        template: sign