Semgrep

A fast, open-source static analysis tool that uses lightweight pattern matching to find bugs, security vulnerabilities, and anti-patterns across 30+ programming languages.

Developer

Semgrep, Inc.

verified_user
Visit Official Site open_in_new

description Technical Dossier

Semgrep is a static analysis engine that bridges the gap between simple regex-based linters and heavyweight commercial SAST products. Its core innovation is a pattern syntax that looks like the source code being analysed — a Semgrep rule for detecting hardcoded SQL queries in Python reads almost identically to the vulnerable code itself, making rule authoring accessible to developers rather than confined to security specialists. Under the hood, the engine parses source code into a generic AST representation and performs intra-file dataflow analysis, supporting taint tracking, constant propagation, and metavariable matching across function boundaries.

The open-source CLI (licensed under LGPL 2.1) is designed for speed. Semgrep analyses code incrementally and avoids whole-program compilation, making it practical for pre-commit hooks and CI gates on large codebases. A typical scan of 100,000 lines completes in under ten seconds. The community rule registry provides over 5,000 pre-built rules organised by language, framework, and vulnerability class — covering injection flaws, authentication bypasses, cryptographic misuse, insecure deserialization, and framework-specific pitfalls for Django, Flask, Spring, Express, React, and others.

Semgrep’s commercial platform (Semgrep AppSec Platform) adds cross-file and cross-function analysis, managed CI integration, a findings dashboard with triage workflows, and Semgrep Supply Chain for reachability-aware SCA that determines whether a vulnerable dependency function is actually called in your code. The combination of developer-friendly rule syntax, fast execution, and broad language coverage has driven adoption across thousands of organisations, from startups running the open-source CLI to enterprises using the full platform for their AppSec programs.

pattern Pattern-Based Analysis

Write detection rules using code-like patterns rather than complex AST queries — if you can read the language, you can write a rule in minutes.

speed Sub-Second Feedback

Incremental, intra-file analysis delivers results in seconds even on large monorepos, designed for tight CI feedback loops and IDE integration.

public Broad Language Support

Supports 30+ languages including Java, Python, JavaScript, TypeScript, Go, Ruby, C, C++, Kotlin, Swift, Rust, and Terraform HCL.

groups Community Rule Registry

5,000+ community-contributed rules covering OWASP Top 10, CWE patterns, framework-specific anti-patterns, and security best practices.

Distribution Model

Open Source

Free community edition available.
Enterprise support on request.

trending_up Popularity

Low 82 / 100 High

settings_suggest Deployment Complexity

Low 10 / 100 High

engineering Technical Difficulty

Low 30 / 100 High
Semgrep visualization
radar

Languages

30+

Community Rules

5,000+

Scan Speed

~10S FOR 100K LOC

License

LGPL 2.1 / COMMERCIAL