CLI Tools2026年5月13日·1 分钟阅读

Rampart — Policy Firewall for AI Agents

Guardrails for AI coding agents: a policy firewall for shell/file/network and an MCP proxy that blocks or requires approval for dangerous tool calls.

简介

Rampart 是一个给 AI 编码 Agent 用的“防火墙”:用 YAML 策略约束命令/文件/网络访问,并可作为 MCP 代理拦截 tools/call 请求。

最适合: 在 Claude Code/Cline/Codex CLI 等自主模式下安全运行,并加固 MCP 工具链

适配: macOS/Linux/Windows;支持 rampart setup 与 MCP 代理;适配 stdio MCP servers

配置时间: 10–20 分钟

关键事实(已验证)

  • README 提供 rampart setup 的多 Agent 集成路径(claude-code/cline/openclaw/codex)。
  • README 展示 MCP 代理用法:rampart mcp -- <server cmd> 作为上游包装层。
  • GitHub:68 stars · 10 forks;最近更新 2026-05-12(GitHub API 验证)。

正文

建议用三步落地 Rampart:

  1. 先以“观察模式”思路接入:跑你平时的工作流,重点看审计日志里都发生了什么。
  2. 为破坏性操作加 deny(delete/rm/drop 等),为高风险工具加人工审批。
  3. 对不支持 hooks 的客户端(如 Claude Desktop/Cursor)用 MCP 代理:把 server 包一层,在 tool 级别施策。

README 原文节选(verbatim)

Rampart

A firewall for AI coding agents.

Go License CI Release Docs


Claude Code's --dangerously-skip-permissions mode, and similar autonomous modes in Cline and Codex, give agents unrestricted shell access. Your agent can read your SSH keys, exfiltrate your .env, or rm -rf / with no guardrails.

Rampart sits between the agent and your system. Every command, file access, and network request is evaluated against your policy before it executes. Dangerous commands never run.


Install

# Homebrew (macOS and Linux, recommended)
brew install peg/tap/rampart

# One-line install (no sudo required)
curl -fsSL https://rampart.sh/install | bash

# Go install (requires Go 1.24+)
go install github.com/peg/rampart/cmd/rampart@latest

Windows (PowerShell):

irm https://rampart.sh/install.ps1 | iex

After installing, run rampart quickstart or follow the setup steps below.


🙏

来源与感谢

Source: https://github.com/peg/rampart > License: Apache-2.0 > GitHub stars: 68 · forks: 10

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产