# 使用 Homebrew, MacPorts, Nix, scoop 安装 terrascan

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

## 安装

```sh
sudo av install brew:terrascan
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install terrascan
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install terrascan
```

  证据: MacPorts ports tree: sysutils/terrascan/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#terrascan
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/terrascan
```

  证据: Scoop official bucket manifest trees: bucket/terrascan.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:terrascan
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/terrascan>
- **版本:** 1.19.9
- **来源摘要:** Detect compliance and security violations across Infrastructure as Code
- **主页:** <https://runterrascan.io/>
- **仓库:** <https://github.com/tenable/terrascan>
- **上游文档:** <https://runterrascan.io/>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/tenable/terrascan/archive/refs/tags/v1.19.9.tar.gz>
- **最后更新:** 2026-07-26T00:50:37+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- terrascan (cli)
- terrascan (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

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

Terrascan is an open-source static analyzer for Infrastructure as Code that checks cloud and Kubernetes configuration before deployment. Its official README describes scanning for misconfigurations, posture drift, security vulnerabilities, and compliance violations, with local CLI and CI/CD integration workflows.

### 项目历史

The project originated under Accurics and later moved under Tenable ownership, as reflected by changelog links that compare older releases under github.com/accurics/terrascan and later releases under github.com/tenable/terrascan. The current official repository is archived and states that it is no longer maintained.

### 采用历史

Terrascan became a package-manager-friendly IaC security tool because it distributed native release binaries, Docker images, and package recipes. The README documents Homebrew installation, AUR installation, and Docker usage, while the input metadata also lists MacPorts, Nix, and Scoop packages.

### 使用方式

In the package-nerd niche, Terrascan was used as a local scanner in developer workstations and CI jobs before Terraform, Kubernetes, Helm, Kustomize, CloudFormation, ARM, Dockerfile, or GitHub infrastructure changes were applied. Its value was the ability to run policy checks from a normal shell command without adopting a hosted platform first.

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

Terrascan is significant as part of the early wave of IaC security CLIs that package managers made easy to slot into pre-commit hooks, CI images, and ephemeral developer machines. Its archived status is now part of its history: packages may remain useful for reproducing older pipelines, but new deployments need to account for maintenance risk.

### 时间线

- 2020: v1.1.0 appears in the official changelog on September 16, 2020.
- 2021-2022: Changelog links show releases under the Accurics repository path.
- 2022: Later changelog entries move to the Tenable repository path.
- 2023: v1.18.3 appears in the official changelog on August 3, 2023.
- 2024: GitHub page lists v1.19.9 as latest release on September 18, 2024.
- 2026: Official repository is archived and marked no longer maintained.

### Related projects

- Terrascan sits in the same IaC and cloud-security package niche as Terraform policy scanners, Kubernetes manifest linters, and CI security gates.

### 来源

- <https://github.com/tenable/terrascan official README, archive notice, installation notes, and feature list.>
- <https://raw.githubusercontent.com/tenable/terrascan/master/CHANGELOG.md official changelog showing Accurics-to-Tenable release history.>
- source_facts.package-manager lists brew, macports, nix, and scoop packaging.


## 安全说明

infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- infrastructure mutation or orchestration signal

## 源数据库详情

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

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

- Nix - terrascan: normalized package name match | nixpkgs package indexes: pkgs/by-name/te/terrascan/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - terrascan: normalized package name match | MacPorts ports tree: sysutils/terrascan/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/terrascan: normalized package name match | Scoop official bucket manifest trees: bucket/terrascan.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Cloud CLI packages](https://pkg.so/zh-hans/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [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.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [checkov](https://pkg.so/zh-hans/brew/checkov/) - Shares pkgdb curated category or tags: cli, compliance, kubernetes, security, static-analysis.
- [tfsec](https://pkg.so/zh-hans/brew/tfsec/) - Shares pkgdb curated category or tags: cli, security, static-analysis, terraform.
- [kubescape](https://pkg.so/zh-hans/brew/kubescape/) - Shares pkgdb curated category or tags: cli, compliance, kubernetes, security.
- [kube-bench](https://pkg.so/zh-hans/brew/kube-bench/) - Shares pkgdb curated category or tags: cli, compliance, kubernetes, security.
- [terraform-iam-policy-validator](https://pkg.so/zh-hans/brew/terraform-iam-policy-validator/) - Shares pkgdb curated category or tags: cli, compliance, security, terraform.
- [intercept](https://pkg.so/zh-hans/brew/intercept/) - Shares pkgdb curated category or tags: cli, compliance, security, static-analysis.
- [zizmor](https://pkg.so/zh-hans/brew/zizmor/) - Shares pkgdb curated category or tags: cli, security, static-analysis.
- [snyk-cli](https://pkg.so/zh-hans/brew/snyk-cli/) - Shares pkgdb curated category or tags: cli, iac, security.

## Combined YAML source

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