semgrep

Install command:
brew install semgrep

Easily detect and prevent bugs and anti-patterns in your codebase

https://semgrep.dev

License: LGPL-2.1-only

Development: Pull requests

Formula JSON API: /api/formula/semgrep.json

Formula code: semgrep.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 1.185.0
head ⚡️ HEAD

Patches:

https://github.com/daeho-ro/semgrep/commit/b111bda71b66813dc44741ba9c85c17e1c1f30d9

Depends on:

certifi 2026.10.23 Mozilla CA bundle for Python
cryptography 50.0.2 Cryptographic recipes and primitives for Python
dwarfutils 2.3.3 Dump and produce DWARF debug information in ELF objects
gmp 6.3.0 GNU multiple precision arithmetic library
libev 4.33 Asynchronous event library
pcre2 10.49 Perl compatible regular expressions library with a new API
pydantic 2.14.3 Data validation using Python type hints
python@3.15 3.15.2 Interpreted, interactive, object-oriented programming language
rpds-py 2026.9.1 Python bindings to Rust's persistent data structures
sqlite 3.54.1 Command-line interface for SQLite
tree-sitter 0.27.2 Incremental parsing library
zstd 1.5.7 Zstandard is a real-time compression algorithm

Depends on when building from source:

ocaml 5.5.2 General purpose programming language in the ML family
opam 2.6.1 OCaml package manager
pkgconf 3.0.11 Package compiler and linker metadata toolkit

Uses from macOS: rsync (build), curl

Binaries: pysemgrep, semgrep

GitHub Packages downloads:

Last 30 days98,520
Downloads1,820,325
Analytics install events (30 days)8,973
Downloads / install events (30 days)11.0×

Source: GitHub Packages, fetched 2026-11-17T00:55:00Z. Analytics dates: 2026-10-18 to 2026-11-17. Totals exclude downloads from Bintray before the migration to GitHub Packages. Downloads and install attempts measure different things; the difference does not count analytics opt-outs. Definitions and limitations.

Analytics:

30 days90 days365 days
Installs8,96019,77176,179
Installs (--HEAD)1336119
Installs on Request8,93519,73676,101
Installs on Request (--HEAD)1336119
Build Errors17

Known vulnerabilities in the current version:

GHSA-xcq7-p3pf-p88h (medium) OpenTelemetry Python: Unbounded tracestate parsing in opentelemetry-api
GHSA-w4fh-qvv9-3v23 (medium) Model Context Protocol Python SDK: Server bearer-token authentication accepts tokens issued for a...
GHSA-5h93-6whr-6q8j (medium) Model Context Protocol Python SDK: HTTP client transports followed cross-origin redirects carryin...
GHSA-rwrf-2pqf-9j8j (medium) Model Context Protocol Python SDK: Client fetched server-chosen $ref URLs while validating tool r...
GHSA-mf5v-w3w3-f6cg (medium) OpenTelemetry Python API: Denial of service through quadratic-time traceparent parsing
GHSA-84m7-p3x7-pcfv (high) MCP Python SDK: Unbounded Session Accumulation in StreamableHTTP Transport Enables Resource Exhau...

Data from Homebrew/advisory-database. Run brew vulns semgrep for a live check.