implementing-code-signing-for-artifacts

Implement GPG and Sigstore signing and verification for build artifacts in CI/CD pipelines.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill implementing-code-signing-for-artifacts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-code-signing-for-artifacts
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/devsecops/implementing-code-signing-for-artifacts
Command: npx skills add https://github.com/xalgord/xalgorix --skill implementing-code-signing-for-artifacts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Build artifacts distributed without cryptographic signatures cannot be verified for integrity or publisher identity, leaving software supply chains exposed to tampering and failing SLSA Level 2+ and compliance requirements.

Core Features & Use Cases

  • Artifact Signing in CI/CD: Sign binaries, tarballs, and checksums with GPG detached signatures or Sigstore keyless signing via OIDC identity in GitHub Actions.
  • Deploy-Time Verification: Enforce signature verification with cosign verify-blob and gpg --verify, including identity pinning with --certificate-identity and --certificate-oidc-issuer.
  • npm Provenance: Publish npm packages with provenance attestations using npm publish --provenance.
  • Use Case: An open-source project cutting a release uses keyless Sigstore signing in GitHub Actions, publishes signatures and Rekor transparency log entries alongside artifacts, and configures the deployment pipeline to reject any unsigned or mis-signed artifact.

Quick Start

Set up keyless Sigstore signing for my GitHub Actions release artifacts and add a verification gate to my deployment pipeline.

Frequently Asked Questions about implementing-code-signing-for-artifacts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sign build artifacts in GitHub Actions?

Sign build artifacts in GitHub Actions by importing a GPG private key from secrets and running `gpg --detach-sign` on each file, or by installing cosign and using `cosign sign-blob` with the workflow's OIDC token for keyless signing. Upload the signatures and certificates alongside the release artifacts.

GPG vs Sigstore cosign for artifact signing?

GPG uses long-lived key pairs that must be stored, rotated, and revoked if compromised, while Sigstore cosign keyless signing issues short-lived certificates bound to an OIDC identity with no key management. Cosign also records every signing event in the Rekor transparency log for public auditability.

How do I verify cosign signatures in a deployment pipeline?

Verify cosign signatures with `cosign verify-blob` passing the signature and certificate files, and always pin `--certificate-identity` and `--certificate-oidc-issuer` so only your CI identity is accepted. The deploy step must abort when verification exits non-zero.

Why does cosign verification accept signatures from the wrong identity?

Verification accepts any valid Sigstore signature when `--certificate-identity` and `--certificate-oidc-issuer` are omitted, including an attacker's. Pinning both flags restricts acceptance to your specific CI identity and issuer, and a mismatched identity will be rejected.

When should I not use artifact signing?

Do not use artifact signing for confidentiality, since signing provides integrity and authenticity but not encryption. For container images use cosign image signing directly, and for source code authentication use commit signing instead.