
Shimguard
io.github.RudrenduPaul由 GitHub 账号 RudrenduPaul 发布v0.1.5更新于 Oct 24, 2026
Wraps the ShimGuard CLI as a single generic MCP tool for agent-shim provenance checks.
概览
一个本地 MCP 服务器,让助手运行 ShimGuard 命令行工具,检查标记为已修复的 GitHub issue 是否真的引用了已合并的拉取请求。
- 可以做什么
- 通过一个通用工具运行 ShimGuard 命令行工具,接受与 CLI 相同的参数,并返回退出码、标准输出、标准错误以及可解析的 JSON 报告。核查 GitHub 仓库中标记为已修复的 issue 所引用的拉取请求是否真的已合并,给出 MATCH、MISMATCH 或 UNVERIFIED 结论。可选地检查被引用文件在仓库最新版本中是否仍包含指定代码模式,从而在拉取请求已合并但漏洞代码仍在时仍标记为不匹配。生成稳定的 JSON 报告,便于脚本、CI 门禁或仪表板使用。
- 适用场景
- 当你希望助手审计 GitHub issue 跟踪器,确认标记为已修复的 issue 确实有已合并的修复时使用,例如在信任安全修复之前,或在 CI 中依据跟踪器声明做门禁时。它是狭窄的机械式核查,不是通用的漏洞或密钥扫描工具。
- 运行要求
- 作为本地进程在用户机器上运行,从 PyPI 安装带 MCP 附加组件的包(需要 Python 3.9 或更高版本),并用 shimguard-mcp 命令启动。需要访问 GitHub REST API 的网络连接。GitHub 令牌可选:未认证时限制为每小时 60 次请求,通过 GITHUB_TOKEN 或令牌参数可提高到每小时 5,000 次。
安装
在 SourceWeft 中
- 打开 控制台中的 Shimguard,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ShimGuard
[CI] [License: MIT] [npm] [PyPI version]
Verify that a GitHub issue closed as "fixed" actually has a merged fix, before you trust the tracker.
That single command against the real sybil-solutions/codex-shim repo (1,000+
stars) turns up 6 MISMATCH results: 6 security issues, each closed with a
"Fixed in PR #52" comment, where PR #52 was never actually merged. The
vulnerable code is still in main today. Nobody reading the closed issues
would know.
Contents
- Why this exists
- Install
- Quickstart
- CLI reference
- Library API
- How it compares
- What is ShimGuard, and why does it exist
- FAQ
- Contributing
- License
Why this exists
Reading an issue tracker, you trust two signals: the issue's state (open
or closed) and the maintainer's closing comment ("fixed in #N"). Neither
signal is verified against reality by GitHub itself. A maintainer can close
an issue citing a PR that never merged, an automated bot can close on a
"fixes #N" keyword in a PR description before that PR lands, or a fix can
get reverted after the issue was already closed. Any of these leaves a
tracker saying "fixed" about a bug that is still live.
ShimGuard checks the one thing a human skimming issues does not: does the
PR the tracker cites as the fix actually show merged: true? It is a small,
mechanical, unambiguous check, not a heuristic or a guess.
Install
ShimGuard ships two independent, equally first-class packages -- pick whichever fits your toolchain, or install both. Neither is deprecated in favor of the other; both implement the same "closed issue cites Fixed in PR #N, is #N actually merged" check against the same GitHub REST API.
The npm CLI requires Node.js 18 or later (uses the built-in fetch API).
The Python package's CLI entry point is also shimguard (e.g. shimguard verify sybil-solutions/codex-shim --issues 45,46); see
python/README.md and
docs/getting-started.md for the Python-specific
walkthrough, and CHANGELOG.md for each distribution's
version history.
Quickstart
Exit code is 1 when any MISMATCH is found (useful for gating CI), 0 when
every checked issue's claimed fix actually merged, 2 on a usage or network
error.
ShimGuard is not just a gotcha finder: run it against a mix of issues and it
correctly reports MATCH, UNVERIFIED, and MISMATCH side by side, exiting 0
whenever nothing is provably broken -- exactly the signal a CI gate needs.
Optional: verify the code, not just the merge status
For an even stronger check, point ShimGuard at the specific file and pattern an issue named as the vulnerable code:
If the PR is merged but the cited pattern is still present in the file at
HEAD, ShimGuard still reports MISMATCH: a merged PR does not guarantee
the specific vulnerable line was actually removed.
[!WARNING]
patternis compiled as a JavaScriptRegExp, andpathis validated to stay within the target repo (no..traversal to a different repo or API endpoint). Only point--patternsat files you wrote or reviewed yourself. See SECURITY.md.
CLI reference
--format json output is stable and designed for scripts and AI agents to
parse directly:
MCP Server
ShimGuard ships a Model Context Protocol server, so an MCP-compatible agent (Claude Desktop, Claude Code, Cursor, or any other MCP client) can call it as a tool instead of shelling out to the CLI and parsing text. It's part of the Python distribution:
Register it with an MCP client such as Claude Desktop:
It exposes a single tool, run, that takes the exact argv you'd pass to
the shimguard CLI and returns a structured result ({returncode, stdout, stderr, json?} on success, {error: ...} if the command failed, timed
out, or exited non-zero). Example call:
which returns the same --format json report shown above, as a parsed
json field alongside the raw stdout. Full details are in the
Python package README.
Library API
ShimGuard's verification logic is also importable directly:
TrackerVerifier takes any GitHubClient and an optional PatternMatcher
(see src/types.ts, src/pattern-matcher.ts), both are interfaces, so a
future local-config scanner or a different code host can plug in without
changing the verifier itself.
The Python package exposes the same shape:
How it compares
No existing open-source tool checks "this issue tracker says fixed-in-PR-#N, is #N actually merged." That claim is verified by searching for issue-fix-verification tools, patch-verification tools, and security-advisory-fix tools before writing this. The closest adjacent tools solve different problems:
The gap ShimGuard fills is real, not theoretical. wow-actions/auto-close-fixed-issues,
a GitHub Action used by other repos, closes an issue on a PR's closed
event, not its merged event: a bot can mark an issue "fixed" the moment
a PR is closed, whether or not it actually merged. GitHub's own native
Closes #N keyword linking only auto-closes on a real merge to the default
branch, so this specific failure mode comes from manual maintainer comments
and third-party automation, not GitHub's own defaults, which is exactly why
nothing catches it after the fact.
What is ShimGuard, and why does it exist
ShimGuard is a CLI and library, shipped as both an npm package and a PyPI
package, that checks whether a GitHub issue's claimed fix ("Fixed in PR
#N") is actually true, by checking the real merge state of that PR (and,
optionally, whether the vulnerable code pattern is still present at
HEAD). It exists because closing an issue with a citation to an unmerged
PR is a real, observed failure mode, not a hypothetical one:
sybil-solutions/codex-shim, a 1,000+-star project, has 6 security issues
closed this way as of this writing, each citing the same unmerged PR #52.
ShimGuard does not scan for secrets in source code (see gitleaks,
trufflehog for that) and does not do general vulnerability scanning
against dependencies (see osv-scanner, trivy, grype). It verifies one
specific, narrow claim: does a tracker's "fixed" status match reality.
FAQ
Does ShimGuard modify my repo or the target repo? No. It only makes read-only GitHub API requests (issues, comments, pull requests, and optionally file contents). It never writes, comments, or mutates anything.
Does it need a GitHub token?
No for occasional use. Unauthenticated requests work, subject to GitHub's
standard rate limit (60 requests/hour). Set GITHUB_TOKEN or pass --token
for the higher authenticated limit (5,000 requests/hour), useful in CI.
What counts as a "cited fix"?
ShimGuard looks for phrases like "Fixed in PR #52", "fixed by #101", or
"resolved in #20" in the issue body and its comments, and extracts the
referenced PR number. If no such phrase is found, the result is
UNVERIFIED, not MATCH or MISMATCH: ShimGuard never guesses.
Can I use this in CI?
Yes. shimguard verify exits 1 when any MISMATCH is found, so a CI step
can gate on it directly. --format json gives a stable, parseable report
for a bot or dashboard.
Why "ShimGuard" if it doesn't scan BYOK shim configs?
An earlier framing of this idea was a broader local-config security scanner
for BYOK (bring-your-own-key) model shims. That scope was narrowed to the
sharper, more defensible wedge: verifying tracker claims against actual
merged code, which is what shipped in v0.1. The name reflects the
project's origin case (sybil-solutions/codex-shim, a BYOK model shim),
not a scope this version doesn't have.
Does ShimGuard work on Windows, macOS, and Linux?
The npm CLI requires Node.js 18 or later (for the built-in fetch API) and
runs anywhere Node runs, including Windows, macOS, and Linux. The PyPI
package requires Python 3.9 or later and lists itself as OS Independent in
its own classifiers. Neither package has a native or compiled dependency.
How is ShimGuard different from gitleaks or trufflehog? Gitleaks and trufflehog scan file content for secrets accidentally committed to a repo, things like API keys and tokens. ShimGuard does not scan file content for secrets at all -- it checks GitHub's issue and pull-request API for one specific mismatch: an issue closed as "fixed in PR #N" where PR #N never actually merged. The two tool categories catch different failure modes and can run in the same pipeline without overlapping; see "How it compares" above for the full list of adjacent tools this project checked before writing a line of code.
Why might shimguard --version print a different number than the
installed package?
In some past releases, running shimguard --version reported a version
string that lagged behind the installed package's actual version --
the version string passed to commander in src/cli.ts was not always
bumped in the same release as a package.json version bump. It is a
display-only mismatch and does not affect verify behavior. To check the
actual installed version, read the package's own package.json or run
npm view shimguard-cli version.
Does ShimGuard scan every closed issue in a repo automatically?
No. You pass the specific issue numbers to check with --issues 38,41,42; ShimGuard does not currently walk a repo's full closed-issue
history looking for cited-fix claims on its own. For a large repo, pick
the issues you care about, for example the ones tagged security or tied
to a release milestone.
Can I use ShimGuard in a commercial product or a paid CI pipeline? Yes. ShimGuard is MIT licensed (see LICENSE), which permits commercial use, modification, and redistribution, including inside a paid product or internal tool, with no royalty and no requirement to open-source your own code. Keeping the MIT notice is the only condition.
Contributing
See CONTRIBUTING.md.
Security
See SECURITY.md.
License
MIT, see LICENSE.
来源:README.md,提交 15983bf
工具
0版本历史
1- v0.1.5最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分