pi-crew 0.11.44 → 0.11.45

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 CHANGED
@@ -1,6 +1,50 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased]
3
+ ## [0.11.45] — security hardening wave: worktree git-injection class closed + verified review fixes (2026-10-27)
4
+
5
+ ### Security hardening wave — worktree git-injection (MED-1) + verified review fixes
6
+
7
+ Cold-verified adversarial review of v0.11.44 surfaced one CONFIRMED code-exec class finding (git config/hook injection
8
+ in worker-controlled worktrees) plus two same-class bypass vectors found while fixing it. This wave closes the full
9
+ attack surface, not just the original report.
10
+
11
+ **Fixed — git config/hook injection via worker-controlled worktrees (MED-1, CONFIRMED).** Every git invocation that
12
+ runs with `cwd` inside a worktree is now routed through `src/worktree/git-hardening.ts`:
13
+ `-c core.fsmonitor=false -c core.hooksPath= -c core.attributesFile=` (empty `hooksPath` neutralizes
14
+ prepare-commit-msg/post-commit that `--no-verify` does not block), `--no-textconv --no-ext-diff` on `diff`,
15
+ `--no-verify` on `commit`, plus `GIT_CONFIG_NOSYSTEM=1` and a shared `buildGitSafeEnv()` (drops `process.env`
16
+ inheritance and `GIT_CONFIG_SYSTEM`). A gitdir-pointer guard (`verifyWorktreeGitdirPointer` + per-command
17
+ `assertWorktreePointerTrusted`) defeats `.git`-pointer hijack and the R-A3 TOCTOU (pointer flipped mid-chain aborts
18
+ the chain as corrupted). Covers `cleanup.ts`, `worktree-manager.ts` (incl. diff-capture fns R-A1), `post-execution.ts`
19
+ read-lane probe (R-A2 — previously raw git with full env secrets), `branch-freshness.ts`, `goal-achievement.ts`.
20
+ Regression tests use live poisoned-config fixtures (fsmonitor/hooks/textconv/filter.clean/diff.external) and assert
21
+ no marker execution. Residual (documented in-code): filter definitions in genuinely-trusted global config remain
22
+ executable — required for commit identity.
23
+
24
+ **Fixed — broker `stop()` unlink race (R-MINOR-2).** Socket leaf identity (`dev`/`ino`) is pinned right after
25
+ `listen()` in the new `src/runtime/broker/socket-stop.ts`; `stop()` unlinks only while it still owns the inode,
26
+ renames the leaf aside while closing, restores only if the path is still `ENOENT` (B-LOW2), and stale
27
+ `.stopping.<pid>.*` shields are swept once their pid is dead (B-LOW1).
28
+
29
+ **Fixed — kill-timer PID-recycle window (E1).** `killProcessPid` snapshots `/proc/<pid>/stat` starttime at entry and
30
+ re-validates before the 3s SIGKILL (group + absolute-pid fallback); proven mismatch skips the kill with a warn log.
31
+ win32//proc-less platforms keep legacy behavior (documented).
32
+
33
+ **Changed — inference-broker token map keyed by SHA-256 digest (R-LOW-4).** Raw secrets are no longer map keys nor
34
+ retained broker-side after registration, matching `crew-broker-tokens` constant-time discipline.
35
+
36
+ **Changed — pi CLI resolution no longer falls back to `process.cwd()` (E2).** A planted `package.json` matching the
37
+ pi package name could otherwise be spawned as a worker with broker-token env in degenerate installs.
38
+
39
+ **Docs — corrected the R7-9 trust-model comment** in `cross-extension-rpc.ts` (`rpc:run` is the only mutating channel
40
+ accepting unsigned RPCs — rate-limited + cwd-contained; live-control rejects all unsigned ops), and removed the dead
41
+ hello length-check shadowed by `isHelloParams` bounds (crew-broker.ts back under the wc-gate ceiling).
42
+
43
+ **CI — nightly now runs `npm audit --audit-level=high` (signal-only, `continue-on-error`) and `test:coverage`**
44
+ (first workflow to execute the existing coverage script; job timeout 30→45 min).
45
+
46
+ **Tests:** worktree suites 92/92, task-runner 213/213, socket/goal suites 146/146, `test:critical` 125/125,
47
+ `tsc --noEmit` + biome + wc-gate all clean.
4
48
 
5
49
  ## [0.11.44] — fix wave 16: full-backlog burn-down — liveness wiring everywhere + rmSync sweep complete + T-6(b) harden (2026-10-26)
6
50