Tool profilesTested by us

Semgrep: scan your own code for bugs and security mistakes before you ship, free and open source

Semgrep is a fast command-line code scanner that searches your source for bugs and security issues using patterns and rules. The engine is open source and runs on your machine. Based on the official README and a small test we ran on fake code in an isolated folder: what it does, what we saw, its limits and what we could not confirm.

Type

Static code analysis scanner (command line)

License and cost

Engine under LGPL-2.1, free; some features need a paid platform account

Reviewed

4 Nov 2026

Version

v1.183.0 (release page, 29 Oct 2026; the version we tested)

Best for

Teams that write their own code, often with an AI assistant, and want a free check for risky patterns and common security mistakes before each release.

Watch out for

The free Community Edition only analyses within a single function or file, so it can miss problems that span several files. A clean scan is not proof of safety.

← All tool profilesNo. 9 / 11

In one sentence

Semgrep is a scanner for your own source code. You point it at a project and it looks for bugs, risky patterns and security mistakes using rules, which are short descriptions of the code shape to look for. This kind of check is called static analysis: it reads the code without running it.

Who it is for

Founders and small teams who write code, especially with help from AI assistants, and want a cheap automatic review of what was generated before it ships. It is a command-line tool, so you need to be comfortable typing commands. It does not replace a human review.

What the documentation says

Everything below comes from the project's README, its rules repository and the release page, which we read on 4 November 2026.

  • What it is: the README describes a fast, open-source static analysis tool that searches code for bugs and enforces coding standards and security guardrails.
  • Languages: the README says Semgrep Code supports more than 30 languages and names, among others, Python, JavaScript, TypeScript, Java, Go, Ruby, C, C++, C#, PHP, Rust and Kotlin. It says Semgrep Supply ChainSupply chain attack An attack that reaches you through something you already trust and install, such as a code package, a tool or a provider. Tap again to open the glossary covers 12 languages across 15 package managers.
  • Install: pipx install semgrep, uv tool install semgrep, python3 -m pip install semgrep, brew install semgrep (the README calls the Homebrew route best-effort) or a Docker image.
  • First scan: the README shows semgrep ci from the project root, optionally after semgrep login, and an ad hoc pattern search such as semgrep -e '$X == $X' --lang=py path/to/src.
  • Your code stays local: the README says that by default code is never uploaded, because the analysis runs on your machine.
  • Licences: the engine is under LGPL-2.1. The rules repository says its Community Edition rules are free to use under the Semgrep Rules License, and links to the licence text, which we did not read.
  • Latest release we saw: v1.183.0, dated 29 October 2026. One of its notes adds a third-party licences section to the help output.

What we tested

We installed Semgrep 1.183.0 on 4 November 2026 in an isolated folder on a Windows 10 computer with Python 3.14, using pip in a virtual environment. The package was a 59.5 MB download from PyPI, the environment took about 381 MB on disk and setup took about 2.5 minutes. We ran it with metrics turned off, on one sample file with fake data that contains three deliberately risky lines: a fake key written in the code, an eval() on text typed by a user, and a database query built by joining text. This is a tiny test: it shows how the tool behaves, not how good it is.

  • Our own rules, first try: 1 of 3. It found the eval() but silently missed the other two, because a Semgrep pattern cannot match part of a text string. It gave no warning that those rules never matched.
  • Same rules rewritten with regular expressions: 3 of 3.
  • Free rule packs from the registry (they download rules, not your code): p/python (151 rules) found 0 on this file, p/security-audit (79 rules) found 1 (the eval()), and p/secrets (37 rules) found 0: it did not flag our invented fake key, which may be because its format is not a real one.
  • Speed: about 8 to 10 seconds per run on one file, mostly start-up.

What it teaches: a clean result is not proof of safety, and every rule needs a test with a case that should trigger it.

The good

  • Free, open-source engine that runs on your own machine, with code kept local by default.
  • Covers many languages, so one tool can check a mixed project.
  • Rules are readable patterns, so a team can learn to write its own checks.
  • A free set of Community Edition rules is maintained in a public repository.

The limits it admits

  • The README says the Community Edition can only analyse code within the boundaries of a single function or file, so it may miss real problems in security situations where the data travels across files.
  • Cross-file and cross-function analysis, data-flow analysis, AI-assisted triage, supply-chain and secretsSecret (API key, token, password) Any piece of text that proves to a service that you are allowed in, such as an API key, a database password or an access token. Tap again to open the glossary scanning belong to Semgrep's platform, which has a free tier and paid tiers. Logging in from the command line also unlocks Pro rules and the Pro engine.
  • The README gives two rule counts ("20000+ proprietary rules" on the platform and "600+ high confidence rules" for Pro rules in the command line section) that we cannot reconcile from the page alone.

When not to use it

  • If you think a clean result means your code is safe. It only finds what the rules cover.
  • If you need analysis across files and services with the free Community Edition alone: its own README says that is a limit.
  • As your only check. Review, tests and dependency scanning still matter.

What it costs you

Time more than money. The README gives no estimate of setup time. The real work is choosing which rule sets to run, deciding what to fix and what to accept, tuning out false alarms and adding the scan to your build. Logging in to the platform is optional and brings features that are not all free. We have not measured any of this.

Typical setup mistakes

  • Scanning once and forgetting. Run it on every change, ideally in your build pipeline.
  • Never failing the build. A scan that never stops a release lets known risky patterns ship.
  • Silencing findings without a reason. Keep a short note on why each exception is acceptable.
  • Treating the free engine as full coverage. Know that cross-file problems can slip through.
  • Pasting secrets into an online tool or an AI chat to "check" a finding. Keep keys out of prompts.

How to check that it works

What we did and you can repeat in a test folder with fake data: write a small file with a risky line on purpose, such as a fake key and an eval(), write or pick a rule for each, run Semgrep on the folder and confirm that every rule fires on its case. If one does not, fix the rule before trusting it. Never test with real keys or on a production system.

Where to start

A short path, the way we ran it (a test folder, fake data):

  1. Create a folder and a virtual environment, then install: python -m venv venv and venv/Scripts/python -m pip install semgrep (on macOS or Linux, venv/bin/python). The official README also lists pipx, uv, Homebrew and Docker.
  2. Check the version: semgrep --version.
  3. Write a small file with fake risky code and a rules.yml with one rule per risk.
  4. Run semgrep --metrics=off --config rules.yml your-folder/.
  5. Check that every rule triggered. Then try a free pack such as --config p/security-audit and compare.

Official README for everything else: httpsHTTPS The secure version of the web address protocol: it encrypts what travels between a visitor and your site and checks that the site is the real one. Tap again to open the glossary://github.com/semgrep/semgrep

What we could not confirm

We tested one small sample on one computer, so we cannot say how many findings or false alarms it gives on a real project, how fast it is on a large codebase, or why the p/python and p/secrets packs found nothing on our file (our guess is that they look for narrower patterns, which we did not verify). We did not read the full documentation site, the text of the Semgrep Rules License or the platform pricing, we did not log in to the platform, and we do not know how it compares with other scanners. We also did not check what the official documentation says about running on Windows.

Glossary: static analysis, vulnerabilityVulnerability A weakness in software, a setting or a process that an attacker could use to get in or do harm. Tap again to open the glossary, supply chain. See also our Gitleaks profile for secrets in code and our OSV-Scanner profile for dependency checks.

More free tools

Other profiles in this section.

Sources

Follow us

New profiles and security news: YouTube (@safet2ship) and Instagram (@safet2ship).

YouTube channel · Instagram

Get the free runbooks

One-page security checklists for founders who build with AI. You get a confirmation email first, then the runbooks.

Send me the runbooks