RunProof Series

Release Receipt(配布物)Release receipts for distributable artifacts

配布物ファイルの digest に対して、軽量な receipt を発行します。サーバは分岐せず、用途差は tags と説明で表現します。Issue a receipt for an artifact digest. No server-side branching; differences are expressed with tags and docs/UI.

subject の定義

subject は「配布物ファイルそのもの」です。内容評価(正しさ・安全性・適法性等)は扱いません。

プラン上の扱い

Series 3種は全プラン共通で利用できます。ただし Free は Free の利用上限(レート / カウンタ / 運用条件)の範囲で利用します。All three Series templates are available on every plan. Free can use them within Free limits.

最小 tags テンプレ

{
  "receipt_kind": "release",
  "tags": {
    "subject_name": "runproof_release_example.zip",
    "subject_type": "zip",
    "subject_version": "v0.1.2",
    "subject_ref": "git:dfcb7479"
  }
}

subject_digest(sha256など)はクライアント側で計算し、input_hash として送ります。

保証 / 非保証

  • 保証:指定された digest と tags に基づき receipt を生成し、署名し、公開鍵で検証できること。
  • 非保証:配布物の中身の真実性・安全性・法的有効性など。

Audit Pack でも同じ線引きを維持します。

receipt_kind の扱い

receipt_kind は用途テンプレ識別と冪等性安定化のために使いますが、署名・verify ロジックの分岐条件には用いません。Series は同じ receipts / verify 基盤の上に置く Docs/UI レイヤです。

サンプル(PowerShell)

公開配布物では scripts/examples/ を前提にしません。以下の最小例をそのまま PowerShell に貼り、input_hash を作って receipt_kind=release で送ります。

$BaseUrl = "https://runproof.chamia-20260215.workers.dev"
$ApiKey  = "rk_..."
$FilePath = ".\dist\runproof_release_example.zip"
$Version = "v0.1.2"
$SubjectRef = "git:dfcb7479"

$hex = (Get-FileHash -Algorithm SHA256 $FilePath).Hash.ToLower()
$payload = @{
  input_hash   = "sha256:$hex"
  receipt_kind = "release"
  tags = @{
    template        = "release"
    subject_name    = [IO.Path]::GetFileName($FilePath)
    subject_type    = "zip"
    subject_version = $Version
    subject_ref     = $SubjectRef
  }
} | ConvertTo-Json -Depth 6

$headers = @{ Authorization = "Bearer $ApiKey"; "Content-Type" = "application/json" }
Invoke-RestMethod -Method Post -Uri "$BaseUrl/v1/receipts" -Headers $headers -Body $payload