security-review

star 1

Brakeman + bundler-audit + secrets検出 + Trivy を一括実行し、 対処が必要な指摘だけを報告する

RyuRyuDX By RyuRyuDX schedule Updated 2/14/2026

name: security-review description: > Brakeman + bundler-audit + secrets検出 + Trivy を一括実行し、 対処が必要な指摘だけを報告する disable-model-invocation: true user-invocable: true allowed-tools: Bash(*), Read, Grep, Glob argument-hint: [--fix]

Security Review スキル

実行手順

  1. スキャンスクリプトを実行する:
bash .claude/skills/security-review/scripts/scan.sh
  1. 出力を以下のルールでフィルタする:

Brakeman

  • confidence が High / Medium のみ(Low は除外)
  • 各 warning からファイル・行番号・タイプ・メッセージを抽出

bundler-audit

  • "Vulnerabilities found!" がなければ PASS
  • CVE 行だけ抽出(gem名・バージョン・CVE番号・概要)

Secrets

  • 以下を false positive として除外:
    • test/, spec/, fixtures/ 配下
    • コメント行(# で始まる内容部分)
    • サンプル値("changeme", "password", "xxxx", "your-*-here", "TODO", "example"
    • .kamal/secrets 内の参照のみの行($ で始まる値)
    • config/credentials/ 配下(Rails encrypted credentials)
    • SKILL.mdscan.sh 自身
  • 残ったものを報告

Trivy

  • severity が HIGH / CRITICAL のみ
  • パッケージ名・現バージョン・修正バージョン・CVE を抽出
  • trivy がなかった場合は「trivy 未インストール — スキップ」と表示
  1. 最終出力フォーマット:
## Security Review Results

### 概要
| スキャン | 結果 |
|---------|------|
| Brakeman | X件の指摘 / PASS |
| bundler-audit | X件の脆弱性 / PASS |
| Secrets | X件の検出 / PASS |
| Trivy | X件 / PASS / スキップ |

### 指摘詳細 (あれば)
| 重要度 | 種別 | ファイル:行 | 概要 | 推奨対応 |
|--------|------|------------|------|---------|
| ...    | ...  | ...        | ...  | ...     |
  1. $ARGUMENTS--fix が含まれる場合:

    • bundler-audit の指摘 → bundle update <gem> を提案・実行
    • Brakeman の指摘 → 該当コードを読んで修正を試みる
    • Secrets → 該当ファイルの値を環境変数参照に置換を提案
  2. 指摘が 0件 の場合は「全スキャン PASS — 指摘なし」と表示

Install via CLI
npx skills add https://github.com/RyuRyuDX/ThisIsMyBlog --skill security-review
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator