# 使用 Homebrew, Nix 安装 ghalint

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

## 安装

```sh
sudo av install brew:ghalint
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ghalint
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#ghalint
```

  证据: nixpkgs package indexes: pkgs/by-name/gh/ghalint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:ghalint
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/ghalint>
- **版本:** 1.5.6
- **来源摘要:** GitHub Actions linter
- **主页:** <https://github.com/suzuki-shunsuke/ghalint>
- **仓库:** <https://github.com/suzuki-shunsuke/ghalint>
- **许可证:** MIT
- **源码归档:** <https://github.com/suzuki-shunsuke/ghalint/archive/refs/tags/v1.5.6.tar.gz>
- **最后更新:** 2026-07-29T16:05:00+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- ghalint (cli)
- ghalint (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.5.6
- 管理器更新时间: 2026-07-29
- 本地数据: OK
- 上游仓库: https://github.com/suzuki-shunsuke/ghalint
- 检测到的最新版本: v1.5.6 (当前)
## 项目历史与用法

ghalint is a Go command-line linter for GitHub Actions workflow files and action metadata. It turns a small set of CI security practices into repeatable checks that can fail a build before a workflow grants broad permissions, exposes secrets through environment variables, or depends on mutable third-party action references.

### 项目历史

Shunsuke Suzuki published the first ghalint releases in January 2023. The README describes the tool as a linter for GitHub Actions security best practices, and its policy documents show the early focus: explicit job permissions, avoiding broad read-all or write-all permissions, limiting inherited secrets, and pinning actions to full-length commit SHAs.

The project later documented a port to the lintnet module ecosystem, connecting ghalint's original GitHub Actions rule set with a broader Jsonnet-powered linting framework. That migration path suggests the project became both a standalone binary and a policy corpus that could be reused by another linter.

### 采用历史

ghalint is a niche security tool rather than a general CI parser. Its adoption path is package-manager friendly: the official install guide lists Homebrew, Scoop, aqua, mise, GitHub Releases, and `go install`, while Homebrew exposes it as a one-command formula. That distribution pattern fits teams that want a small CI hardening check without installing a larger platform.

### 使用方式

Practitioners run `ghalint run` from a repository root to inspect workflow files under `.github/workflows`, or `ghalint run-action` for `action.yaml` and `action.yml` files. A `ghalint.yaml` configuration file can disable selected policies for named workflows, jobs, or actions when a repository has an intentional exception.

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

For package maintainers, ghalint is notable because it packages CI supply-chain advice as a fast local executable. It complements tools such as actionlint by concentrating on security posture: minimum permissions, safe secret handling, pinned action references, and checkout credential handling.

### 时间线

- 2023: v0.1.0 was published on GitHub Releases.
- 2023: Early policy docs covered job permissions, workflow secrets, inherited secrets, and immutable action references.
- After 2023: The README documented a ghalint module for lintnet.

### Related projects

- lintnet reuses the ghalint policy domain in a general-purpose Jsonnet linter.
- pinact is referenced by ghalint documentation as a helper for converting GitHub Actions tags to full-length commit SHAs.

### 来源

- <https://formulae.brew.sh/formula/ghalint>
- <https://github.com/suzuki-shunsuke/ghalint>
- <https://github.com/suzuki-shunsuke/ghalint/blob/main/docs/install.md>
- <https://github.com/suzuki-shunsuke/ghalint/blob/main/docs/policies/001.md>
- <https://github.com/suzuki-shunsuke/ghalint/blob/main/docs/policies/008.md>
- <https://github.com/suzuki-shunsuke/ghalint/releases/tag/v0.1.0>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** ghalint
- **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

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

- Nix - ghalint: normalized package name match | nixpkgs package indexes: pkgs/by-name/gh/ghalint/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [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.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [zizmor](https://pkg.so/zh-hans/brew/zizmor/) - Shares pkgdb curated category or tags: cli, github-actions, security.
- [bandit](https://pkg.so/zh-hans/brew/bandit/) - Shares pkgdb curated category or tags: cli, linter, security.
- [ratchet](https://pkg.so/zh-hans/brew/ratchet/) - Shares pkgdb curated category or tags: ci-cd, cli, security.
- [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.
- [raven](https://pkg.so/zh-hans/brew/raven/) - Security-sensitive metadata or terminology overlaps. Shared terms: actions, ci-cd, cli, github, github-actions.
- [frizbee](https://pkg.so/zh-hans/brew/frizbee/) - Security-sensitive metadata or terminology overlaps. Shared terms: actions, cli, github, github-actions, security.

## Combined YAML source

View the package source record on GitHub. [combined/ghalint.yml](https://github.com/mxcl/pkgdb/blob/main/combined/ghalint.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
