
Releaseguard
io.github.RudrenduPaul由 GitHub 账号 RudrenduPaul 发布v0.1.2更新于 Oct 24, 2026
Scans datasets/models for PII/secrets, redacts, and packages a public-release bundle via MCP.
概览
本地 MCP 服务器,让助手扫描数据集或模型目录中的个人信息与密钥,生成脱敏副本,并打包含数据集卡与合规摘要的发布包。
- 可以做什么
- 用 Presidio 扫描文件或目录中的个人信息与密钥,返回发现项和实体计数,可指定 spaCy 模型与置信度阈值(scan_directory_tool)。将目录的脱敏副本写入新的输出路径,支持掩码、哈希或删除策略,不改动源目录(redact_directory_tool)。扫描、可选脱敏,并写出包含 Hugging Face 数据集或模型卡以及 EU AI Act 训练数据摘要草稿的发布包(package_release_tool)。各工具返回与对应命令行命令相同的 JSON 结构,路径不存在时返回结构化错误。
- 适用场景
- 适合在准备公开发布数据集或模型目录时使用,让助手在一次流程中完成个人信息扫描、生成脱敏副本并起草配套的数据集卡与训练数据摘要,而不必分别使用多个工具和手写模板。
- 运行要求
- 作为本地 stdio 进程运行,通过 uvx 从 releaseguard-cli 包启动;需在 Python 3.10 及以上安装 MCP 附加组件。Presidio 需要一次性下载 spaCy 英文模型(默认 en_core_web_sm,或显式传入更大模型)。未声明账号、API 密钥或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Releaseguard,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
ReleaseGuard
[CI] [PyPI] [npm] [License: Apache 2.0] [Python 3.10+]
Install • Quickstart • CLI reference • Library API • Comparison • FAQ
Scan a dataset or model directory for PII and secrets with Presidio, redact what you find, and generate a public-release bundle, a Hugging Face dataset/model card plus an EU AI Act Art. 53(1)(d) training-data summary, in one command.
ReleaseGuard is not a PII detector. It's the glue between "I have a dataset I want to publish" and "I have a sanitized bundle with the paperwork already drafted." Detection is entirely Presidio's, an actively maintained open-source project with 10,000+ GitHub stars. ReleaseGuard chains Presidio's scan straight into redaction and into the two documents almost every public dataset/model release actually needs, instead of you writing a script to do it yourself.
Install
en_core_web_sm is spaCy's small English model and Presidio's own quickstart default. For higher-accuracy detection, install the larger model instead and pass --spacy-model:
Quickstart
This is a real, unedited run against a two-row sample CSV, not a mockup:
That URL: 3 line is a real Presidio quirk worth calling out rather than hiding: its regex-based URL recognizer also fires on the domain portion of an email address (example.com inside [email protected]), so email-heavy text double-counts as both EMAIL_ADDRESS and URL. This is Presidio's own recognizer behavior, unmodified, and it's worth noting entity counts can shift slightly between Presidio/spaCy versions since detection is NLP-based, not a fixed lookup table (this run used presidio-analyzer 2.2.364 with en_core_web_sm 3.8.0). Filter it out with --entities if you only care about email addresses:
Redact, then package a release bundle in one command:
bundle/eu-ai-act-training-summary.md opens like this, real scan counts filled in, everything else left as an explicit placeholder for a human to complete:
--json on every command switches to machine-readable output for scripts and agents.
Quick summary
- Use it for: turning a Presidio scan into a redacted copy plus a dataset/model card and an EU AI Act Art. 53(1)(d) training-data summary, from one command instead of three separate tools and a hand-written template
- What it's not: a PII detector of its own, or a claim of "total transparency"/full training-data disclosure compliance. See What ReleaseGuard is not
- Runs entirely local. No dataset content, scan results, or redacted output is ever sent to a remote service.
CLI reference
[ReleaseGuard --help output listing the scan, redact, package, and mcp subcommands]
Every command supports --json. Full flag reference: releaseguard <command> --help.
Library API
PIIDetector (releaseguard.detectors.base) and FileReader (releaseguard.readers.base) are the two extension points. Presidio is currently the only detector shipped; CSV, JSON/JSONL, and plain text are currently the three readers shipped. Both are registries, not hardcoded calls, specifically so a new format or a second detection backend is a scoped addition later. See CONTRIBUTING.md.
MCP Server
ReleaseGuard ships a Model Context Protocol server so an AI agent (Claude, Cursor, or any MCP-compatible client) can scan, redact, and package a dataset or model directory directly, without a human invoking the CLI by hand.
Install the extra:
Start it directly with the mcp subcommand:
Add it to your MCP client's config (for Claude Desktop, claude_desktop_config.json). The server
is started via a subcommand of the published releaseguard console script, not a separate
console script of its own:
Transport is stdio, so there is nothing to host: the MCP client spawns the server as a local
subprocess. Source: src/releaseguard/mcp_server.py.
The server exposes three tools, each returning the same JSON shape as the matching CLI --json
output:
A real example call:
Every tool checks that path exists before doing anything else and returns a structured error,
{"error": "Path '<path>' does not exist.", "error_type": "PathNotFound"}, instead of a silent,
misleading "0 files scanned" success result. Earlier versions of this server skipped that check
and let a bad path slip straight into scan_directory, which returned a false success instead
of an error; every tool handler is also now wrapped so an unexpected exception comes back as
{"error": ..., "error_type": ...} rather than crashing the server. A .well-known/agent.json
manifest is shipped at the repo root for A2A-style discovery, listing both the CLI and MCP
interfaces and the packages that provide them.
Comparison
Star counts checked live against the GitHub API on 2026-08-03: data-privacy-stack/presidio (originally microsoft/presidio; the project moved organizations, same codebase), huggingface/huggingface_hub, bigcode-project/pii-lib. pii-lib's low star count is itself informative: it is the closest prior attempt at PII redaction scoped to a training-data release workflow, and it has not gained meaningful adoption. ReleaseGuard does not assume that outcome will be different here; see the FAQ entry on demand.
Enterprise data-governance platforms (Databricks Unity Catalog, Credo AI, BigID, and others) already offer PII classification and redaction as part of broader paid platforms aimed at large organizations. ReleaseGuard is a free, single-purpose, open-source alternative for a team that just wants the scan-redact-package workflow for one release, not a governance suite.
What is ReleaseGuard, and why does it exist
ReleaseGuard is an open-source CLI, Python library, and MCP server that chains three steps, PII/secret detection (via Presidio), redaction, and public-release documentation, into one command. Each step already exists as a separate tool: Presidio detects, presidio-anonymizer redacts, huggingface_hub has card-generation helpers, and the European Commission publishes a training-data-summary template as a document you fill in by hand. Nothing before ReleaseGuard chained a real scan directly into a filled-in template.
It exists because publishing a dataset or model responsibly involves running a PII scan, redacting what it finds, and then writing up two documents almost by hand, a card and (for general-purpose AI model providers) an EU AI Act training-data summary. ReleaseGuard automates the second half of that workflow so the resulting documents reflect what was actually scanned, not what someone remembered to write down afterward.
EU AI Act Art. 53(1)(d), stated precisely: this article requires providers of general-purpose AI (GPAI) models to publish a "sufficiently detailed summary" of training content, using the template the European Commission's AI Office published on 2025-07-24 (in force for new models from 2025-08-02, transitional deadline 2027-08-02 for models already on the market, enforcement checks from the AI Office starting 2026-08-02). It requires a categorical summary of data sources and modalities. It does not require raw training samples, full training recipes, or model weights, and it applies specifically to GPAI model providers, not to every dataset publisher. ReleaseGuard's generated summary is a starting draft for that narrow, real requirement, never a claim of broader "total transparency" compliance.
What ReleaseGuard is not
- Not a PII detector. Every entity type, confidence score, and detection decision comes from Presidio. ReleaseGuard adds no NLP model, no recognizer, and no accuracy claim of its own. If Presidio misses something or overcounts (see the
URL/email overlap in the Quickstart above), ReleaseGuard inherits that behavior unmodified. - Not a hosted service. Everything runs locally. No scan target, scan result, or redacted output is transmitted anywhere. See SECURITY.md's scope section.
- Not proof of legal compliance. The generated EU AI Act summary is a draft that still needs a human to fill in licensing, data-source, and copyright sections ReleaseGuard cannot infer from a scan. Running
releaseguard packagedoes not, by itself, satisfy Art. 53(1)(d) or any other regulation. - Not evidence of demand beyond what's cited above. The closest prior attempt at this same workflow,
pii-lib, sits at 16 GitHub stars. ReleaseGuard does not claim to have solved the adoption problem that project ran into; it claims to fill a real, narrow, independently-verified gap (no existing open-source tool chains a Presidio scan directly into an Art. 53(1)(d) template), and lets real usage decide the rest.
FAQ
Does ReleaseGuard detect PII more accurately than Presidio?
No. It cannot, since it calls Presidio's own AnalyzerEngine for every detection decision. Any accuracy question is a Presidio question; see Presidio's own documentation and presidio-research for its evaluation methodology.
Why does scan need a spaCy model download?
Presidio's AnalyzerEngine requires a spaCy language model for context-aware detection (recognizing that "John Smith" is a name from surrounding text, not just a capitalized word). spaCy models ship as their own installable packages, not as a pip dependency, so python -m spacy download en_core_web_sm is a required one-time step, the same as it is for anyone using Presidio directly.
Does ReleaseGuard work on Windows, macOS, and Linux?
It's pure Python with no OS-specific code path, and the npm launcher shim picks where or which per platform to locate the installed CLI (npm-shim/bin/releaseguard-cli.js). CI currently runs on ubuntu-latest only, across Python 3.10 and 3.12, so macOS and Windows aren't yet covered by an automated test matrix. Treat them as expected to work, not CI-verified, until that matrix expands.
Is the EU AI Act Art. 53(1)(d) summary legally sufficient on its own? No. It is a structurally correct starting draft populated with real scan data where ReleaseGuard can verify it (the PII/secrets section) and an explicit placeholder everywhere it can't (data sources, licensing, copyright status). A human, ideally with legal review, has to fill in the placeholders before publishing it as a compliance artifact.
Does this only apply if I'm training a GPAI model?
The Art. 53(1)(d) summary specifically targets general-purpose AI model providers under the EU AI Act, a narrow buyer set. The scan, redact, and Hugging Face card-generation parts of ReleaseGuard are useful for any dataset or model release, regardless of whether Art. 53(1)(d) applies to you.
Why two registries?
ReleaseGuard's implementation is Python, since Presidio itself is Python (presidio-analyzer/presidio-anonymizer); wrapping it in another language would mean re-shelling out or reimplementing bindings. The npm package (releaseguard-cli) is a thin launcher, not a reimplementation. It locates and execs the real releaseguard binary installed from PyPI, so npx releaseguard-cli works for npm-first agent tooling without duplicating Presidio's detection logic in two languages.
What license is ReleaseGuard under, and can I use it commercially? Apache 2.0, the same license Presidio itself uses. It permits commercial use, modification, and redistribution, including inside a proprietary product, subject to the standard Apache 2.0 terms: keep the license and copyright notice, and state any changes made to the source. See LICENSE for the full text.
Does anyone actually need this, or is it "glue code nobody asked for"? Honestly stated: no organic demand signal (an HN/Reddit thread describing this exact workflow as a lived pain point) had surfaced as of this project's initial research. The independently verifiable fact is narrower and more defensible: no existing open-source tool chains a Presidio scan directly into an Art. 53(1)(d) template or a combined HF card, in one command, from one scan. Whether that gap turns into real usage is an open, falsifiable question this project tracks rather than assumes the answer to.
What happens to files ReleaseGuard can't parse (images, model weight files, Parquet without the extra)?
scan and redact skip them (listed under files_skipped in --json output); redact copies them through to the output directory unchanged rather than silently dropping them from the release bundle. They are not scanned for PII, so review them separately before publishing.
Contributing
See CONTRIBUTING.md. Security issues: see SECURITY.md.
License
来源:README.md,提交 35d72f6
工具
0版本历史
1- v0.1.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分