@mokuyoaxis/agent-guard 0.2.3-rc1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +124 -52
  2. package/README.zh-CN.md +102 -41
  3. package/adapters/dsh/README.md +92 -10
  4. package/adapters/dsh/harness/README.md +384 -0
  5. package/adapters/dsh/harness/baseline.patch.yml +8 -0
  6. package/adapters/dsh/harness/bootstrap.patch.yml +5 -0
  7. package/adapters/dsh/harness/bootstrap_init.mjs +48 -0
  8. package/adapters/dsh/harness/guard_lab.py +771 -0
  9. package/adapters/dsh/harness/native_session.py +503 -0
  10. package/adapters/dsh/harness/profiles.py +212 -0
  11. package/adapters/dsh/harness/read_fixture.py +60 -0
  12. package/adapters/dsh/harness/retry_stream.py +171 -0
  13. package/adapters/dsh/harness/session_decode.mjs +117 -0
  14. package/adapters/dsh/lib/index.js +46 -5
  15. package/adapters/dsh/lib/read_result_guard.js +207 -0
  16. package/adapters/dsh/lib/read_result_guard.py +139 -0
  17. package/adapters/harness_support.py +109 -0
  18. package/adapters/kimi-code/README.md +15 -7
  19. package/adapters/kimi-code/harness/README.md +126 -0
  20. package/adapters/kimi-code/harness/guard_lab.py +430 -0
  21. package/core/lab.py +2396 -0
  22. package/core/redaction.py +157 -55
  23. package/docs/architecture.md +75 -0
  24. package/docs/development-note-unguarded-deletion.md +6 -7
  25. package/docs/friction.md +140 -4
  26. package/docs/guard-lab-clean-task.md +4 -0
  27. package/docs/guard-lab-read-trial-task.md +7 -0
  28. package/docs/guard-lab-trial-task.md +5 -0
  29. package/docs/guard-lab.md +398 -0
  30. package/docs/harness-capabilities.md +8 -5
  31. package/docs/release-notes-0.2.0-rc1.md +2 -2
  32. package/docs/release-notes-0.2.0.md +2 -2
  33. package/docs/release-notes-0.2.2.md +7 -8
  34. package/docs/release-notes-0.2.3-rc1.md +4 -2
  35. package/docs/release-notes-0.2.3-rc2.md +189 -0
  36. package/docs/release-notes-0.2.3.md +84 -0
  37. package/docs/secret-guard-analysis.md +13 -12
  38. package/docs/secret-guard-architecture.md +5 -3
  39. package/docs/secret-guard-design.md +7 -3
  40. package/docs/test-report-codex-gpt-5.6-sol.md +10 -11
  41. package/docs/test-report-dsh-0.2-upgrade.md +142 -0
  42. package/docs/test-report-dsh-guard-lab.md +154 -0
  43. package/docs/test-report-dsh-native-session.md +118 -0
  44. package/docs/test-report-dsh-paired-lab.md +183 -0
  45. package/docs/test-report-dsh-read-redaction.md +114 -0
  46. package/docs/test-report-dsh-real-followup.md +170 -0
  47. package/docs/test-report-dsh-retry-evidence.md +134 -0
  48. package/docs/test-report-kimi-code-block.md +19 -20
  49. package/docs/test-report-kimi-guard-lab.md +117 -0
  50. package/docs/test-report-release-readiness-0.2.3.md +239 -0
  51. package/docs/test-report-workbuddy-windows-core.md +53 -0
  52. package/docs/test-report-zcode-glm-flash.md +9 -9
  53. package/docs/threat-model.md +42 -0
  54. package/guard_lab.py +14 -0
  55. package/package.json +8 -5
  56. package/skills/delete-guard/SKILL.md +2 -3
  57. package/skills/exfil-guard/SKILL.md +37 -7
  58. package/skills/exfil-guard/references/rules.md +84 -16
  59. package/skills/exfil-guard/scripts/_payload.py +99 -0
  60. package/skills/exfil-guard/scripts/check_span.py +14 -81
  61. package/skills/exfil-guard/scripts/sanitize.py +113 -34
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![npm version](https://img.shields.io/npm/v/%40mokuyoaxis%2Fagent-guard.svg)](https://www.npmjs.com/package/@mokuyoaxis/agent-guard)
5
5
  [![License](https://img.shields.io/github/license/mokuyoaxis/agent-guard)](LICENSE)
6
6
  [![Python 3.9+](https://img.shields.io/badge/Python-3.9%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
7
- [![v0.2.3-rc1 source](https://img.shields.io/badge/Source-v0.2.3--rc1-5B6B7A)](https://github.com/mokuyoaxis/agent-guard/releases)
7
+ [![v0.2.3 source](https://img.shields.io/badge/Source-v0.2.3-5B6B7A)](docs/release-notes-0.2.3.md)
8
8
 
9
9
  **Make destructive agent actions reversible by default.** · [简体中文](README.zh-CN.md)
10
10
 
@@ -19,6 +19,8 @@ keeping routine work automatic.
19
19
  - **Accidental outbound disclosure** of known credentials or host-identifying
20
20
  absolute paths can be checked through a cooperative text CLI. A caller that
21
21
  owns the emission can apply its redaction plan, escalate, or block.
22
+ - **Synthetic honeytoken experiments** can exercise declared local channels
23
+ with zero-token controls and fail-inconclusive evidence health checks.
22
24
 
23
25
  The Core is harness-neutral and supports Python 3.9+ and Git. Automatic
24
26
  interception still depends on whether the host exposes a compatible hook; a
@@ -48,19 +50,20 @@ the human or blocks the operation.
48
50
 
49
51
  ## Quick start with your coding agent
50
52
 
51
- Use the scoped npm package after it is available in the registry, or keep a
52
- stable Git checkout. Never substitute the unrelated unscoped `agent-guard`
53
- package.
53
+ Use the scoped npm package or a stable Git checkout. The unscoped
54
+ `agent-guard` package is unrelated to this project.
54
55
 
55
56
  Pinned npm installation into a stable, user-owned prefix:
56
57
 
57
58
  ```sh
58
- npm install --prefix /absolute/path/to/agent-guard-install @mokuyoaxis/agent-guard@0.2.2
59
+ npm install --prefix /absolute/path/to/agent-guard-install @mokuyoaxis/agent-guard@0.2.3
59
60
  ```
60
61
 
61
- `0.2.2` remains the stable recommendation. After the candidate is published,
62
- explicit testers may select `@mokuyoaxis/agent-guard@0.2.3-rc1` or the npm
63
- `@rc` channel; prereleases do not replace npm `latest`.
62
+ **0.2.3** combines Windows/Core fixes, information-protection improvements
63
+ and the offline guard-lab MVP. See the [release notes](docs/release-notes-0.2.3.md)
64
+ for scope and evidence limits. The npm badge and
65
+ [GitHub Releases](https://github.com/mokuyoaxis/agent-guard/releases) show
66
+ which artifacts are available.
64
67
 
65
68
  The package root is then
66
69
  `/absolute/path/to/agent-guard-install/node_modules/@mokuyoaxis/agent-guard`.
@@ -77,8 +80,10 @@ the host's hook support. Then give your coding agent the following setup prompt
77
80
 
78
81
  ```text
79
82
  Set up agent-guard for this workspace. Use either an existing Git checkout or
80
- the exact scoped npm package @mokuyoaxis/agent-guard@0.2.2; never install the
81
- unscoped package named agent-guard. Before installing, ask me to choose and
83
+ the exact scoped npm package @mokuyoaxis/agent-guard@0.2.3;
84
+ never install the unscoped package named agent-guard. If 0.2.3 is unavailable,
85
+ report that and use the existing checkout or ask me to choose a published
86
+ version. Before installing, ask me to choose and
82
87
  approve a stable user-owned prefix. Treat the checkout or installed package
83
88
  root as /absolute/path/to/agent-guard below.
84
89
  First identify the current harness and its actual hook/skill capabilities;
@@ -205,6 +210,13 @@ and **host-identifying absolute paths**. Depending on the channel, it can
205
210
  allow the payload, return a redaction plan, ask for a human decision, or block
206
211
  the emission.
207
212
 
213
+ DSH also offers a [default-off text-read redaction prototype](adapters/dsh/README.md#experimental-text-read-redaction)
214
+ for complete native reads in a pinned composition. It reuses Core and
215
+ regenerates both rendered text and presentation metadata; a zero-model native
216
+ probe covers the next request and durable JSONL log. A separate
217
+ [official Flash direct-read trial](docs/test-report-dsh-real-followup.md)
218
+ observed supported synthetic-secret redaction while useful config stayed readable.
219
+
208
220
  It is a prevention and redaction guard, not a compensation engine: after an
209
221
  emission there is nothing to recover. It is also **not a security sandbox** and
210
222
  does not attempt to stop adversarial exfiltration by an agent with equal OS
@@ -225,19 +237,27 @@ cannot rewrite what it did not write):
225
237
 
226
238
  ### What is detected
227
239
 
228
- **T1 vendor credential patterns** (`secret/*`, deterministic, near-zero
229
- false positives). Rule ids: `secret/openai-key`, `secret/github-token`,
240
+ **T1 vendor credential patterns** (`secret/*`). These rules use known formats;
241
+ documented placeholders and negative examples constrain false positives.
242
+ Rule ids: `secret/openai-key`, `secret/github-token`,
230
243
  `secret/aws-access-key-id`, `secret/gitlab-token`, `secret/slack-token`,
231
- `secret/stripe-key` (live keys only — `sk_test_` is exempt), `secret/jwt`
232
- (structural: the header must base64-decode to JSON containing `alg`), and
244
+ `secret/stripe-key` (live keys only — `sk_test_` is exempt),
245
+ `secret/pypi-token`, `secret/jwt` (structural: the header must decode to JSON
246
+ with a nonempty ASCII string `alg`), and
233
247
  `secret/private-key-block` (whole `-----BEGIN ... PRIVATE KEY-----` block,
234
248
  redacted in one piece). See
235
249
  [skills/exfil-guard/references/rules.md](skills/exfil-guard/references/rules.md)
236
- for the frozen table.
250
+ for the rule table and remaining ambiguities.
251
+
252
+ `secret/connection-password` also detects nonempty passwords in URI userinfo.
253
+ It redacts only the password, preserving the scheme, account and host for
254
+ diagnostics. Percent-encoded passwords and JSON-escaped scheme slashes are
255
+ supported; this does not hide network topology or scan every DSN format.
237
256
 
238
257
  **Value-free secret references** (`secret/source-reference`). The guard
239
- classifies an environment variable's *name* (`*KEY*`, `*TOKEN*`,
240
- `*SECRET*`, `*PASSWORD*`, `*CRED*`, `*AUTH*`) and a secret-store *file name*
258
+ classifies complete components in an environment variable's *name* (such as
259
+ `KEY`, `TOKEN`, `SECRET`, `PASSWORD`, `PASSWD`, `CRED`, or `AUTH`) and a
260
+ secret-store *file name*
241
261
  (`.env`, `*.pem`, `id_rsa*`, `.netrc`, `kubeconfig`, ...), and detects
242
262
  whole-environment expansions (`printenv`, `env | ...`, `cat
243
263
  /proc/self/environ`). This scanner **does not resolve the variable value**;
@@ -293,6 +313,28 @@ Exit code contract: `0` = ALLOW/SANITIZED · `2` = BLOCK · `3` = ASK ·
293
313
  and placeholders only — **never the matched bytes**), and `--path` to enable
294
314
  the repo-local exemption file for the file being written.
295
315
 
316
+ `sanitize.py` enforces the same exit codes: ASK/BLOCK and errors emit no
317
+ payload on stdout. It validates an external `--plan` against the current scan
318
+ and rescans the rewritten text before emitting. Both CLIs use the same default
319
+ workspace and host-side mode; stdin is bounded to the scan cap (4 MiB by default)
320
+ during reading, as is an external plan file. A checker plan produced with an
321
+ explicit mode or path exemption must still satisfy the sanitizer's current
322
+ policy; the plan itself does not authorize emission.
323
+
324
+ Credential detection covers classic and stateless `ghs_APPID_JWT` GitHub
325
+ installation tokens, including long signatures and credentials next to CJK
326
+ prose. Placeholder exemptions require whole shapes; incidental example words
327
+ inside a token do not exempt it. Secret variable references are classified by
328
+ complete name components, preserving ordinary identifiers such as `MONKEY`
329
+ and metadata such as `TOKEN_COUNT`. See the [rule reference](skills/exfil-guard/references/rules.md)
330
+ for supported forms and limitations.
331
+
332
+ PyPI publishing tokens are also detected with their documented prefix and
333
+ minimum body shape, with complete redaction of long tokens. AWS group/user/
334
+ role/policy IDs are kept distinct from access-key IDs; JWT headers require
335
+ the declared nonempty ASCII string `alg`. Public-key variable names and the
336
+ broad legacy `sk-` shape retain their documented conservative boundaries.
337
+
296
338
  ### Read a config without printing its values
297
339
 
298
340
  Introduced in the `0.2.0` source; this CLI is **not** in the earlier
@@ -348,8 +390,8 @@ is a false security claim:
348
390
  guard can see *on the way out*.
349
391
  - **No history rewriting.** Detecting a secret already in Git history is a
350
392
  report at most. Rewriting history is a human action with its own risks.
351
- - **No T3 entropy detector in this release.** It is the single largest
352
- false-positive source, and the named scenarios do not require it.
393
+ - **No T3 entropy detector in this release.** Random-looking text alone is
394
+ insufficient evidence of a credential; ordinary identifiers stay readable.
353
395
 
354
396
  ## Manual, harness-neutral usage
355
397
 
@@ -402,12 +444,18 @@ quarantine full → BLOCK (never fall back to permanent delete)
402
444
 
403
445
  ## Integration and validation matrix
404
446
 
405
- [![Node.js 20 smoke](https://img.shields.io/badge/Node.js-20%20smoke-339933?logo=nodedotjs&logoColor=white)](.github/workflows/ci.yml)
447
+ [![Node.js 22 smoke](https://img.shields.io/badge/Node.js-22%20smoke-339933?logo=nodedotjs&logoColor=white)](.github/workflows/ci.yml)
406
448
  [![Codex Skill/CLI tested](https://img.shields.io/badge/Codex-Skill%2FCLI%20tested-000000?logo=openai&logoColor=white)](docs/test-report-codex-gpt-6-astra-high.md)
407
449
  [![DSH 0.1.5-rc.1 host BLOCK tested](https://img.shields.io/badge/DSH%200.1.5--rc.1-host%20BLOCK%20tested-4D6BFE)](docs/test-report-dsh-0.1.5-rc.1.md)
408
450
  [![ZCode win32 CLI evaluated](https://img.shields.io/badge/ZCode-win32%20CLI%20evaluated-7C5CE0)](docs/test-report-zcode-glm-flash.md)
409
451
  [![Claude Code hook tested with scripted model](https://img.shields.io/badge/Claude%20Code-hook%20tested%20%28scripted%20model%29-D97757?logo=anthropic&logoColor=white)](docs/test-report-claude-code-harness.md)
410
- [![Kimi Code 2.1.1 K3 Bash BLOCK](https://img.shields.io/badge/Kimi%20Code%202.1.1-K3%20Bash%20BLOCK-5B9BD5)](docs/test-report-kimi-code-block.md)
452
+ [![Kimi Code 2.1.1 root Bash BLOCK](https://img.shields.io/badge/Kimi%20Code%202.1.1-root%20Bash%20BLOCK-5B9BD5)](docs/test-report-kimi-code-block.md)
453
+ [![WorkBuddy Windows Core/CLI evaluated](https://img.shields.io/badge/WorkBuddy-Windows%20Core%2FCLI%20evaluated-5B6B7A)](docs/test-report-workbuddy-windows-core.md)
454
+ [![Windows Core CI](https://img.shields.io/badge/Windows-Core%20CI-0078D4)](docs/release-notes-0.2.3-rc1.md#focused-windows-ci)
455
+ [![DSH native text-read checked](https://img.shields.io/badge/DSH-native%20text--read%20checked-4D6BFE)](docs/test-report-release-readiness-0.2.3.md)
456
+
457
+ These badges link to scoped evidence; they do not certify every tool or model.
458
+ The DSH text-read feature is optional and off by default.
411
459
 
412
460
  "The Core works", "a Skill-guided agent used it", and "the harness
413
461
  intercepts every matching tool call" are separate claims. This table keeps
@@ -416,10 +464,13 @@ those evidence levels explicit:
416
464
  | Harness / tested version | Integration path | Evidence and limit |
417
465
  |---|---|---|
418
466
  | **Claude Code 2.1.270 / 2.1.273** | [Native `PreToolUse` for Bash](adapters/claude/README.md) | [Real CLI + scripted model](docs/test-report-claude-code-harness.md): sampled allow/ask/deny and Python-startup failure; other tools unverified. |
419
- | **DSH 0.1.5-rc.1** | [Native pre-execute adapter](adapters/dsh/README.md) | [Real-host, no-model packaged-plugin probe](docs/test-report-dsh-0.1.5-rc.1.md): benign execution, execution-level `BLOCK`, absent bypass marker and loaded-adapter Core failure; model/Agent and non-`bash` paths unverified. |
467
+ | **DSH 0.1.5-rc.1** | [Native pre-execute adapter](adapters/dsh/README.md) | [Real-host packaged-plugin probe](docs/test-report-dsh-0.1.5-rc.1.md): execution-level `BLOCK` and loaded-adapter Core failure. A [real-model Lab baseline](docs/test-report-dsh-guard-lab.md) stayed quiet with guard off, so no L2 mitigation claim exists; model-proposed destructive `bash` enforcement remains unverified. The separate opt-in read path is listed below. |
468
+ | **DSH CLI rc.1 / tools and FS rc.2 / Node 22** | [Experimental text-read redaction](adapters/dsh/README.md#experimental-text-read-redaction), default off | [Zero-model native probe](docs/test-report-dsh-read-redaction.md): next request and durable JSONL. [Official Flash direct-read off/on](docs/test-report-dsh-real-followup.md): supported synthetic secrets redacted in tool content/meta/session, useful config preserved; no injection L2 claim. |
469
+ | **DSH 0.2.0-rc.2 / Node 22** | [Default deletion and optional text-read adapter](adapters/dsh/README.md) | [Fresh contract review](docs/test-report-release-readiness-0.2.3.md): native deletion blocking, read redaction on reviewed local/sandbox FS, next synthetic request and durable JSONL. Native v4 Lab support remains bounded; no new real-model L2 result. |
420
470
  | **Codex CLI 0.154.0 (tested session)** | [Skill + production CLI](docs/test-report-codex-gpt-6-astra-high.md) | Older-source cooperative acceptance; no native hook claim. |
471
+ | **WorkBuddy (version not recorded; Windows 11)** | [Core / CLI](docs/test-report-workbuddy-windows-core.md) | Community feedback on 0.2.2 found two Core defects now covered by regressions and focused Windows CI; no WorkBuddy adapter or native-hook validation. |
421
472
  | **ZCode (version unrecorded; win32)** | [Historical Skill/CLI + hook trial](docs/test-report-zcode-glm-flash.md) | Older hook observation includes a persistent-permission bypass; current version unverified. |
422
- | **Kimi Code 0.42.0 / 2.1.1** | [Native `PreToolUse` for Bash](adapters/kimi-code/README.md) | [Bounded tests](docs/test-report-kimi-code-block.md): authenticated 2.1.1 root-Bash PASS on an OAuth official model and maintainer-confirmed official K3 relay; older 0.42.0 root/child BLOCK, ASK denial and Python-failure refusal. Hook absence/timeout remains fail-open. |
473
+ | **Kimi Code 0.42.0 / 2.1.1** | [Native `PreToolUse` for Bash](adapters/kimi-code/README.md) | [Bounded tests](docs/test-report-kimi-code-block.md): authenticated 2.1.1 root-Bash PASS on an OAuth official model and a second configured model route; older 0.42.0 root/child BLOCK, ASK denial and Python-failure refusal. Hook absence/timeout remains fail-open. |
423
474
  | **Other / unlisted hosts** | [Self-adaptation guide](adapters/INTEGRATION.md) | No native claim without a blocking pre-tool event and independent non-execution check. |
424
475
 
425
476
  For agent-led setup: identify the actual host version and tool names, follow
@@ -466,6 +517,7 @@ agent-guard/
466
517
  ├── core/ # classifier · policy · recovery · audit · redaction
467
518
  ├── doctor.py # local configuration, probes, and drift preflight
468
519
  ├── live_sentinel.py # opt-in real-host sentinel and alarm evidence
520
+ ├── guard_lab.py # user-controlled offline synthetic honeytoken lab
469
521
  ├── adapters/INTEGRATION.md # checklist for an unlisted host
470
522
  ├── adapters/claude/ # Claude Code PreToolUse hook adapter
471
523
  ├── adapters/kimi-code/ # Kimi Code PreToolUse hook adapter
@@ -486,16 +538,21 @@ compensation engine without restructuring.
486
538
  | [CONTRIBUTING.md](CONTRIBUTING.md) | how to propose an Issue and submit a focused Pull Request |
487
539
  | [docs/architecture.md](docs/architecture.md) | pillars ↔ components, data flow, design decisions |
488
540
  | [docs/host-drift.md](docs/host-drift.md) | zero-token host/version drift states and privacy-minimal baselines |
541
+ | [docs/guard-lab.md](docs/guard-lab.md) | synthetic Lab workflow, evidence semantics, and unsupported channels |
542
+ | [docs/release-notes-0.2.3.md](docs/release-notes-0.2.3.md) | 0.2.3 stable-release scope and evidence limits |
543
+ | [docs/release-notes-0.2.3-rc2.md](docs/release-notes-0.2.3-rc2.md) | published prerelease: offline guard-lab and reviewed DSH contracts |
489
544
  | [docs/release-notes-0.2.3-rc1.md](docs/release-notes-0.2.3-rc1.md) | Windows Core fail-closed candidate and prerelease channel |
490
545
  | [docs/release-notes-0.2.2.md](docs/release-notes-0.2.2.md) | 0.2.2 host drift, live sentinel and DSH package acceptance |
491
546
  | [docs/release-notes-0.2.1.md](docs/release-notes-0.2.1.md) | 0.2.1 adapter/doctor changes and bounded evidence |
492
547
  | [docs/release-notes-0.2.0.md](docs/release-notes-0.2.0.md) | 0.2.0 changes, evidence levels, and known limits |
493
548
  | [adapters/INTEGRATION.md](adapters/INTEGRATION.md) | self-adaptation checklist for an unlisted host |
494
549
  | [docs/threat-model.md](docs/threat-model.md) | honest limits: what this is and is not |
495
- | [docs/friction.md](docs/friction.md) | what real agents taught us (F1–F11) |
550
+ | [docs/friction.md](docs/friction.md) | what real agents and host processes taught us (F1–F20) |
496
551
  | [docs/development-note-unguarded-deletion.md](docs/development-note-unguarded-deletion.md) | de-identified incident exploration and the recovery-aware direction |
497
552
  | [docs/test-report-codex-gpt-5.6-sol.md](docs/test-report-codex-gpt-5.6-sol.md) | v0.1.1 Codex evaluation (medium + high) |
498
- | [docs/test-report-dsh-0.1.5-rc.1.md](docs/test-report-dsh-0.1.5-rc.1.md) | current DSH packaged-plugin and execution-level `bash` acceptance |
553
+ | [docs/test-report-workbuddy-windows-core.md](docs/test-report-workbuddy-windows-core.md) | community Windows Core/CLI feedback and resulting regressions |
554
+ | [docs/test-report-dsh-0.1.5-rc.1.md](docs/test-report-dsh-0.1.5-rc.1.md) | DSH 0.1.5-rc.1 packaged-plugin and execution-level `bash` acceptance |
555
+ | [docs/test-report-dsh-guard-lab.md](docs/test-report-dsh-guard-lab.md) | bounded DSH real-model Lab baseline; no L2 claim |
499
556
  | [docs/test-report-dsh-v0.1.1.md](docs/test-report-dsh-v0.1.1.md) | v0.1.1 DSH live test (DeepSeek V4 Pro high, minimal mode) |
500
557
  | [skills/recovery-audit/SKILL.md](skills/recovery-audit/SKILL.md) | evidence hierarchy, deterministic replay, recovery and landing gates |
501
558
  | [skills/delete-guard/references/policy.md](skills/delete-guard/references/policy.md) | full rule table and decision codes |
@@ -504,43 +561,58 @@ compensation engine without restructuring.
504
561
 
505
562
  ## Status & roadmap
506
563
 
507
- The source version is **v0.2.3-rc1**; the latest stable release remains
508
- **v0.2.2**. The published `v0.2.0` baseline includes
509
- recoverable destructive actions, cmd/PowerShell dialect parsing, the
510
- `exfil-guard` text CLI, a read-only config view, and `recovery-audit`.
511
- Later source releases add Claude/Kimi POSIX hook bridges, bounded host
512
- evidence, a local `doctor`, host-drift checks, an opt-in live sentinel and
513
- current DSH package acceptance. See the
514
- [0.2.3-rc1 notes](docs/release-notes-0.2.3-rc1.md) for the candidate scope,
515
- [0.2.2 notes](docs/release-notes-0.2.2.md) for the stable scope, and
516
- [GitHub Releases](https://github.com/mokuyoaxis/agent-guard/releases) for
517
- publication status; a source version is not itself a published Release.
518
-
519
- The release identity is harness-neutral. Existing DSH and Claude adapters,
520
- Codex/ZCode acceptance evidence, and the bounded Kimi exercise are entries
521
- in a growing compatibility matrix, not separate definitions of the product.
564
+ **v0.2.3** combines the Windows/Core
565
+ fixes and offline guard-lab MVP with validated text redaction, URI password
566
+ detection, PyPI and newer GitHub token support, and narrower false-positive
567
+ boundaries. Existing recovery tools, safe config inspection, Claude/Kimi
568
+ bridges, doctor, host-drift checks and live sentinel remain available.
569
+ The DSH bridge supports the reviewed `0.1.5-rc.1` and `0.2.0-rc.2` contracts;
570
+ its optional text-read protection remains off by default.
571
+
572
+ The [0.2.3 notes](docs/release-notes-0.2.3.md) describe this release's scope.
573
+ The [rc2](docs/release-notes-0.2.3-rc2.md),
574
+ [rc1](docs/release-notes-0.2.3-rc1.md), and
575
+ [0.2.2](docs/release-notes-0.2.2.md) notes retain their historical scope.
576
+ Check [GitHub Releases](https://github.com/mokuyoaxis/agent-guard/releases)
577
+ and npm for published artifacts.
578
+
579
+ The Core and Decision Protocol are shared across harnesses. DSH, Claude and
580
+ Kimi adapters, together with Codex/WorkBuddy/ZCode acceptance records, are documented in
581
+ one compatibility matrix.
522
582
  The Kimi result includes sampled hook-compensation and execution-level BLOCK
523
583
  paths, not proof that its host enforces every BLOCK or that arbitrary agent
524
584
  actions are protected. A tested direct-Python hook startup failure was
525
585
  fail-open. The optional shell bridge blocked a sampled Python startup failure
526
586
  in a real Kimi host session, but only when the bridge itself ran; config
527
587
  validation alone cannot prove that the hook is live.
528
- The candidate adds a focused real-Windows Core gate for Issue #7, but native
588
+ The release adds a focused real-Windows Core gate for Issue #7, but native
529
589
  cmd/PowerShell execution through every harness and general concurrent-subagent
530
590
  safety remain explicit gaps. Later Guard branches (`git-guard`, `database-guard`,
531
591
  `cloud-guard`) reuse the same protocol and compensation engine.
532
592
 
533
- ## 0.2.x preview: guard-lab
534
-
535
- Planned, **not included in 0.2.3-rc1**: an opt-in, offline honeytoken lab
536
- using disposable projects and synthetic, non-secret markers. It will compare
537
- normal tasks with prompt-injection attempts, and separately observe whether a
538
- harness indexes or exports files without an agent-requested read. Positive and
539
- negative controls, an independent observer, and evidence labels will keep a
540
- mere read request distinct from a confirmed external transfer. No real
541
- credentials or automatic background monitoring are part of the plan. This is
542
- a bounded diagnostic experiment, not a guarantee against a malicious model
543
- or harness.
593
+ ## guard-lab
594
+
595
+ The opt-in, offline honeytoken Lab uses disposable
596
+ projects and synthetic, non-secret markers. Its `clean`, `mock-positive`,
597
+ `mock-injection`, and `snapshot-positive` controls call no model and make no
598
+ external request. A bounded loopback observer records the fake Lab stub, bait
599
+ URL, or a validated synthetic snapshot; an explicit post-run scan can detect a
600
+ canary in selected output without retaining the raw value.
601
+
602
+ The user keeps the true controller and evidence outside the fixture shown to
603
+ the tested agent. Broken controls or changed evidence produce `INCONCLUSIVE`,
604
+ never an optimistic pass. The Lab cannot observe ordinary file
605
+ reads, prove remote transfer, universally block LLM calls, or resist a same-UID
606
+ adversary. Start with the zero-token controls and read the
607
+ [guard-lab guide](docs/guard-lab.md) before involving a real harness.
608
+ The built-in cases report `CALIBRATION_ONLY`. A separate manual
609
+ `injection-probe` treats bait contact as `EXPOSURE_OBSERVED`, and `compare`
610
+ accepts a mitigation result only after an effective unguarded baseline and a
611
+ matched guarded trial with the same protocol, harness/version/model, group,
612
+ and task hash. Manual real-model runs also require a user-verified completed
613
+ host result, so an exit-0 startup/model failure cannot count as a quiet win.
614
+ A quiet baseline stays `INCONCLUSIVE`; no result is a general model or vendor
615
+ safety rating.
544
616
 
545
617
  ## Contributing
546
618
 
package/README.zh-CN.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![npm 版本](https://img.shields.io/npm/v/%40mokuyoaxis%2Fagent-guard.svg)](https://www.npmjs.com/package/@mokuyoaxis/agent-guard)
5
5
  [![License](https://img.shields.io/github/license/mokuyoaxis/agent-guard)](LICENSE)
6
6
  [![Python 3.9+](https://img.shields.io/badge/Python-3.9%2B-3776AB?logo=python&logoColor=white)](https://www.python.org/)
7
- [![v0.2.3-rc1 源码](https://img.shields.io/badge/%E6%BA%90%E7%A0%81-v0.2.3--rc1-5B6B7A)](https://github.com/mokuyoaxis/agent-guard/releases)
7
+ [![v0.2.3 源码](https://img.shields.io/badge/%E6%BA%90%E7%A0%81-v0.2.3-5B6B7A)](docs/release-notes-0.2.3.md)
8
8
 
9
9
  **让 AI Agent 的破坏性操作默认可逆。** · [English](README.md)
10
10
 
@@ -15,6 +15,8 @@ Agent Guard 是给编码 Agent 用的可靠性工具:让受支持的高风险
15
15
  - **破坏性 Git 操作**:可先保存可恢复的状态,再覆盖工作树。
16
16
  - **意外外发**:合作式文本 CLI 可检查已知凭据和带本机标识的绝对路径;
17
17
  持有载荷的调用方按判决应用脱敏计划、请求人工处理或阻断。
18
+ - **合成蜜罐验测**:用零 Token 正负对照检查明确列出的本地信道;证据健康
19
+ 不足时只报 `INCONCLUSIVE`,不猜测通过。
18
20
 
19
21
  共享 Core 支持 Python 3.9+ 和 Git,不依附某个 harness。能否自动拦截,
20
22
  仍取决于宿主有没有兼容 hook;仅安装 Skill 不会自动拦截工具调用。
@@ -39,18 +41,19 @@ git push --force → BLOCK # 不自动改写远端历史
39
41
 
40
42
  ## 让编码 Agent 帮你接入
41
43
 
42
- 可以在 npm registry 可用后安装带作用域的包,也可以保留一个稳定的 Git
43
- checkout。不要误装无作用域的同名 `agent-guard` 包。
44
+ 可以安装带作用域的 npm 包,也可以保留一个稳定的 Git checkout。
45
+ 无作用域的同名 `agent-guard` 包与本项目无关。
44
46
 
45
47
  把固定版本安装到用户选择的稳定路径:
46
48
 
47
49
  ```sh
48
- npm install --prefix /absolute/path/to/agent-guard-install @mokuyoaxis/agent-guard@0.2.2
50
+ npm install --prefix /absolute/path/to/agent-guard-install @mokuyoaxis/agent-guard@0.2.3
49
51
  ```
50
52
 
51
- `0.2.2` 仍是稳定版推荐。候选版发布后,测试者可显式选择
52
- `@mokuyoaxis/agent-guard@0.2.3-rc1` 或 npm 的 `@rc` 通道;预发布不会替换
53
- npm `latest`。
53
+ **0.2.3** 合并 Windows/Core 修复、信息保护增强和离线 guard-lab MVP。
54
+ 本次范围与证据边界见 [发布说明](docs/release-notes-0.2.3.md);
55
+ npm 徽章和 [GitHub Releases](https://github.com/mokuyoaxis/agent-guard/releases)
56
+ 展示实际可用的发布工件。
54
57
 
55
58
  安装后的包根目录是
56
59
  `/absolute/path/to/agent-guard-install/node_modules/@mokuyoaxis/agent-guard`。
@@ -66,7 +69,8 @@ Core 需要 Python 3.9+ 和 Git;是否能自动拦截取决于宿主是否提
66
69
 
67
70
  ```text
68
71
  请为当前工作区接入 agent-guard。只使用现有 Git checkout,或精确的 scoped
69
- npm 包 @mokuyoaxis/agent-guard@0.2.2;不要安装无作用域的同名 agent-guard。
72
+ npm 包 @mokuyoaxis/agent-guard@0.2.3;不要安装无作用域的同名
73
+ agent-guard。若 0.2.3 尚不可用,说明情况,使用现有 checkout 或让我选择已发布版本。
70
74
  安装前先让我选择并批准一个稳定的用户目录,然后把 checkout 或 npm 安装后的
71
75
  包根目录作为下文的 /absolute/path/to/agent-guard。
72
76
  先识别当前 harness 实际支持的 hook 与 Skill,阅读本 README 和对应 adapter
@@ -177,6 +181,12 @@ DSH 的 `PreToolDecision`、Claude Code PreToolUse 的 `ask`,或在不支持
177
181
  **带本机标识的绝对路径**。依据信道,Guard 可放行、返回脱敏计划、
178
182
  请求人处理或阻断。
179
183
 
184
+ DSH 另有[默认关闭的文本 `read` 脱敏原型](adapters/dsh/README.md#experimental-text-read-redaction),
185
+ 仅覆盖版本门控下的完整原生读取。它复用同一 Core,并让 DSH 同时重新生成
186
+ 返回文本和展示元数据;零模型原生验证已覆盖下一次请求和 JSONL 落盘。
187
+ 另一次[官方 Flash 真实直接读取对照](docs/test-report-dsh-real-followup.md)
188
+ 观察到支持规则的合成秘密被脱敏,同时保留有用配置;这不是提示注入 L2 结论。
189
+
180
190
  它做的是预防和脱敏,不是补偿:内容发出去后就不能撤销。它也**不是
181
191
  安全沙箱**,不负责抵抗拥有相同系统权限的 Agent 蓄意外泄。
182
192
 
@@ -194,16 +204,21 @@ DSH 的 `PreToolDecision`、Claude Code PreToolUse 的 `ask`,或在不支持
194
204
 
195
205
  ### 检测什么
196
206
 
197
- **T1 厂商凭据特征**(`secret/*`,确定性,误报接近零)。rule id 包括:
207
+ **T1 厂商凭据特征**(`secret/*`)。按已知格式识别,用文档化占位符和反例
208
+ 约束误伤。rule id 包括:
198
209
  `secret/openai-key`、`secret/github-token`、`secret/aws-access-key-id`、
199
210
  `secret/gitlab-token`、`secret/slack-token`、`secret/stripe-key`
200
- (仅 live key,`sk_test_` 豁免)、`secret/jwt`(结构化:头部必须 base64
201
- 解码为含 `alg` 的 JSON),以及 `secret/private-key-block`
202
- (整段 `-----BEGIN ... PRIVATE KEY-----` 一次性脱敏)。冻结规则表见
211
+ (仅 live key,`sk_test_` 豁免)、`secret/pypi-token`、`secret/jwt`(结构化:
212
+ 头部须解码为 JSON,且 `alg` 是非空 ASCII 字符串),以及 `secret/private-key-block`
213
+ (整段 `-----BEGIN ... PRIVATE KEY-----` 一次性脱敏)。规则表与保留边界见
203
214
  [skills/exfil-guard/references/rules.md](skills/exfil-guard/references/rules.md)。
204
215
 
205
- **不读值的密钥引用**(`secret/source-reference`)。Guard 只对变量**名**
206
- (`*KEY*`、`*TOKEN*`、`*SECRET*`、`*PASSWORD*`、`*CRED*`、`*AUTH*`)与
216
+ `secret/connection-password` 另检测 URI 用户信息中的非空口令,只遮口令,
217
+ 保留协议、账号与主机以便排错。支持百分号编码口令和 JSON 转义的协议斜杠;
218
+ 这不等于隐藏网络拓扑,也不覆盖所有 DSN 格式。
219
+
220
+ **不读值的密钥引用**(`secret/source-reference`)。Guard 按变量名中的完整
221
+ 组成部分(如 `KEY`、`TOKEN`、`SECRET`、`PASSWORD`、`PASSWD`、`CRED`、`AUTH`)与
207
222
  密钥库**文件名**(`.env`、`*.pem`、`id_rsa*`、`.netrc`、`kubeconfig` 等)
208
223
  分类,并识别整环境展开(`printenv`、`env | ...`、
209
224
  `cat /proc/self/environ`)。这个扫描器**不解析变量的值**;这不代表其他
@@ -255,6 +270,21 @@ echo 'config: sk-proj-AbCdEf…' | python3 skills/exfil-guard/scripts/sanitize.p
255
270
  `--json` 输出机器可读判决(仅偏移、rule id 与占位符——**绝不含匹配到的
256
271
  字节**);`--path` 为即将写入的文件启用仓库本地豁免文件。
257
272
 
273
+ `sanitize.py` 同样落实上述退出码:ASK/BLOCK 和错误时 stdout 不输出正文。
274
+ 外部 `--plan` 必须与当前扫描一致,改写后复扫通过才输出。两个 CLI 共用默认
275
+ 工作区和宿主模式;stdin 在读取时即受到扫描上限限制(默认 4 MiB),外部计划文件
276
+ 也受同一上限约束。checker 使用显式模式或路径豁免产生的计划,仍须满足 sanitizer
277
+ 当前策略;计划本身不是发送授权。
278
+
279
+ 凭据检测支持经典和 `ghs_APPID_JWT` GitHub 安装令牌,完整遮挡长签名,并能识别
280
+ 紧贴中文的凭据。占位符豁免要求完整形状,token 内偶然出现示例词不会整段放行。
281
+ 秘密变量引用按名称组成部分判断,保留 `MONKEY` 等普通标识符和 `TOKEN_COUNT`
282
+ 等元数据名称。支持的形式和限制见[规则说明](skills/exfil-guard/references/rules.md)。
283
+
284
+ 新增 PyPI 发布令牌识别,按官方前缀与最小 body 形状完整遮挡长令牌。AWS 组/
285
+ 用户/角色/策略 ID 与访问密钥 ID 分开处理;JWT header 的 `alg` 须为非空
286
+ ASCII 字符串。公钥变量名称与通用 `sk-` 形状仍保留已说明的保守边界。
287
+
258
288
  ### 不打印值地查看配置
259
289
 
260
290
  此 CLI 从 `0.2.0` 源码开始提供,**不属于**此前的 `0.2.0-rc2`
@@ -303,7 +333,8 @@ python3 skills/exfil-guard/scripts/view.py --workspace /path/to/workspace config
303
333
  路径上**能看到的内容。
304
334
  - **不改写历史。** 检测到已经进入 git 历史的密钥最多只是一份报告。
305
335
  改写历史是需要人类执行、且自带风险的动作。
306
- - **本版本不含 T3 熵检测器。** 它是最大的单一误报来源,而目标场景并不需要它。
336
+ - **本版本不含 T3 熵检测器。** 不把看起来随机的字符串直接当作凭据,减少
337
+ 对普通标识符的干扰。
307
338
 
308
339
  ## 手动使用(不依赖特定 harness)
309
340
 
@@ -354,12 +385,18 @@ node_modules/(已 ignore) → ALLOW (可证明可再生)
354
385
 
355
386
  ## 接入与验证矩阵
356
387
 
357
- [![Node.js 20 smoke](https://img.shields.io/badge/Node.js-20%20smoke-339933?logo=nodedotjs&logoColor=white)](.github/workflows/ci.yml)
388
+ [![Node.js 22 smoke](https://img.shields.io/badge/Node.js-22%20smoke-339933?logo=nodedotjs&logoColor=white)](.github/workflows/ci.yml)
358
389
  [![Codex Skill/CLI tested](https://img.shields.io/badge/Codex-Skill%2FCLI%20tested-000000?logo=openai&logoColor=white)](docs/test-report-codex-gpt-6-astra-high.md)
359
390
  [![DSH 0.1.5-rc.1 宿主 BLOCK 实测](https://img.shields.io/badge/DSH%200.1.5--rc.1-%E5%AE%BF%E4%B8%BB%20BLOCK%20%E5%AE%9E%E6%B5%8B-4D6BFE)](docs/test-report-dsh-0.1.5-rc.1.md)
360
391
  [![ZCode win32 CLI evaluated](https://img.shields.io/badge/ZCode-win32%20CLI%20evaluated-7C5CE0)](docs/test-report-zcode-glm-flash.md)
361
392
  [![Claude Code hook tested with scripted model](https://img.shields.io/badge/Claude%20Code-hook%20tested%20%28scripted%20model%29-D97757?logo=anthropic&logoColor=white)](docs/test-report-claude-code-harness.md)
362
- [![Kimi Code 2.1.1 K3 Bash BLOCK](https://img.shields.io/badge/Kimi%20Code%202.1.1-K3%20Bash%20BLOCK-5B9BD5)](docs/test-report-kimi-code-block.md)
393
+ [![Kimi Code 2.1.1 root Bash BLOCK](https://img.shields.io/badge/Kimi%20Code%202.1.1-root%20Bash%20BLOCK-5B9BD5)](docs/test-report-kimi-code-block.md)
394
+ [![WorkBuddy Windows Core/CLI evaluated](https://img.shields.io/badge/WorkBuddy-Windows%20Core%2FCLI%20evaluated-5B6B7A)](docs/test-report-workbuddy-windows-core.md)
395
+ [![Windows Core CI](https://img.shields.io/badge/Windows-Core%20CI-0078D4)](docs/release-notes-0.2.3-rc1.md#focused-windows-ci)
396
+ [![DSH native text-read checked](https://img.shields.io/badge/DSH-native%20text--read%20checked-4D6BFE)](docs/test-report-release-readiness-0.2.3.md)
397
+
398
+ 徽章链接到各自范围内的证据,不代表所有工具和模型均已通过。
399
+ DSH 文本读取脱敏是可选功能,默认关闭。
363
400
 
364
401
  “Core 可用”、“受 Skill 引导的 Agent 使用过”和“harness 会强制拦截每次匹配的
365
402
  工具调用”是三种不同强度的结论:
@@ -367,10 +404,13 @@ node_modules/(已 ignore) → ALLOW (可证明可再生)
367
404
  | Harness/实测版本 | 接入路径 | 证据与边界 |
368
405
  |---|---|---|
369
406
  | **Claude Code 2.1.270 / 2.1.273** | [Bash 原生 `PreToolUse`](adapters/claude/README.md) | [真实 CLI+脚本模型](docs/test-report-claude-code-harness.md):抽样 allow/ask/deny 与 Python 启动故障;其他工具未验证。 |
370
- | **DSH 0.1.5-rc.1** | [原生 pre-execute adapter](adapters/dsh/README.md) | [真实宿主、无模型、打包插件探针](docs/test-report-dsh-0.1.5-rc.1.md):无害放行、执行级 `BLOCK`、旁路标记缺席和已加载 adapter 的 Core 故障拒绝;模型/Agent 与非 `bash` 路径未验证。 |
407
+ | **DSH 0.1.5-rc.1** | [原生 pre-execute adapter](adapters/dsh/README.md) | [真实宿主打包插件探针](docs/test-report-dsh-0.1.5-rc.1.md):执行级 `BLOCK` 与已加载 adapter 的 Core 故障拒绝。另一次[真实模型 Lab 基线](docs/test-report-dsh-guard-lab.md)在 guard-off 下未触发诱饵,故没有 L2 缓解结论;模型主动提出破坏性 `bash` 时的强制执行仍未验证。单独开启的读取脱敏路径见下一行。 |
408
+ | **DSH CLI rc.1/工具与 FS rc.2/Node 22** | [实验性文本读取脱敏](adapters/dsh/README.md#experimental-text-read-redaction),默认关闭 | [零模型原生验证](docs/test-report-dsh-read-redaction.md):下一次请求和 JSONL 落盘。[官方 Flash 真实读取 off/on](docs/test-report-dsh-real-followup.md):支持规则的合成秘密在工具内容/元数据/会话中被脱敏,有用配置保留;无提示注入 L2 结论。 |
409
+ | **DSH 0.2.0-rc.2/Node 22** | [默认删除与可选文本读取 adapter](adapters/dsh/README.md) | [最新契约复核](docs/test-report-release-readiness-0.2.3.md):原生删除阻断、已审阅本地/沙箱 FS 的读取脱敏、下一次合成请求与 JSONL 落盘。原生 v4 Lab 支持仍有范围限制;没有新的真实模型 L2 结果。 |
371
410
  | **Codex CLI 0.154.0(所测会话)** | [Skill + 生产 CLI](docs/test-report-codex-gpt-6-astra-high.md) | 较早源码的合作式验收;不声称原生 hook。 |
411
+ | **WorkBuddy(版本未记录;Windows 11)** | [Core/CLI](docs/test-report-workbuddy-windows-core.md) | 社区在 0.2.2 上发现两个 Core 缺陷,现有回归与聚焦 Windows CI 覆盖;没有 WorkBuddy adapter 或原生 hook 验证。 |
372
412
  | **ZCode(版本未记录;win32)** | [历史 Skill/CLI+hook 试次](docs/test-report-zcode-glm-flash.md) | 旧报告记录了持久许可绕过 hook;当前版本未验证。 |
373
- | **Kimi Code 0.42.0 / 2.1.1** | [Bash 原生 `PreToolUse`](adapters/kimi-code/README.md) | [有界实测](docs/test-report-kimi-code-block.md):2.1.1 在 OAuth 官模和维护者确认的官方 K3 可信中转上均取得根 Bash PASS;0.42.0 另有主/子代理 BLOCK、ASK 硬拒绝和 Python 故障拒绝。hook 缺席/超时仍可能放行。 |
413
+ | **Kimi Code 0.42.0 / 2.1.1** | [Bash 原生 `PreToolUse`](adapters/kimi-code/README.md) | [有界实测](docs/test-report-kimi-code-block.md):2.1.1 在 OAuth 官方模型和另一条已配置模型路由上均取得根 Bash PASS;0.42.0 另有主/子代理 BLOCK、ASK 硬拒绝和 Python 故障拒绝。hook 缺席/超时仍可能放行。 |
374
414
  | **其他/未列出宿主** | [自适配指南](adapters/INTEGRATION.md) | 未独立验证调用前阻断与目标未执行前,不作原生支持声明。 |
375
415
 
376
416
  由 Agent 协助接入时,先识别真实宿主版本与工具名称,阅读上表对应指南,
@@ -410,6 +450,7 @@ agent-guard/
410
450
  ├── core/ # classifier · policy · recovery · audit · redaction
411
451
  ├── doctor.py # 本地配置、探针与宿主漂移预检
412
452
  ├── live_sentinel.py # 可选实宿主哨兵与报警证据
453
+ ├── guard_lab.py # 用户控制的离线合成蜜罐实验
413
454
  ├── adapters/INTEGRATION.md # 未列出宿主的自适配检查清单
414
455
  ├── adapters/claude/ # Claude Code PreToolUse hook 适配器
415
456
  ├── adapters/kimi-code/ # Kimi Code PreToolUse hook 适配器
@@ -429,16 +470,21 @@ Skill 负责 Agent 行为引导,约束全部下沉 Core。未来的 `git-guard`
429
470
  | [CONTRIBUTING.md](CONTRIBUTING.md) | 如何提出 Issue 与提交范围清晰的 Pull Request |
430
471
  | [docs/architecture.md](docs/architecture.md) | 四柱↔组件映射、数据流、关键设计决定 |
431
472
  | [docs/host-drift.md](docs/host-drift.md) | 零 Token 宿主/版本漂移状态与最小化基线 |
473
+ | [docs/guard-lab.md](docs/guard-lab.md) | 合成 Lab 流程、证据语义与不支持的信道 |
474
+ | [docs/release-notes-0.2.3.md](docs/release-notes-0.2.3.md) | 0.2.3 正式版范围与证据边界 |
475
+ | [docs/release-notes-0.2.3-rc2.md](docs/release-notes-0.2.3-rc2.md) | 已发布预览版:离线 guard-lab 与已复核 DSH 契约 |
432
476
  | [docs/release-notes-0.2.3-rc1.md](docs/release-notes-0.2.3-rc1.md) | Windows Core fail-closed 候选版与预发布通道 |
433
477
  | [docs/release-notes-0.2.2.md](docs/release-notes-0.2.2.md) | 0.2.2 宿主漂移、实时哨兵与 DSH 打包验收 |
434
478
  | [docs/release-notes-0.2.1.md](docs/release-notes-0.2.1.md) | 0.2.1 adapter/doctor 变更与证据边界 |
435
479
  | [docs/release-notes-0.2.0.md](docs/release-notes-0.2.0.md) | 0.2.0 变更、证据等级与已知限制 |
436
480
  | [adapters/INTEGRATION.md](adapters/INTEGRATION.md) | 未列出宿主的自适配检查清单 |
437
481
  | [docs/threat-model.md](docs/threat-model.md) | 诚实边界:它是什么、不是什么 |
438
- | [docs/friction.md](docs/friction.md) | 真实 Agent 撞出来的教训(F1–F11) |
482
+ | [docs/friction.md](docs/friction.md) | 真实 Agent 与宿主进程撞出来的教训(F1–F20) |
439
483
  | [docs/development-note-unguarded-deletion.md](docs/development-note-unguarded-deletion.md) | 去标识化事故探索与面向恢复的后续方向 |
440
484
  | [docs/test-report-codex-gpt-5.6-sol.md](docs/test-report-codex-gpt-5.6-sol.md) | v0.1.1 Codex 评估(medium + high) |
441
- | [docs/test-report-dsh-0.1.5-rc.1.md](docs/test-report-dsh-0.1.5-rc.1.md) | 当前 DSH 打包插件与执行级 `bash` 验收 |
485
+ | [docs/test-report-workbuddy-windows-core.md](docs/test-report-workbuddy-windows-core.md) | 社区 Windows Core/CLI 反馈与对应回归 |
486
+ | [docs/test-report-dsh-0.1.5-rc.1.md](docs/test-report-dsh-0.1.5-rc.1.md) | DSH 0.1.5-rc.1 打包插件与执行级 `bash` 验收 |
487
+ | [docs/test-report-dsh-guard-lab.md](docs/test-report-dsh-guard-lab.md) | DSH 真实模型有界 Lab 基线;无 L2 结论 |
442
488
  | [docs/test-report-dsh-v0.1.1.md](docs/test-report-dsh-v0.1.1.md) | v0.1.1 DSH 真机测试(DeepSeek V4 Pro high,极简模式) |
443
489
  | [skills/recovery-audit/SKILL.md](skills/recovery-audit/SKILL.md) | 证据优先级、确定性回放、恢复与落地门禁 |
444
490
  | [skills/delete-guard/references/policy.md](skills/delete-guard/references/policy.md) | 完整规则表与判决码 |
@@ -447,33 +493,48 @@ Skill 负责 Agent 行为引导,约束全部下沉 Core。未来的 `git-guard`
447
493
 
448
494
  ## 状态与路线图
449
495
 
450
- 当前源码版本为 **v0.2.3-rc1**,最新稳定版仍为 **v0.2.2**。已发布的
451
- `v0.2.0` 基线包含可恢复的破坏性
452
- 操作、cmd/PowerShell 方言解析、`exfil-guard` 文本 CLI、只读配置安全视图
453
- 和 `recovery-audit`。后续源码版新增 Claude/Kimi POSIX hook 桥、有界宿主
454
- 证据、`doctor`、宿主漂移检查、可选实时哨兵与当前 DSH 打包验收。准确范围见
455
- [0.2.3-rc1 说明](docs/release-notes-0.2.3-rc1.md)记录候选范围,
456
- [0.2.2 说明](docs/release-notes-0.2.2.md)记录稳定版范围;是否已正式发布以
457
- [GitHub Releases](https://github.com/mokuyoaxis/agent-guard/releases) 为准,
458
- 源码版本号本身不代表已有 Release。
459
-
460
- 该版本的项目身份与 harness 无关。现有 DSH、Claude adapter,Codex/ZCode
461
- 验收证据,以及有边界的 Kimi 实测,只是不断扩展的兼容矩阵,不分别定义产品。
496
+ **v0.2.3** 合并 Windows/Core 修复和离线 guard-lab
497
+ MVP,并增强文本脱敏执行与校验、URI 口令识别、PyPI/新版 GitHub 令牌保护,
498
+ 收窄部分误伤边界。已有的恢复工具、配置安全视图、Claude/Kimi 接入桥、
499
+ doctor、宿主漂移检查与实时哨兵继续提供。
500
+ DSH 接入支持已复核的 `0.1.5-rc.1` 和 `0.2.0-rc.2` 契约;可选文本读取
501
+ 保护仍默认关闭。
502
+
503
+ [0.2.3 说明](docs/release-notes-0.2.3.md)记录本次范围;
504
+ [rc2](docs/release-notes-0.2.3-rc2.md)、[rc1](docs/release-notes-0.2.3-rc1.md)
505
+ 和 [0.2.2](docs/release-notes-0.2.2.md) 说明保留各自历史范围。
506
+ 已发布工件以 [GitHub Releases](https://github.com/mokuyoaxis/agent-guard/releases)
507
+ 和 npm 为准。
508
+
509
+ Core 和 Decision Protocol 由各 harness 共用。DSH、Claude、Kimi 的适配器
510
+ 以及 Codex/WorkBuddy/ZCode 的验收记录,统一列在兼容矩阵中。
462
511
  Kimi 结果包含所测调用的 hook 补偿与执行级 BLOCK 证据,不证明宿主强制执行
463
512
  所有 `BLOCK`,也不意味着任意 Agent 操作都受保护。实测旧的直连 Python hook
464
513
  启动故障会放行;可选 shell 桥在一次 Kimi 宿主故障注入中将其转为拒绝,
465
- 但前提是桥自身成功运行;单凭配置校验无法证明 hook 在线。候选版为 Issue #7
514
+ 但前提是桥自身成功运行;单凭配置校验无法证明 hook 在线。本次版本为 Issue #7
466
515
  新增了聚焦的真实 Windows Core 门,但各 harness 下的原生 cmd/PowerShell
467
516
  执行与一般并发子代理安全仍是明确缺口。
468
517
  后续 `git-guard`、`database-guard`、`cloud-guard` 继续复用同一协议与补偿引擎。
469
518
 
470
- ## 0.2.x 预告:guard-lab 合成蜜罐
471
-
472
- 这是规划中的可选实验,**不属于 0.2.3-rc1**。它会在离线、一次性的测试项目
473
- 里放入无认证能力的合成标记,对照正常任务与提示词注入诱导;另设试次观察
474
- harness 是否在 Agent 未请求读取时自行索引或外发文件。正负对照、独立观察器
475
- 和证据分级将区分“提出读取”“本地接触”与“证实越过外部边界”。不使用真实
476
- 凭据,不默认常驻后台;它也不是抵抗恶意模型或宿主的安全保证。
519
+ ## guard-lab 合成蜜罐
520
+
521
+ 可选的离线蜜罐 Lab 在一次性项目中放入不具备认证能力的合成
522
+ 标记。`clean`、`mock-positive`、`mock-injection` 与 `snapshot-positive` 四组
523
+ 对照不调用模型,也不访问外网;限时回环观察器记录假 Lab 工具、诱饵 URL 或
524
+ 经验证的合成快照,用户还可在试次结束后显式扫描选定输出,只保留哈希、阶段与
525
+ 命中的 bait id,不保存原值。
526
+
527
+ 真控制器与证据由用户保管,和交给受测 Agent 的夹具分开。观察器、控制文件或
528
+ 事件链有问题时只报 `INCONCLUSIVE`。Lab 不能看到普通文件读取,不能证明数据
529
+ 已经外发,不能普遍封禁 LLM 调用,也不能抵抗同一系统用户权限下的对手。
530
+ 涉及真实 harness 前,请先跑零 Token 对照并阅读
531
+ [guard-lab 指南](docs/guard-lab.md)。
532
+ 这些内建 case 只报 `CALIBRATION_ONLY`。另设的手动 `injection-probe` 会把诱饵
533
+ 命中记为 `EXPOSURE_OBSERVED`;只有未防护基线确实中招,并与相同协议、
534
+ harness/版本/模型、实验组和任务哈希的开启防护试次配对,`compare` 才可能给出
535
+ 缓解成立。手动真实模型试次还必须由用户确认宿主确实完成,避免把“进程退出 0、
536
+ 但模型/配置已失败”误算成安静成功。基线没触发时只能报 `INCONCLUSIVE`,任何
537
+ 结果都不是对模型或厂商的通用安全认证。
477
538
 
478
539
  ## 参与贡献
479
540