security: Actions/Docker/依存の固定(提案・自動生成) - #441
Conversation
- GitHub Actions を commit SHA で固定(49 箇所) - node/caddy イメージを digest 固定 - package.json を lockfile 解決バージョンに固定(npm ci 互換) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Preview (prod) → https://441-prod.portfolio-preview.trapti.tech/ |
Important
これは自動生成された「対応提案」PR です。
CI/サプライチェーンのハードニングを進めやすくするために機械的に変更を加えています。
変更内容が正しいか・CI が通るかは必ずメンテナご自身でご確認ください。 誤検出や、このリポジトリの文脈では不要な変更が含まれている可能性があります。不要なものは部分的に revert/close いただいて構いません。
traPtitech org 全体のセキュリティ監査に基づく提案です。
適用した変更
✅ GitHub Actions を commit SHA で固定(49 箇所)
タグ(
@v6等)は可変で付け替えられ得るため、不変な commit SHA に固定しました。# vXコメントを残しているので Dependabot / Renovate は引き続き自動更新できます。actions/checkout,actions/setup-node,actions/upload-artifact,actions/download-artifact,actions/github-script,docker/*,softprops/action-gh-release,shimataro/ssh-key-action,qodo-ai/pr-agent等✅ Docker ベースイメージを digest 固定(2 箇所)
node:22.12.0-alpine→@sha256:51eff88a...caddy:2.4.6-alpine→@sha256:15e576e7...✅ package.json を厳密バージョンに固定(22 依存)
^レンジを外し、現在のpackage-lock.jsonで解決されているバージョンに固定しました(npm ciはそのまま通ります)。pull_request_target+ cache(自動変更していません)自動監査では
.github/workflows/preview.yamlが「pull_request_targetでキャッシュを使用(cache poisoning リスク)」としてフラグされました。しかし内容を精査したところ、既に適切に緩和されていると判断したため変更していません:genApiジョブのcache: npm… checkout にref:指定がなく**ベースブランチ(信頼されたコード)**を取得しているため、攻撃者 PR がキャッシュを汚染できないbuild-preview-imageのcache-from: ...:buildcache… 読み取り専用(cache-toなし) で、共有キャッシュへの書き込み=汚染経路がない。かつ未信頼コードは Docker 内でビルドしているこの認識が正しいか、念のためご確認ください。
pull_request_target+ cache の緩和状況の認識が正しいことを確認した確認のお願い
npm ciが通ることを確認した参考
pull_request_target+ cache のリスク🤖 この PR は traPtitech org セキュリティ監査の一環として自動生成されました。