豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Add policy enforcement for terminal commands and file operations #431

@L1AD

Description

@L1AD

This server gives agents direct access to the host operating system:

  • execute_command -- runs arbitrary terminal commands
  • write_file -- writes to any path on the filesystem
  • kill_process -- terminates running processes

execute_command with arbitrary input is effectively root access. An agent can run rm -rf, install packages, modify system files, or exfiltrate data via network commands.

Suggestion: Consider documenting support for PolicyLayer/Intercept, an open-source MCP proxy that enforces policies on tool calls before execution.

Example policy:

version: "1"
default: deny

tools:
  execute_command:
    rules:
      - action: require_approval

  write_file:
    rules:
      - rate_limit: 10/minute

  kill_process:
    rules:
      - action: require_approval

hide:
  - execute_command

One line to set up: npx -y @policylayer/intercept init

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions