Goal: Sign container images at release time for supply chain security.
Installed via brew install cosign (v3.0.5). Modern OCI-native signing standard.
| Option | Pros | Cons |
|---|---|---|
| YubiKey PIV | Hardware-backed, touch to sign | Uses PIV applet (separate from GPG key) |
| File-based | Simple setup | Must protect private key file |
| GPG-wrapped | Leverages existing GPG key | Extra decrypt step at sign time |
Note: Cosign uses the PIV applet on YubiKey, not the OpenPGP applet where GPG keys live. These are separate key stores on the same hardware.
brew install ykman # YubiKey Manager
cosign generate-key-pair --sk # Generate key in PIV slot
cosign sign --sk <IMAGE_DIGEST> # Sign with hardware key
cosign verify --key cosign.pub <IMAGE> # Verify signature./run sign # Sign image after release
./run verify # Verify signature existsOr integrate signing into ./run release flow.
- Cosign binary is available
- Image can be signed after push
- Signature can be verified
- Unsigned images fail verification
- Decide on key storage approach (YubiKey PIV vs file-based)
- If YubiKey PIV: install ykman, generate key in PIV slot
- Implement signing in
yajsvproject as pilot (simplest release process) - Add
signandverifycommands to./run - Document in AGENTS.md