Skip to content
Semgrep

Semgrep

Category: SAST
License: LGPL-2.1 (CE) / Commercial (Platform)
Suphi Cankurt
Suphi Cankurt
AppSec Enthusiast
Updated February 27, 2026
5 min read
Key Takeaways
  • Semgrep Community Edition (CE) is a free, open-source SAST engine (LGPL-2.1) scanning 30+ languages with 3,000+ community rules — single-file analysis only.
  • Semgrep AppSec Platform adds Semgrep Code (cross-file dataflow analysis), Supply Chain (SCA with reachability), and Secrets detection — free for up to 10 contributors and 10 private repos.
  • According to Semgrep's own benchmarks, Semgrep Code detects 72% of vulnerabilities in WebGoat vs 48% with CE alone — a 50% improvement through cross-file analysis.
  • Write rules in pattern syntax that mirrors source code — no query language to learn. Used by Dropbox, Figma, Snowflake; 14,300+ GitHub stars.

Semgrep is a SAST tool that finds bugs and security vulnerabilities using pattern-matching rules that look like the code you’re scanning.

It comes in two forms: Semgrep Community Edition (CE), the free, open-source CLI under LGPL-2.1, and the Semgrep AppSec Platform, which adds cross-file analysis, SCA, secrets detection, and team management on top.

The project has 14,300+ GitHub stars and the company (formerly Return to Corp) serves organizations including Dropbox, Figma, and Snowflake.

The rule syntax is the main differentiator. Instead of writing abstract regex or custom DSLs, you write rules that resemble the source code you want to match.

Custom rule creation takes minutes, not hours. The community registry has 3,000+ rules, and the Platform adds 20,000+ proprietary ones.

Semgrep AppSec Platform dashboard showing security scan orchestration and findings overview

What is Semgrep?

Semgrep Community Edition (CE) is a free, open-source static analysis tool (LGPL-2.1) that scans 30+ programming languages using pattern-matching rules.

CE performs single-file analysis — it matches patterns within individual files but does not trace data flow across file boundaries.

The Semgrep AppSec Platform extends CE with cross-file dataflow analysis (Semgrep Code), software composition analysis (Semgrep Supply Chain), secrets detection (Semgrep Secrets), and AI-powered triage (Semgrep Assistant).

30+ Languages
Covers Apex, Bash, C, C++, C#, Go, Java, JavaScript, TypeScript, Python, Ruby, Rust, Kotlin, PHP, Swift, Scala, Terraform, Dockerfile, and more. A generic mode handles unsupported formats.
Code-Like Rules

Rules resemble the source code they match. No regex or custom DSLs to learn.

The community registry has 3,000+ rules and the Platform adds 20,000+ proprietary ones.

10-Second Scans
Median CI scan time is 10 seconds. Runs locally by default. Code never leaves your machine unless you opt into the cloud platform.

Semgrep Community Edition (Free & Open Source)

Semgrep CE is the open-source CLI licensed under LGPL-2.1. It performs single-file, single-function static analysis across 30+ languages.

CE is what made Semgrep popular: fast, simple to install, and good at catching security patterns within individual files.

What CE includes:

  • Single-file pattern matching and taint analysis (intrafile only)
  • 3,000+ community rules from the Semgrep Registry
  • Support for 30+ languages
  • CLI-only operation — no dashboard, no cloud upload
  • SARIF, JSON, and human-readable output formats
  • Custom rule authoring in YAML

What CE does not include:

  • Cross-file dataflow analysis (data tracing across file boundaries)
  • Pro rules (20,000+ curated by Semgrep’s research team)
  • SCA, secrets detection, or AI triage
  • Team dashboards or centralized policy management

CE is a strong fit for individual developers, penetration testers, and small teams that want fast, free SAST they can extend with custom rules. For ad-hoc security scans and enforcing coding standards within single files, CE is genuinely useful on its own.

# Install CE
brew install semgrep

# Run with auto config (uses recommended rules)
semgrep --config=auto .

# Run with a specific rule from the registry
semgrep --config=p/ci .
Pattern-matching rules
To find insecure YAML loading in Python, you write a rule that looks like yaml.load(...) rather than a regex. Developers can write and review security rules without learning a separate language.

Semgrep AppSec Platform

The Semgrep AppSec Platform is the commercial product built on top of CE. It adds cross-file analysis, SCA, secrets detection, AI triage, and team management. The Platform is free for up to 10 contributors.

Semgrep Code (SAST with cross-file analysis)

Semgrep Code adds cross-file and cross-function dataflow analysis on top of CE’s pattern matching.

This means it can trace user-controlled input from an HTTP parameter in one file, through a service layer in another, to a SQL query in a third — and flag the injection vulnerability only if no sanitization exists along the path.

According to Semgrep’s published benchmarks, Semgrep Code detects 72% of vulnerabilities in WebGoat compared to 48% with CE alone, and 75% vs 44% in Juice Shop.

Semgrep cross-file dataflow analysis tracing user input from a Python view through session variables to a Jinja2 template

Semgrep bot posting a security finding as a GitHub pull request comment with code diff and remediation guidance

Semgrep Supply Chain (SCA)

Checks open-source dependencies for known vulnerabilities, then uses reachability analysis to determine whether your code actually calls the vulnerable function. CVEs in dependencies you import but never invoke get filtered out.

Semgrep Secrets

Scans source code for hardcoded credentials, API keys, and tokens. Goes beyond regex pattern matching by using semantic analysis to reduce false positives from test fixtures and example strings.

Semgrep Assistant

An AI layer that triages findings and suggests fixes. It adds context to each finding, explaining what the vulnerability is and how to remediate it, so developers don’t have to research every rule ID themselves. Semgrep reports 96% alignment with human triage decisions.

Platform pricing

TierPriceContributorsRepositoriesIncludes
Free$0Up to 1010 private + unlimited publicCode + Supply Chain + Secrets
Teams$35/month per contributorUnlimitedUp to 500SSO, REST API, dedicated support
EnterpriseCustomUnlimitedUnlimitedDedicated infra, custom onboarding

CE vs Platform: feature comparison

FeatureSemgrep CE (Free)Semgrep AppSec Platform
LicenseLGPL-2.1 (open source)Commercial (free tier available)
Analysis scopeSingle-file onlyCross-file and cross-function dataflow
Detection rate (WebGoat)~48%~72%
Detection rate (Juice Shop)~44%~75%
Languages30+30+
Rules3,000+ community3,000+ community + 20,000+ pro
SCANoYes (reachability analysis)
Secrets detectionNoYes (semantic analysis)
AI triageNoYes (Semgrep Assistant)
DashboardNo (CLI only)Yes (web dashboard)
PR commentsNoYes
Team managementNoYes
PriceFreeFree (10 contributors, 10 private repos) / $35/mo / Custom

When to choose CE vs the Platform

Choose Semgrep CE if:

  • You’re an individual developer or penetration tester running ad-hoc scans
  • Single-file pattern matching covers your use case
  • Budget is zero and you want a solid, extensible SAST engine
  • You maintain open-source projects and want free security scanning
  • Custom rule authoring for single-file patterns is your main need

Choose the Semgrep AppSec Platform if:

  • You need to trace data flow across file boundaries (injection vulnerabilities, auth bypasses)
  • Your team has more than a handful of developers and needs dashboards and policy management
  • SCA with reachability analysis and secrets detection round out your security stack
  • You want 20,000+ curated rules maintained by Semgrep’s security research team
  • The free tier (10 contributors, 10 private repos) covers your team size

Installation

MethodCommand
Homebrewbrew install semgrep
pippython3 -m pip install semgrep
Dockerdocker run --rm -v "${PWD}:/src" semgrep/semgrep semgrep --config=auto

Getting started

1
Install Semgrep CE — Use brew install semgrep, pip install semgrep, or Docker. The CLI is a single binary with no dependencies.
2
Run your first scan — Run semgrep --config=auto . in your project directory. This pulls the recommended ruleset and finishes in seconds.
3
Write a custom rule — Create a YAML file with a pattern that looks like the code you want to find. Test it interactively at semgrep.dev/editor.
4
Add to CI — Run semgrep ci in your pipeline. Official configs exist for GitHub Actions, GitLab CI, Jenkins, Buildkite, and CircleCI.

Who uses Semgrep

Used by Lyft, Dropbox, Snowflake, HashiCorp, Trail of Bits, GitLab, and Figma. For a detailed comparison with other tools, see the guides on Semgrep alternatives and Semgrep vs CodeQL.

Best for
Semgrep CE is best for individual developers and small teams that want fast, free SAST with custom rules. The AppSec Platform is best for organizations that need cross-file analysis, SCA, secrets detection, and team management — free for up to 10 contributors and 10 private repos.

Frequently Asked Questions

What is the difference between Semgrep CE and Semgrep AppSec Platform?
Semgrep Community Edition (CE) is the free, open-source CLI (LGPL-2.1) that performs single-file static analysis with 3,000+ community rules. The Semgrep AppSec Platform adds Semgrep Code (cross-file dataflow analysis), Semgrep Supply Chain (SCA with reachability), Semgrep Secrets (semantic credential detection), Semgrep Assistant (AI triage), managed dashboards, and 20,000+ pro rules. The Platform is free for up to 10 contributors, with the Teams plan at $35/month per contributor.
Is Semgrep CE free?
Yes. Semgrep Community Edition is completely free and open-source under LGPL-2.1. You can scan unlimited codebases, write unlimited custom rules, and integrate it into any CI/CD pipeline at no cost. CE includes 3,000+ community rules and supports 30+ languages. The limitation is single-file analysis only — cross-file dataflow tracking requires the Semgrep AppSec Platform.
When should I upgrade from Semgrep CE to the AppSec Platform?
Upgrade when you need cross-file dataflow analysis (tracing data across multiple files), SCA with reachability analysis, secrets detection, team dashboards, or managed rule sets. According to Semgrep’s benchmarks, Semgrep Code detects 72% of vulnerabilities in WebGoat compared to 48% with CE. The Platform’s free tier supports up to 10 contributors and 10 private repositories.
How fast is Semgrep?
Median CI scan time is 10 seconds according to the Semgrep website. Both CE and the Platform run locally by default — code never leaves your machine unless you opt into the cloud platform.
What languages does Semgrep support?
Semgrep supports 30+ languages including Python, JavaScript, TypeScript, Go, Java, C, C++, C#, Ruby, Rust, Kotlin, PHP, Swift, Scala, Terraform, Dockerfile, and more. It also has a generic mode for unsupported languages using ERB, Jinja, and similar templates.
How does Semgrep compare to SonarQube?
Semgrep is faster to set up and its rule syntax is easier to learn, since rules look like the code you want to match. SonarQube covers broader code quality analysis beyond security, including code smell detection and technical debt tracking. Semgrep CE is security-focused; SonarQube covers quality and security together.