[Security] Sign releases and add SLSA provenance

Open
#88 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
github-actions, go

Research direction

Start by reading .github/workflows/release.yml and tracing how release artifacts and hashes are produced. Add signing and SLSA provenance for published artifacts, then validate the workflow with a pre-release and document verification in README. Done means releases include verifiable signatures and provenance.

Written by the indexing model from the issue text.

Description

Issue

OpenSSF Scorecard identified that releases are not cryptographically signed and lack provenance, scoring 0/10.

Risk Level

Medium - Unsigned releases allow potential man-in-the-middle attacks and make it difficult to verify artifact authenticity.

Current State

  • Releases published without cryptographic signatures
  • No SLSA provenance attestations
  • Users cannot verify release artifact integrity
  • Missing supply chain transparency

Recommendation

Implement release signing and SLSA provenance for all published artifacts.

Option 1: Sigstore/Cosign (Recommended)

Use keyless signing with Sigstore for simplicity and transparency:

GitHub Actions Integration:

- name: Sign release artifacts
  uses: sigstore/cosign-installer@v3
- name: Sign artifacts with cosign
  run: |
    cosign sign-blob --yes \
      --bundle cosign.bundle \
      tar-diff-linux-amd64

Benefits:

  • No key management required (uses OIDC)
  • Signatures stored in public Rekor transparency log
  • Widely adopted in cloud-native ecosystem
Option 2: SLSA Provenance Generator

Add build provenance using GitHub's SLSA generator:

- uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.9.0
  with:
    base64-subjects: "${{ needs.build.outputs.hashes }}"

Benefits:

  • Documents build process and dependencies
  • Achieves SLSA Level 3 compliance
  • Verifiable build reproducibility
Option 3: GPG Signing (Traditional)

Use GPG keys to sign releases:

  • Requires secure key storage and management
  • More operational overhead
  • Well-established in many ecosystems

Recommended Implementation

Combine both approaches:

  1. Use Cosign for artifact signing
  2. Use SLSA Generator for build provenance
  3. Publish signatures alongside release artifacts
  4. Document verification process in README

Steps to Implement

  1. Add Cosign signing to .github/workflows/release.yml
  2. Integrate SLSA provenance generator
  3. Update release process to include signature verification instructions
  4. Test with a pre-release to validate workflow
  5. Document how users can verify signatures

Verification Instructions (for users)

Once implemented, users can verify releases:

# Install cosign
go install github.com/sigstore/cosign/v2/cmd/cosign@latest

# Verify signature
cosign verify-blob \
  --bundle cosign.bundle \
  --certificate-identity-regexp="^https://github.com/containers/tar-diff" \
  --certificate-oidc-issuer="https://token.actions.githubusercontent.com" \
  tar-diff-linux-amd64

References

Related

Part of OpenSSF Scorecard evaluation THEEDGE-4717 (overall score: 6.8/10)

Dominant language
Go
Stars
66
Forks
27
Avg merge
14d 3h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from containers/tar-diff

All issues in containers/tar-diff

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.