Skip to content

fix: dependabot-auto-merge を非 Dependabot PR でも Pass で終了するように修正 - #600

Merged
keito4 merged 3 commits into
mainfrom
fix/dependabot-auto-merge-skip-pass
Mar 21, 2026
Merged

fix: dependabot-auto-merge を非 Dependabot PR でも Pass で終了するように修正#600
keito4 merged 3 commits into
mainfrom
fix/dependabot-auto-merge-skip-pass

Conversation

@keito4

@keito4 keito4 commented Mar 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • ジョブレベルの if: github.actor == 'dependabot[bot]' を削除し、ステップレベルのガードに変更
  • 非 Dependabot PR ではスキップメッセージを出力して Pass で終了するように修正
  • Required Status Check としてブロックしなくなる

Changes

変更点 内容
ジョブ条件の削除 if をジョブレベルからステップレベルに移動
スキップステップ追加 非 Dependabot PR でメッセージ出力して正常終了
ステップガード追加 各ステップに github.actor == 'dependabot[bot]' 条件を追加

Test plan

  • Dependabot PR でワークフローが正常動作すること(patch/minor/major)
  • 非 Dependabot PR でジョブが Pass で終了すること

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Refined dependency-update automation to perform actor checks per step, tightening auto-merge behavior.
    • Updated development container environment: added an environment variable to modify container runtime behavior for developer tooling.
  • Security
    • Added a vulnerability ignore entry for CVE-2026-33186 to the scanner configuration, documenting affected versions and remediation guidance.

ジョブレベルの `if` 条件を削除し、ステップレベルのガードに変更。
非 Dependabot PR ではステップがスキップされるだけでジョブは Pass となり、
Required Status Check としてブロックしなくなる。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Mar 20, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 047674cb-95c6-4ff3-9fe0-2299d8c15555

📥 Commits

Reviewing files that changed from the base of the PR and between 9975353 and 5c9139f.

📒 Files selected for processing (1)
  • .trivyignore
✅ Files skipped from review due to trivial changes (1)
  • .trivyignore

📝 Walkthrough

Walkthrough

Dependabot auto-merge workflow actor gating moved from a job-level if to step-level checks (early skip step + explicit dependabot[bot] conditions). Devcontainer configs now set CLAUDE_CODE_DISABLE_1M_CONTEXT="1". .trivyignore gains an entry for CVE-2026-33186 affecting google.golang.org/grpc.

Changes

Cohort / File(s) Summary
Dependabot Workflow
.github/workflows/dependabot-auto-merge.yml
Removed job-level if: github.actor == 'dependabot[bot]'; added an early step that exits when github.actor != 'dependabot[bot]' and added if: github.actor == 'dependabot[bot]' to subsequent steps (Dependabot metadata fetch and semver-patch/minor/major handlers).
DevContainer env
.devcontainer/devcontainer.json, .devcontainer/codespaces/devcontainer.json
Added CLAUDE_CODE_DISABLE_1M_CONTEXT = "1" to containerEnv alongside existing CLAUDE_ENV_FILE.
Trivy ignore
.trivyignore
Added ignore entry for CVE-2026-33186 (google.golang.org/grpc v1.79.2 / v1.75.1; fixed in v1.79.3) with contextual notes about prebuilt CLI binaries.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

bug, size/S

Poem

🐰 I nudged a step, then gave a hop,
Actors checked before they stop,
Env var tucked beneath my paw,
A CVE note — I saw it, caw! 🐇

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change: modifying dependabot-auto-merge workflow to exit with Pass status for non-Dependabot PRs instead of skipping the job.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dependabot-auto-merge-skip-pass

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.

@keito4

keito4 commented Mar 20, 2026

Copy link
Copy Markdown
Owner Author

🔍 AI Code Review (Local Hook)

Models: Codex (default) / Gemini (default)

🤖 Codex Review

重大な問題は見当たりませんでした。

判定: patch is correct
理由: Dependabot 以外の実行で自動マージ/承認/ラベル付与の各ステップが確実にスキップされるようになっており、意図しない動作や権限不足エラーの発生リスクは増えていません。
信頼度: 0.62


🤖 Generated by post_pr_ai_review.py hook

@keito4 keito4 self-assigned this Mar 20, 2026
@keito4

keito4 commented Mar 20, 2026

Copy link
Copy Markdown
Owner Author

🔍 AI Code Review (Local Hook)

Models: Codex (default) / Gemini (default)

🤖 Codex Review

指摘事項はありません。

総合判定
patch is correct(Dependabot 以外の PR でジョブ全体が失敗せずにパスするようにしつつ、依然として各処理が Dependabot のみに限定されているため、機能要件と安全性に問題は見当たりません。)
信頼度: 0.63


🤖 Generated by post_pr_ai_review.py hook

ローカル・Codespaces 両方の devcontainer.json の containerEnv に
CLAUDE_CODE_DISABLE_1M_CONTEXT=1 を設定。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

PR review

変更内容を確認しました。ジョブレベルの if 条件を削除することで Required Status Check として非 Dependabot PR をブロックしない修正は正しい方向性です。

良い点

  • 意図が明確: 変更が小さく、目的(Required Status Check での Pass 保証)がPR説明と差分から即座に把握できる
  • KISS 原則に準拠: 最小限の変更でゴールを達成している
  • セキュリティ維持: pull_request_target ワークフローにおいて github.actor チェックが各ステップに明示されており、権限昇格リスクへの対処が維持されている

指摘事項

軽微 — ステップ命名のミスマッチ

Skip non-Dependabot PRs ステップはメッセージを出力するだけです。後続ステップのスキップは各ステップの if 条件が担っており、「このステップがスキップを行う」と誤読される可能性があります。

提案(任意): Log — not a Dependabot PR, subsequent steps will be skipped

機能に影響はないためブロッカーではありません。

既存課題 — dependabot/fetch-metadata@v2 のバージョン固定

このPRの変更対象ではありませんが、@v2 をコミット SHA にピン留めするとサプライチェーンリスクを低減できます。

セキュリティ観点

pull_request_target はベースブランチのコンテキストでシークレットにアクセスできるため、github.actor チェックの維持は必須です。今回の変更でそのガードが各ステップに正しく移植されており問題ありません。

総合評価

承認可能。変更は正確で最小限、意図も明確です。

Reviewed with Claude Code

@keito4

keito4 commented Mar 21, 2026

Copy link
Copy Markdown
Owner Author

(aside)
@claude PRがbaseにマージする際にCIが落ちています。
修正してください。

@claude

claude Bot commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

Claude finished @keito4's task in 4m 43s —— View job


CI修正完了

タスク

  • CIの失敗内容を確認
  • 原因を特定
  • .trivyignore に CVE を追記して修正
  • 修正をプッシュ

原因と修正内容

Container Security ScanTrivy Container Scan ジョブが、新たな CRITICAL 脆弱性 CVE-2026-33186 を検出して失敗していました。

対象 ライブラリ 現バージョン 修正バージョン
usr/bin/gh (GitHub CLI) google.golang.org/grpc v1.79.2 v1.79.3
usr/local/bin/op (1Password CLI) google.golang.org/grpc v1.75.1 v1.79.3

いずれもプリビルドバイナリ内の依存関係であり、直接アップグレードは不可能です。ghop が grpc >= v1.79.3 を含む新バージョンをリリースするまで upstream 待ちとなります。

対応: .trivyignoreCVE-2026-33186 を追記し、既存エントリと同様のフォーマットで理由・追跡先・レビュー日を明記しました。

コミット 5c9139f をプッシュ済みです。

gh および op バイナリの google.golang.org/grpc に CRITICAL 脆弱性
(CVE-2026-33186) が検出されたため .trivyignore に追記。
いずれもプリビルドバイナリ内の依存関係であり upstream のリリースを待つ必要がある。

Co-authored-by: keito4 <keito4@users.noreply.github.com>
@keito4
keito4 merged commit 4cdbb3f into main Mar 21, 2026
2 checks passed
@keito4
keito4 deleted the fix/dependabot-auto-merge-skip-pass branch March 21, 2026 00:22
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.99.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released リリース済み

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant