Skip to content

security: サプライチェーンハードニング対応(提案・自動生成) - #782

Merged
Futadaruma merged 4 commits into
mainfrom
security/supply-chain-hardening
Nov 12, 2026
Merged

Futadaruma merged 4 commits into
mainfrom
security/supply-chain-hardening

Conversation

@kaitoyama

@kaitoyama kaitoyama commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Important

これは自動生成された「対応提案」PR です。
CI/サプライチェーンのハードニングを進めやすくするために機械的に変更を加えています。
変更内容が正しいか・CI が通るかは必ずメンテナご自身でご確認ください。 誤検出や、このリポジトリの文脈では不要な変更が含まれている可能性があります。不要なものは部分的に revert/close いただいて構いません。

traPtitech org 全体のセキュリティ監査に基づく提案です。

適用した変更

✅ GitHub Actions を commit SHA で固定(26 箇所)

タグ/ブランチ参照は可変で付け替えられ得るため、不変な commit SHA に固定しました(pinact を使用)。# vX コメントを残しているので Dependabot / Renovate は引き続き自動更新できます。

✅ Docker ベースイメージを digest 固定(4 箇所)

信頼できる発行元(Docker 公式 / distroless / ghcr.io/traPtitech 等)の可変タグに @sha256:... を付与しました。

  • golang:1.25.3-alpine(Dockerfile)
  • alpine:3(Dockerfile)
  • mariadb:10.6.4(compose.yaml)
  • adminer:standalone(compose.yaml)

確認のお願い

  • CI が通ることを確認した

参考

  • SHA pinning: pinact / Dependabot(github-actions)・Renovate(helpers:pinGitHubActionDigests)でも自動更新できます
  • Docker Hardened Images

🤖 この PR は traPtitech org セキュリティ監査の一環として自動生成されました。

Summary by CodeRabbit

  • 保守
    • CI・イメージ作成ワークフローで使用する各アクションを、特定のコミットに固定しました。
    • DockerfileおよびCompose設定で使用するコンテナイメージを、SHA-256ダイジェストで固定しました。
    • ビルド、テスト、デプロイで使用するアクションやイメージが明確になり、設定の再現性が高まりました。アプリケーションの機能や処理内容に変更はありません。

@coderabbitai

coderabbitai Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 18 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e1944910-7741-476b-9c5e-1466de1b3fa7
Commits

Reviewing files that changed from the base of the PR and between 90561d2 and 72dbf59.

Files selected for processing: 4

  • .github/workflows/image.yaml
  • .github/workflows/main.yaml
  • Dockerfile
  • compose.yaml

No actionable comments were generated in the recent review.

Walkthrough

CI とイメージワークフローの GitHub Actions 参照をコミット SHA に固定しました。Dockerfile と Compose のコンテナイメージ参照を SHA-256 ダイジェストで固定しました。各ワークフローの処理やビルド設定に変更はありません。

Changes: 外部依存関係のバージョン固定

Layer / File(s) Summary
GitHub Actions の参照固定
.github/workflows/main.yaml, .github/workflows/image.yaml
CI とイメージワークフローの checkout、Go セットアップ、成果物処理、Lint、カバレッジ、イメージビルドなどで使う Action の参照をコミット SHA に変更しました。
コンテナイメージの参照固定
Dockerfile, compose.yaml
Dockerfile のビルド・デプロイ用イメージと、Compose の MariaDB・Adminer イメージを SHA-256 ダイジェスト付きの参照に変更しました。

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: ras0q, h1rono

Merge Risk: Minimal · previous review 90561

This change pins CI actions and container base images to fixed versions, so builds become more reproducible. No functional behavior changes were identified, and the risk of merging is low.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed PR タイトル「security: サプライチェーンハードニング対応(提案・自動生成)」は、変更内容の中心であるサプライチェーン防御の強化を示しています。変更は GitHub Actions 26 件のコミット SHA 固定と、Dockerfile および compose.yaml のベースイメージへの SHA-256 ダイジェスト追加です。タイトルは変更の主要な目的を捉えており、対象範囲も実際の…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

PR タイトル「security: サプライチェーンハードニング対応(提案・自動生成)」は、変更内容の中心であるサプライチェーン防御の強化を示しています。変更は GitHub Actions 26 件のコミット SHA 固定と、Dockerfile および compose.yaml のベースイメージへの SHA-256 ダイジェスト追加です。タイトルは変更の主要な目的を捉えており、対象範囲も実際の変更と一致しています。ただし、「Actions の SHA 固定」や「ダイジェスト固定」といった具体的な内容は含まれていません。

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 15b52220-1732-49e7-9019-0ce9375a5836
Commits

Reviewing files that changed from the base of the PR and between e5a3f39 and 90561d2.

Files selected for processing: 4

  • .github/workflows/image.yaml
  • .github/workflows/main.yaml
  • Dockerfile
  • compose.yaml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@codecov

codecov Bot commented Jun 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.03%. Comparing base (8ee79df) to head (72dbf59).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #782      +/-   ##
==========================================
- Coverage   72.55%   71.03%   -1.53%     
==========================================
  Files          43       43              
  Lines        3881     4623     +742     
==========================================
+ Hits         2816     3284     +468     
- Misses        902     1180     +278     
+ Partials      163      159       -4     
Flag Coverage Δ
integration 72.61% <ø> (+0.05%) ⬆️
unit 71.03% <ø> (-1.53%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Futadaruma
Futadaruma marked this pull request as ready for review November 12, 2026 15:25

@Futadaruma Futadaruma left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

良さそうです
ありがとうございます!

@Futadaruma
Futadaruma merged commit 701704c into main Nov 12, 2026
15 checks passed
@Futadaruma
Futadaruma deleted the security/supply-chain-hardening branch November 12, 2026 16:21
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.

2 participants