Token导航 LogoToken导航TokenDH.com
MCP Shield Action logo
安全风控未说明官方级别未说明来源级核验

MCP Shield Action

MCP Server

GitHub Action,用于扫描MCP服务器以检测安全问题、合规性差距和风险因素。

工具数

0

提示词数

0

GitHub Stars

1

资源数

0
安全GitHub本地部署

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

thuggeelya

提供方

thuggeelya

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

MCP屏蔽动作

GitHub Action扫描MCP服务器的安全问题、合规漏洞和风险因素。

用途 mcp屏蔽cli --跨合规性、安全性和咨询套件的自动检查。

快速开始

name: MCP Shield
on: [push, pull_request]

permissions:
  contents: read
  pull-requests: write
  security-events: write

jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
      - uses: thuggeelya/mcp-shield-action@v1
        with:
          server: 'node dist/index.js'

输入

输入必填默认说明
serveryes--服务器命令(例如。, node dist/index.js, npx -y @foo/bar)
fail-on没有high失败CI的最低严重性: critical, high, medium, low, any
comment没有true将扫描结果作为PR评论
badge没有true在输出中生成徽章URL
ml没有false启用基于ML的快速注射检测
sarif没有true生成SARIF报告并上传到GitHub代码扫描
version没有latest要安装的mcp-shield-cli版本

输出

输出描述
score数字分数(0-100)
grade字母等级(A+至F)
badge-urlshields.io徽章URL
report-jsonJSON报告文件的路径
report-sarifSARIF报告文件的路径

徽章

扫描成功后,在README中添加一个徽章:

[![MCP Shield](https://img.shields.io/badge/MCP_Shield-A%2B%20(95)-brightgreen)](https://github.com/thuggeelya/mcp-shield)

行动输出a badge-url 您可以直接使用:

- uses: thuggeelya/mcp-shield-action@v1
  id: shield
  with:
    server: 'node dist/index.js'
- run: echo "Badge: ${{ steps.shield.outputs.badge-url }}"

公关评论

comment: true (默认)并由拉取请求触发,Action会发布一份详细报告,其中包含具体发现、受影响的工具/字段和可操作的建议:

## MCP屏蔽报告 分数:57/100(D级) 检查:22 |通过:13 |失败:1 |警告:7 ### 研究结果 #### :x: SEC-004 失败——发现5项危险操作(CWE-78、CWE-250) - [high] Destructive operation: delete_pod - [high] Destructive operation: delete_deployment - [high] Exec operation: exec_command #### :警告: SEC-002 警告——发现3个潜在的注射载体(CWE-78、CWE-89) - [high] Potential injection vector: run_query.sql - [medium] Unconstrained path field: read_file.path ### 建议 :red_circle:阻止危险操作(找到5个) > 检查并限制破坏性/执行工具,或使用带有--deny的mcp-shield代理 > 影响: delete_pod, delete_deployment, exec_command

GitHub代码扫描(SARIF)

默认情况下(sarif: true),Action生成 沙林2.1.0 通过以下方式报告并上传到GitHub的“安全”选项卡 codeql-action/upload-sarif.结果显示在下 安全→ 代码扫描警报 具有CWE参考和严重程度评分。

不需要额外的配置——它开箱即用。

要禁用SARIF上传:

- uses: thuggeelya/mcp-shield-action@v1
  with:
    server: 'node dist/index.js'
    sarif: false

例子

严格模式(任何警告都失败)

- uses: thuggeelya/mcp-shield-action@v1
  with:
    server: 'node dist/index.js'
    fail-on: medium

使用ML检测

- uses: thuggeelya/mcp-shield-action@v1
  with:
    server: 'node dist/index.js'
    ml: true

基于npx的服务器

- uses: thuggeelya/mcp-shield-action@v1
  with:
    server: 'npx -y @modelcontextprotocol/server-memory'

在后续步骤中使用输出

- uses: thuggeelya/mcp-shield-action@v1
  id: shield
  with:
    server: 'node dist/index.js'
    fail-on: critical
- run: |
    echo "Score: ${{ steps.shield.outputs.score }}"
    echo "Grade: ${{ steps.shield.outputs.grade }}"
    if [ "${{ steps.shield.outputs.score }}" -lt 50 ]; then
      echo "::warning::Low security score"
    fi

许可证

Apache 2.0

目录标签

目录标签

安全GitHub本地部署安全扫描合规检查风险评估GitHub集成

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP