attestation について
attestation は、Sigstore のビルド来歴バンドルを検証、ダウンロード、確認する orbit のコマンドラインスキルです。成果物の出所、署名者の身元、ビルド情報を確認する用途に向いています。
主な機能
- 01バンドルに照らした成果物の検証
- 02GitHub からのバンドル取得
- 03来歴と署名者情報の確認
- 04JSON・YAML 出力
- 05SHA-256・SHA-512 ダイジェスト対応
活用シーン
- 01リリースバイナリの来歴確認
- 02リポジトリと署名者の身元確認
- 03バンドル内のビルド素材の確認
- 04CI スクリプトでの構造化出力の利用
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ jorgemuza/ orbit --skill attestationインストール後、Claude Code で/attestationを入力して読み込まれたか確認します。
同梱ファイルreferences/commands.md
詳細
orbit CLI によるアテステーション
Sigstore バンドルと in-toto アテステーション形式、SLSA provenance predicate を使用して、ビルドの来歴を検証、ダウンロード、確認します。この機能により、アーティファクトの出所、署名者の ID、ビルドメタデータを確認でき、サプライチェーンセキュリティを支援します。
前提条件
orbitCLI がインストールされていること —which orbitが失敗する場合は、次の方法でインストールします:- macOS/Linux(Homebrew):
brew install jorgemuza/tap/orbit - macOS/Linux(スクリプト):
curl -sSfL https://raw.githubusercontent.com/jorgemuza/orbit/main/install.sh | sh - Windows(Scoop):
scoop bucket add jorgemuza https://github.com/jorgemuza/scoop-bucket && scoop install orbit
- macOS/Linux(Homebrew):
- 検証または確認するアーティファクトの Sigstore アテステーションバンドル(
.jsonlまたは.json) downloadの場合:GitHub サービスが設定されたプロファイル(アテステーションバンドルは GitHub から取得します)
クイックリファレンス
すべてのコマンドは次の形式に従います:orbit attestation <command> [arguments] [flags]
エイリアス:orbit attest <command> [arguments] [flags]
すべてのコマンドで、構造化出力用に -o json と -o yaml を使用できます。コマンドとすべてのフラグの詳細については、references/commands.md を参照してください。
主なワークフロー
アーティファクトの検証
アーティファクトがアテステーションバンドルと一致することを検証し、ビルドの来歴、署名者の ID、ソースリポジトリを確認します。
# Verify a local binary against a bundle
orbit attestation verify ./my-binary --bundle attestation.jsonl
# Verify with owner, repo, and signer identity checks.
# --owner and --repo must equal the owner and repository the provenance source
# URI names, compared case-insensitively; using either also requires the source
# to be hosted on --source-host (default github.com). --signer-identity must be
# an anchored prefix of the builder ID (matched from the start, ending on a '/',
# an '@', or end of string); its scheme://host/owner/repo head folds case, the
# workflow path and git ref after it do not. Nested namespaces work too:
# --owner mygroup/subgroup --repo myproject.
orbit attest verify ./artifact --bundle bundle.json --owner my-org --repo my-repo \
--signer-identity "https://github.com/my-org/my-repo"
# Same, against a self-hosted forge instead of github.com
orbit attest verify ./artifact --bundle bundle.json --source-host git.example.com \
--repo my-org/my-repo
# Verify a pre-computed digest
orbit attestation verify abc123def456... --bundle att.json --digest-algorithm sha256
# Output verification result as JSON
orbit attestation verify ./my-binary --bundle att.json -o json
アテステーションバンドルのダウンロード
GitHub リポジトリから、アーティファクトのダイジェストに対応するアテステーションバンドルを取得します。
# Download attestation bundle by digest
orbit attestation download sha256:abc123... --repo owner/repo
# With explicit digest algorithm
orbit attest download abc123... --repo owner/repo --digest-algorithm sha256
バンドルの確認
SLSA provenance、署名者の ID、ビルダー、ソース、マテリアルなど、アテステーションバンドルの全内容を表示します。
# Inspect a bundle file
orbit attestation inspect attestation.jsonl
# Output as JSON for processing
orbit attest inspect bundle.json -o json
よく使うパターン
リリースバイナリを最初から最後まで検証する:
# Download the attestation bundle
orbit attestation download sha256:abc123... --repo my-org/my-repo
# Verify the binary against the downloaded bundle
orbit attestation verify ./my-binary --bundle attestation.jsonl --owner my-org
# Inspect the bundle for detailed provenance info
orbit attestation inspect attestation.jsonl
スクリプト用に JSON を取得する:
すべてのコマンドで、機械可読な出力用に -o json を使用できます:
orbit attestation verify ./my-binary --bundle att.json -o json | jq '.signer'
アーティファクトの署名者を確認する:
orbit attestation inspect bundle.json -o json | jq '.signer'
署名者の ID を厳密に指定して検証する:
orbit attest verify ./artifact --bundle bundle.json \
--owner my-org \
--repo my-org/my-repo \
--signer-identity "https://github.com/my-org/my-repo/.github/workflows/release.yml"
重要な注意事項
- Sigstore 形式 — アテステーションバンドルは Sigstore バンドル仕様に準拠しています。検証には、SLSA provenance predicate を使用した in-toto アテステーション形式を使用します。
- ダイジェストアルゴリズム — サポートされているアルゴリズムは
sha256(デフォルト)とsha512です。指定するには--digest-algorithmを使用します。 - download 用のプロファイル —
downloadコマンドでは、GitHub リポジトリからバンドルを取得するため、GitHub へのアクセス権を持つプロファイル(-p <profile>)が必要です。--repoフラグも必須です。 - ローカルのみのコマンド —
verifyコマンドとinspectコマンドはローカルファイルで動作し、プロファイルやネットワークアクセスは必要ありません(バンドルを取得する場合を除く)。 - 出力形式 — すべてのコマンドで、スクリプトや CI パイプラインに適した構造化出力用に
-o jsonと-o yamlを使用できます。