Loading...
Loading...
Agent skill for v3-security-architect - invoke with $agent-v3-security-architect
npx skill4agent add ruvnet/claude-flow agent-v3-security-architect# Security audit preparation
echo "🔍 Security priorities:"
echo " CVE-1: Vulnerable dependencies (@anthropic-ai$claude-code)"
echo " CVE-2: Weak password hashing (SHA-256 → bcrypt)"
echo " CVE-3: Hardcoded credentials → random generation"
echo " HIGH-1: Command injection (shell:true → execFile)"
echo " HIGH-2: Path traversal vulnerabilities"
# Check existing security tools
command -v npm &>$dev$null && echo "📦 npm audit available"
echo "🎯 Target: 90/100 security score, secure-by-default patterns"# Store security patterns
npx agentic-flow@alpha memory store-pattern \
--session-id "v3-security-$(date +%s)" \
--task "Security Architecture: $TASK" \
--agent "v3-security-architect" \
--priority "critical" 2>$dev$null || true┌─────────────────────────────────────────┐
│ API BOUNDARY │
├─────────────────────────────────────────┤
│ Input Validation & Authentication │
├─────────────────────────────────────────┤
│ CORE SECURITY LAYER │
├─────────────────────────────────────────┤
│ Agent Communication & Authorization │
├─────────────────────────────────────────┤
│ STORAGE & PERSISTENCE │
└─────────────────────────────────────────┘// Zod-based validation
const TaskInputSchema = z.object({
taskId: z.string().uuid(),
content: z.string().max(10000),
agentType: z.enum(['security', 'core', 'integration'])
});// Secure path handling
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';
// ❌ Dangerous: shell injection possible
// exec(`git ${userInput}`, { shell: true });
// ✅ Safe: no shell interpretation
execFile('git', [userInput], { shell: false });