# Install semgrep with Homebrew, MacPorts, Nix

Easily detect and prevent bugs and anti-patterns in your codebase. Version 1.168.0 via Homebrew; verified 2026-06-25.

## Install

```sh
sudo av install brew:semgrep
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install semgrep
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install semgrep
```

  Evidence: MacPorts ports tree: devel/semgrep/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#semgrep
```

  Evidence: nixpkgs package indexes: semgrep from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

## Package facts

- **Package key:** brew:semgrep
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/semgrep>
- **Version:** 1.168.0
- **Source summary:** Easily detect and prevent bugs and anti-patterns in your codebase
- **Homepage:** <https://semgrep.dev>
- **Repository:** <https://github.com/semgrep/semgrep>
- **Upstream docs:** <https://semgrep.dev/docs>
- **License:** LGPL-2.1-only
- **Source archive:** <https://github.com/semgrep/semgrep.git>
- **Last updated:** 2026-06-25T23:37:03Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- pysemgrep (cli)
- semgrep (cli)
- pysemgrep (alias)
- semgrep (alias)

## Dependencies

- certifi
- cryptography
- dwarfutils
- gmp
- libev
- pcre2
- pydantic
- python@3.14
- rpds-py
- sqlite
- tree-sitter
- zstd

## Build dependencies

- ocaml
- opam
- pkgconf

## Uses from macOS

- curl

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.168.0
- Package-manager updated: 2026-06-25
- Local data: ok
- Upstream repository: https://github.com/semgrep/semgrep
- info: No cached GitHub release or tag data was available.

## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** semgrep
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - semgrep: normalized package name match | nixpkgs package indexes: semgrep from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- MacPorts - semgrep: normalized package name match | MacPorts ports tree: devel/semgrep/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [dwarfutils](https://www.automicvault.com/pkg/brew/dwarfutils/) - Runtime dependency declared by Homebrew.
- [pcre2](https://www.automicvault.com/pkg/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [ocaml](https://www.automicvault.com/pkg/brew/ocaml/) - Build dependency declared by Homebrew.
- [opam](https://www.automicvault.com/pkg/brew/opam/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [datadog-static-analyzer](https://www.automicvault.com/pkg/brew/datadog-static-analyzer/) - Shares av.db curated category or tags: cli, developer-tools, security, static-analysis.
- [globstar](https://www.automicvault.com/pkg/brew/globstar/) - Shares av.db curated category or tags: cli, developer-tools, sast, static-analysis.
- [kube-score](https://www.automicvault.com/pkg/brew/kube-score/) - Shares av.db curated category or tags: cli, developer-tools, security, static-analysis.
- [spoa](https://www.automicvault.com/pkg/brew/spoa/) - Shares av.db curated category or tags: cli, developer-tools, security, static-analysis.
- [cflow](https://www.automicvault.com/pkg/brew/cflow/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [checkstyle](https://www.automicvault.com/pkg/brew/checkstyle/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [clazy](https://www.automicvault.com/pkg/brew/clazy/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [cppcheck](https://www.automicvault.com/pkg/brew/cppcheck/) - Shares av.db curated category or tags: cli, developer-tools, static-analysis.
- [sarif-tools](https://www.automicvault.com/pkg/brew/sarif-tools/) - Both packages touch the same language runtime or ecosystem. Shared terms: analysis, cli, code, developer, developer-tools.
- [vermin](https://www.automicvault.com/pkg/brew/vermin/) - Both packages touch the same language runtime or ecosystem. Shared terms: analysis, cli, code, detect, developer.

## Combined YAML source

View the package source record on GitHub. [combined/semgrep.yml](https://github.com/automic-vault/db/blob/main/combined/semgrep.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
