# 使用 Homebrew, zypper, apt 安装 modsecurity

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

## 安装

```sh
sudo av install brew:modsecurity
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install modsecurity
```

  证据: local Homebrew formula metadata

### Linux

- zypper (92%):

```sh
sudo zypper install modsecurity
```

  证据: openSUSE Tumbleweed package metadata: modsecurity from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

- Debian apt (92%):

```sh
sudo apt install libmodsecurity-dev
```

  证据: Debian stable package indexes: libmodsecurity-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

## 软件包事实

- **软件包键:** brew:modsecurity
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/modsecurity>
- **版本:** 3.0.16
- **来源摘要:** Libmodsecurity is one component of the ModSecurity v3 project
- **主页:** <https://github.com/owasp-modsecurity/ModSecurity>
- **仓库:** <https://github.com/owasp-modsecurity/ModSecurity>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/owasp-modsecurity/ModSecurity/releases/download/v3.0.16/modsecurity-v3.0.16.tar.gz>
- **最后更新:** 2026-06-29T22:26:54Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- modsec-rules-check (cli)
- modsec-rules-check (别名)

## 依赖

- libmaxminddb
- lua
- pcre2
- yajl

## 构建依赖

- autoconf
- automake
- libtool
- pkgconf

## macOS 提供的库

- curl
- libxml2

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 3.0.16
- 管理器更新时间: 2026-06-29
- 本地数据: OK
- 上游仓库: https://github.com/owasp-modsecurity/ModSecurity
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

ModSecurity is an open-source web application firewall engine that began in 2002 and became one of the most widely known defensive layers for inspecting HTTP traffic with configurable rules. Ivan Ristic created the original Apache-focused project; later stewardship passed through commercial and community hands, including Thinking Stone, Breach Security, Trustwave SpiderLabs, and OWASP. OWASP's project page records the 2024 transfer from Trustwave to OWASP and frames the project as the WAF engine commonly paired with the OWASP Core Rule Set.

### 项目历史

Technically, ModSecurity evolved from an Apache module into a cross-platform WAF engine. The v3/libmodsecurity architecture separated the core library from web-server connectors, removing Apache dependencies and allowing connectors for environments such as Nginx and Apache to feed traffic into the same SecRules processing engine. The upstream README describes libmodsecurity as the component that loads and interprets SecRules and applies traditional ModSecurity processing to HTTP content supplied by connectors.

### 使用方式

Its adoption history is tied to both open-source infrastructure and commercial WAF support. Breach Security described the project in 2006 as having more than 10,000 deployments, and Trustwave later provided commercial rules and support before announcing end-of-sale in 2021 and end-of-life for Trustwave support on July 1, 2024. Distribution through Homebrew and Linux development packages such as `libmodsecurity-dev` reflects its dual identity as both an installable command-line/dev library package and a component embedded by web-server modules, reverse proxies, hosting panels, and security stacks.

### 来源

- <https://formulae.brew.sh/formula/modsecurity>
- <https://github.com/owasp-modsecurity/ModSecurity>
- <https://owasp.org/www-project-modsecurity/>
- <https://www.helpnetsecurity.com/2006/09/25/breach-acquires-modsecurity-open-source-vendor-thinking-stone/>
- <https://www.levelblue.com/blogs/spiderlabs-blog/modsecurity-version-3.0-announcement>
- <https://www.levelblue.com/security-resources/software-updates/end-of-sale-and-trustwave-support-for-modsecurity-web-application-firewall/>


## 安全说明

没有找到 modsecurity 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

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

## 其他软件包管理器记录

- Debian apt - libmodsecurity-dev - 3.0.14-1+deb13u1: normalized package name match | Debian stable package indexes: libmodsecurity-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | ModSecurity v3 library component (development files) | https://www.modsecurity.org/
- Debian apt - libmodsecurity3t64 - 3.0.14-1+deb13u1: normalized package name match | Debian stable package indexes: libmodsecurity3t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | ModSecurity v3 library component | https://www.modsecurity.org/
- Ubuntu apt - libmodsecurity-dev - 3.0.12-1.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmodsecurity-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | ModSecurity v3 library component (development files) | https://www.modsecurity.org/
- Ubuntu apt - libmodsecurity3t64 - 3.0.12-1.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmodsecurity3t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | ModSecurity v3 library component | https://www.modsecurity.org/
- zypper - libmodsecurity3 - 3.0.15-2.3: normalized package name match | openSUSE Tumbleweed package metadata: libmodsecurity3 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Web application firewall engine | https://www.modsecurity.org/
- zypper - modsecurity - 3.0.15-2.3: normalized package name match | openSUSE Tumbleweed package metadata: modsecurity from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Web application firewall engine | https://www.modsecurity.org/
- zypper - modsecurity-devel - 3.0.15-2.3: normalized package name match | openSUSE Tumbleweed package metadata: modsecurity-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for modsecurity, a web application firewall engine | https://www.modsecurity.org/


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://pkg.so/zh-hans/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [pcre2](https://pkg.so/zh-hans/brew/pcre2/) - Runtime dependency declared by Homebrew.
- [lua](https://pkg.so/zh-hans/brew/lua/) - Runtime dependency declared by Homebrew.
- [yajl](https://pkg.so/zh-hans/brew/yajl/) - Runtime dependency declared by Homebrew.
- [libmaxminddb](https://pkg.so/zh-hans/brew/libmaxminddb/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [libtool](https://pkg.so/zh-hans/brew/libtool/) - Build dependency declared by Homebrew.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [gotestwaf](https://pkg.so/zh-hans/brew/gotestwaf/) - Shares pkgdb curated category or tags: cli, owasp, security, waf.
- [dependency-check](https://pkg.so/zh-hans/brew/dependency-check/) - Shares pkgdb curated category or tags: cli, owasp, security.
- [bounceback](https://pkg.so/zh-hans/brew/bounceback/) - Shares pkgdb curated category or tags: cli, security, waf.
- [gnutls](https://pkg.so/zh-hans/brew/gnutls/) - Shares pkgdb curated category or tags: cli, security.
- [krb5](https://pkg.so/zh-hans/brew/krb5/) - Shares pkgdb curated category or tags: cli, security.
- [nettle](https://pkg.so/zh-hans/brew/nettle/) - Shares pkgdb curated category or tags: cli, security.
- [libcap](https://pkg.so/zh-hans/brew/libcap/) - Shares pkgdb curated category or tags: cli, security.
- [nss](https://pkg.so/zh-hans/brew/nss/) - Shares pkgdb curated category or tags: cli, security.
- [hydra](https://pkg.so/zh-hans/brew/hydra/) - Security-sensitive metadata or terminology overlaps. Shared terms: cli, pcre2, security.
- [libselinux](https://pkg.so/zh-hans/brew/libselinux/) - Security-sensitive metadata or terminology overlaps. Shared terms: cli, pcre2, security.

## Combined YAML source

View the package source record on GitHub. [combined/modsecurity.yml](https://github.com/mxcl/pkgdb/blob/main/combined/modsecurity.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
