# 使用 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
- **版本:** 1.5.6
- **来源摘要:** GitHub Actions linter
- **主页:** <https://github.com/suzuki-shunsuke/ghalint>
- **仓库:** <https://github.com/suzuki-shunsuke/ghalint>
- **最后更新:** 2026-07-29T16:05:00+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ghalint (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.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

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

- 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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
