Skip to content

chore: phase 2 supply-chain hardening (SBOM + provenance)#169

Merged
sasagar merged 1 commit into
devfrom
chore/issue-168-supply-chain-phase2
May 13, 2026
Merged

chore: phase 2 supply-chain hardening (SBOM + provenance)#169
sasagar merged 1 commit into
devfrom
chore/issue-168-supply-chain-phase2

Conversation

@sasagar
Copy link
Copy Markdown
Collaborator

@sasagar sasagar commented May 13, 2026

Closes #168

Summary

Phase 1(#164)の続編。リリース成果物の 透明性検証可能性 を高める。

  • SBOM (SPDX-JSON) をリリース時に自動生成して GitHub Release に添付
  • Build provenance attestation を Sigstore (GitHub OIDC) で付与 → 利用者が `gh attestation verify` で出自を検証可能
  • 副次: `.playwright-mcp/` を gitignore に追加(テスト成果物の混入防止)

Changes

.github/workflows/auto-tag.yml & release.yml

両ワークフローの `create-release` job に以下を追加:

  1. SBOM 生成 (`anchore/sbom-action` @ v0.24.0, SHA pinned)

    • リポジトリ全体を Syft でスキャン
    • SPDX-JSON 形式で `rox-.spdx.json` を出力
  2. Provenance attestation (`actions/attest-build-provenance` @ v4.1.0, SHA pinned)

    • Sigstore 経由(GitHub OIDC、keyless 署名)
    • SBOM ファイルを subject として attestation 作成
    • GitHub の Attestations タブに記録
  3. Release attach

    • `softprops/action-gh-release` の `files:` に SBOM を追加

Permissions opt-in(最小権限維持)

`create-release` job のみに以下を付与:

  • `id-token: write` (Sigstore OIDC 用)
  • `attestations: write` (GitHub attestation API 用)

他の job はデフォルトの `contents: read` のまま。

.gitignore

  • `.playwright-mcp/` を追加(Playwright MCP のスナップショット・スクリーンショット)

Verification by users

リリース後、利用者は以下で出自を検証可能:

```bash

SBOM ダウンロード後

gh attestation verify rox-2026.5.0.spdx.json --repo Love-Rox/rox
```

成功すれば「この SBOM は Love-Rox/rox の から作られた」ことを暗号学的に証明できる。

Test plan

  • CI が緑になる(変更は workflow YAML のみで、テスト実行に影響しない)
  • 次のリリース時(タグ push or 手動 release)に SBOM が生成され Release に添付されることを確認
  • Attestation が GitHub の Actions > Attestations に表示されることを確認
  • `gh attestation verify` で検証成功

Out of scope

  • 過去リリースへの遡及 SBOM 生成 → 不要
  • Docker image push to GHCR + cosign → 利用者がレジストリ pull する運用が無いため

Adds SBOM generation and build provenance attestation to release
workflows. Users can now audit dependency trees and verify that
release artifacts originate from this repository at a specific commit.

Workflows:
- auto-tag.yml, release.yml: generate SPDX-JSON SBOM via Syft
  (anchore/sbom-action), attest provenance via Sigstore
  (actions/attest-build-provenance), attach SBOM to GitHub Release
- Permissions: opt-in id-token: write, attestations: write per job

Pinned to SHA:
- anchore/sbom-action@e22c389 (v0.24.0)
- actions/attest-build-provenance@a2bbfa2 (v4.1.0)

Side fix:
- .gitignore: add .playwright-mcp/ to prevent Playwright MCP
  snapshot/screenshot artifacts from being tracked
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Warning

Rate limit exceeded

@sasagar has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 17 minutes and 16 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b571957e-951a-4615-bb8b-276e8262e17b

📥 Commits

Reviewing files that changed from the base of the PR and between 76dbd44 and 689fcb8.

📒 Files selected for processing (3)
  • .github/workflows/auto-tag.yml
  • .github/workflows/release.yml
  • .gitignore
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/issue-168-supply-chain-phase2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sasagar sasagar merged commit 4b9c89e into dev May 13, 2026
11 checks passed
@sasagar sasagar deleted the chore/issue-168-supply-chain-phase2 branch May 13, 2026 17:37
This was referenced May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant