v3-security-overhaul

Complete security architecture overhaul for claude-flow v3. Addresses critical CVEs (CVE-1, CVE-2, CVE-3) and implements secure-by-default patterns. Use for…

INSTALLATION
npx skills add https://github.com/ruvnet/ruflo --skill v3-security-overhaul
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$2b

CVE-1: Vulnerable Dependencies

npm update @anthropic-ai$claude-code@^2.0.31

npm audit --audit-level high

CVE-2: Weak Password Hashing

// ❌ 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: Hardcoded Credentials

// ✅ Generate secure random credentials

const apiKey = crypto.randomBytes(32).toString('hex');

Security Patterns

Input Validation (Zod)

import { z } from 'zod';

const TaskSchema = z.object({

  taskId: z.string().uuid(),

  content: z.string().max(10000),

  agentType: z.enum(['security', 'core', 'integration'])

});

Path Sanitization

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;

}

Safe Command Execution

import { execFile } from 'child_process';

// ✅ Safe: No shell interpretation

const { stdout } = await execFile('git', [userInput], { shell: false });

Success Metrics

  • Security Score: 90/100 (npm audit + custom scans)
  • CVE Resolution: 100% of critical vulnerabilities fixed
  • Test Coverage: >95% security-critical code
  • Implementation: All secure patterns documented and tested
BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card