Pull Request のコード変更をセキュリティの観点から分析し、脆弱性を検出して GitHub にコメントします。
Analyzes PR code changes for security vulnerabilities using OWASP Top 10 standards and posts findings as GitHub comments. Detects injection flaws, authentication issues, secrets leaks, and dependency vulnerabilities.
/plugin marketplace add shiiman/claude-code-plugins/plugin install shiiman-git@shiiman-claude-code-pluginsPull Request のコード変更をセキュリティの観点から分析し、脆弱性を検出して GitHub にコメントします。 OWASP Top 10 を基準にリスク評価を行います。
| # | カテゴリ | チェック内容 |
|---|---|---|
| A01 | Broken Access Control | 認可チェックの欠如、IDOR |
| A02 | Cryptographic Failures | 弱い暗号化、平文での機密情報 |
| A03 | Injection | SQL/XSS/コマンドインジェクション |
| A04 | Insecure Design | 安全でない設計パターン |
| A05 | Security Misconfiguration | 設定ミス、デフォルト設定 |
| A06 | Vulnerable Components | 脆弱な依存関係 |
| A07 | Auth Failures | 認証の不備 |
| A08 | Data Integrity | データの整合性 |
| A09 | Logging Failures | ログ・監視の不備 |
| A10 | SSRF | サーバーサイドリクエストフォージェリ |
# PR の差分を取得
gh pr diff {pr番号}
# 変更されたファイル一覧
gh pr view {pr番号} --json files -q '.files[].path'
# セキュリティ問題を指摘(request-changes)
gh pr review {pr番号} --request-changes --body "## 🔒 セキュリティレビュー
### ⚠️ 検出された問題
1. **[Critical] SQL インジェクション**
- ファイル: src/db.ts:42
- 問題: ユーザー入力が直接 SQL クエリに埋め込まれている
- 推奨: プリペアドステートメントを使用
"
| 重要度 | 種類 | ファイル | 行 | 説明 |
|---|---|---|---|---|
| 🔴 Critical | SQL Injection | db.ts | 42 | 未検証の入力 |
| 🟡 Medium | XSS | view.tsx | 15 | dangerouslySetInnerHTML |
| 🟢 Low | Logging | auth.ts | 30 | パスワードのログ出力 |
# PR のセキュリティチェック
この PR のセキュリティをチェックして
# 特定の PR を対象
PR #123 のセキュリティレビューをして
Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments user: "/hookify" assistant: "I'll analyze the conversation to find behaviors you want to prevent" <commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." <commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example>