Chuyển đến nội dung
Skillpedia
Trình kết nối (MCP)48k · #5186

mcp-dependency-drift-audit

Skill này làm gì

Công cụ này kiểm tra các file cấu hình (như `.mcp.json`) để đảm bảo các tham chiếu đến gói phần mềm (npm/npx) không thay đổi bất ngờ sau khi đã được xem xét. Nó làm việc này bằng cách đọc file mà không thực thi chúng, giúp duy trì tính nhất quán và an toàn.

Khi nào nên dùng

  • ✓Khi bạn cần phê duyệt một file cấu hình AI trước khi dùng.
  • ✓Khi bạn thêm các kiểm tra bảo mật vào cập nhật mã.
  • ✓Khi rà soát bảo mật các cấu hình AI.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mcp-dependency-drift-audit/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/mcp-dependency-drift-audit/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra các cấu hình AI trong dự án này để đảm bảo các phụ thuộc không thay đổi sau khi tôi xem xét.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ đọc các file cấu hình AI và phân tích các tham chiếu đến gói. Nó xác định xem các tham chiếu này có thể trỏ đến phiên bản khác trong tương lai hay không, mà không chạy bất kỳ máy chủ AI nào.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

MCP Dependency Drift Audit

Overview

Audit Model Context Protocol configuration files for npm/npx package references that can resolve to different code after the configuration was reviewed. The workflow is deliberately static: it reads config text, classifies version selectors, and recommends reproducibility fixes without starting discovered MCP servers.

Dependency mutability is a review-boundary signal, not proof that a package is malicious, vulnerable, or compromised.

When to Use This Skill

  • Before approving .mcp.json, Cursor, VS Code, GitHub Copilot, Claude, or Windsurf MCP configuration.
  • When adding an MCP configuration gate to pull requests or CI.
  • During an AI-agent security review where npm/npx-backed MCP servers are configured.
  • When checking whether a previously reviewed MCP config can silently resolve to newer package code.

How It Works

Step 1: Locate and read MCP configs without executing them

Inspect known project paths such as .mcp.json, .github/mcp.json, .cursor/mcp.json, .vscode/mcp.json, and .windsurf/mcp.json, plus any MCP config explicitly supplied by the user.

Read them as text/JSON only. Never run a discovered command or args value as part of this audit. Stay inside the requested workspace by default; only include user-level/global MCP configuration if the user explicitly asks for machine-wide scope.

Step 2: Use MCP Drift Check when already available

If mcp-drift-check is already installed, use the workspace-scoped mode from the intended repo root:

mcp-drift-check scan-workspace --markdown

For CI evidence:

mcp-drift-check scan-workspace --sarif mcp-drift.sarif --markdown

If the scanner is not installed, explain that the following command fetches the open-source scanner from GitHub and get user approval before running it:

uvx --from git+https://github.com/tomelias10/mcp-drift-check mcp-drift-check scan-workspace --markdown

If the user declines network access or installation, continue with the manual rules below.

Step 3: Apply the manual static rules

For npm/npx-style package selectors:

Selector Classification Reason
package@1.2.3 SAFE Exact package version is reproducible.
bare package or @scope/package HIGH A later resolution can select different package code.
package@latest HIGH The selector is explicitly mutable.
package@^1.2.0, ~1.2.0, >=1.2.0, wildcard MEDIUM Resolution can change within the allowed range.
local path, script, binary, unknown executable REVIEW npm version-drift rules do not establish update behavior.

Treat -y / --yes as context only. It suppresses interactive confirmation but is not a vulnerability by itself.

Step 4: Recommend remediation without inventing versions

For mutable npm/npx references, recommend pinning to an exact version that the team has actually reviewed and then updating that pin deliberately.

Do not guess the version to pin. If registry lookup is needed, explain that it requires network access and ask before querying it.

Pinning improves reproducibility. It does not establish package provenance, vulnerability status, authorization safety, prompt-injection resistance, or runtime isolation.

Step 5: Produce a bounded report

Return:

Config MCP server Package/reference Classification Why Recommended next step

Then state:

  • No MCP servers were executed during the audit.
  • Mutable dependency references are review/reproducibility signals, not breach claims.
  • A clean dependency-drift result is not a complete MCP security assessment.

Examples

Example 1: Audit before approval

User: Audit this repo's MCP config before we approve it. Do not run any MCP servers.

Expected shape:

.mcp.json | browser | @example/browser-mcp@latest | HIGH
Reason: @latest can resolve to different package code later.
Next step: pin the exact version your team reviews and update it deliberately.

No MCP servers were executed.

Example 2: Add a CI gate

For GitHub Actions:

- uses: actions/checkout@v4
- uses: tomelias10/mcp-drift-check@v0

MCP Drift Check can also emit SARIF 2.1.0 for GitHub Code Scanning. The action defaults to workspace-only discovery; machine-wide user-level scanning remains an explicit scan-all choice.

Best Practices

…

Câu hỏi thường gặp

Dependency “drift” là gì?

Đó là khi một tham chiếu đến gói phần mềm (như số phiên bản) có thể thay đổi theo thời gian, trỏ đến mã khác với mã đã được xem xét và phê duyệt ban đầu.

Công cụ này có chạy mã AI nào không?

Không. Công cụ chỉ đọc các file cấu hình và phân tích tham chiếu gói. Nó không thực thi bất kỳ máy chủ AI nào.

“Pinning” phiên bản nghĩa là gì?

Nghĩa là ghim một số phiên bản chính xác cho gói phần mềm, thay vì dùng tham chiếu chung chung như 'latest' hoặc khoảng phiên bản. Điều này đảm bảo luôn dùng đúng phiên bản gói đó.

Chi tiết

Mô tả gốc của tác giả

Statically audit MCP configs for mutable npm/npx package references before approval or CI, without executing discovered MCP servers.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5186
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự