| name | semgrep |
| description | Static code analysis tool for finding bugs and security issues. Use when auditing code quality, detecting OWASP vulnerabilities, or running custom code pattern matching across Python, Go, TypeScript, and many other languages. |
semgrep — Static Analysis
Basic Scan
semgrep scan
semgrep scan ./src
semgrep --pattern "os.system($VAR)" .
Rules and Rulesets
semgrep scan --config=auto
semgrep scan --config=p/security
semgrep scan --config=python
semgrep scan --config=go
semgrep scan --config=typescript
semgrep scan --config=p/security --config=python --config=go
Output
semgrep scan --config=auto --json --output=semgrep.json
semgrep scan --config=auto --sarif --output=semgrep.sarif
semgrep scan --quiet
When to Use
- Detect bug patterns (e.g.,
TODO, hardcoded credentials, SQL injection)
- Security audits (OWASP Top 10)
- Code quality checks (unused variables, incorrect API usage)
- Run before generating audit findings
Examples
semgrep scan --config=p/security --severity=ERROR --json -o findings.json
semgrep scan --config=auto --json -o semgrep.json