Semgrep in 5 Minutes for Vibe Coders
AI coding tools generate working code fast, but they also generate security bugs fast. Semgrep is a lightweight static analysis tool that can scan your AI-generated codebase in minutes and flag the most common vulnerability patterns before they reach production.
Install Semgrep
The fastest way to install Semgrep is via pip:
pip install semgrep
Or use Homebrew on macOS:
brew install semgrep
Run Your First Scan
From your project root, run Semgrep with the default auto ruleset, which includes rules for JavaScript, TypeScript, Python, and more:
semgrep scan --config auto .
This pulls the latest Semgrep registry rules and runs them against your codebase. A typical vibe-coded project scan takes 30 to 90 seconds depending on code size.
What to Look For in the Results
Semgrep organizes results by severity. When reviewing output from AI-generated code, pay special attention to:
- ERROR severity: These are high-confidence findings you should fix before shipping
- WARNING severity: Patterns that are often bugs, especially SQL queries and authentication checks
- Hardcoded secrets: The
secretcategory catches API keys, tokens, and passwords in source files
Rules Most Relevant to Vibe-Coded Apps
AI coding tools most commonly generate vulnerable code in these areas. Run these specific rule categories if you want a faster, targeted scan:
p/nodejs— Node.js security rules covering injection, path traversal, and insecure defaultsp/javascript— General JavaScript security rules including prototype pollutionp/typescript— TypeScript-specific rules for React and Next.js appsp/secrets— Detects hardcoded credentials and API keys in any language
Automate It in CI
Add Semgrep to your GitHub Actions workflow to catch security bugs on every pull request, before AI-generated code gets merged into your main branch:
- name: Run Semgrep
run: semgrep scan --config auto --error .
For a fully automated scan with zero configuration, use Hammering.ai. Paste your repository URL and get a comprehensive security report covering all the vulnerability classes Semgrep and our custom rules detect, organized by severity and fix priority.