本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)35k · #8408

verifying-build-provenance-with-slsa-sigstore

できること

cosignとslsa-verifierというツールを使って、プログラムやファイルが、想定どおりの送り元によって安全に作成されたかを検証します。これにより、ソフトウェアが悪意のある人物によって改ざんされていないことを確かめられます。

使う場面

  • ✓インターネットからダウンロードしたプログラムをインストールしたり使ったりする前。
  • ✓他者が作成したソフトウェア部品を使うとき。
  • ✓自分のソフトウェアのビルド過程が安全であることを確かめたいとき。

スキルのリンク

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/verifying-build-provenance-with-slsa-sigstore/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/verifying-build-provenance-with-slsa-sigstore/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“プログラム「my_app」が、バージョン「v1.0」のリポジトリ「my_github/my_project」からビルドされたものかを検証してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

cosignとslsa-verifierは、電子署名と作成元の情報(来歴、provenance)を確認します。安全なサービスに接続して、ファイルを作成したと主張する人物が実際に作成したこと、そして正しい場所から来たことを確認します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Verifying Build Provenance with SLSA and Sigstore

Overview

Build-provenance verification answers a question that defeats many supply-chain attacks: was this artifact actually built from the source I think it was, by the builder I trust, without tampering? Attackers who compromise a build system, swap a compiled release, or inject a malicious step (as in the SolarWinds and 3CX incidents) produce artifacts that look legitimate but lack verifiable provenance. SLSA (Supply-chain Levels for Software Artifacts, https://slsa.dev) defines Build levels (L1–L3) describing increasing provenance integrity, and Sigstore (https://www.sigstore.dev) provides the signing and transparency infrastructure: cosign for signing/verifying artifacts and attestations, Fulcio for short-lived keyless certificates bound to an OIDC identity, and Rekor as a tamper-evident transparency log.

This skill covers verifying signatures and SLSA provenance with cosign (cosign verify, cosign verify-attestation, cosign verify-blob-attestation) and slsa-verifier (slsa-verifier verify-artifact), enforcing the builder identity (the GitHub Actions workflow that produced the artifact) and the expected source repository. Keyless verification ties trust to an OIDC issuer (e.g., https://token.actions.githubusercontent.com) and a certificate identity rather than a long-lived private key.

This maps to MITRE ATT&CK T1195 — Supply Chain Compromise (provenance verification detects/blocks tampered artifacts) and NIST CSF PR.DS-01 (the confidentiality, integrity, and availability of data-at-rest are protected; CSF 2.0 absorbed the retired 1.1 PR.DS-06 integrity-checking outcome here).

When to Use

  • In CI/CD before deploying or promoting any container image or release binary.
  • When consuming third-party artifacts (base images, Go/npm releases) that publish attestations.
  • When establishing a SLSA Build L3 producer pipeline and enforcing it at the consumer side.
  • During incident response to confirm whether a deployed artifact's provenance is intact.
  • In admission control (e.g., Kubernetes via policy-controller / Kyverno) to admit only verified images.

Prerequisites

  • cosign (Sigstore CLI):
    go install github.com/sigstore/cosign/v2/cmd/cosign@latest
    # or download a release binary from https://github.com/sigstore/cosign/releases
    
  • slsa-verifier:
    go install github.com/slsa-framework/slsa-verifier/v2/cli/slsa-verifier@latest
    # or:
    curl -sSL https://github.com/slsa-framework/slsa-verifier/releases/latest/download/slsa-verifier-linux-amd64 \
      -o /usr/local/bin/slsa-verifier && chmod +x /usr/local/bin/slsa-verifier
    
  • Network access to Rekor (https://rekor.sigstore.dev) and Fulcio for transparency-log verification.
  • The artifact plus its provenance/attestation bundle (.sigstore, .intoto.jsonl, or attached OCI attestation).

Objectives

  • Verify a keyless cosign signature on a container image, pinning OIDC issuer and certificate identity.
  • Verify a SLSA provenance attestation on an image with cosign verify-attestation --type slsaprovenance.
  • Verify a release binary's provenance with slsa-verifier verify-artifact, pinning source repo and tag.
  • Verify GitHub artifact attestations / blob bundles with cosign verify-blob-attestation.
  • Gate CI and admission control on successful verification; understand SLSA Build L1–L3.

MITRE ATT&CK Mapping

ID Tactic Technique Name Relevance
T1195 Initial Access Supply Chain Compromise Verifying provenance and signatures detects artifacts that were tampered with or substituted in the build/distribution chain, preventing supply-chain compromise from reaching deployment.

Workflow

Step 1: Verify a keyless cosign signature on an image

Pin both the OIDC issuer and the certificate identity (the exact workflow that signed). A bare cosign verify without identity pinning is meaningless — anyone can sign.

cosign verify \
  --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
  --certificate-identity-regexp "^https://github.com/myorg/myrepo/.github/workflows/.*@refs/tags/v.*" \
  ghcr.io/myorg/myrepo:v1.2.3

A non-zero exit or empty result means verification failed — do not deploy.

Step 2: Verify the SLSA provenance attestation on the image

…

よくある質問

「provenance(来歴)」とは何ですか?

誰が、いつ、どのように作成したかを示す履歴のようなものです。そのファイルが本物であることを保証するものです。

「cosign」と「slsa-verifier」とは何ですか?

ソフトウェアファイルの来歴と署名を検証するためのコマンドラインツールです。Sigstoreなどの技術を使い、安全性を確保します。

来歴を検証することが重要なのはなぜですか?

サプライチェーン攻撃を防ぐためです。サプライチェーン攻撃とは、攻撃者が正規のソフトウェアを悪意のあるものにすり替える攻撃です。来歴を検証することで、正しく信頼できるソフトウェアを使っていることを確認できます。

詳細

作者による元の説明

Verifies artifact signatures and SLSA provenance using Sigstore's cosign (verify, verify-attestation, verify-blob-attestation) and slsa-verifier (verify-artifact), enforcing keyless OIDC builder identity and source repo against SLSA Build levels. Use in CI/CD before deploying artifacts, when consuming third-party attestations, establishing a SLSA Build L3 pipeline, or confirming provenance during

repo: mukul975/Anthropic-Cybersecurity-Skills

人気

GitHubのスター
35k
ランキング
#8408
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル