mcpField
V
V3 Security Overhaul

V3 Security Overhaul

github.com/proffesor-for-testing安全520103 次安装今天更新
代码仓库

关于 V3 Security Overhaul

V3 Security Overhaul 是面向 Claude Code 的技能,用于协调 claude-flow v3 的安全工作,涵盖漏洞修复、威胁建模、测试和安全编码模式。

主要功能

  1. 01协调安全专项 Agent
  2. 02处理依赖项漏洞
  3. 03替换薄弱的密码哈希方式
  4. 04验证输入并净化路径
  5. 05避免命令执行时解析 Shell

适用场景

  1. 01规划 v3 威胁模型
  2. 02修复严重漏洞
  3. 03添加安全测试与验证
  4. 04检查命令执行和路径处理

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/proffesor-for-testing/agentic-qe --skill v3-security-overhaul

安装后在 Claude Code 中输入/v3-security-overhaul确认已加载。

详细介绍

V3 安全改造

此技能的作用

协调 claude-flow v3 的全面安全改造,解决关键漏洞,并通过专用的 v3 安全 Agent 建立安全优先的开发实践。

快速开始

# 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