Skip to content
This repository was archived by the owner on Aug 2, 2026. It is now read-only.

chore: pre-commit 配布の廃止・oss profile 削除・cron を sca 限定化(RFS-002) - #22

Merged
kukv merged 2 commits into
mainfrom
chore/rfs-002-distribution-cleanup
Jul 25, 2026
Merged

chore: pre-commit 配布の廃止・oss profile 削除・cron を sca 限定化(RFS-002)#22
kukv merged 2 commits into
mainfrom
chore/rfs-002-distribution-cleanup

Conversation

@kukv

@kukv kukv commented Jul 25, 2026

Copy link
Copy Markdown
Member

概要

RFS-002(配布ファイル/プロファイルの見直し)の実装。

変更内容

pre-commit 配布の廃止

  • .pre-commit-config.yaml / .config/mise/conf.d/pre-commit.toml / mise-precommit-hook.toml.liquid を catalog・base profile から削除
  • 根拠: hooks は gitleaks + forbid-bidi-controls の 2 つのみで、CI の secrets / hidden-unicode job と完全重複。防止(push 前ブロック)の役割は GitHub secret scanning push protection(fanout 適用 8 リポは全て public のため無料。br-cluster では有効済み)が担う。ローカル環境依存(mise 非利用者・Windows)の検証コストも解消
  • 追従不要になった pre-commit rev の customManager も削除

oss profile の削除

  • profiles/oss/ と contributing / security / code-of-conduct / license テンプレート 4 つを削除(利用は mindstock 1 リポのみだった)
  • mindstock に配布済みの実ファイルは残置(fanout は記録照合型削除に未対応。LICENSE は public リポから消すべきでもない)

週次 cron を sca のみに限定

  • security.yml の非 sca 4 job(hidden-unicode / secrets / workflow-audit / policy)に if: github.event_name != 'schedule' を追加
  • cron の根拠「脆弱性 DB は後から更新される」が当てはまるのは sca だけ。コード変更時は従来どおり PR/push で全 job 実行。週次 Actions 使用量が 1/5 に

python profile の renovate 寄与

  • renovate-config:python preset の extends を追加(preset 本体は bright-room/renovate-config 側で追加予定。そちらの merge を先行させること)

customManager マッチ検証 CI

  • scripts/check-renovate-pins.mjs を追加し validate.yml に step 追加
  • renovate.json の 7 customManager regex を実ファイルに適用し、期待マッチ数(計 25 箇所)を下回ったら fail。テンプレ改変で regex が切れて更新が黙って止まる問題を PR 時点で検知

検証

  • fanout engine validate → validation OK
  • renovate-config-validator renovate.json → validated successfully
  • check-renovate-pins.mjs → 正常系 25 箇所 ok / gitleaks 行を故意に改変して exit 1(NG 検知)を確認

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 改善

    • 定期的なセキュリティチェックでは、脆弱性スキャンを優先して実行するようになりました。
    • 依存関係の自動更新設定が正しく維持されているか、検証できるようになりました。
    • Python向けプロファイルの依存関係更新設定を追加しました。
  • 変更

    • 貢献ガイド、セキュリティポリシー、行動規範、ライセンスなどの生成テンプレートを整理・削除しました。
    • pre-commit関連の生成設定を廃止しました。

- pre-commit 配布(.pre-commit-config.yaml / .config/mise/conf.d/pre-commit.toml /
  mise-precommit-hook.toml.liquid)を廃止。hooks は gitleaks + forbid-bidi-controls の
  2 つで CI の secrets / hidden-unicode job と完全重複しており、防止の役割は
  GitHub push protection(全 fanout リポ public で無料)が担う。ローカル環境
  (mise 非利用・Windows)依存の検証コストも解消
- oss profile と関連テンプレ 4 つを削除(利用 mindstock 1 リポのみ。配布済み
  実ファイルは fanout の削除未対応のため mindstock 側に残置)
- security.yml の週次 cron を sca job のみに限定(他 4 job は schedule 時スキップ)。
  cron の根拠(脆弱性 DB の事後更新)が当てはまるのは sca のみ
- python profile に renovate.json 寄与を追加(renovate-config:python preset 前提)
- scripts/check-renovate-pins.mjs + validate.yml step を追加。customManager の
  regex が切れてピン追従が黙って止まる問題を CI で検知(25 箇所を検証)
- pre-commit rev 追従の customManager を削除(対象ファイル廃止のため)

検証: fanout engine validate OK / renovate-config-validator OK /
check-renovate-pins 正常系 25 箇所 ok・故意破壊で exit 1 を確認

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kukv
kukv requested a review from a team as a code owner July 25, 2026 19:33
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kukv, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 47 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d826b330-8383-458f-91e6-8c458d46a7c3

📥 Commits

Reviewing files that changed from the base of the PR and between 9c63f35 and adae7f3.

📒 Files selected for processing (2)
  • README.md
  • scripts/check-renovate-pins.mjs
📝 Walkthrough

Walkthrough

OSS文書とpre-commit関連テンプレートを削除し、PythonプロファイルとRenovate設定を更新しました。Renovateピン検証スクリプトを追加してvalidateワークフローから実行し、定期セキュリティ実行時はSCA以外のジョブをスキップします。

Changes

テンプレートとプロファイルの整理

Layer / File(s) Summary
カタログとプロファイル定義の削除
catalog.json, profiles/base/contributes.json, profiles/oss/contributes.json, profiles/python/contributes.json
OSS文書とpre-commit関連ファイルの宣言を削除し、PythonプロファイルにRenovate設定の拡張を追加しました。
文書とpre-commitテンプレートの削除
templates/code-of-conduct.liquid, templates/contributing.liquid, templates/license.liquid, templates/security.liquid, templates/mise-precommit-hook.toml.liquid
Contributor Covenant、Contributing、MIT License、Security Policy、mise pre-commit hookのテンプレートを削除しました。

Renovate設定とピン検証

Layer / File(s) Summary
Renovate custom manager検証の追加
renovate.json, scripts/check-renovate-pins.mjs, .github/workflows/validate.yml
pre-commit用custom managerを削除し、custom managerのマッチ数と構成差分を検証するスクリプトをvalidateワークフローに追加しました。

定期セキュリティワークフロー

Layer / File(s) Summary
定期実行時のジョブ制御
templates/security-workflow.liquid
scheduleイベント時にhidden-unicode、secrets、workflow-audit、policyジョブをスキップする条件を追加しました。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant ValidateWorkflow
  participant CheckRenovatePins
  participant RenovateConfig
  participant RepositoryFiles
  ValidateWorkflow->>CheckRenovatePins: スクリプトを実行
  CheckRenovatePins->>RenovateConfig: customManagersを読み込む
  CheckRenovatePins->>RepositoryFiles: git ls-filesで対象ファイルを取得
  CheckRenovatePins-->>ValidateWorkflow: 検証結果と終了コードを返す
Loading

Poem

ぴょんと跳ねて、テンプレート整理、
Renovateの針を数えるうさぎ。
定期便ではSCAだけ、
検証の道をきれいに整え、
月明かりの下でにんじんを祝う。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 主要な変更点である pre-commit 配布廃止、oss profile 削除、cron の SCA 限定化を具体的に示しており、変更内容と整合しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/rfs-002-distribution-cleanup

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@profiles/base/contributes.json`:
- Line 2: README.md の該当する pre-commit 配布方針の記述を更新し、RFS-002
により新規配布を廃止した現状と整合させてください。既存配布先への移行・互換性説明として残す場合は、その対象と位置付けが明確になるよう記載し、単に現在も配布するよう読める説明は削除してください。

In `@scripts/check-renovate-pins.mjs`:
- Around line 34-46: Update the validation loop around targets and
manager.matchStrings to verify expected matches per file (or individual pin),
rather than only comparing the aggregate count across all files. Ensure a
missing match in one template cannot be offset by extra matches elsewhere, while
preserving the existing EXPECTED lookup and failure reporting behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: da5db759-7dd2-42e4-8d8a-bab09bebef3e

📥 Commits

Reviewing files that changed from the base of the PR and between a392957 and 9c63f35.

📒 Files selected for processing (13)
  • .github/workflows/validate.yml
  • catalog.json
  • profiles/base/contributes.json
  • profiles/oss/contributes.json
  • profiles/python/contributes.json
  • renovate.json
  • scripts/check-renovate-pins.mjs
  • templates/code-of-conduct.liquid
  • templates/contributing.liquid
  • templates/license.liquid
  • templates/mise-precommit-hook.toml.liquid
  • templates/security-workflow.liquid
  • templates/security.liquid
💤 Files with no reviewable changes (8)
  • templates/contributing.liquid
  • profiles/oss/contributes.json
  • templates/code-of-conduct.liquid
  • templates/mise-precommit-hook.toml.liquid
  • templates/security.liquid
  • templates/license.liquid
  • renovate.json
  • catalog.json

Comment thread profiles/base/contributes.json
Comment thread scripts/check-renovate-pins.mjs Outdated
CodeRabbit レビュー対応(#22):
- 合計値比較では、あるテンプレートの regex 切れが別テンプレートのピン追加で
  相殺されて素通りする(EXPECTED が最小値のため追加の度に検知余裕も溜まる)。
  ファイル単位の完全一致に変更し、相殺シナリオ(gitleaks 破壊 + jvm へ digest
  追加)で NG 2 件 / exit 1 になることを確認
- README の pre-commit 配布前提の記述 2 箇所(repo local 運用ルール・triage の
  対象ファイル)を配布廃止後の現状に同期

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kukv
kukv merged commit 23ed005 into main Jul 25, 2026
7 checks passed
@kukv
kukv deleted the chore/rfs-002-distribution-cleanup branch July 25, 2026 19:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant