# 安装 semgrep

查看 semgrep 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install semgrep
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install semgrep
```

  证据: 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
```

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

## 软件包事实

- **软件包键:** brew:semgrep
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/semgrep>
- **版本:** 1.157.0
- **来源摘要:** Easily detect and prevent bugs and anti-patterns in your codebase
- **主页:** <https://semgrep.dev>
- **仓库:** <https://github.com/semgrep/semgrep>
- **上游文档:** <https://semgrep.dev>
- **许可证:** LGPL-2.1-only
- **源码归档:** <https://github.com/semgrep/semgrep.git>
- **更新:** 2026-04-14T12:17:01+09:00
- **生成来源:** 2026-05-26T22:45:13+00:00

## 可执行文件

- pysemgrep (cli)
- semgrep (cli)
- pysemgrep (别名)
- semgrep (别名)

## 依赖

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

## 构建依赖

- ocaml
- opam
- pkgconf

## macOS 提供的库

- curl

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 新鲜度

- 页面生成时间: 2026-05-26
- 管理器版本: 1.157.0
- 管理器更新时间: 2026-04-14
- 本地数据: ok
- 上游仓库: https://github.com/semgrep/semgrep
- info: No cached GitHub release or tag data was available.

## 安全说明

narrow executable package without higher-risk signals.

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

## 相关链接

- [sqlite](https://www.automicvault.com/pkg/brew/sqlite/) - Runtime dependency declared by Homebrew.
- [zstd](https://www.automicvault.com/pkg/brew/zstd/) - 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.
- [gmp](https://www.automicvault.com/pkg/brew/gmp/) - Runtime dependency declared by Homebrew.
- [certifi](https://www.automicvault.com/pkg/brew/certifi/) - Runtime dependency declared by Homebrew.
- [cryptography](https://www.automicvault.com/pkg/brew/cryptography/) - Runtime dependency declared by Homebrew.
- [tree-sitter](https://www.automicvault.com/pkg/brew/tree-sitter/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [opam](https://www.automicvault.com/pkg/brew/opam/) - Build dependency declared by Homebrew.
- [ocaml](https://www.automicvault.com/pkg/brew/ocaml/) - Build dependency declared by Homebrew.

## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- package version freshness
- package relationship graph
- cross-ecosystem install command graph
