Install
openclaw skills install security-vuln-scanner扫描代码中常见安全漏洞如SQL注入、XSS、硬编码密码,提供检测结果和安全评分建议。
openclaw skills install security-vuln-scanner扫描代码中的安全漏洞,提供修复建议。
const patterns = {
sqlInjection: /query\s*\(\s*['"`].*\$\{/,
xss: /innerHTML\s*=|document\.write/,
hardcodedSecret: /password\s*=\s*['"][^'"]+['"]/,
insecureRandom: /Math\.random\(\)/,
commandInjection: /exec\s*\(\s*\$\{/
};
{
"vulnerabilities": [
{
"type": "sql_injection",
"line": 42,
"severity": "high",
"message": "检测到SQL注入风险"
}
],
"score": 65
}