Skip to content

ci: 🤖 品質向上ワークフローを導入 - #94

Merged
genzouw merged 6 commits into
mainfrom
chore/quality-tooling
May 20, 2026
Merged

genzouw merged 6 commits into
mainfrom
chore/quality-tooling

Conversation

@genzouw

@genzouw genzouw commented May 20, 2026

Copy link
Copy Markdown
Owner

概要

toique の品質向上対応を横展開し、本リポジトリにも静的解析・セキュリティスキャン系の GitHub Actions と markdownlint 設定を導入する。

追加ファイル

  • .github/workflows/gitleaks.yml — シークレットスキャン
  • .github/workflows/actionlint.yml — GitHub Actions の構文チェック
  • .github/workflows/codeql.yml — JavaScript/TypeScript の CodeQL 静的解析
  • .github/workflows/markdownlint.yml — Markdown Lint
  • .markdownlint-cli2.jsonc — markdownlint-cli2 設定

スキップしたファイル

  • .github/PULL_REQUEST_TEMPLATE.md — 既存のためスキップ

設計判断

  • リポジトリの言語/構成 (TypeScript) に応じてフィット導入
  • 既存ファイルは上書きせずスキップ

動作確認

  • CI で新規 workflow が想定通り起動するか
  • Gitleaks 初回スキャン結果に対応が必要な指摘がないか
  • CodeQL 初回スキャン結果に対応が必要な指摘がないか
  • markdownlint が既存ドキュメントに対して致命的な指摘を出さないか

Summary by CodeRabbit

  • Chores
    • GitHub Actionsワークフローを追加し、自動コード品質チェック(Markdown、YAML構文、シークレット検出)を実装。
    • 関連する設定ファイルを追加し、品質チェックのルールを構成。

Review Change Stack

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

本プルリクエストは、リポジトリの品質向上を目的として、自動化されたワークフローと静的解析ツールを導入するものです。これにより、セキュリティリスクの早期発見やコード品質の維持、ドキュメントの整合性チェックを自動化し、開発効率と安全性を向上させます。

Highlights

  • 品質向上ワークフローの導入: 静的解析、セキュリティスキャン、およびMarkdownのLintチェックを行うGitHub Actionsを導入しました。
  • Markdown Lint設定の追加: markdownlint-cli2の設定ファイルを追加し、プロジェクトのドキュメント品質を維持するためのルールを定義しました。
Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/actionlint.yml
    • .github/workflows/codeql.yml
    • .github/workflows/gitleaks.yml
    • .github/workflows/markdownlint.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

このPRは、GitHub Actionsワークフロー3種類(actionlint、Gitleaks、markdownlint)と、markdownlintの設定ファイルを新規追加しており、リポジトリのコード品質・セキュリティスキャンの自動化を実装します。

Changes

CI/CDワークフロー整備

Layer / File(s) Summary
actionlintワークフロー
\.github/workflows/actionlint.yml``
GitHub Actionsワークフロー検証ツール・actionlintをワークフロー化。mainブランチへのpush/pull_request、および.github/workflows/**.github/actionlint*配下の変更時に起動。バージョン1.7.7のバイナリをGitHub Releasesからダウンロード、チェックサム検証して展開、-colorオプション付きで実行。actionlint-${{ github.ref }}単位で同時実行を制御。
Gitleaksシークレット検出ワークフロー
\.github/workflows/gitleaks.yml``
シークレット・認証情報検出ツール・Gitleaksをワークフロー化。mainブランチへのpush/pull_request、および毎週月曜05:00 JST定期実行(schedule)で動作。フルクローン後、バージョン8.21.2のバイナリをダウンロード・検証・配置し、--redact--exit-code 1・SARIF出力オプション付きで実行。結果をgithub/codeql-action/upload-sarifでアップロード。gitleaks-${{ github.ref }}単位で同時実行を制御。
markdownlintワークフローと設定
\.github/workflows/markdownlint.yml`、\.markdownlint-cli2.jsonc``
マークダウン記法検証ツール・markdownlint-cli2をワークフロー化。mainブランチへのpush/pull_request**/*.md.markdownlint-cli2.jsonc、ワークフロー自体の変更時に起動。設定ファイルで複数ルール(MD013、MD033、MD025、MD024など)の制約を緩和・パラメータ化。node_modulesdistbuild.claude配下は除外。markdownlint-${{ github.ref }}単位で同時実行を制御し、continue-on-error: trueで失敗を警告に設定。

🎯 2 (Simple) | ⏱️ ~12分

🚥 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 タイトルは品質向上ワークフローの導入という実際の変更内容を反映しており、複数のワークフロー・設定ファイル追加(actionlint、gitleaks、markdownlint等)という主要な変更を適切に要約しています。
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.

✏️ 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 chore/quality-tooling

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

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@gemini-code-assist gemini-code-assist 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.

Code Review

このプルリクエストでは、Markdownファイルの静的解析を行うための .markdownlint-cli2.jsonc 設定ファイルが新規追加されました。レビューでは、存在しないルール ID (MD060) の指定に関する修正提案と、ignores セクションにおける冗長なパス定義を整理して保守性を向上させる改善案が提示されています。

Comment thread .markdownlint-cli2.jsonc Outdated
Comment thread .markdownlint-cli2.jsonc Outdated

@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 @.github/workflows/actionlint.yml:
- Line 27: The checkout step using "uses: actions/checkout@..." must explicitly
disable persisting Git credentials; update the checkout step (the uses:
actions/checkout action) to add the input "persist-credentials: false" under
that step so credentials are not retained, keeping the existing pinned version
and other keys intact.

In @.github/workflows/gitleaks.yml:
- Around line 32-38: Add SHA-256 checksum verification for the downloaded
gitleaks tarball: after setting GITLEAKS_VERSION and downloading
gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz with curl, also download
gitleaks_${GITLEAKS_VERSION}_checksums.txt (or the release checksum file),
verify the tarball using sha256sum -c (or a comparable command) and abort if
verification fails, only then extract with tar and move the gitleaks binary;
reference the GITLEAKS_VERSION variable and the downloaded filenames
(gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz and
gitleaks_${GITLEAKS_VERSION}_checksums.txt) and ensure the script exits non‑zero
on checksum mismatch.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f3aa6bb3-bb9a-4df8-a554-fe4a1e44df1d

📥 Commits

Reviewing files that changed from the base of the PR and between f31af17 and eb42844.

📒 Files selected for processing (5)
  • .github/workflows/actionlint.yml
  • .github/workflows/codeql.yml
  • .github/workflows/gitleaks.yml
  • .github/workflows/markdownlint.yml
  • .markdownlint-cli2.jsonc

Comment thread .github/workflows/actionlint.yml
Comment thread .github/workflows/gitleaks.yml
genzouw added 5 commits May 20, 2026 12:21
actions/checkout ステップに persist-credentials: false を明示し、
Git 認証情報が不要なワークフローで権限最小化の原則を適用。

レビューコメント: #94 (comment)
レビュアー: coderabbitai
優先度: high
ダウンロードした gitleaks tarball を展開・実行する前に
SHA-256 チェックサムによる整合性検証を追加し、
サプライチェーン攻撃リスクを低減。

レビューコメント: #94 (comment)
レビュアー: coderabbitai
優先度: high
MD060 は markdownlint に存在しないルール ID。
意図した「テーブルパイプスタイル」設定は MD055 (Table pipe style) が正しい。

レビューコメント: #94 (comment)
レビュアー: gemini-code-assist
優先度: low
**/node_modules/** は node_modules/** を含むため、
ルート固定の冗長なエントリ (node_modules/**, dist/**, build/**) を削除。

レビューコメント: #94 (comment)
レビュアー: gemini-code-assist
優先度: low
リポジトリの Default Setup (CodeQL 自動スキャン) が既に有効なため、
カスタムの codeql.yml を追加すると
「advanced configurations cannot be processed when the default setup is enabled」
エラーが発生していた。Default Setup によるスキャンは維持されるため機能への影響はない。

@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.

🧹 Nitpick comments (1)
.github/workflows/actionlint.yml (1)

35-35: ⚡ Quick win

actionlint のバージョンを v1.7.12 に更新することを推奨します。

現在の v1.7.7 に対し、最新版 v1.7.12(2026年3月30日リリース)では以下の改善が含まれています:

  • on.scheduletimezone 設定の検証(IANA タイムゾーン文字列チェック)
  • jobs.<job_id>.environment.deployment の新しい設定サポート
  • macos-26-intel ランナーラベルのサポート
  • Go 1.26 への対応
  • その他バグ修正および依存関係の更新

バージョン更新に際しては、以下のチェックサムを使用してください:

8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8  actionlint_1.7.12_linux_amd64.tar.gz
🤖 Prompt for 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.

In @.github/workflows/actionlint.yml at line 35, Update the actionlint
download/version variables: change the VERSION value from "1.7.7" to "1.7.12"
and replace the existing checksum for the released tarball with
"8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 
actionlint_1.7.12_linux_amd64.tar.gz" so the workflow pulls v1.7.12 and verifies
the new artifact; locate and update the VERSION assignment and the checksum
string in the same actionlint job or step that references the actionlint
tarball.
🤖 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.

Nitpick comments:
In @.github/workflows/actionlint.yml:
- Line 35: Update the actionlint download/version variables: change the VERSION
value from "1.7.7" to "1.7.12" and replace the existing checksum for the
released tarball with
"8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 
actionlint_1.7.12_linux_amd64.tar.gz" so the workflow pulls v1.7.12 and verifies
the new artifact; locate and update the VERSION assignment and the checksum
string in the same actionlint job or step that references the actionlint
tarball.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: da0cce7c-3069-458a-8b9b-633491fc89d9

📥 Commits

Reviewing files that changed from the base of the PR and between eb42844 and 58e4f86.

📒 Files selected for processing (3)
  • .github/workflows/actionlint.yml
  • .github/workflows/gitleaks.yml
  • .markdownlint-cli2.jsonc

@genzouw
genzouw merged commit 365fcbd into main May 20, 2026
11 checks passed
@genzouw
genzouw deleted the chore/quality-tooling branch May 20, 2026 03:41
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