# 使用 Homebrew, Nix 安装 detect-secrets

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

## 安装

```sh
sudo av install brew:detect-secrets
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install detect-secrets
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#detect-secrets
```

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

## 软件包事实

- **软件包键:** brew:detect-secrets
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/detect-secrets>
- **版本:** 1.5.0
- **来源摘要:** Enterprise friendly way of detecting and preventing secrets in code
- **主页:** <https://github.com/Yelp/detect-secrets>
- **仓库:** <https://github.com/Yelp/detect-secrets>
- **许可证:** Apache-2.0
- **源码归档:** <https://files.pythonhosted.org/packages/69/67/382a863fff94eae5a0cf05542179169a1c49a4c8784a9480621e2066ca7d/detect_secrets-1.5.0.tar.gz>
- **最后更新:** 2026-05-20T12:50:03Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- detect-secrets (cli)
- detect-secrets-hook (cli)
- detect-secrets (别名)
- detect-secrets-hook (别名)

## 依赖

- certifi
- libyaml
- python@3.14

## 安装行为

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

## 版本和新鲜度

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

detect-secrets is Yelp's open-source command-line scanner for finding secrets in code and, more importantly, preventing newly introduced secrets from entering a repository. Its README describes the baseline workflow as a way to accept existing findings while blocking new ones.

### 项目历史

The GitHub repository was created in December 2017, and the README presents the tool as enterprise-friendly secret detection. Its changelog shows continued 1.x releases through 2024, including new detectors for GitLab, Telegram, PyPI, OpenAI, and IP addresses, plus support for newer Python versions.

### 采用历史

detect-secrets was designed for large repositories where immediately removing every old secret-like value may be impractical. The baseline model helped it fit pre-commit hooks and CI workflows: teams generate .secrets.baseline, audit it, and then use detect-secrets-hook or scans to catch new findings.

### 使用方式

The standard package-manager workflow is to install the CLI, run detect-secrets scan into .secrets.baseline, and wire detect-secrets-hook into staged-file or tracked-file checks. The README also documents auditing the baseline and tuning detectors and filters for local policy.

### 为什么软件包爱好者会关心

Package nerds care about detect-secrets because it is a practical DevSecOps CLI with a persistent config artifact rather than a one-shot grep-like scanner. It sits alongside pre-commit, GitHub secret scanning, trufflehog-style tools, and policy-driven CI checks.

### 时间线

- 2017: GitHub repository created for Yelp/detect-secrets.
- 2020: 0.14.x releases continued the pre-1.0 series.
- 2022: 1.2.0 added CI and release-pipeline work plus new token detectors.
- 2024: 1.5.0 added OS-agnostic baseline support and more modern token detectors.

### Related projects

- The project is commonly used with pre-commit-style hooks, CI pipelines, and other secret-scanning tools that enforce repository hygiene.

### 来源

- <https://github.com/Yelp/detect-secrets>
- <https://github.com/Yelp/detect-secrets/blob/master/README.md>
- <https://github.com/Yelp/detect-secrets/blob/master/CHANGELOG.md>
- <https://api.github.com/repos/Yelp/detect-secrets>


## 安全说明

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



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: .secrets.baseline
## 源数据库详情

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

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

- Nix - detect-secrets: normalized package name match | nixpkgs package indexes: detect-secrets from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix


## 相关链接

- [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.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [tartufo](https://pkg.so/zh-hans/brew/tartufo/) - Shares pkgdb curated category or tags: cli, pre-commit, secret-scanning, security.
- [kingfisher](https://pkg.so/zh-hans/brew/kingfisher/) - Shares pkgdb curated category or tags: cli, secret-scanning, security.
- [mantra](https://pkg.so/zh-hans/brew/mantra/) - Shares pkgdb curated category or tags: cli, secret-scanning, security.
- [gitleaks](https://pkg.so/zh-hans/brew/gitleaks/) - Shares pkgdb curated category or tags: cli, devsecops, secret-scanning, security.
- [git-hound](https://pkg.so/zh-hans/brew/git-hound/) - Shares pkgdb curated category or tags: cli, pre-commit, secret-scanning, security.
- [talisman](https://pkg.so/zh-hans/brew/talisman/) - Shares pkgdb curated category or tags: cli, devsecops, pre-commit, security.
- [ggshield](https://pkg.so/zh-hans/brew/ggshield/) - Shares pkgdb curated category or tags: cli, devsecops, security.
- [git-secrets](https://pkg.so/zh-hans/brew/git-secrets/) - Shares pkgdb curated category or tags: cli, secret-scanning, security.
- [cycode](https://pkg.so/zh-hans/brew/cycode/) - Both packages touch the same language runtime or ecosystem. Shared terms: certifi, cli, devsecops, libyaml, python.

## Combined YAML source

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


## 来源

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