claudemd-cli 0.51.0 → 0.52.0
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.
- package/CHANGELOG.md +26 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,32 @@ All notable changes to the `claudemd` plugin. This changelog tracks plugin artif
|
|
|
8
8
|
- **Canonical spec version source**: `spec/CLAUDE.md` top-line title (`# AI-CODING-SPEC vX.Y.Z — Core`) + `spec/CLAUDE-changelog.md` top `##` entry.
|
|
9
9
|
- **Plugin semver vs spec semver** are independent: plugin patch (0.2.0 → 0.2.1) may ship when spec is unchanged (this release); plugin minor (0.1.9 → 0.2.0) ships when spec minor updates (v0.2.0 shipped spec v6.10.0).
|
|
10
10
|
|
|
11
|
+
## [0.52.0] - 2026-07-24
|
|
12
|
+
|
|
13
|
+
Fix batch from the 2026-07-24 production-readiness audit (`docs/2026-07-24-production-readiness-audit.md`) — items 1-3 and 5-10 of its action table, plus the restocked core net-delete candidate pool (C7-C12, item 4 core-side). Ships spec **v6.20.1** (patch). Minor bump: the curl-sh gate's deny surface widens (user-visible default behavior change).
|
|
14
|
+
|
|
15
|
+
**What changes for users**: wrapper-prefixed fetch-to-shell commands (`sudo curl … | sh`, `nohup curl … | bash`, `FOO=1 curl … | sh`, `timeout 5 curl … | sh`, `( sudo curl … | sh )`) previously slipped past the §8 curl-sh gate and now deny. Escape hatches unchanged: `[allow-curl-sh]` token or `DISABLE_PRE_BASH_SAFETY_HOOK=1`; prior behavior = pin plugin ≤0.51.1. The deny message carries the bypass paths at the moment of impact.
|
|
16
|
+
|
|
17
|
+
- **fix(§8): fetch-side wrapper/assignment prefix bypassed the curl-sh gate** (audit P1-1). Only the sink side stripped wrappers (`curl … | sudo bash` denied) while the fetch side was a bare regex anchored at command position, so `sudo curl … | sh` was allowed. Each curl-sh segment now strips leading subshell/brace openers, env-assignments and exec-wrappers via the shared `s8_strip_wrappers` (same machinery as the rm/npx gates; monotonic — stripping only exposes text to a deny-on-match regex). Hook suite 382 → 394 (+8 wrapper-deny cases, 7 pre-fix RED, + 4 FP guards; all pre-existing rows verdict-unchanged). Documented residuals: option-with-arg wrappers (`sudo -u svc curl`), wrapper after a mid-segment background `&`.
|
|
18
|
+
- **spec v6.20.1** (patch, audit P1-2 + P2-14): §13 META enforcement-partition counts corrected 22/6-hook → 23/7-hook (stale since §8-curl-sh joined hard-rules.json 2026-07-13) with new drift test `hard-rules-9` pinning the prose counts to the computed manifest partition; duplicate §EXT heading ids made unique (`§7-EXT-TMP` / `§11-EXT-MEM` / `§11-EXT-MAC`), tag-syntax subsection relocated into §11-EXT-MEM, core pointers updated; `spec-coherence-audit` CHECK 1 now flags duplicate `##+ §id` headings (with the id-token regex fixed so `§4.FULL` / `§4.FULL-lite` are distinct ids, not a phantom `§4.` duplicate). v6.20.0 Recent-changes entry externalized to the spec changelog: extended headroom 1300B → 2311B (95.38% of cap, out of the §0.1 danger band).
|
|
19
|
+
- **ci: shellcheck now blocking at warning+ severity** (audit P2-11; was `|| echo` warn-only) and scope extended to `scripts/*.sh` + `tests/lib/*.sh`. Baseline cleaned: `tests/lib/env-hygiene.sh` gains a `shellcheck shell=bash` directive (SC2148), dead `TRIGGER_RE` back-compat alias removed from banned-vocab-check.sh (SC2034). Info-level findings remain a visible non-blocking report.
|
|
20
|
+
- **fix(mem-audit): 24h debounce sentinel now written BEFORE the scan loop** (audit P2-4). A 3s-timeout kill on a many-project install left the sentinel unwritten, so every subsequent Stop re-ran the full scan instead of debouncing.
|
|
21
|
+
- **statusline: repo git calls bounded with `timeout 1`** where coreutils timeout exists (audit P2-18; hung NFS/fuse git could block the render — CC's own statusline timeout remains the backstop; macOS stock falls back to bare git).
|
|
22
|
+
- **docs (audit P1-3 + P2-9/10/12)**: `ADDING-NEW-HOOK.md` now includes the drift-gate registration steps (RULE-HITS-SCHEMA + contract-test `DOCUMENTED` array + hard-rules.json + registry/toggle) — following the old doc verbatim produced a red build; stale "6th hook" / "8 shipped hooks" counts removed (install.js ×2); `ARCHITECTURE.md` documents the settings.json lock-free/idempotent posture and the guarded L1-spawns-L2 bootstrap edge; `mergeHook` annotated as test-fixture-only (not live wiring since v0.1.5).
|
|
23
|
+
|
|
24
|
+
## [0.51.1] - 2026-07-17
|
|
25
|
+
|
|
26
|
+
Fix release from the 2026-07-17 four-dimension audit (`docs/comprehensive-audit-2026-07-17-v0.51.0.md`): two latent-bug closures + one CI coverage hole. No spec change (spec stays **v6.20.0**). All three are `fix:` — restoring documented/intended behavior, not new rules.
|
|
27
|
+
|
|
28
|
+
**What changes for users**: commands that hid the command word behind quotes (`"rm" -rf $X`, `r""m`, `curl … | "bash"`, `ba''sh`) previously slipped past all three §8 gates and now deny. Ordinary quoting (`-m "fix rm usage"`, `echo ""`, quoted `$VAR` targets) is unaffected — the original 283-row corpus re-verdicts byte-identically. Escape hatches unchanged: per-command `[allow-rm-rf-var]` / `[allow-npx-unpinned]` / `[allow-curl-sh]` tokens, or `DISABLE_PRE_BASH_SAFETY_HOOK=1`; prior behavior = pin plugin ≤0.51.0. The deny message itself carries these bypass paths, so affected users see the revert path at the moment of impact.
|
|
29
|
+
|
|
30
|
+
- **fix(§8): quoted / intra-word-split command words bypassed all three gates** (2026-07-17 audit F1, pre-existing since the sanitize state machine — NOT a 0.51.0 regression). `sanitize_cmd` stripped quoted-string *contents*, so `"rm"` became `""` and `ba""sh` kept its empty pair — the basename compares and the curl-sh sink regex never matched, while bash execs them as `rm`/`bash`. The state machine now unwraps a terminated quote whose body is a simple literal word (`[A-Za-z0-9_./-]+` — what the shell execs after quote removal) and drops an *empty* pair only when glued to a word/quote char on either side; a standalone `echo ""` keeps its token-boundary marker. Closed shapes: `"rm"`/`'rm'`/`r""m`/`"""rm"""`/`rm '-rf'` (rm gate), `"npx"`/`n""px` (npx gate), `curl … | "bash"`/`ba""sh`/`ba''sh`/`'sh'` (curl-sh gate), plus combos with `${IFS}`, wrappers, `$( )`, and leading assignments. Documented residual (deliberate double-evasion, same bar as the heredoc note): quoted runner + indirect payload (`"bash" -c 'rm …'`).
|
|
31
|
+
- **fix(telemetry): cwd encoder was byte-wise in bash, character-wise in JS.** `hook_encode_project` used `tr -c` (a CJK char → `---`) while `paths.js#encodeProjectCwd` and CC itself produce one `-` per character — every JS auditor mis-located `~/.claude/projects/<encoded>` for non-ASCII cwds (latent: all current repos are ASCII-pathed). Now a character-wise bash loop with an explicit ASCII set (no `[a-z]` ranges — locale collation can swallow accented letters), pinned by a new cross-language parity test (ARCH-2: CJK / accented / `+@space` / ASCII fixtures assert bash ≡ JS). Known residual: non-BMP (emoji) counts UTF-16 units in JS vs codepoints in bash.
|
|
32
|
+
- **ci: node matrix [20] → [20, 22].** `memory-maintenance.js`'s real `node:sqlite` query path (Node ≥22.5) was CI-invisible — its test self-skips on 20, so a query/schema regression shipped green. 20 keeps covering the engines-floor degradation path.
|
|
33
|
+
- **test(§8): curl-sh wrapper parity gate is now bidirectional** — new assertion S8_WRAP_ARGLESS ⊆ CURLSH_WRAP (the direction that actually prevents curl-sh FNs when a wrapper is added to the shared arrays; FLAGGED stays legitimately excluded).
|
|
34
|
+
- **docs: ARCHITECTURE.md state-locations** gains the v0.50.0 `bootstrap-failed.json` sentinel line.
|
|
35
|
+
- **Evidence**: corpus 366 → 382 (+11 deny RED, +5 FP-guard); original 283 rows differential = 0 verdict changes; live-hook FN matrix (F1 shapes × evasion-family combos) all deny, FP guards all allow; full `npm test` green; perf-baseline delta ≤5ms per probe; shellcheck clean.
|
|
36
|
+
|
|
11
37
|
## [0.51.0] - 2026-07-15
|
|
12
38
|
|
|
13
39
|
Third deferred item from the 2026-07-15 four-dimension audit: the §8 shared-tokenizer consolidation, scoped to the safe single-source subset. No spec change (spec stays **v6.20.0**). **Behaviour-preserving** — every deny/allow verdict is provably unchanged; this is a refactor of the enforcement plumbing, not a rule change.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudemd-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"description": "Standalone CLI for §10-V banned-vocab + transcript scanning. Companion to the claudemd Claude Code plugin (github.com/sdsrss/claudemd) for use in git pre-commit hooks, GitHub Actions, and other agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|