mcpField
S
security-scan

security-scan

github.com/wojonsセキュリティ336 回インストール30 週間前に更新
リポジトリ

security-scan について

Security Scanningは、アプリケーション、インフラ、コンテナ、依存関係、クラウド設定を評価するスキルです。複数のセキュリティスキャナーとLLM分析を連携し、検出結果の関連付けやコンプライアンスへの対応付け、修正案の提示を行います。

主な機能

  1. 01LLMによるセキュリティパターン分析
  2. 02複数のセキュリティスキャナーの連携
  3. 03アプリ、インフラ、コンテナ、依存関係のスキャン
  4. 04検出結果の関連付けと脆弱性の優先順位付け
  5. 05検出結果とコンプライアンスフレームワークの対応付け
  6. 06修正案とリスクスコアの提示

活用シーン

  1. 01アプリケーションとインフラの評価
  2. 02CI/CDパイプラインでのスキャン導入
  3. 03セキュリティ監査や認証の準備
  4. 04コンテナとIaCのリスク確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/wojons/skills --skill security-scan

インストール後、Claude Code で/security-scanを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

README.md
references/
README.md
scripts/
analyze-security.sh

詳細

セキュリティスキャン

アプリケーション、インフラストラクチャ、コンテナ、依存関係、クラウド環境など、スタック全体にわたる包括的なセキュリティスキャンを実行します。このスキルは、LLM ベースのセキュリティ分析と業界標準のツールを統合し、脆弱性、設定ミス、セキュリティ上の弱点を特定します。

どのような場合に使うか

次のような場合にこのスキルを使用します:

  • アプリケーションとインフラストラクチャの包括的なセキュリティ評価が必要な場合
  • 複数のセキュリティスキャンツールを統合されたワークフローに組み込みたい場合
  • 複雑なセキュリティ問題の特定に LLM を活用した分析が必要な場合
  • セキュリティ監査やコンプライアンス認証に備える場合
  • CI/CD パイプラインで基本的なセキュリティスキャンを確立したい場合
  • 複数の環境(クラウド、コンテナ、インフラストラクチャ)を横断してスキャンする必要がある場合

できること

  • LLM ベースのセキュリティ分析:AI を使用して、複雑なセキュリティパターン、ビジネスロジックの欠陥、新たな脆弱性を特定します
  • 統合ツールエコシステム:OWASP ZAP、Snyk、Trivy、Nessus などのセキュリティスキャナーをオーケストレーションします
  • 多層スキャン:アプリケーション(SAST/DAST)、インフラストラクチャ(IaC スキャン)、コンテナ、依存関係、クラウド設定をスキャンします
  • 脆弱性の相関分析:複数のスキャンツールからの検出結果を相関分析し、重大な問題を優先順位付けします
  • コンプライアンスへの対応付け:脆弱性をコンプライアンスフレームワーク(SOC 2、ISO 27001、HIPAA、GDPR)に対応付けます
  • 修正ガイダンス:各検出結果に対して、具体的で実行可能な修正手順を提示します
  • リスクスコアリング:CVSS、エクスプロイトの入手可能性、ビジネスへの影響に基づいてリスクスコアを算出します

例

# Run comprehensive security scan
./scripts/security-scan.sh --target https://app.example.com

# Scan Docker containers
./scripts/security-scan.sh --container myapp:latest

# Scan infrastructure as code
./scripts/security-scan.sh --iac terraform/

# Generate compliance report
./scripts/security-scan.sh --compliance soc2

# LLM-powered security analysis
./scripts/security-scan.sh --llm-analysis --context "Payment processing system"

出力形式

Security Scan Report
─────────────────────────────────────
Scan Date: 2025-01-15T10:30:00Z
Target: https://app.example.com
Scan Duration: 2m 45s

CRITICAL FINDINGS (3):
────────────────────────
❌ SQL Injection in /api/users endpoint
   Risk: Critical (CVSS 9.8)
   Detection: OWASP ZAP + LLM analysis
   Remediation: Use parameterized queries, implement input validation
   Compliance Impact: PCI DSS 6.5.1, OWASP A1

❌ Hard-coded AWS credentials in config file
   Risk: Critical (CVSS 8.9)
   Detection: TruffleHog + LLM pattern matching
   Remediation: Move to AWS Secrets Manager, rotate credentials
   Compliance Impact: SOC 2 CC6.1, ISO 27001 A.9.4.1

❌ Unpatched vulnerability in nginx:1.18 (CVE-2021-23017)
   Risk: Critical (CVSS 9.1)
   Detection: Trivy container scan
   Remediation: Upgrade to nginx 1.20+, apply security patches
   Compliance Impact: PCI DSS 6.2, ISO 27001 A.12.6.1

HIGH FINDINGS (8):
───────────────────
⚠️ Missing Content Security Policy header
⚠️ Excessive permissions in IAM role (AdminAccess)
⚠️ Outdated OpenSSL library (CVE-2022-2068)
⚠️ Docker container running as root
⚠️ API endpoint without rate limiting
⚠️ Sensitive data in application logs
⚠️ Missing MFA for administrative access
⚠️ Unencrypted S3 bucket

MEDIUM/LOW FINDINGS (14):
──────────────────────────
ℹ️ Security headers missing (X-Frame-Options, X-Content-Type-Options)
ℹ️ Verbose error messages revealing system information
ℹ️ Session timeout too long (24 hours)
ℹ️ Cross-site request forgery (CSRF) protection missing

LLM SECURITY ANALYSIS:
──────────────────────
🔍 Business Logic Vulnerabilities:
   • Payment amount manipulation possible in checkout flow
   • Privilege escalation via IDOR in admin panel
   • Race condition in inventory reservation system

🔍 Architectural Security Issues:
   • Monolithic architecture increases attack surface
   • Lack of network segmentation between tiers
   • Insufficient logging for security events

🔍 Compliance Gaps:
   • Missing data retention policy implementation
   • Inadequate incident response procedures
   • Insufficient employee security training documentation

SUMMARY:
────────
Total Findings: 25
Critical: 3 | High: 8 | Medium: 9 | Low: 5
Risk Score: 78/100 (High Risk)
Compliance Status: 65% compliant with SOC 2

RECOMMENDATIONS:
────────────────
1. IMMEDIATE ACTION: Fix 3 critical vulnerabilities within 24 hours
2. PRIORITY: Address 8 high-risk issues within 7 days
3. IMPROVEMENTS: Implement security controls for medium/low issues
4. ARCHITECTURAL: Consider microservices segmentation, zero-trust network
5. PROCESS: Establish security training program, incident response plan

注意事項

  • 既存の CI/CD パイプラインやセキュリティツールと統合できます
  • 誤検知を避けるため、LLM による分析結果は慎重に検証する必要があります
  • スキャンツールによってライセンス要件が異なる場合があります
  • スキャナーによっては認証トークンや API キーが必要です
  • 修正を実施する前に、必ず検出結果を検証してください
  • パフォーマンスへの影響を最小限に抑えるため、利用の少ない時間帯にスキャンを実行することを検討してください
  • 本番システムでは、定期的なスキャン(日次/週次)を推奨します
  • 最新の脆弱性を検出できるよう、スキャンツールを最新の状態に保ってください

コメント