What do you want to do?
3 use cases
-
Search your code for a bug pattern in one command
Install the CLI and write a pattern query inline with -e.
View prompt
Using semgrep/semgrep, install it with `pipx install semgrep` and run `semgrep -e '$X == $X' --lang=py path/to/src` on my code. Summarise each match and say which look like real bugs.
-
Scan a project for vulnerabilities with Semgrep ci
Log in once and scan source code and dependencies from the app root.
View prompt
With semgrep/semgrep installed via `uv tool install semgrep`, run `semgrep ci` in my project root and group the findings by severity with a suggested fix for each.
-
Give your AI coding assistant Semgrep scans over MCP
Start the built-in MCP server so assistants can run scans while they write code.
View prompt
Using semgrep/semgrep, install it with `pipx install semgrep`, start `semgrep mcp`, then scan the files you changed and fix every finding.
Quick start with Semgrep
- Check you have what it needs: Python and pip, or pipx, uv, Homebrew or Docker; A project directory to scan; Optional free Semgrep account for extra rules.
- Open semgrep/semgrep on GitHub and read the README and license.
- Install with
pipx install semgrep - Run
semgrep -e '$X == $X' --lang=py path/to/src, using your own source path - Read each match, which is a Python comparison with identical sides and a possible bug
- Change the pattern and rerun to look for other shapes
These steps come from our top use case, Search your code for a bug pattern in one command, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for semgrep/semgrep
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forDevelopers and security engineers who want code scanning in the terminal and in pull requests.
- Why it is hot17k stars, talked about in 2 AI sources we track
- LanguageC
- Sourcegithub.com/semgrep/semgrep ยท Back to Hot repos
Requirements
- Python and pip, or pipx, uv, Homebrew or Docker
- A project directory to scan
- Optional free Semgrep account for extra rules
Add this badge to your README
Maintain Semgrep? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/semgrep-semgrep/?utm_source=github&utm_medium=badge&utm_campaign=semgrep-semgrep)
HTML
<a href="https://dedupedai.com/use-cases/semgrep-semgrep/?utm_source=github&utm_medium=badge&utm_campaign=semgrep-semgrep"><img src="https://dedupedai.com/badge/semgrep/semgrep.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about Semgrep
What is Semgrep?
Semgrep is a fast static analysis engine for finding bugs and vulnerabilities in source code and dependencies. Rules look like the code you already write, it supports 30+ languages, and it runs from the CLI, in CI on pull requests, or as an MCP server for AI coding assistants. It is an open-source project on GitHub: https://github.com/semgrep/semgrep.
How do I use Semgrep?
Install with pipx install semgrep; then run semgrep -e '$X == $X' --lang=py path/to/src, using your own source path; read each match, which is a Python comparison with identical sides and a possible bug. The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is Semgrep for?
Developers and security engineers who want code scanning in the terminal and in pull requests.
What can I do with Semgrep?
3 use cases so far, for example: Search your code for a bug pattern in one command; Scan a project for vulnerabilities with Semgrep ci; Give your AI coding assistant Semgrep scans over MCP. Each has steps and a copy-paste agent prompt.
What do I need to run Semgrep?
Python and pip, or pipx, uv, Homebrew or Docker; A project directory to scan; Optional free Semgrep account for extra rules.
What are alternatives to Semgrep?
Other hot AI repos in Security and science: Failproofai, Codex Security, Chgnet, Mace, Syft.
Is Semgrep safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.