# Sentinel (HashiCorp)

用于定义和执行 HashiCorp 产品规则的命令行工具及策略即代码语言。

> 这是 OpenNavo 上 Sentinel (HashiCorp) 页面的 Markdown 版本，内容与网页相同： <https://opennavo.com/zh/apps/sentinel>

- **最新版本**: `0.41.1`
- **开发者**: HashiCorp
- **主页**: <https://docs.hashicorp.com/sentinel>
- **分类**: [开发工具](https://opennavo.com/zh/categories/developer-tools)
- **安装**: `brew install --cask sentinel`
- **近 30 天安装**: 48
- **Homebrew**: 可以安装，由 Homebrew 更新
- **下载地址**: <https://releases.hashicorp.com/sentinel/0.41.1/sentinel_0.41.1_darwin_arm64.zip>
- **SHA-256**: `52bc7058e460d39abbb36b53f02bf5c75a847dc6f861294c962b57c95f8a47af`
- **附带命令**: sentinel

SHA-256 只用来核对下载的文件是否完整，不代表安全认证。

## 安装与卸载内容

```json
[
  {
    "declaration": {
      "binary": [
        "sentinel"
      ],
      "target": "$HOMEBREW_PREFIX/bin/sentinel"
    },
    "phase": "install",
    "sources": [
      "sentinel"
    ],
    "target": "$HOMEBREW_PREFIX/bin/sentinel",
    "type": "binary"
  },
  {
    "declaration": {
      "zap": []
    },
    "phase": "cleanup",
    "sources": [],
    "type": "zap"
  }
]
```

## 介绍

Sentinel 是 HashiCorp 的策略即代码语言和框架。它可用于定义 HashiCorp 产品用户获准执行的操作，并主动执行策略，阻止不符合规则的变更。此 Homebrew cask 安装的是 Sentinel 命令行工具，而非图形应用。

Sentinel 可用于：
- 使用 Sentinel CLI 编写并运行策略示例。
- 将策略应用于基础设施工作流，包括在 HCP Terraform 中检查基础设施是否符合策略。
- 在 Vault 中使用策略，根据用户角色或端点控制对机密的访问。
- 在 Nomad 中使用策略，根据作业驱动程序等属性控制作业。

开始使用时，运行 `brew install --cask sentinel` 安装 cask，然后通过 Sentinel CLI 编写并运行策略。HashiCorp 还提供语言文档、引导式示例，以及用于使用模拟数据编写和测试策略的托管 playground。这些资源与本地安装的 CLI 相互独立。

Sentinel 专用于在 HashiCorp 产品中执行策略；文档中列出的使用示例包括 HCP Terraform、Vault 和 Nomad。[Sentinel 官方文档](https://docs.hashicorp.com/sentinel) · [Homebrew cask](https://raw.githubusercontent.com/Homebrew/homebrew-cask/HEAD/Casks/s/sentinel.rb)

## 系统要求

- 适用于 macOS 27, 26, 15, 14, 13, 12, 11 的版本 · 应用版本: 0.41.1 · Intel · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/sentinel.rb> · 核查于 2026-12-06
  - <https://releases.hashicorp.com/sentinel/0.41.1/sentinel_0.41.1_darwin_amd64.zip>
  - SHA-256: `d426d3b4b7b599505eaa8be2516e8fc016dbcdd9a4a51008c4b1fbf50a5b699b`
- 适用于 macOS 27, 26, 15, 14, 13, 12, 11 的版本 · 应用版本: 0.41.1 · Apple 芯片 · <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/sentinel.rb> · 核查于 2026-12-06
  - <https://releases.hashicorp.com/sentinel/0.41.1/sentinel_0.41.1_darwin_arm64.zip>
  - SHA-256: `52bc7058e460d39abbb36b53f02bf5c75a847dc6f861294c962b57c95f8a47af`

## 卸载

- `brew uninstall --cask sentinel`

普通卸载会删除应用本身，设置和缓存会保留。

## 资料与来源

- <https://opennavo.com/zh/apps/sentinel>
- <https://opennavo.com/zh/apps/sentinel/versions>
- <https://github.com/homebrew/homebrew-cask/blob/HEAD/Casks/s/sentinel.rb> · 核查于 2026-12-06
- <https://formulae.brew.sh/cask/sentinel>
