Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Git Security

БесплатноНе проверен

Analyzes GitHub repositories for security risks including exposed secrets, vulnerable dependencies, and high-churn hotspot files.

GitHubEmbed

Описание

Analyzes GitHub repositories for security risks including exposed secrets, vulnerable dependencies, and high-churn hotspot files.

README

Git MCP is an MCP server that helps LLM agents analyze GitHub repositories for security risk and codebase shape.

It combines four practical scans:

  • Secrets exposure in commit history
  • Dependency inventory from common manifest files
  • Dependency CVE scan using Trivy
  • Hotspot detection (frequently changed files)

It also includes a repository summarizer that returns relevant file paths and contents for downstream reasoning.

Objectives

This project demonstrates building an MCP-native security workflow that is:

  • Tool-driven (LLM invokes structured capabilities, not ad-hoc scripts)
  • Operationally aware (timeouts, error categorization, and binary checks)
  • Agent-friendly (standardized response envelope for reliable parsing)

Tech stack

  • Python 3.11+
  • FastMCP (mcp.server.fastmcp.FastMCP)
  • Pydantic response models
  • External scanners:
    • TruffleHog (via Docker image)
    • Trivy (local binary)

Repository layout

src/git_mcp/
	server.py                # MCP server and tool registration
	models/responses.py      # Standard ToolResponse schema
	tools/
		secrets.py             # GitHub secret scan (TruffleHog via Docker)
		dependencies.py        # Dependency extraction + Trivy CVE scan
		hotspots.py            # Git churn hotspot scan
		clone.py               # Repo clone helper + repository summarizer
		prerequisites.py       # Local runtime binary checks

Prerequisites

Install the following on your machine and ensure they are on PATH:

  • uv
  • git
  • docker (required for secret scanning)
  • trivy (required for CVE scanning)

Installation

uv sync

Run the MCP server

uv run git-mcp

This starts the MCP server over stdio, suitable for MCP-compatible clients/agents.

MCP tools

run_github_secret_scan(owner, repo, scan_depth=50)

Scans GitHub commit history for exposed secrets using containerized TruffleHog.

run_dependency_scan(owner, repo)

Extracts dependencies from root-level package.json, pyproject.toml, and requirements.txt.

run_github_dependency_cve_scan(owner, repo, severity_threshold="HIGH")

Runs Trivy vulnerability scan on extracted dependencies and returns CVE findings at or above the threshold.

run_github_hotspot_scan(owner, repo, scan_depth=50)

Finds high-churn files from Git history (git log --name-only) to identify risk hotspots.

run_summarize_repository(owner, repo)

Clones the repository and returns relevant source/text files (excluding .git, node_modules, __pycache__) with lightweight summary metadata.

Response contract

All tools return a shared ToolResponse schema with:

  • status: ok | degraded | error
  • summary: concise human-readable outcome
  • findings: structured list payload
  • optional error_category and error_detail

This consistency improves reliability when wiring multiple tools into one agent loop.

Notes and current limitations

  • Dependency extraction currently checks only top-level repository manifests.
  • Secret scanning relies on Docker availability at runtime.
  • CVE scanning requires local Trivy installation.
  • Default command timeouts are tuned for interactive agent usage and may need adjustment for large repositories.

from github.com/felip3s/git_sec_mcp

Установка Git Security

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/felip3s/git_sec_mcp

FAQ

Git Security MCP бесплатный?

Да, Git Security MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Git Security?

Нет, Git Security работает без API-ключей и переменных окружения.

Git Security — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Git Security в Claude Desktop, Claude Code или Cursor?

Открой Git Security на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Git Security with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development