---
name: "cosign-sigstore-image-signing"
description: "Sign container images cryptographically and verify provenance in Kubernetes admission controllers."
metadata:
  author: "Sigstore"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "sign container image cosign"
  - "verify image signature cosign"
  - "attach sbom with cosign"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Cosign Sigstore Container Image Signing & Verification

Secures software supply chains using Sigstore Cosign: keyless signing with OIDC identity (Fulcio/Rekor), generating and attaching SBOMs/attestations, verifying image signatures, and enforcing policies via Kyverno.

## When to Invoke
Invoke this skill whenever you need to:
- sign container image cosign
- verify image signature cosign
- attach sbom with cosign

## Execution SOP & Rules
1. Sign image: cosign sign --yes <registry>/<image>@<sha256:digest> using OIDC ambient credentials.
2. Attach SBOM: cosign attach sbom --sbom sbom.spdx.json <image>@<digest>.
3. Verify signature: cosign verify --certificate-identity-regexp 'https://github.com/my-org/.*' <image>.
4. Configure admission controller to reject any unsigned images at deployment admission time.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
