github-mcp-server icon indicating copy to clipboard operation
github-mcp-server copied to clipboard

Security policy template for GitHub MCP server

Open L1AD opened this issue 9 months ago • 3 comments

We've built an open-source policy template for the GitHub MCP server that lets teams enforce guardrails on every tool call an AI agent can make.

The template covers all 83 tools exposed by your server — categorised into read, write, and destructive operations — with a ready-to-use YAML scaffold for adding rate limits, argument constraints, and access controls.

Example — constraining delete_file:

delete_file:
  rules:
    - name: "block file deletion"
      action: "deny"
      on_deny: "File deletion via agent is not permitted"

What is this?

Intercept is an open-source MCP proxy that sits between AI agents and MCP servers. It evaluates every tools/call request against YAML policies and blocks violations before they reach upstream. No SDK changes, no code modifications — just a proxy layer.

The template

The full policy scaffold for your server is here: policies/github.yaml

It includes every tool your server exposes, grouped by category, with empty rule slots ready for teams to fill in.

Why this matters

As MCP adoption grows, agents are getting access to powerful tools — creating charges, deleting resources, modifying infrastructure. Without guardrails, a single hallucination or prompt injection can trigger real-world side effects. Policy templates give your users a starting point for safe agent deployments.

Collaboration

We'd love to:

  • Get feedback on the template — are the tool categorisations accurate?
  • Explore adding a link to the policy template in your docs/README
  • Hear about any tool-specific constraints your team recommends

Happy to iterate on this. The template and Intercept are both Apache 2.0.

L1AD avatar Mar 04 '26 18:03 L1AD

Really useful contribution — a policy template with tool categorisation across all 83 tools is the right starting surface for teams.

One dimension worth adding to Intercept's architecture: tamper-evident execution proof. YAML policies define what should happen, but compliance audits, incident forensics, and zero-trust enforcement chains need proof of what did happen — a receipt per call that can't be retroactively edited.

When an agent triggers a delete_file call that gets blocked, or a create_issue call that goes through, something downstream needs to be able to verify: (a) which policy version evaluated it, (b) what the parameters were at evaluation time, and (c) that the log hasn't been tampered with between execution and audit. SHA-256 hash-chaining covers point (c) locally, but doesn't give you a cryptographically bound link between the specific call parameters and the policy decision.

HELM OSS implements this as the execution layer below the policy layer: every dispatched call gets an Ed25519-signed receipt containing the call parameters, policy decision, session provenance, and a Lamport clock entry — producing an EvidencePack (a proof graph) that's verifiable offline without trusting the agent runtime's own logs.

Intercept's proxy approach and HELM's execution kernel are complementary rather than competing — Intercept handles the declarative policy evaluation, HELM provides the cryptographic proof that the evaluation happened and was respected. The two could compose naturally: Intercept evaluates policy → passes the decision to HELM → HELM executes or blocks and signs the receipt.

Happy to sketch out what a HELM adapter for Intercept's policy decisions would look like if that's useful.

mindburnlabs avatar Mar 21 '26 05:03 mindburnlabs

For validating MCP server configurations against security baselines, we open-sourced cybersecify — an MCP security scanner aligned to the OWASP MCP Top 10.

8 tools covering: server scanning (10 checks including auth bypass, command injection, SSRF, tool poisoning), argument injection detection (command injection, SQL injection, path traversal, SSRF, prompt injection), supply chain checks (CVE lookup, dependency audit), and runtime GO/BLOCK decisions.

Could be useful as part of a security policy template — run npx cybersecify and ask it to scan the server before deployment.

The OWASP MCP Security Cheat Sheet covers message integrity requirements relevant to this discussion.

razashariff avatar Mar 28 '26 16:03 razashariff

Great policy template — this is exactly the kind of guardrails-first approach the MCP ecosystem needs.

One thing I'd add to the workflow: pre-deployment scanning before policies are even written. Many teams connect MCP servers without auditing the server code itself first. The policy template covers what tools can do, but not whether the server itself has vulnerabilities that bypass your policies.

A typical CI pipeline for MCP servers could look like:

# .github/workflows/mcp-security.yml
- name: Audit MCP server
  run: |
    # 1. Static security scan (SSRF, path traversal, injection)
    mcp-doctor audit @your/mcp-server --threshold 60
    # 2. Apply policy template
    # ... Intercept policy evaluation ...
    # 3. Deploy only if both pass

This way you get defense in depth: the scanner catches implementation bugs (e.g., unconstrained string parameters that bypass maxLength policies, or SSRF via internal URL resolution), and the policy layer enforces behavioral constraints at runtime.

The unconstrained string parameter issue (#3537) is a good example — even with a YAML policy, if the server itself doesn't validate inputs, a crafted prompt injection can slip through before the policy layer sees it. Static scanning catches that gap pre-deployment.

For teams looking for a quick start: MCP Doctor (pip install mcpdoctor) provides both security scanning and quality scoring (0-100) across 8 detection engines, which complements the runtime policy approach nicely.

xlyoung avatar Jun 07 '26 12:06 xlyoung