security-audit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Security Audit Skill

安全审计Skill

Purpose

用途

Comprehensive security scanning and vulnerability detection. Includes input validation, path traversal prevention, CVE detection, and secure coding pattern enforcement.
全面的安全扫描与漏洞检测。包括输入验证、路径遍历防护、CVE检测以及安全编码规范强制执行。

When to Trigger

触发时机

  • authentication implementation
  • authorization logic
  • payment processing
  • user data handling
  • API endpoint creation
  • file upload handling
  • database queries
  • external API integration
  • 身份验证实现
  • 授权逻辑开发
  • 支付流程处理
  • 用户数据管理
  • API端点创建
  • 文件上传处理
  • 数据库查询
  • 外部API集成

When to Skip

跳过时机

  • read-only operations on public data
  • internal development tooling
  • static documentation
  • styling changes
  • 公共数据的只读操作
  • 内部开发工具
  • 静态文档
  • 样式变更

Commands

命令

Full Security Scan

全面安全扫描

Run comprehensive security analysis on the codebase
bash
npx @claude-flow/cli security scan --depth full
Example:
bash
npx @claude-flow/cli security scan --depth full --output security-report.json
对代码库执行全面的安全分析
bash
npx @claude-flow/cli security scan --depth full
示例:
bash
npx @claude-flow/cli security scan --depth full --output security-report.json

Input Validation Check

输入验证检查

Check for input validation issues
bash
npx @claude-flow/cli security scan --check input-validation
Example:
bash
npx @claude-flow/cli security scan --check input-validation --path ./src/api
检查输入验证相关问题
bash
npx @claude-flow/cli security scan --check input-validation
示例:
bash
npx @claude-flow/cli security scan --check input-validation --path ./src/api

Path Traversal Check

路径遍历检查

Check for path traversal vulnerabilities
bash
npx @claude-flow/cli security scan --check path-traversal
检查路径遍历漏洞
bash
npx @claude-flow/cli security scan --check path-traversal

SQL Injection Check

SQL注入检查

Check for SQL injection vulnerabilities
bash
npx @claude-flow/cli security scan --check sql-injection
检查SQL注入漏洞
bash
npx @claude-flow/cli security scan --check sql-injection

XSS Check

XSS检查

Check for cross-site scripting vulnerabilities
bash
npx @claude-flow/cli security scan --check xss
检查跨站脚本漏洞
bash
npx @claude-flow/cli security scan --check xss

CVE Scan

CVE扫描

Scan dependencies for known CVEs
bash
npx @claude-flow/cli security cve --scan
Example:
bash
npx @claude-flow/cli security cve --scan --severity high
扫描依赖项中的已知CVE
bash
npx @claude-flow/cli security cve --scan
示例:
bash
npx @claude-flow/cli security cve --scan --severity high

Security Audit Report

安全审计报告

Generate full security audit report
bash
npx @claude-flow/cli security audit --report
Example:
bash
npx @claude-flow/cli security audit --report --format markdown --output SECURITY.md
生成完整的安全审计报告
bash
npx @claude-flow/cli security audit --report
示例:
bash
npx @claude-flow/cli security audit --report --format markdown --output SECURITY.md

Threat Modeling

威胁建模

Run threat modeling analysis
bash
npx @claude-flow/cli security threats --analyze
执行威胁建模分析
bash
npx @claude-flow/cli security threats --analyze

Validate Secrets

验证密钥

Check for hardcoded secrets
bash
npx @claude-flow/cli security validate --check secrets
检查硬编码的密钥
bash
npx @claude-flow/cli security validate --check secrets

Scripts

脚本

ScriptPathDescription
security-scan
.agents/scripts/security-scan.sh
Run full security scan pipeline
cve-remediate
.agents/scripts/cve-remediate.sh
Auto-remediate known CVEs
脚本路径描述
security-scan
.agents/scripts/security-scan.sh
运行完整的安全扫描流水线
cve-remediate
.agents/scripts/cve-remediate.sh
自动修复已知CVE

References

参考资料

DocumentPathDescription
Security Checklist
docs/security-checklist.md
Security review checklist
OWASP Guide
docs/owasp-top10.md
OWASP Top 10 mitigation guide
文档路径描述
Security Checklist
docs/security-checklist.md
安全审查清单
OWASP Guide
docs/owasp-top10.md
OWASP Top 10缓解指南

Best Practices

最佳实践

  1. Check memory for existing patterns before starting
  2. Use hierarchical topology for coordination
  3. Store successful patterns after completion
  4. Document any new learnings
  1. 开始前检查已有模式的内存存储
  2. 使用分层拓扑进行协调
  3. 完成后存储成功的模式
  4. 记录所有新的学习内容