Repository navigation
0.3.2 — Exfil-guard hardening, Delete-guard policy & restore previews, L0 lifecycle calibration and workspace doctor
Zero-dependency deterministic Core hardening across all three pillars: expanded
Exfil-guard channels, credential rules and export/Bash preflights; controlled
Delete-guard workspace policies, read-only restore previews and inline-script
deletion blocks; L0 paired lifecycle calibration and read-only workspace
diagnostics with Unicode carrier-smuggling checks.
本版围绕零依赖确定性 Core 同步补强三大模块:Exfil-guard 新增 TOML 无标量配置视图、无原文外发审计、3 项 MCP 工具、本地 Git Hook、八类现代凭据检测、导出预检 CLI(agent-guard-exfil-export)与 opt-in Bash 外发预检;Delete-guard 补齐保护路径与受控可再生模式 CLI、只读恢复预览(含 MCP restore_preview)、内联脚本删除双重锚定拦截及 Windows PowerShell 交接命令格式化;Guard-lab 与 Doctor 新增零模型成对生命周期校准套件与只读工作区体检(含白名单持久载体不可见 Unicode 走私检测),并同步 exfil-guard Skill 安装清单。既有恢复格式、核心边界与手动 GC 契约保持不变。
Changes
Exfil-guard
- TOML safe config view and opt-in metadata-only audit:
view.py
(agent-guard-config-view) inspects TOML structure without scalar values on
Python 3.11+ (older runtimes reportUNSUPPORTED_RUNTIMEbefore opening TOML
inputs).--audit/AGENT_GUARD_EXFIL_AUDIT=1(and MCP--audit-exfil)
record metadata-only egress summaries and spans without matched bytes, paths
or secret hashes.sanitize.py --jsonreturns structured decisions, plans
and audit receipts while withholding text and plans onASK/BLOCK.
See Exfil-guard Skill and
Opt-in Exfil audit. - MCP Exfil tools and opt-in local Git hooks: The local stdio MCP server
addsconfig_safe_view,exfil_checkandexfil_sanitize, anddoctor mcp
adds a benign Exfil read-only probe. Git repositories can separately enable
localpre-commit(staged UTF-8 blobs) andcommit-msghooks via
adapters/git/hook.py.
See MCP Exfil tools and
Git hooks. - Eight modern credential rules, export preflight and opt-in Bash checks:
Adds T1 detectors for npm, Google API, Hugging Face, SendGrid, HashiCorp
Vault, DigitalOcean, Perplexity and structurally valid HTTP Basic tokens.
Addsagent-guard-exfil-export(skills/exfil-guard/scripts/check_export.py)
for bounded POSIX descriptor-walk export preflights before packaging or
sharing files. Adds default-off credential and secret-source checks on native
Bash events in Claude Code, Kimi Code (AGENT_GUARD_EXFIL_BASH=1) and DSH
(exfilBashGuard: true), evaluated before Delete-guard compensation.
See Rule catalogue
and Opt-in Bash Exfil.
Delete-guard
- Protected paths CLI and guarded workspace
regenerable_patterns:
agent-guard-delete-policyaddsprotect add|remove(refusing.,.git,
.agent-guardand.agent-trashto prevent self-lockout) and
regenerable add|removewith--previewand interactive terminalAPPLY
confirmation. Custom patterns enforce four guardrails (strict POSIX
segment-by-segment matching without**or broad/secret-store globs,
Git-ignored and unprotected checks, whole-tree no-follow inspection shared
between Core and Cleanup that falls back to quarantine if a directory holds a
secret-store descendant or cannot be completely scanned, and--quarantine
precedence). Policy edits change the config fingerprint (CONFIG_CHANGED),
whilereset-limitspreserves both lists.
See Workspace policy settings. - Read-only restore preview and MCP
restore_preview: Adds zero-write
restore.py preview <txid>(and--preview) with unique CLI transaction
prefixes, bounded 4 MiB no-follow SHA-256 boolean content equality on
occupied regular files (never emitting file bytes or digests), explicit
blockedstatus without--forcewhen an origin ancestor directory is no
longer a readable directory, and the read-only MCP toolrestore_preview.
Both MCPrestoreandrestore_previewrequire exact complete transaction
IDs.
See Restore preview
and MCP tools. - Inline script deletion blocks and Windows PowerShell handoff: Core and
DSH prefilters block inline script deletion calls (python -c,node -e,
bun -e,deno eval,ruby -e,perl -e, interpreter heredocs and piped
scripts invoking file-deletion APIs) asBLOCK_UNDETERMINABLE_EFFECT, while
masking ordinary string literals and ignoring Deno data arguments to avoid
blocking benign scripts orcat/teeheredocs. On Windows, CLI handoff
commands render PowerShell single-quoted invocations (escaping ASCII and
typographic single quotes) with single-invocationtry/finallyenvironment
scoping, verified with an echo probe in the Windows Core CI gate.
See Delete-guard Skill
and Recovery handoff.
Guard-lab, workspace doctor and Skill installation
- L0 paired lifecycle calibration (
agent-guard-lab run --case lifecycle-calibration):
Runs 11 paired checks (22 checks across configuration, hard boundaries and
inline scripts, Cleanup approval drift, recovery preview/conflicts and
Exfil/export/Bash preflights) in an isolated disposable worker with zero
model calls and zero retained fixture values. Reports count protective block
cases and benign allow cases separately, expose read-onlyreportretrieval,
and report the export pair asUNSUPPORTED_PLATFORMwhen the required
file-descriptor operations are unavailable. Windows runs 10 supported pairs.
See Lifecycle calibration. - Read-only workspace doctor (
agent-guard-doctor workspace): Checks
.agent-guard/delete-policy.json, effective Exfil exemptions, Skill links
(local and explicit--skill-dir), active Git Hook wrappers (supporting
--strict-pathsand--audit), and persistent instruction carriers against
invisible Unicode Tags, BiDi overrides/unpaired isolates, non-CJK
supplemental variation selectors and invisible-character runs using bundled
Unicode 17.0 and Adobe-Japan1 sequence tables (51,667 bytes compressed,
Unicode-3.0license).WARNexits0by default and1with--strict.
FAILexits1. The report setshost_interceptionandhook_enforcement
toUNVERIFIED.
See Workspace doctor and
Unicode data provenance. - Skill installer alignment:
install_skill.pynow checks and reports
scripts/check_export.pyandscripts/check_bash_exfil.pyalongside the
existingexfil-guardentrypoints, verified through symlinked real-path
invocation. The separate Kimi2.1.1Lab capture helper retains its pinned
version and historical scope unchanged.
See Skill installation.
Upgrade
Check the exact GitHub Release
and npm version
before registry installation. If unavailable, use a reviewed checkout or a
checked local archive.
Keep doctor, CLI, MCP server and linked Skills on the same installation.
Version 0.3.2 expands the local MCP server from 10 to 14 default tools
(from 11 to 15 with --approval-channel codex) and adds
agent-guard-exfil-export for 15 npm CLI entrypoints. Existing recovery
manifests, deletion policy files and session accounting require no migration.
Complete outstanding approved tasks under their original package, workspace,
quarantine and session binding; older doctor baselines may report DRIFTED
after upgrading and should be reviewed before writing a new baseline.
Core/CLI requires Python 3.9+ and Git. Optional MCP retains Python 3.10+ and
mcp==2.3.0. TOML safe_view and Kimi TOML doctor helpers require Python
3.11+, and agent-guard-exfil-export requires POSIX file-descriptor
operations. No new production dependency is introduced; bundled Unicode table
metadata ships under assets/ with SPDX-License-Identifier: Unicode-3.0.
Validation and scope
This release builds on the 0.3.0 host acceptance baseline recorded in
maintenance acceptance. Local
and CI validation across the 0.3.2 milestones covers TOML safe views,
metadata-only Exfil audit, MCP Exfil and restore_preview real-stdio
contracts, local Git hooks, eight new credential rules, POSIX export
preflights, synthetic-payload Bash Exfil hooks across Claude/Kimi/DSH,
whole-tree regenerable_patterns and protected_paths policy CLI checks,
inline script deletion block/allow pairs, Windows PowerShell echo-probe
formatting, L0 lifecycle calibration, read-only workspace doctor and Unicode
carrier checks, and three-Skill symlinked entrypoint checks. Follow
development CI
for exact commit-level Linux, macOS and Windows Core RC runs. The tag-triggered
release workflow runs the pinned MCP SDK gate and full suite before packing one
archive for GitHub Releases and npm (with provenance) and running independent
read-only publication checks.
Claude Code model-backed maintenance remains deferred, Kimi's standalone Lab
capture helper remains pinned to 2.1.1, and explicit MCP tools remain
separate from native shell/editor interception and OS sandboxing; see the
capability matrix. Opt-in Bash Exfil
coverage is verified on direct synthetic hook payloads and mocked DSH services
rather than live model sessions. Quarantine copies still occupy disk space,
restore remains transaction-level, and GC remains an explicit manual action
with no automatic purge, GUI panel or commercial retention/legal-hold features.