semgrep

多语言代码安全扫描

补充说明

semgrep 用模式匹配规则检查代码中的安全问题、反模式和业务规则。它支持多种语言,可本地运行,也可接入 CI。

常用示例

semgrep scan
semgrep --config auto
semgrep --config p/security-audit
semgrep --config p/secrets .
semgrep --severity ERROR --json -o report.json
semgrep ci
semgrep --config rules/ ./src

.semgrepignore:

vendor/
node_modules/
dist/

易错点与排错

相关命令