V3 Security Overhaul について
claude-flow v3 のセキュリティ改修向けスキルで、専門エージェントを調整して脆弱性への対処と安全な開発手法の確立を支援します。依存関係の更新、パスワードハッシュ、認証情報の生成、入力検証、パス処理、コマンド実行の指針を含みます。
主な機能
- 01セキュリティ専門エージェントの調整
- 02依存関係と CVE の修正ガイダンス
- 03安全なパスワードハッシュと認証情報生成
- 04入力検証とパスのサニタイズパターン
- 05安全なコマンド実行のガイダンス
活用シーン
- 01claude-flow v3 のセキュリティレビュー計画
- 02脆弱な依存関係や認証情報の修正
- 03入力検証とパストラバーサル対策の追加
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ ruvnet/ ruflo --skill v3-security-overhaulインストール後、Claude Code で/v3-security-overhaulを入力して読み込まれたか確認します。
詳細
V3 セキュリティの全面的な見直し
このスキルでできること
専用の v3 セキュリティエージェントを使用して、claude-flow v3 の包括的なセキュリティの見直しを調整し、重大な脆弱性に対処するとともに、セキュリティを最優先する開発手法を確立します。
クイックスタート
# Initialize V3 security domain (parallel)
Task("Security architecture", "Design v3 threat model and security boundaries", "v3-security-architect")
Task("CVE remediation", "Fix CVE-1, CVE-2, CVE-3 critical vulnerabilities", "security-auditor")
Task("Security testing", "Implement TDD London School security framework", "test-architect")
重大なセキュリティ修正
CVE-1:脆弱な依存関係
npm update @anthropic-ai$claude-code@^2.0.31
npm audit --audit-level high
CVE-2:弱いパスワードハッシュ
// ❌ Old: SHA-256 with hardcoded salt
const hash = crypto.createHash('sha256').update(password + salt).digest('hex');
// ✅ New: bcrypt with 12 rounds
import bcrypt from 'bcrypt';
const hash = await bcrypt.hash(password, 12);
CVE-3:ハードコードされた認証情報
// ✅ Generate secure random credentials
const apiKey = crypto.randomBytes(32).toString('hex');
セキュリティパターン
入力検証(Zod)
import { z } from 'zod';
const TaskSchema = z.object({
taskId: z.string().uuid(),
content: z.string().max(10000),
agentType: z.enum(['security', 'core', 'integration'])
});
パスのサニタイズ
function securePath(userPath: string, allowedPrefix: string): string {
const resolved = path.resolve(allowedPrefix, userPath);
if (!resolved.startsWith(path.resolve(allowedPrefix))) {
throw new SecurityError('Path traversal detected');
}
return resolved;
}
安全なコマンド実行
import { execFile } from 'child_process';
// ✅ Safe: No shell interpretation
const { stdout } = await execFile('git', [userInput], { shell: false });
成功指標
- セキュリティスコア:90/100(npm audit とカスタムスキャン)
- CVE の解決:重大な脆弱性を 100%修正
- テストカバレッジ:セキュリティ上重要なコードの 95%超
- 実装:すべての安全なパターンを文書化してテスト済み
コメント
Markdown 対応