DiffSense

io.github.GoldenSupremeSaltedFish由 GitHub 帳號 GoldenSupremeSaltedFish 發布v2.3.1更新於 Oct 24, 2026

MR/PR risk audit MCP server: semantic diff + rule engine, strict read-only. Run as image or pip.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

唯讀的 MCP 伺服器,以語意 diff 與規則引擎稽核 MR/PR 變更的迴歸風險,輸出審查等級與規則說明。

可以做什麼
  • 稽核目前的 diff 或重播已儲存的 diff,取得風險審查等級與建議動作
  • 列出內建規則並說明單一規則檢查的內容
  • 輸出可重現的機器可讀結果,例如帶版本號的 JSON 契約或 SARIF 2.1.0,供 CI 閘門使用
  • 只分析變更內容,不做全庫掃描或程式碼風格檢查
適用情境
適合讓助理判斷某個合併請求的 diff 是否帶來迴歸風險,或在 PR 階段流程與代理程式管線中需要可重現、唯讀風險訊號時使用。
執行需求
以本機 stdio 程序執行,從 PyPI 安裝(pip install "diffsense[mcp]")後以 diffsense-mcp 啟動,需要 Python。MCP 伺服器本身未宣告驗證、環境變數或標頭。另外的 GitLab CI 設定使用 DIFFSENSE_TOKEN 變數,GitHub 工作流程則依賴預設的 GITHUB_TOKEN。
安裝前請注意
此 MCP 伺服器被描述為嚴格唯讀,且不會自動變更 CI 狀態,攔阻決定仍須由人工或下游流程完成。GitLab CI 方式需要具 api 權限的個人存取權杖並存為 DIFFSENSE_TOKEN,應勾選遮蔽,並視為機密。送出的 diff 內容會由本機工具分析,請留意其中是否含敏感資訊。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 DiffSense,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

DiffSense

DiffSense is a Change Risk Gate for the PR stage: it evaluates whether the current diff introduces regression risks without performing full codebase scans or style checks. Designed for minimal alerts, high precision, low latency, and interpretable results.

[Version] [License] [VSCode] [Marketplace] [DeepWiki] [Agent]


Quick Start

ScenarioAction
GitHub Pull RequestCopy the workflow from diffsense/docs/quickstart.md (Method 1) to .github/workflows/diffsense.yml in your target repository. Uses the default GITHUB_TOKEN with no additional configuration required. After committing and creating/updating a PR, the workflow will automatically execute the audit and post results under the PR.
Local AuditRun pip install -e diffsense in the repository root, or pip install "git+https://github.com/GoldenSupremeSaltedFish/DiffSense.git@main#subdirectory=diffsense", then execute diffsense replay <path-to-diff>.
Agent / LLM IntegrationInstall the MCP server with pip install "diffsense[mcp]" and run diffsense-mcp, or consume the JSON contract / SARIF directly. See Agent Integration Guide.

Complete steps are available at diffsense/docs/quickstart.md.

Optional: Add .diffsense.yaml to your repository root to use the officially recommended configuration, suitable for most teams.


Features

  • CI / Local: Performs semantic risk auditing on MR/PR diffs, outputting review_level and recommended actions. Analyzes only changed content without slowing down pipelines. Low-quality rules are automatically downgraded. Does not automatically modify CI status; decisions to block are made manually or by downstream processes.
  • Agent / LLM Integration: Deterministic, machine-readable surfaces for agents and CI gates — versioned JSON contract (schema_version), SARIF 2.1.0 output, and a read-only MCP server (audit_diff / audit_replay / list_rules / explain_rule). See the Agent Integration Guide and CLI Contract.
  • VSCode Extension: Maintained in the vscode-extension directory of this repository (dual-artifact layout). Install from the Marketplace or download the VSIX from Releases.

Quick Start (Detailed)

GitHub Actions

Copy the complete YAML from diffsense/docs/quickstart.md (Method 1) to your repository's .github/workflows/diffsense.yml to enable PR auditing.

GitLab CI

  1. In your project, go to Settings → CI/CD → Variables and add the variable DIFFSENSE_TOKEN (Personal Access Token with api permissions; recommended to check Mask variable).
  2. Add the corresponding job to .gitlab-ci.yml. See the example at diffsense/gitlab-ci-example.yml.

VSCode Extension

Maintained in the vscode-extension directory of this repository. Install from the Marketplace or download the VSIX from Releases.


Project Structure (This Branch)

DiffSense/├── diffsense/          # CLI, rule engine, GitHub/GitLab adapters, MCP server; see docs/quickstart.md for quick start├── vscode-extension/   # VS Code extension (dual-artifact line)├── AGENTS.md           # repository guide for AI coding agents└── technical_documentation/

Development

bash
git clone https://github.com/GoldenSupremeSaltedFish/DiffSense.gitcd DiffSense/diffsensepip install -e ".[dev]"pytest tests/ -v

See diffsense/CONTRIBUTING.md for details.


License & Links

English | 中文版(存档)

來源:README.md,提交 81fe7eb

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.3.1最新Oct 12, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。