reviewdog
reviewdogは、CI/CDパイプラインで複数のセキュリティ・品質ツール(SAST、リンターなど)の結果を統合し、プルリクエストに統一されたコードレビューコメントとして表示することで、セキュアな開発を支援するSkill。
📜 元の英語説明(参考)
Automated code review and security linting integration for CI/CD pipelines using reviewdog. Aggregates findings from multiple security and quality tools (SAST, linters, formatters) into unified code review comments on pull requests. Use when: (1) Integrating security scanning into code review workflows, (2) Automating security feedback on pull requests, (3) Consolidating multiple tool outputs into actionable review comments, (4) Enforcing secure coding standards in CI/CD pipelines, (5) Providing inline security annotations during development.
🇯🇵 日本人クリエイター向け解説
reviewdogは、CI/CDパイプラインで複数のセキュリティ・品質ツール(SAST、リンターなど)の結果を統合し、プルリクエストに統一されたコードレビューコメントとして表示することで、セキュアな開発を支援するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o reviewdog.zip https://jpskill.com/download/17036.zip && unzip -o reviewdog.zip && rm reviewdog.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17036.zip -OutFile "$d\reviewdog.zip"; Expand-Archive "$d\reviewdog.zip" -DestinationPath $d -Force; ri "$d\reviewdog.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
reviewdog.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
reviewdogフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 7
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Reviewdog - 自動化されたセキュリティコードレビュー
概要
Reviewdog は、セキュリティスキャンとリンティングの結果をプルリクエストのレビューコメントに統合する自動化されたコードレビューツールです。これは、さまざまなセキュリティツール(SAST スキャナ、リンター、フォーマッタ)とコードホスティングプラットフォーム(GitHub、GitLab、Bitbucket)間の汎用アダプタとして機能し、コードレビュー中にシームレスなセキュリティフィードバックを可能にします。
主な機能:
- 複数のセキュリティおよび品質ツールからの検出結果を集約します
- 特定のコード行にインラインレビューコメントを投稿します
- 40 以上のリンターとセキュリティスキャナをすぐにサポートします
- GitHub Actions、GitLab CI、CircleCI、およびその他の CI プラットフォームと統合します
- 検出結果をフィルタリングして、diff の新しい問題のみを表示します(
fail-on-diffモード) - カスタムルールセットとセキュリティポリシーをサポートします
クイックスタート
セキュリティスキャナを使用した基本的な reviewdog の使用法:
# reviewdog をインストール
go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest
# セキュリティスキャナを実行し、reviewdog にパイプ
bandit -r . -f json | reviewdog -f=bandit -reporter=github-pr-review
# または Semgrep と一緒に使用
semgrep --config=auto --json | reviewdog -f=semgrep -reporter=local
GitHub Actions の統合:
- name: Run reviewdog
uses: reviewdog/action-setup@v1
- name: Security scan with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bandit -r . -f json | reviewdog -f=bandit -reporter=github-pr-review
コアワークフロー
ステップ 1: reviewdog をインストール
CI 環境またはローカルに reviewdog をインストールします。
# Go 経由
go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest
# Homebrew 経由 (macOS/Linux)
brew install reviewdog
# Docker 経由
docker pull reviewdog/reviewdog:latest
ステップ 2: セキュリティツールを設定
統合するセキュリティスキャナを設定します。Reviewdog は複数の入力形式をサポートしています。
サポートされているセキュリティツール:
- SAST: Semgrep, Bandit, ESLint Security, Brakeman
- シークレット検出: Gitleaks, TruffleHog, detect-secrets
- IaC セキュリティ: Checkov, tfsec, terrascan
- コンテナセキュリティ: Hadolint, Trivy, Dockle
- 一般的なリンター: ShellCheck, yamllint, markdownlint
ステップ 3: CI/CD パイプラインに統合
reviewdog を CI パイプラインに追加して、セキュリティの検出結果をレビューコメントとして自動的に投稿します。
GitHub Actions の例:
name: Security Review
on: [pull_request]
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup reviewdog
uses: reviewdog/action-setup@v1
- name: Run Bandit SAST
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install bandit
bandit -r . -f json | \
reviewdog -f=bandit \
-name="Bandit SAST" \
-reporter=github-pr-review \
-filter-mode=added \
-fail-on-error
GitLab CI の例:
security_review:
stage: test
script:
- pip install bandit reviewdog
- bandit -r . -f json |
reviewdog -f=bandit
-reporter=gitlab-mr-discussion
-filter-mode=diff_context
only:
- merge_requests
ステップ 4: レビューの動作を設定
フラグを使用して reviewdog の動作をカスタマイズします。
# 変更された行の問題のみを表示するようにフィルタリング
reviewdog -filter-mode=diff_context
# 追加された行の問題のみを表示するようにフィルタリング
reviewdog -filter-mode=added
# 検出結果が存在する場合にビルドを失敗させる
reviewdog -fail-on-error
# 重大度しきい値を設定
reviewdog -level=warning
ステップ 5: セキュリティの検出結果を確認
Reviewdog は、プルリクエストにインラインコメントとして検出結果を投稿します。
- インラインアノテーション: セキュリティの問題は、影響を受けるコード行に直接表示されます
- 重大度インジケータ: Critical、High、Medium、Low の重大度レベル
- 修復ガイダンス: 利用可能な場合は、CWE/OWASP への参照リンク
- Diff を認識したフィルタリング: PR で導入された新しい問題のみを表示します
セキュリティに関する考慮事項
-
API トークンのセキュリティ: GitHub/GitLab トークンをシークレット管理(GitHub Secrets、GitLab CI/CD 変数)に保存します
- トークンをバージョン管理にコミットしないでください
- 最小限必要な権限(プルリクエストに対する読み取り/書き込み)を使用します
- トークンを定期的にローテーションします
-
アクセス制御:
- 信頼できるブランチでのみ reviewdog が実行されるように設定します
- CODEOWNERS を使用して、reviewdog の構成変更にセキュリティチームの承認を要求します
.reviewdog.yml構成を変更できるユーザーを制限します
-
監査ログ:
- すべてのセキュリティの検出結果を SIEM またはセキュリティ監視プラットフォームに記録します
- 検出結果がいつ導入され、解決されたかを追跡します
- バイパスされたセキュリティチェックを監視します
-
コンプライアンス:
- セキュリティレビューの監査証跡を維持します (SOC2, ISO27001)
- コードレビューでセキュリティポリシーのコンプライアンスを強制します
- CI/CD アーティファクトを介したコンプライアンスレポートをサポートします
-
安全なデフォルト:
fail-on-errorを使用して、セキュリティの検出結果がある PR をブロックしますfilter-mode=addedを有効にして、新しい脆弱性をキャッチします- リスク許容度に応じて重大度のしきい値を構成します
バンドルされたリソース
スクリプト (scripts/)
setup_reviewdog.py- 自動化された reviewdog のインストールと CI 構成ジェネレータrun_security_suite.sh- reviewdog を介して複数のセキュリティスキャナを実行します
参考文献 (references/)
supported_tools.md- 構成例を含む、サポートされているセキュリティツールの完全なリストreporter_formats.md- 利用可能な出力形式とレポーター構成cwe_mapping.md- 一般的なツールの検出結果から CWE カテゴリへのマッピング
アセット (assets/)
github_actions_template.yml- 複数ツールセキュリティスキャン用の GitHub Actions ワークフローgitlab_ci_template.yml- reviewdog 統合用の GitLab CI 構成.reviewdog.yml- reviewdog 構成ファイルのサンプルpre_commit_config.yaml- Pre-commit フックの統合
一般的なパターン
パターン 1: 複数ツールのセキュリティスイート
複数ツールを実行
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Reviewdog - Automated Security Code Review
Overview
Reviewdog is an automated code review tool that integrates security scanning and linting results into pull request review comments. It acts as a universal adapter between various security tools (SAST scanners, linters, formatters) and code hosting platforms (GitHub, GitLab, Bitbucket), enabling seamless security feedback during code review.
Key Capabilities:
- Aggregates findings from multiple security and quality tools
- Posts inline review comments on specific code lines
- Supports 40+ linters and security scanners out-of-the-box
- Integrates with GitHub Actions, GitLab CI, CircleCI, and other CI platforms
- Filters findings to show only new issues in diff (fail-on-diff mode)
- Supports custom rulesets and security policies
Quick Start
Basic reviewdog usage with a security scanner:
# Install reviewdog
go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest
# Run a security scanner and pipe to reviewdog
bandit -r . -f json | reviewdog -f=bandit -reporter=github-pr-review
# Or use with Semgrep
semgrep --config=auto --json | reviewdog -f=semgrep -reporter=local
GitHub Actions integration:
- name: Run reviewdog
uses: reviewdog/action-setup@v1
- name: Security scan with reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bandit -r . -f json | reviewdog -f=bandit -reporter=github-pr-review
Core Workflow
Step 1: Install reviewdog
Install reviewdog in your CI environment or locally:
# Via Go
go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest
# Via Homebrew (macOS/Linux)
brew install reviewdog
# Via Docker
docker pull reviewdog/reviewdog:latest
Step 2: Configure Security Tools
Set up the security scanners you want to integrate. Reviewdog supports multiple input formats:
Supported Security Tools:
- SAST: Semgrep, Bandit, ESLint Security, Brakeman
- Secret Detection: Gitleaks, TruffleHog, detect-secrets
- IaC Security: Checkov, tfsec, terrascan
- Container Security: Hadolint, Trivy, Dockle
- General Linters: ShellCheck, yamllint, markdownlint
Step 3: Integrate into CI/CD Pipeline
Add reviewdog to your CI pipeline to automatically post security findings as review comments:
GitHub Actions Example:
name: Security Review
on: [pull_request]
jobs:
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup reviewdog
uses: reviewdog/action-setup@v1
- name: Run Bandit SAST
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install bandit
bandit -r . -f json | \
reviewdog -f=bandit \
-name="Bandit SAST" \
-reporter=github-pr-review \
-filter-mode=added \
-fail-on-error
GitLab CI Example:
security_review:
stage: test
script:
- pip install bandit reviewdog
- bandit -r . -f json |
reviewdog -f=bandit
-reporter=gitlab-mr-discussion
-filter-mode=diff_context
only:
- merge_requests
Step 4: Configure Review Behavior
Customize reviewdog's behavior using flags:
# Filter to show only issues in changed lines
reviewdog -filter-mode=diff_context
# Filter to show only issues in added lines
reviewdog -filter-mode=added
# Fail the build if findings are present
reviewdog -fail-on-error
# Set severity threshold
reviewdog -level=warning
Step 5: Review Security Findings
Reviewdog posts findings as inline comments on the pull request:
- Inline annotations: Security issues appear directly on affected code lines
- Severity indicators: Critical, High, Medium, Low severity levels
- Remediation guidance: Links to CWE/OWASP references when available
- Diff-aware filtering: Only shows new issues introduced in the PR
Security Considerations
-
API Token Security: Store GitHub/GitLab tokens in secrets management (GitHub Secrets, GitLab CI/CD variables)
- Never commit tokens to version control
- Use minimum required permissions (read/write on pull requests)
- Rotate tokens regularly
-
Access Control:
- Configure reviewdog to run only on trusted branches
- Use CODEOWNERS to require security team approval for reviewdog config changes
- Restrict who can modify
.reviewdog.ymlconfiguration
-
Audit Logging:
- Log all security findings to SIEM or security monitoring platform
- Track when findings are introduced and resolved
- Monitor for bypassed security checks
-
Compliance:
- Maintains audit trail of security reviews (SOC2, ISO27001)
- Enforces security policy compliance in code review
- Supports compliance reporting through CI/CD artifacts
-
Safe Defaults:
- Use
fail-on-errorto block PRs with security findings - Enable
filter-mode=addedto catch new vulnerabilities - Configure severity thresholds appropriate to your risk tolerance
- Use
Bundled Resources
Scripts (scripts/)
setup_reviewdog.py- Automated reviewdog installation and CI configuration generatorrun_security_suite.sh- Runs multiple security scanners through reviewdog
References (references/)
supported_tools.md- Complete list of supported security tools with configuration examplesreporter_formats.md- Available output formats and reporter configurationscwe_mapping.md- Mapping of common tool findings to CWE categories
Assets (assets/)
github_actions_template.yml- GitHub Actions workflow for multi-tool security scanninggitlab_ci_template.yml- GitLab CI configuration for reviewdog integration.reviewdog.yml- Sample reviewdog configuration filepre_commit_config.yaml- Pre-commit hook integration
Common Patterns
Pattern 1: Multi-Tool Security Suite
Run multiple security tools and aggregate results in a single review:
#!/bin/bash
# Run comprehensive security scan
# Python security
bandit -r . -f json | reviewdog -f=bandit -name="Python SAST" -reporter=github-pr-review &
# Secrets detection
gitleaks detect --report-format json | reviewdog -f=gitleaks -name="Secret Scan" -reporter=github-pr-review &
# IaC security
checkov -d . -o json | reviewdog -f=checkov -name="IaC Security" -reporter=github-pr-review &
wait
Pattern 2: Severity-Based Gating
Block PRs based on severity thresholds:
- name: Critical findings - Block PR
run: |
semgrep --config=p/security-audit --severity=ERROR --json | \
reviewdog -f=semgrep -level=error -fail-on-error -reporter=github-pr-review
- name: Medium findings - Comment only
run: |
semgrep --config=p/security-audit --severity=WARNING --json | \
reviewdog -f=semgrep -level=warning -reporter=github-pr-review
Pattern 3: Differential Security Scanning
Only flag new security issues introduced in the current PR:
# Only show findings in newly added code
reviewdog -filter-mode=added -fail-on-error
# Show findings in modified context (added + surrounding lines)
reviewdog -filter-mode=diff_context
Pattern 4: Custom Security Rules
Integrate custom security policies using grep or custom parsers:
# Check for prohibited patterns
grep -nH -R "eval(" . --include="*.py" | \
reviewdog -f=grep -name="Dangerous Functions" -reporter=github-pr-review
# Custom JSON parser
./custom_security_scanner.py --json | \
reviewdog -f=rdjson -name="Custom Policy" -reporter=github-pr-review
Integration Points
-
CI/CD Platforms:
- GitHub Actions (native action available)
- GitLab CI/CD
- CircleCI
- Jenkins
- Azure Pipelines
- Bitbucket Pipelines
-
Security Tools:
- SAST: Semgrep, Bandit, ESLint, Brakeman, CodeQL
- Secrets: Gitleaks, TruffleHog, detect-secrets
- IaC: Checkov, tfsec, terrascan, kics
- Containers: Hadolint, Trivy, Dockle
-
Code Hosting:
- GitHub (PR comments, check runs, annotations)
- GitLab (MR discussions)
- Bitbucket (inline comments)
- Gerrit (review comments)
-
SDLC Integration:
- Pre-commit hooks: Fast local feedback before push
- PR/MR review: Automated security review on code changes
- Trunk protection: Block merges with security findings
- Security dashboard: Aggregate findings for visibility
Troubleshooting
Issue: Reviewdog not posting comments
Solution:
- Verify GitHub token has correct permissions (
reposcope for private repos,public_repofor public) - Check CI environment has
REVIEWDOG_GITHUB_API_TOKENorGITHUB_TOKENset - Ensure repository settings allow PR comments from workflows
- Verify reviewdog is running in PR context (not on push to main)
Issue: Too many false positives
Solution:
- Use
filter-mode=addedto only show new issues - Configure tool-specific suppressions in
.reviewdog.yml - Adjust severity thresholds with
-levelflag - Use baseline files to ignore existing issues
Issue: Performance issues with large repositories
Solution:
- Run reviewdog only on changed files using
filter-mode=diff_context - Cache tool dependencies and databases in CI
- Run expensive scanners on scheduled jobs, lightweight ones on PR
- Use parallel execution for multiple tools
Issue: Integration with custom security tools
Solution:
- Convert tool output to supported format (checkstyle, sarif, rdjson, rdjsonl)
- Use
-f=rdjsonfor custom JSON output following reviewdog diagnostic format - Create errorformat pattern for text-based outputs
- See
references/reporter_formats.mdfor format specifications
Advanced Configuration
Custom reviewdog configuration (.reviewdog.yml)
runner:
bandit:
cmd: bandit -r . -f json
format: bandit
name: Python Security
level: warning
semgrep:
cmd: semgrep --config=auto --json
format: semgrep
name: Multi-language SAST
level: error
gitleaks:
cmd: gitleaks detect --report-format json
format: gitleaks
name: Secret Detection
level: error
Integration with Security Frameworks
Map findings to OWASP Top 10 and CWE:
# Semgrep with OWASP ruleset
semgrep --config "p/owasp-top-ten" --json | \
reviewdog -f=semgrep -name="OWASP Top 10" -reporter=github-pr-review
# Include CWE references in comments
reviewdog -f=semgrep -name="CWE Analysis" -reporter=github-pr-review
References
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (11,941 bytes)
- 📎 assets/github_actions_template.yml (5,500 bytes)
- 📎 assets/gitlab_ci_template.yml (5,080 bytes)
- 📎 assets/pre_commit_config.yaml (3,444 bytes)
- 📎 references/cwe_mapping.md (11,016 bytes)
- 📎 references/reporter_formats.md (10,348 bytes)
- 📎 references/supported_tools.md (8,595 bytes)