Marketplace

Security Audit and Vulnerability Scanning

Comprehensive security audit workflow including dependency scanning, unsafe code detection, and secret management. Use when scanning for vulnerabilities or before production deployment.

allowed_tools: Bash, Read, Grep, Glob

$ Installieren

git clone https://github.com/ShunsukeHayashi/Miyabi /tmp/Miyabi && cp -r /tmp/Miyabi/packages/mcp-bundle/claude-plugins/miyabi-full/skills/security-audit ~/.claude/skills/Miyabi

// tip: Run this command in your terminal to install the skill


name: Security Audit and Vulnerability Scanning description: Comprehensive security audit workflow including dependency scanning, unsafe code detection, and secret management. Use when scanning for vulnerabilities or before production deployment. allowed-tools: Bash, Read, Grep, Glob

🔐 Security Audit and Vulnerability Scanning

Version: 2.0.0 Last Updated: 2025-11-22 Priority: ⭐⭐⭐⭐ (P1 Level) Purpose: 包括的セキュリティ監査と脆弱性スキャン


📋 概要

依存関係の脆弱性スキャン、unsafeコード検出、シークレット管理を含む 包括的なセキュリティ監査ワークフローを提供します。


🎯 P0: 呼び出しトリガー

トリガー
脆弱性スキャン"scan for security vulnerabilities"
CVE確認"are there any CVEs?"
コード監査"audit the codebase"
デプロイ前"before production deployment"
定期監査"weekly security check"

🔧 P1: セキュリティツール一覧

ツール優先順位

ツール用途頻度コマンド
cargo-audit依存関係CVEcargo audit
cargo-denyポリシー強制cargo deny check
cargo-geigerunsafe検出cargo geiger
gitleaksシークレット検出gitleaks detect
cargo-supply-chainサプライチェーンcargo supply-chain

🚀 P2: 監査パターン

Pattern 1: フルセキュリティ監査

# Step 1: 依存関係脆弱性
cargo audit

# Step 2: ポリシーチェック
cargo deny check

# Step 3: unsafe使用量
cargo geiger --output-format Json

# Step 4: シークレット検出
gitleaks detect --source . --verbose

# Step 5: サプライチェーン
cargo supply-chain crates

Pattern 2: クイック監査(CI用)

# 最小限のチェック(2-3分)
cargo audit && cargo deny check advisories

Pattern 3: Clippy セキュリティリント

# セキュリティ関連警告
cargo clippy -- \
  -D warnings \
  -W clippy::all \
  -W clippy::pedantic \
  -A clippy::missing_errors_doc

⚡ P3: 脆弱性対応

重大度別対応

重大度対応期限アクション
Critical即時デプロイ停止、即時修正
High24時間優先修正、回避策検討
Medium1週間計画的修正
Low1ヶ月次回アップデート時

依存関係更新

# 特定クレート更新
cargo update -p vulnerable-crate

# Cargo.toml バージョン指定
[dependencies]
vulnerable-crate = ">=1.2.3"  # 修正版以降

📊 deny.toml設定例

[advisories]
db-path = "~/.cargo/advisory-db"
vulnerability = "deny"
unmaintained = "warn"

[licenses]
allow = ["MIT", "Apache-2.0", "BSD-3-Clause"]
copyleft = "deny"

[bans]
multiple-versions = "warn"
wildcards = "deny"

[sources]
allow-git = []

🛡️ シークレット管理

検出パターン

パターンアクション
AWS KeyAKIA...即時無効化
GitHub Tokenghp_...即時無効化
API Keysk-...即時無効化
Private Key-----BEGINリポジトリからパージ

誤コミット対応

# ファイル削除
git rm --cached secrets.json
git commit --amend --no-edit

# 履歴からパージ(重大な場合)
git filter-repo --invert-paths --path secrets.json

✅ 成功基準

チェック項目基準
cargo audit0 vulnerabilities
cargo deny0 denied
cargo geigerunsafe最小化
gitleaks0 secrets

出力フォーマット

🔐 Security Audit Results

✅ Dependencies: 0 vulnerabilities
✅ Policy: All checks passed
⚠️ Unsafe: 5 blocks (3rd party only)
✅ Secrets: No leaks detected

Ready for production ✓

🔗 関連Skills

  • Rust Development: ビルド品質
  • Dependency Management: 依存関係更新
  • Debugging: セキュリティ問題調査

Repository

ShunsukeHayashi
ShunsukeHayashi
Author
ShunsukeHayashi/Miyabi/packages/mcp-bundle/claude-plugins/miyabi-full/skills/security-audit
11
Stars
6
Forks
Updated5d ago
Added1w ago