Chuyển đến nội dung
Skillpedia
Bảo mật35k · #8123

implementing-sigstore-for-software-signing

Skill này làm gì

Công cụ này giúp bảo đảm phần mềm bạn dùng là chính gốc và chưa bị can thiệp. Nó tạo chữ ký số cho phần mềm bằng danh tính trực tuyến của bạn (như tài khoản Google hoặc GitHub), mà bạn không cần quản lý mật khẩu phức tạp.

Khi nào nên dùng

  • ✓Khi phát hành phiên bản phần mềm mới.
  • ✓Khi xác minh phần mềm đã tải về có phải là bản gốc không.
  • ✓Trong các hệ thống tự động xây dựng và kiểm thử phần mềm.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-sigstore-for-software-signing/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-sigstore-for-software-signing/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy ký image container này bằng tài khoản GitHub của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng Cosign để tạo chữ ký số. Chữ ký này được liên kết với danh tính trực tuyến (OIDC) của bạn và được ghi vào một nhật ký công khai (Rekor) để bất kỳ ai cũng có thể xác minh.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Implementing Sigstore for Software Signing

When to Use

  • Signing container images and software artifacts without managing long-lived cryptographic keys
  • Establishing verifiable provenance for build outputs in CI/CD pipelines using OIDC identity binding
  • Querying the Rekor transparency log to audit when and by whom an artifact was signed
  • Verifying that container images pulled from registries were signed by authorized identities and issuers
  • Integrating Sigstore verification into Kubernetes admission controllers to enforce signed-image policies

Do not use for signing artifacts that require air-gapped or offline signing workflows where OIDC authentication is unavailable, for environments that cannot reach the public Sigstore infrastructure (Fulcio, Rekor) and have no private instance deployed, or as a replacement for traditional PGP/GPG signing where regulatory compliance mandates specific key management procedures.

Prerequisites

  • Cosign CLI v2.4+ installed (go install github.com/sigstore/cosign/v2/cmd/cosign@latest or binary release)
  • Access to an OIDC identity provider supported by Fulcio (Google, GitHub, Microsoft, or a custom OIDC issuer)
  • Container registry credentials (for signing container images) with push access to store signature objects
  • Python 3.9+ with sigstore, requests, and cryptography packages for the automation agent
  • Network access to fulcio.sigstore.dev, rekor.sigstore.dev, and tuf-repo-cdn.sigstore.dev (or private Sigstore instance URLs)

Workflow

Step 1: Install and Configure Cosign

Install Cosign and verify it can reach the Sigstore infrastructure:

  • Install from binary release: Download the appropriate binary from the Cosign GitHub releases page and verify its checksum. On Linux: curl -LO https://github.com/sigstore/cosign/releases/latest/download/cosign-linux-amd64 && chmod +x cosign-linux-amd64 && sudo mv cosign-linux-amd64 /usr/local/bin/cosign
  • Verify installation: Run cosign version to confirm the version and check connectivity to Sigstore services with cosign initialize which fetches the TUF root of trust
  • Configure custom infrastructure (optional): If running a private Sigstore stack, set --fulcio-url, --rekor-url, and --oidc-issuer flags or use environment variables COSIGN_REKOR_URL and COSIGN_FULCIO_URL

Step 2: Keyless Signing with Cosign and Fulcio

Perform identity-based signing where Fulcio issues a short-lived certificate bound to your OIDC identity:

  • Sign a container image: Run cosign sign <IMAGE_DIGEST> which triggers an OIDC authentication flow. Cosign generates an ephemeral key pair, obtains a short-lived certificate from Fulcio binding the public key to the OIDC identity, signs the image digest, and records the signing event in Rekor. The private key is destroyed immediately after signing.
  • Sign a blob (file): Run cosign sign-blob <file> --bundle artifact.sigstore.json to sign arbitrary files. The bundle contains the signature, certificate, timestamp, and Rekor inclusion proof.
  • Non-interactive signing in CI: Set SIGSTORE_ID_TOKEN environment variable with a valid OIDC token (e.g., from GitHub Actions OIDC or GCP workload identity) to skip the browser-based authentication flow:
    export SIGSTORE_ID_TOKEN=$(curl -sH "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
      "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=sigstore" | jq -r '.value')
    cosign sign $IMAGE_DIGEST
    
  • Supported OIDC providers: Google (https://accounts.google.com), GitHub (https://github.com/login/oauth), Microsoft (https://login.microsoftonline.com), GitLab (https://gitlab.com), and custom providers registered with a private Fulcio instance

Step 3: Verify Signed Artifacts

Verify that artifacts were signed by expected identities from expected OIDC issuers:

  • Verify a container image: Run cosign verify <IMAGE_URI> --certificate-identity=name@example.com --certificate-oidc-issuer=https://accounts.google.com to confirm the image was signed by the specified identity. Cosign validates the certificate chain, checks the Rekor inclusion proof, and verifies the signature matches the current image digest.
  • Verify a signed blob: Run cosign verify-blob <file> --bundle artifact.sigstore.json --certificate-identity=name@example.com --certificate-oidc-issuer=https://accounts.google.com

…

Câu hỏi thường gặp

Tôi có cần tạo mật khẩu hoặc khóa bí mật không?

Không. Công cụ dùng danh tính trực tuyến của bạn (như Google hoặc GitHub) để ký, quy trình này được gọi là “keyless”.

“Cryptographic provenance” là gì?

Đó là cách chứng minh ai đã tạo hoặc ký một phần mềm và bảo đảm nó chưa bị thay đổi kể từ đó.

Nếu tôi không có truy cập internet thì sao?

Phương pháp này cần kết nối internet để liên lạc với dịch vụ Sigstore (Fulcio, Rekor). Nó không hoạt động trong môi trường hoàn toàn ngoại tuyến.

Chi tiết

Mô tả gốc của tác giả

Implements Sigstore-based software signing and verification using Cosign keyless signing, Rekor transparency log verification, and Fulcio certificate authority integration to establish cryptographic provenance for container images, binaries, and software artifacts, including OIDC-based identity binding and CI/CD pipeline integration. Use when setting up keyless container/artifact signing, verifyin

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#8123
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự