Skip to content

semgrep

Static analysis CLI that finds bugs and security issues with code-like rules

Weak copyleft (OSI) · LGPL-2.1
  • macOS
  • Linux
  • CLI

Listed by , founder & editor

90

Health

Thriving

Overview

Stars

17,919

Last commit

3 days ago

Nov 2026

Repository age

6 years

since Dec 2019

Latest version

v1.186.0

Nov 2026

Contributors

–

23 active in 90 days

Releases

25

last 12 months

Docker pulls

78M

semgrep/semgrep

Language

C

Semgrep is a static analysis tool that searches source code for bugs, security issues and style violations. Its rules look like the code you write, so you do not need abstract syntax trees or regular expressions. It matches semantically, so a pattern for the value 2 can match code like x = 1; y = x + 1.

It supports more than 30 languages, including Python, JavaScript, TypeScript, Go, Java, C, Ruby, Rust and Terraform. You can run it from the command line, in an IDE, as a pre-commit check or in CI. Scans run locally and code is not uploaded by default.

The Community Edition analyzes within a single function or file, so it misses some security findings. The commercial Semgrep AppSec Platform adds cross-file analysis, supply chain scanning, secrets detection and proprietary rules. The engine is under LGPL-2.1, and a Docker image and Homebrew formula are available. It is an open option beside commercial SAST products.

Who it's for

Developers adding checks to CI

Rules are written like code and run in pre-commit or CI.

Skip if: You need deep cross-file analysis without a paid platform.

Security engineers writing custom rules

Simple patterns make team-specific checks quick to author.

Skip if: You want a managed rule set maintained for you at no cost.

Teams mixing many languages

One tool covers over 30 languages.

Skip if: You only need a single-language linter.

The problem it solves

Finding insecure patterns across a codebase with grep or regex is brittle. Semgrep matches code by meaning, so you can enforce rules and catch bugs without building a parser.

Strengths

  • Supports 30+ languages
  • Rules resemble the code being matched
  • Runs in IDE, pre-commit and CI
  • Scans run locally; code is not uploaded by default
  • Docker image and Homebrew formula

Trade-offs

  • Community Edition analyzes only within one function or file
  • Cross-file analysis and proprietary rules need the paid platform
  • Security coverage is weaker than the commercial edition

Self-host semgrep

Self-hostable
No (desktop or local app)
Docker image
semgrep/semgrep
Hosted plan
From $15/month · pricing

Frequently asked questions

Is Semgrep free?

The Community Edition is open source under LGPL-2.1. The AppSec Platform is a separate commercial offering with a hosted plan.

Is my code uploaded?

No. Scans run locally and code is not uploaded by default.

Which languages does it scan?

More than 30, including Python, JavaScript, Go, Java, C, Ruby, Rust and Terraform.

Where can I run it?

In the CLI, an IDE, as a pre-commit check, or in CI/CD.

Similar tools in Vulnerability and application security tools

Nuclei

Vulnerability and application security tools

Template-driven vulnerability scanner for security teams that write YAML checks

33k 4.1k yesterday Active MIT

Replaces NessusBurp Suite

Ghidra

Vulnerability and application security tools

Reverse engineering suite with disassembler and decompiler for malware analysts

101k 12k yesterday Thriving Apache-2.0

pentagi

Vulnerability and application security tools

Self-hosted AI agent system that runs automated penetration tests in a Docker sandbox

35k 5.6k 32 days ago Active MIT

Faraday

Vulnerability and application security tools

Self-hosted vulnerability manager that merges scanner output for security teams

6.9k 1.1k 25 days ago Active GPL-3.0

mCaptcha

Vulnerability and application security tools

Self-hosted proof-of-work CAPTCHA that avoids cookies and tracking, for site owners

2.5k 94 14 months ago Dormant AGPL-3.0

Replaces Google reCAPTCHAhCaptcha

clair

Vulnerability and application security tools

Static vulnerability scanner for OCI and Docker container images, run as an API service

11k 1.2k 12 days ago Active Apache-2.0