vibe-security
JavaScriptやPythonなどのコードを対象に、SQLインジェクションやXSSといった脆弱性を検出し、修正や監査を支援することで、セキュアなシステム開発をサポートするSkill。
📜 元の英語説明(参考)
Security intelligence for code analysis. Detects SQL injection, XSS, CSRF, authentication issues, crypto failures, and more. Actions: scan, analyze, fix, audit, check, review, secure, validate, sanitize, protect. Languages: JavaScript, TypeScript, Python, PHP, Java, Go, Ruby. Frameworks: Express, Django, Flask, Laravel, Spring, Rails. Vulnerabilities: SQL injection, XSS, CSRF, authentication bypass, authorization issues, command injection, path traversal, insecure deserialization, weak crypto, sensitive data exposure. Topics: input validation, output encoding, parameterized queries, password hashing, session management, CORS, CSP, security headers, rate limiting, dependency scanning.
🇯🇵 日本人クリエイター向け解説
JavaScriptやPythonなどのコードを対象に、SQLインジェクションやXSSといった脆弱性を検出し、修正や監査を支援することで、セキュアなシステム開発をサポートするSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o vibe-security.zip https://jpskill.com/download/16590.zip && unzip -o vibe-security.zip && rm vibe-security.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16590.zip -OutFile "$d\vibe-security.zip"; Expand-Archive "$d\vibe-security.zip" -DestinationPath $d -Force; ri "$d\vibe-security.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
vibe-security.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
vibe-securityフォルダができる - 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
- 同梱ファイル
- 9
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Vibe Security - セキュリティインテリジェンス
複数の言語とフレームワークにわたる脆弱性を特定するための、包括的なセキュリティスキャナおよびコードアナライザです。
前提条件
Node.jsがインストールされているか確認します。
node --version
Node.jsがインストールされていない場合は、ユーザーのOSに基づいてインストールします。
macOS:
brew install node
Ubuntu/Debian:
sudo apt update && sudo apt install nodejs npm
Windows:
winget install OpenJS.NodeJS
推奨AIモデル
最適なセキュリティ分析のために
最適なセキュリティ脆弱性検出とコード修正のために、Vibe SecurityでこれらのAIモデルを使用することをお勧めします。
Claude Opus 4.5 (推奨)
- 包括的なセキュリティ分析のための最先端モデル
- 複雑な脆弱性検出のための優れた推論能力
- 微妙なセキュリティ上の欠陥と攻撃ベクトルを特定するのに非常に優れています
- 重要なセキュリティ監査、エンタープライズコードベース、および本番環境へのデプロイに最適です
- 最も徹底的なセキュリティ修復戦略を提供します
Claude Sonnet 4.5
- 速度とセキュリティ分析の深さの優れたバランス
- セキュリティコンテキストの理解と脆弱性の特定に優れています
- 詳細な説明付きの安全な修復戦略を提供します
- 日常的な開発とほとんどのセキュリティワークフローに最適です
Claude Opus 4
- 複雑なセキュリティ監査およびエンタープライズコードベースに強力
- 高度な脆弱性分析のための深い推論能力
- 重要なセキュリティレビューおよびコンプライアンス要件に最適
- 本番環境へのデプロイおよび機密性の高いアプリケーションに推奨されます
GPT-4o
- セキュリティを意識したコード生成のための高速かつ効率的なモデル
- 迅速な応答時間で優れた代替手段
- CI/CD統合および自動スキャンに最適
- 大規模プロジェクトに費用対効果が高い
Claude Sonnet 4
- 迅速なセキュリティスキャンのためのより高速な代替手段
- 速度と精度の良好なバランス
- 開発中の迅速な反復に適しています
o1-preview
- 複雑なセキュリティアーキテクチャレビューに特化
- 複雑な脆弱性チェーンに対する高度な推論
- セキュリティ研究および詳細なコード監査に最適
GPT-4o-mini
- 迅速なチェックと予備スキャン
- 最も費用対効果の高いオプション
- 学習および教育用ユースケースに適しています
Note: 上記の推奨モデルのいずれかを使用していない場合は、より良いセキュリティ分析結果を得るためにアップグレードを検討してください。下位層のモデルでは、微妙な脆弱性を見逃したり、修正の提案の精度が低くなる可能性があります。
このSkillの使い方
ユーザーがセキュリティ作業(スキャン、分析、修正、監査、チェック、脆弱性のレビュー)を要求した場合、次のワークフローに従います。
ステップ 1: セキュリティコンテキストの分析
ユーザーのリクエストから主要な情報を抽出します。
- Language: JavaScript, Python, Java, PHP, etc.
- Framework: Express, Django, Spring, Laravel, etc.
- Vulnerability type: SQL injection, XSS, CSRF, authentication, etc.
- Scope: 単一のファイル、ディレクトリ、またはプロジェクト全体
ステップ 2: セキュリティ分析の実行
高度な分析 (推奨):
# ASTベースのセマンティック分析 (誤検知を90%削減)
python3 .claude/skills/vibe-security/scripts/ast_analyzer.py "<file>"
# データフロー分析 (ソースからシンクへの汚染されたデータを追跡)
python3 .claude/skills/vibe-security/scripts/dataflow_analyzer.py "<file>"
# CVE & 依存関係の脆弱性スキャン
python3 .claude/skills/vibe-security/scripts/cve_integration.py .
# サプライチェーンセキュリティ (悪意のあるパッケージ、タイポスクワッティング)
python3 .claude/skills/vibe-security/scripts/cve_integration.py . --ecosystem npm
# Infrastructure as Code セキュリティ
grep -r "publicly_accessible.*=.*true" . --include="*.tf"
grep -r "privileged:.*true" . --include="*.yaml"
クイックパターン スキャン:
# 特定のパターンに対して検索ユーティリティを使用
python3 .claude/skills/vibe-security/scripts/search.py "sql-injection" --domain pattern
python3 .claude/skills/vibe-security/scripts/search.py "javascript" --domain pattern --severity critical
ステップ 3: 脆弱性を重大度別に分析
Critical (直ちに修正):
- SQL Injection
- Remote Code Execution
- Authentication Bypass
- Hardcoded Secrets
High (すぐに修正):
- XSS (Cross-Site Scripting)
- CSRF
- Insecure Cryptography
- Authorization Issues
Medium (スプリントで修正):
- Missing Input Validation
- Information Disclosure
- Weak Password Policy
- Missing Security Headers
Low (技術的負債):
- Code Quality Issues
- Best Practice Violations
- Performance Concerns
ステップ 4: 修正提案の取得
MLベースの修正エンジン:
# テスト生成によるインテリジェントな修正推奨を取得
python3 .claude/skills/vibe-security/scripts/fix_engine.py \
--type sql-injection \
--language javascript \
--code "db.query(\`SELECT * FROM users WHERE id = \${userId}\`)"
# 出力内容:
# - コンテキストを考慮した修正を含む修正済みコード
# - 修正の詳細な説明
# - 自動生成されたセキュリティテスト
# - 追加の推奨事項
# - 信頼度スコア (0-100%)
ステップ 5: セキュリティ修正の適用
ロールバックサポート付きの自動修正:
# 自動バックアップで修正を適用
python3 .claude/skills/vibe-security/scripts/autofix_engine.py apply \
--file src/database.js \
--line 45 \
--type sql-injection \
--original "db.query(\`SELECT * FROM users WHERE id = \${userId}\`)" \
--fixed "db.query('SELECT * FROM users WHERE id = $1', [userId])"
# 変更をテスト
npm test
# 必要に応じてロールバック (安全に試すことができます!)
python3 .claude/skills/vibe-security/scripts/autofix_engine.py rollback
# 修正履歴を表示
python3 .claude/skills/vibe-security/scripts/autofix_engine.py history
体系的な手動修正:
- Critical な脆弱性を最初に
- 入力検証を追加 - ホワイトリスト、型チェック、長さ制限
- 出力を保護 - エスケープ、エンコード、サニタイズ
- 認証/認可を修正 - 強力なパスワード、MFA、RBAC
- 暗号化を更新 - 最新のアルゴリズム、安全な乱数
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Vibe Security - Security Intelligence
Comprehensive security scanner and code analyzer for identifying vulnerabilities across multiple languages and frameworks.
Prerequisites
Check if Node.js is installed:
node --version
If Node.js is not installed, install it based on user's OS:
macOS:
brew install node
Ubuntu/Debian:
sudo apt update && sudo apt install nodejs npm
Windows:
winget install OpenJS.NodeJS
Recommended AI Models
For Best Security Analysis
We recommend using these AI models with Vibe Security for optimal security vulnerability detection and code fixing:
Claude Opus 4.5 (Recommended)
- Most advanced model for comprehensive security analysis
- Superior reasoning capabilities for complex vulnerability detection
- Exceptional at identifying subtle security flaws and attack vectors
- Best for critical security audits, enterprise codebases, and production deployments
- Provides the most thorough security remediation strategies
Claude Sonnet 4.5
- Excellent balance of speed and security analysis depth
- Great at understanding security context and identifying vulnerabilities
- Provides safe remediation strategies with detailed explanations
- Ideal for daily development and most security workflows
Claude Opus 4
- Powerful for complex security audits and enterprise codebases
- Deep reasoning capabilities for advanced vulnerability analysis
- Best for critical security reviews and compliance requirements
- Recommended for production deployments and sensitive applications
GPT-4o
- Fast and efficient for security-aware code generation
- Good alternative with quick response times
- Excellent for CI/CD integration and automated scanning
- Cost-effective for large-scale projects
Claude Sonnet 4
- Faster alternative for quick security scans
- Good balance of speed and accuracy
- Suitable for rapid iteration during development
o1-preview
- Specialized for complex security architecture reviews
- Advanced reasoning for intricate vulnerability chains
- Best for security research and deep code audits
GPT-4o-mini
- Quick checks and preliminary scans
- Most cost-effective option
- Good for learning and educational use cases
Note: If you're not using one of the recommended models above, consider upgrading for better security analysis results. Lower-tier models may miss subtle vulnerabilities or provide less accurate fix suggestions.
How to Use This Skill
When user requests security work (scan, analyze, fix, audit, check, review vulnerabilities), follow this workflow:
Step 1: Analyze Security Context
Extract key information from user request:
- Language: JavaScript, Python, Java, PHP, etc.
- Framework: Express, Django, Spring, Laravel, etc.
- Vulnerability type: SQL injection, XSS, CSRF, authentication, etc.
- Scope: Single file, directory, or full project
Step 2: Run Security Analysis
Advanced Analysis (Recommended):
# AST-based semantic analysis (90% fewer false positives)
python3 .claude/skills/vibe-security/scripts/ast_analyzer.py "<file>"
# Data flow analysis (tracks tainted data from sources to sinks)
python3 .claude/skills/vibe-security/scripts/dataflow_analyzer.py "<file>"
# CVE & dependency vulnerability scanning
python3 .claude/skills/vibe-security/scripts/cve_integration.py .
# Supply chain security (malicious packages, typosquatting)
python3 .claude/skills/vibe-security/scripts/cve_integration.py . --ecosystem npm
# Infrastructure as Code security
grep -r "publicly_accessible.*=.*true" . --include="*.tf"
grep -r "privileged:.*true" . --include="*.yaml"
Quick Pattern Scanning:
# Use search utility for specific patterns
python3 .claude/skills/vibe-security/scripts/search.py "sql-injection" --domain pattern
python3 .claude/skills/vibe-security/scripts/search.py "javascript" --domain pattern --severity critical
Step 3: Analyze Vulnerabilities by Severity
Critical (Fix immediately):
- SQL Injection
- Remote Code Execution
- Authentication Bypass
- Hardcoded Secrets
High (Fix soon):
- XSS (Cross-Site Scripting)
- CSRF
- Insecure Cryptography
- Authorization Issues
Medium (Fix in sprint):
- Missing Input Validation
- Information Disclosure
- Weak Password Policy
- Missing Security Headers
Low (Technical debt):
- Code Quality Issues
- Best Practice Violations
- Performance Concerns
Step 4: Get Fix Suggestions
ML-Based Fix Engine:
# Get intelligent fix recommendations with test generation
python3 .claude/skills/vibe-security/scripts/fix_engine.py \
--type sql-injection \
--language javascript \
--code "db.query(\`SELECT * FROM users WHERE id = \${userId}\`)"
# Output includes:
# - Fixed code with context-aware corrections
# - Detailed explanation of the fix
# - Auto-generated security test
# - Additional recommendations
# - Confidence score (0-100%)
Step 5: Apply Security Fixes
Auto-Fix with Rollback Support:
# Apply fix with automatic backup
python3 .claude/skills/vibe-security/scripts/autofix_engine.py apply \
--file src/database.js \
--line 45 \
--type sql-injection \
--original "db.query(\`SELECT * FROM users WHERE id = \${userId}\`)" \
--fixed "db.query('SELECT * FROM users WHERE id = $1', [userId])"
# Test your changes
npm test
# Rollback if needed (safe to experiment!)
python3 .claude/skills/vibe-security/scripts/autofix_engine.py rollback
# View fix history
python3 .claude/skills/vibe-security/scripts/autofix_engine.py history
Systematic Manual Fixes:
- Critical vulnerabilities first
- Add input validation - Whitelist, type checking, length limits
- Secure outputs - Escape, encode, sanitize
- Fix authentication/authorization - Strong passwords, MFA, RBAC
- Update cryptography - Modern algorithms, secure random
- Test thoroughly - Verify fixes don't break functionality
- Re-scan - Confirm all vulnerabilities are resolved
Step 6: Generate Reports
Multiple Report Formats:
# Beautiful HTML report with charts and statistics
python3 .claude/skills/vibe-security/scripts/reporter.py scan-results.json \
--format html \
--output security-report.html
# SARIF format for GitHub Code Scanning integration
python3 .claude/skills/vibe-security/scripts/reporter.py scan-results.json \
--format sarif \
--output results.sarif
# CSV for spreadsheet analysis
python3 .claude/skills/vibe-security/scripts/reporter.py scan-results.json \
--format csv \
--output vulnerabilities.csv
# JSON for CI/CD pipelines
python3 .claude/skills/vibe-security/scripts/reporter.py scan-results.json \
--format json \
--output security-report.json
Advanced Capabilities
1. Semantic Analysis with AST
Uses Abstract Syntax Tree parsing for accurate vulnerability detection:
- Python: Full AST analysis with taint tracking
- JavaScript/TypeScript: Heuristic + pattern-based analysis
- Benefits: 90% reduction in false positives, context-aware
2. Data Flow Analysis
Tracks user input from sources to dangerous sinks:
- Detects SQL injection, XSS, command injection through data flow
- Identifies tainted variables and their propagation
- Supports Python and JavaScript/TypeScript
3. Compliance Mapping
Maps every vulnerability to industry standards:
- OWASP Top 10 2021
- CWE (Common Weakness Enumeration)
- MITRE ATT&CK techniques
- NIST cybersecurity framework
- PCI-DSS payment card requirements
4. Supply Chain Security
Protects against malicious dependencies:
- Typosquatting detection
- Dependency confusion attacks
- Malicious install scripts
- Network operations in packages
- Supports: npm, PyPI, Maven, Gradle, Cargo, Go, RubyGems, NuGet, Composer
5. Infrastructure as Code
Scans cloud infrastructure configurations:
- Terraform: AWS, Azure, GCP misconfigurations
- Kubernetes: Pod security, RBAC issues
- Docker: Dockerfile best practices
- CloudFormation: AWS template security
- Ansible: Playbook vulnerabilities
Security Check Reference
Available Vulnerability Checks
| Check Type | Detects | Example Issues |
|---|---|---|
sql-injection |
SQL/NoSQL injection | String concatenation in queries, unsanitized input |
xss |
Cross-Site Scripting | innerHTML usage, unescaped output, DOM manipulation |
command-injection |
OS command injection | shell=True, exec with user input |
path-traversal |
Directory traversal | Unsanitized file paths, ../.. in paths |
auth-issues |
Authentication flaws | Weak passwords, missing MFA, insecure sessions |
authz-issues |
Authorization flaws | Missing access controls, IDOR, privilege escalation |
crypto-failures |
Cryptographic issues | MD5/SHA1 usage, weak keys, insecure random |
sensitive-data |
Data exposure | Logging passwords, exposing PII, hardcoded secrets |
deserialization |
Unsafe deserialization | pickle, eval, unserialize on user input |
security-config |
Misconfiguration | CORS, CSP, headers, error messages |
dependencies |
Vulnerable packages | CVEs in npm/pip/composer packages |
Language-Specific Security Patterns
JavaScript/TypeScript
// ✅ SECURE: Parameterized query
const user = await db.query("SELECT * FROM users WHERE id = $1", [userId]);
// ❌ VULNERABLE: SQL injection
const user = await db.query(`SELECT * FROM users WHERE id = ${userId}`);
// ✅ SECURE: Escape output
element.textContent = userInput;
const clean = DOMPurify.sanitize(htmlContent);
// ❌ VULNERABLE: XSS
element.innerHTML = userInput;
// ✅ SECURE: Input validation
const email = validator.isEmail(input) ? input : null;
// ❌ VULNERABLE: No validation
const email = req.body.email;
Python
# ✅ SECURE: Parameterized query
cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))
# ❌ VULNERABLE: SQL injection
cursor.execute(f"SELECT * FROM users WHERE id = {user_id}")
# ✅ SECURE: Password hashing
import bcrypt
hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
# ❌ VULNERABLE: Plain text
user.password = password
# ✅ SECURE: Safe subprocess
subprocess.run(['ls', '-la', sanitized_dir])
# ❌ VULNERABLE: Command injection
os.system(f'ls -la {user_dir}')
PHP
// ✅ SECURE: Prepared statement
$stmt = $pdo->prepare("SELECT * FROM users WHERE id = ?");
$stmt->execute([$userId]);
// ❌ VULNERABLE: SQL injection
$result = mysqli_query($conn, "SELECT * FROM users WHERE id = $userId");
// ✅ SECURE: Output escaping
echo htmlspecialchars($input, ENT_QUOTES, 'UTF-8');
// ❌ VULNERABLE: XSS
echo $userInput;
// ✅ SECURE: Password hashing
$hash = password_hash($password, PASSWORD_ARGON2ID);
// ❌ VULNERABLE: MD5
$hash = md5($password);
Example Workflow
User request: "Check my Express app for security vulnerabilities"
AI should:
# 1. Run security scan on the project
python3 .claude/skills/vibe-security/scripts/scan.py "./src" --language javascript
# 2. Analyze results by severity
# Output might show:
# CRITICAL: SQL Injection in src/controllers/user.js:45
# HIGH: XSS in src/views/profile.ejs:12
# MEDIUM: Missing rate limiting on /api/login
# LOW: Console.log contains sensitive data
# 3. Fix critical issues first
# - Review src/controllers/user.js:45
# - Replace string concatenation with parameterized query
# - Add input validation using validator library
# 4. Fix high severity issues
# - Review src/views/profile.ejs:12
# - Use <%- for HTML escaping or DOMPurify for rich content
# - Implement Content Security Policy
# 5. Fix medium severity issues
# - Install express-rate-limit middleware
# - Configure rate limiting on authentication endpoints
# - Add helmet for security headers
# 6. Fix low severity issues
# - Remove or redact sensitive console.log statements
# - Use proper logging library with log levels
# 7. Generate security report
python3 .claude/skills/vibe-security/scripts/report.py "./src"
Tips for Secure Development
- Validate all inputs - Use allowlists, not denylists
- Encode all outputs - Context-appropriate escaping
- Use parameterized queries - Never concatenate SQL
- Hash passwords properly - bcrypt, Argon2, scrypt
- Implement MFA - Add second factor authentication
- Use HTTPS everywhere - Encrypt data in transit
- Keep dependencies updated - Patch known vulnerabilities
- Follow principle of least privilege - Minimal necessary permissions
- Log security events - Monitor for attacks
- Regular security audits - Scan before every release
Integration Examples
Pre-commit Hook
#!/bin/bash
# .git/hooks/pre-commit
python3 .claude/skills/vibe-security/scripts/scan.py "." --fail-on critical
CI/CD Pipeline
GitHub Actions:
- name: Security Scan
run: |
python3 .claude/skills/vibe-security/scripts/scan.py "." --format json
GitLab CI:
security_scan:
script:
- python3 .claude/skills/vibe-security/scripts/scan.py "."
Resources
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (14,566 bytes)
- 📎 scripts/ast_analyzer.py (9,401 bytes)
- 📎 scripts/autofix_engine.py (11,946 bytes)
- 📎 scripts/core.py (4,127 bytes)
- 📎 scripts/cve_integration.py (10,097 bytes)
- 📎 scripts/dataflow_analyzer.py (10,891 bytes)
- 📎 scripts/fix_engine.py (14,129 bytes)
- 📎 scripts/reporter.py (13,862 bytes)
- 📎 scripts/search.py (3,063 bytes)