Token导航 LogoToken导航

MCP Server · 开发工具

GitHub Security MCP

一个为AI代理提供的GitHub安全态势分析工具,涵盖组织、仓库、Actions、密钥、供应链和访问控制等全方位的安全检查。

未说明官方级别未说明来源级核验工具 39
TypeScriptClaude开发工具Claude DesktopCursorWindsurf

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
badchars
提供方
badchars

工具数量

39

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

5

仓库热度

收录来源

1 个

MCP World

选型结论

GitHub Security MCP 属于开发工具类 MCP Server,公开资料标注 39 个工具,通过传输方式未标注接入,适配 Claude Desktop、Claude、Cursor,没有现成的安装命令;接入前要先准备 OAuth 授权。

分类

开发工具

传输方式

未说明

认证方式

OAuth 授权

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 39 个工具,随便调一个只读工具确认能返回结果。

接入前确认

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

公开资料仍需确认:安装命令

详细介绍

GitHub security posture analysis for AI agents.

GitHub Enterprise security features cost $21/user/month.

This gives your AI agent the same visibility for free — org, repos, Actions, secrets, supply chain.

The Problem • How It's Different • Quick Start • What The AI Can Do • Tools • Checks • Architecture

______________________________________________________________________

问题

GitHub的安全性是分散的。您需要单独的工具来进行组织设置、仓库配置、操作工作流分析、秘密扫描、供应链和访问控制。没有一个工具能涵盖这一切,也没有一个能与人工智能代理配合使用。

Traditional workflow:
  manually check org settings                →  click through 15 pages
  run github-advisory-db for each repo       →  one at a time
  grep workflows for script injection        →  miss half the patterns
  review collaborator access                 →  spreadsheet hell
  check secret scanning alerts               →  another dashboard
  ──────────────────────────────────────────
  Total: hours of manual work per org

github安全mcp 为您的AI代理提供39个工具和45个安全检查 模型上下文协议.代理直接调用GitHub API,了解它发现了什么,并告诉您要修复什么。

With github-security-mcp:
  You: "Audit my GitHub org for security issues and prioritize the fixes"

  Agent: → checks org settings (2FA, SSO, member privileges)
         → scans repos (branch protection, secret scanning, Dependabot)
         → analyzes workflows (script injection, unpinned actions, OIDC)
         → reviews access (teams, collaborators, PATs, GitHub Apps)
         → "12 critical, 8 high — here are the top 5 to fix now"

______________________________________________________________________

这有什么不同

现有的工具专注于GitHub安全的一个方面。github security-mcp覆盖了整个堆栈,可以与任何AI代理配合使用。

Existing Tools github-security-mcp

Interface CLI / GitHub UI / dashboards MCP — AI agent calls tools in real-time

Scope Single domain (Actions, or secrets, or repos) Full stack: org + repos + Actions + secrets + supply chain + access

Correlation None — isolated findings Agent chains: "This unpinned action + write permissions + no environment protection = supply chain risk"

Remediation Generic docs links Agent generates specific fix instructions for your exact configuration

Actions analysis Most tools skip workflows 8 checks: script injection, PR target, OIDC, pinning, secrets, runners, environments, permissions

Enterprise features Require GitHub Enterprise ($21/user/mo) Free — uses public API with graceful degradation for Enterprise-only features

Specific comparisons with popular tools

工具它能做什么它不能做什么
全明星通过GitHub App强制执行仓库设置无操作分析、无秘密扫描、无访问审核
记分卡OpenSSF仓库安全评分单一仓库焦点,无组织级检查,无实时交互
合法化组织+回购策略执行CLI输出,无AI集成,操作分析有限
踏步安全/加固转轮运行时操作安全仅操作,无组织/仓库/访问检查
GitGuardian 的提交中的秘密检测仅SaaS,无自托管,仅限于秘密域
套接字供应链风险分析以包为重点,无组织/行动/访问分析

所有这些都是优秀的工具。github安全mcp并没有取代它们——它填补了提供人工智能代理的空白 统一、交互式访问 跨所有GitHub安全域。

______________________________________________________________________

快速开始

安装

git clone https://github.com/badchars/github-security-mcp.git
cd github-security-mcp
bun install

设置身份验证

# Classic PAT (requires: repo, admin:org, admin:org_hook, admin:repo_hook)
export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Fine-grained PAT (preferred — least privilege)
# Organization: Members (read), Administration (read)
# Repository: Administration, Code scanning, Dependabot, Secret scanning,
#             Actions, Environments, Webhooks (all read-only)

连接到您的AI代理

Claude Code

claude mcp add github-security -- bun run /path/to/github-security-mcp/src/index.ts

Claude Desktop

增添 ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "github-security": {
      "command": "bun",
      "args": ["run", "/path/to/github-security-mcp/src/index.ts"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Cursor / Windsurf / other MCP clients

相同的JSON配置格式。将命令指向您的安装路径。

开始审核

You: "Audit my GitHub org for security misconfigurations"

就这样,剩下的就交给特工了。

______________________________________________________________________

AI能做什么

全面组织审计

You: "Run a complete security audit on our GitHub org"

Agent: → github_run_all {org: "myorg", repo: "main-app"}
       → 45 checks across 6 categories
       → github_audit_report
       → "34 findings: 4 critical, 7 high, 12 medium.
          Critical #1: No branch protection on main (REPO-001)
          Critical #2: Script injection in deploy.yml (ACT-001)
          Critical #3: 3 critical Dependabot alerts unfixed 90+ days (REPO-007)
          Critical #4: Unresolved secret scanning alerts (SEC-002)
          Here are the exact fixes for each..."

操作工作流安全

You: "Check our CI/CD workflows for supply chain risks"

Agent: → github_check_workflow_injection
         Found ${{ github.event.issue.title }} in run: block (deploy.yml:47)
       → github_check_workflow_pinning
         12 actions use tags instead of SHA pins
       → github_check_workflow_pr_target
         build.yml uses pull_request_target with checkout — critical risk
       → github_check_workflow_permissions
         Default GITHUB_TOKEN has write-all permissions
       → "4 supply chain risks found. The PR target + checkout pattern
          allows any fork to execute arbitrary code with write access
          to your repo. Fix this first."

访问控制审查

You: "Who has too much access to our repositories?"

Agent: → github_check_team_permissions
         "platform" team has admin on 47 repos, only 3 members
       → github_check_collaborators
         8 outside collaborators with write access
       → github_check_app_permissions
         "old-ci-bot" GitHub App has admin + all repos
       → github_check_pat_usage
         14 classic PATs with repo scope (should be fine-grained)
       → "Reduce blast radius: restrict platform team to maintain,
          remove 3 stale outside collaborators, limit old-ci-bot
          to specific repos, migrate classic PATs to fine-grained."

秘密曝光检测

You: "Are we properly protecting secrets across our repos?"

Agent: → github_check_secret_scanning
         Secret scanning disabled on 5 private repos
       → github_check_push_protection
         3 push protection bypasses in the last month
       → github_check_secret_patterns
         No custom secret patterns defined
       → github_check_secret_scoping
         2 org secrets available to all repos (should be scoped)
       → "Enable secret scanning on all repos, review the 3 bypasses,
          add custom patterns for internal API keys, and scope
          org secrets to only the repos that need them."

______________________________________________________________________

工具参考(39个工具)

Organization (7)

工具说明
github_check_org_security2FA执行、默认仓库可见性、成员创建权限
github_check_org_sso通过GraphQL配置SSO/SAML
github_check_org_members外部合作者、过时成员检测
github_check_org_appsOAuth凭据授权、GitHub应用程序安装权限
github_check_org_webhooks不安全的webhook URL(HTTP,无秘密)
github_check_org_audit_log可疑的审计日志活动(企业)
github_list_org_repos列出组织中具有安全元数据的所有存储库

Repository (8)

工具说明
github_check_repo_branch_protection违约分行的分行保护规则
github_check_repo_secrets启用秘密扫描和推送保护
github_check_repo_code_scanningCodeQL/代码扫描已启用,打开警报
github_check_repo_dependabot启用Dependabot的关键警报分诊
github_check_repo_settingsSECURITY.md、私有漏洞报告、分叉限制
github_check_repo_webhooks不安全的仓库级webhook URL
github_check_repo_deploy_keys部署密钥权限(只读与读写)
github_check_repo_codeownersCODEOWNERS文件的存在和执行

Actions (8)

工具说明
github_check_workflow_injection通过脚本注入 ${{ github.event.* }} 在 run: 砌块
github_check_workflow_pr_targetpull_request_target +结账模式(关键)
github_check_workflow_permissionsGITHUB_TOKEN默认权限范围
github_check_workflow_pinning未绑定的第三方操作(标签vs SHA)
github_check_workflow_runners自我主持跑步者曝光
github_check_workflow_environments缺少环境保护规则
github_check_workflow_secrets工作流中的秘密渗透模式
github_check_workflow_oidcOIDC主题索赔定制

Secrets (4)

工具说明
github_check_secret_scanning覆盖范围差距和未解决的警报
github_check_push_protection推送保护旁路跟踪
github_check_secret_patterns自定义秘密图案配置
github_check_secret_scoping环境、仓库和组织级秘密范围

Supply Chain (4)

工具说明
github_check_dependency_graph依赖图启用
github_check_dependabot_updatesDependabot安全更新配置
github_check_sbomSBOM生成能力
github_check_vulnerabilities已知漏洞,严重未修复>90天

Access Control (4)

工具说明
github_check_team_permissions跨存储库的团队权限级别
github_check_collaborators外部合作者访问审核
github_check_app_permissionsGitHub应用程序权限范围审查
github_check_pat_usage经典与细粒度PAT使用

Meta (4)

工具说明
github_list_checks浏览所有45项检查,按类别/严重程度筛选
github_audit_summary按类别、严重程度、状态汇总调查结果
github_audit_report完整的markdown或JSON审计报告
github_run_all执行对组织/仓库的所有检查

______________________________________________________________________

检查注册表(45次检查)

Organization (ORG-001 to ORG-010)

ID检查严重性
ORG-0012FA未执行关键
ORG-002默认回购可见性为公开高
ORG-003成员可以创建公共仓库中等
ORG-004未配置SSO/SAML高
ORG-005有访问权限的外部合作者中等
ORG-006组织成员陈旧低
ORG-007OAuth应用授权风险高高
ORG-008过度允许GitHub应用程序安装高
ORG-009不安全的webhook URL中等
ORG-010可疑审计日志活动信息

Repository (REPO-001 to REPO-013)

ID检查严重性
REPO-001缺少或弱分支保护关键
REPO-002未启用秘密扫描高
REPO-003推送保护未启用高
REPO-004未启用代码扫描中等
REPO-005打开代码扫描警报高
REPO-006未启用Dependabot中等
REPO-007关键依赖机器人警报关键
REPO-008无SECURITY.md策略文件低
REPO-009关闭私有漏洞报告低
REPO-010无限制拨叉设置低
REPO-011不安全的回购webhooks中等
REPO-012读写部署密钥高
REPO-013缺少代码所有者文件低

Actions (ACT-001 to ACT-008)

ID检查严重性
ACT-001通过不受信任的输入进行脚本注入关键
ACT-002带校验的pull_request_target关键
ACT-003过度允许赠品_糖果高
ACT-004未加密的第三方行为中等
ACT-005自托管跑步者曝光高
ACT-006缺少环境保护规则中等
ACT-007秘密渗透模式高
ACT-008OIDC配置错误中等

Secrets (SEC-001 to SEC-005)

ID检查严重性
SEC-001秘密扫描覆盖范围差距高
SEC-002未解决的秘密扫描警报严重
SEC-003推送保护旁路高
SEC-004无自定义秘密图案低
SEC-005秘密范围过于宽泛中等

Supply Chain (SUP-001 to SUP-005)

ID检查严重性
SUP-001依赖关系图未启用中等
SUP-002Dependabot安全更新关闭高
SUP-003无SBOM生成低
SUP-004关键已知漏洞关键
SUP-005长期未修复的漏洞(>90天)高

Access Control (ACC-001 to ACC-004)

ID检查严重性
ACC-001团队访问权限过大高
ACC-002外部合作者写+中等
ACC-003GitHub应用程序范围过大高
ACC-004具有宽范围的经典PAT高

______________________________________________________________________

建筑

src/
├── index.ts                    Entry point + MCP stdio
├── types/
│   └── index.ts                CheckResult, ToolDef, ToolContext, ToolResult
├── github/
│   └── client.ts               GitHubClientFactory (lazy Octokit + GraphQL)
├── protocol/
│   ├── tools.ts                39 tool definitions (Zod schemas)
│   └── mcp-server.ts           MCP server + stdio transport
├── org/                        Organization checks (ORG-001..010)
│   ├── security.ts             2FA, visibility, member privileges
│   ├── sso.ts                  SSO/SAML via GraphQL
│   ├── members.ts              Outside collaborators, stale members
│   ├── apps.ts                 OAuth apps, GitHub App installations
│   ├── webhooks.ts             Insecure webhook URLs
│   └── audit-log.ts            Suspicious audit log patterns
├── repo/                       Repository checks (REPO-001..013)
│   ├── branch-protection.ts    Branch protection rules
│   ├── secret-scanning.ts      Secret scanning + push protection
│   ├── code-scanning.ts        CodeQL enabled, open alerts
│   ├── dependabot.ts           Dependabot enabled, critical alerts
│   ├── settings.ts             SECURITY.md, vuln reporting, forks
│   ├── webhooks.ts             Insecure repo webhooks
│   ├── deploy-keys.ts          Deploy key permissions
│   └── codeowners.ts           CODEOWNERS file
├── actions/                    GitHub Actions checks (ACT-001..008)
│   ├── injection.ts            Script injection via untrusted inputs
│   ├── pr-target.ts            pull_request_target + checkout
│   ├── permissions.ts          GITHUB_TOKEN default permissions
│   ├── pinning.ts              Unpinned third-party actions
│   ├── runners.ts              Self-hosted runner exposure
│   ├── environments.ts         Environment protection rules
│   ├── secrets.ts              Secret exfiltration patterns
│   └── oidc.ts                 OIDC configuration
├── secrets/                    Secret management checks (SEC-001..005)
│   ├── scanning.ts             Coverage + alert triage
│   ├── push-protection.ts      Push protection bypasses
│   ├── patterns.ts             Custom secret patterns
│   └── scoping.ts              Env/repo/org secret scoping
├── supply-chain/               Supply chain checks (SUP-001..005)
│   ├── dependency-graph.ts     Dependency graph enabled
│   ├── dependabot-updates.ts   Security updates config
│   ├── sbom.ts                 SBOM generation
│   └── vulnerabilities.ts      Known vulns, stale unfixed
├── access/                     Access control checks (ACC-001..004)
│   ├── teams.ts                Team permission audit
│   ├── collaborators.ts        External collaborators
│   ├── github-apps.ts          GitHub App permissions
│   └── tokens.ts               Classic vs fine-grained PATs
└── meta/                       Aggregation + reporting
    ├── list-checks.ts          CHECK_REGISTRY (45 checks)
    ├── summary.ts              Findings aggregation
    ├── report.ts               Markdown/JSON report
    └── run-all.ts              Execute all checks

设计决策:

  • 单个Octokit实例 -GitHub API是全球性的(无地区)。在第一个API调用上的延迟初始化。
  • 统一检查结果 --每次检查都返回相同的结构:checkId、严重性、状态、详细信息、补救措施。图案与 云审计mcp.
  • 静态工作流分析 -操作检查通过Contents API获取YAML并使用regex分析。GitHub没有解析的工作流API。
  • 企业优雅降级 --仅限企业的功能(审核日志、凭据授权、SSO)返回 NOT_APPLICABLE 而不是错误。
  • 记忆中的发现 --会话范围的发现数组。没有数据库,就没有持久性。跑 github_audit_summary 或 github_audit_report 聚合。
  • 4依赖关系 — @modelcontextprotocol/sdk, @octokit/rest, @octokit/graphql, zod没有别的了。

______________________________________________________________________

认证

令牌类型必填范围
经典PATrepo, admin:org, admin:org_hook, admin:repo_hook
细粒PAT (推荐)组织:成员+管理(阅读)。回购:管理、代码扫描、Dependabot、秘密扫描、操作、环境、Webhooks(阅读)
GitHub应用程序与细粒度PAT具有相同的存储库/组织权限

从读取令牌 GITHUB_TOKEN 环境变量。

______________________________________________________________________

MCP安全套件的一部分

项目域工具
Hackbrowserv mcp基于浏览器的安全测试39个工具,Firefox,注入测试
云审计mcp云安全(AWS/Azure/GCP)38个工具,60多项检查
github安全mcpGitHub安全态势39个工具,45个检查

______________________________________________________________________

局限性

  • 需要具有适当范围的GitHub PAT或GitHub App令牌
  • 一些检查需要GitHub Enterprise Cloud(审计日志、凭据授权、SSO)——这些检查在免费/团队计划中会优雅地返回NOT_APPLICABLE
  • 动作工作流分析是基于正则表达式的(没有AST解析)——可能会错过复杂的注入模式
  • 速率限制:GitHub API允许通过身份验证的用户每小时请求5000次。一个包含多个仓库的完整组织审计可能会接近这个极限
  • macOS/Linux(未测试Windows)

______________________________________________________________________

For authorized security testing and assessment only.

Always ensure you have proper authorization before auditing any organization.

MIT License • Built with Bun + TypeScript

工具与能力

工具数量

39

资源数量

0

提示词数量

0

能力标签

GitHub安全TypeScript本地部署AI代理安全检查自动化审计开源安全

支持客户端

Claude DesktopClaudeCursorWindsurf

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 工具数量 39 个,一次接入能覆盖的操作比单点工具更全。
  • 已经适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 需要自备OAuth 授权,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 暂时拿不到OAuth 授权的人。
  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
GitHub Security MCP

MCP World · 本页

39未说明未标注1 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

GitHub Security MCP 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

GitHub Security MCP 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

GitHub Security MCP 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

GitHub Security MCP 需要 API Key 吗?

公开资料标注的认证方式是OAuth 授权,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

GitHub Security MCP 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude、Cursor、Windsurf;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP