Skip to content

v0.6.64

Choose a tag to compare

@github-actions github-actions released this 31 Jul 11:32
feat: hook cwd exclusion list + folder picker, auto-upgrade, target fix

Three related changes triggered by "白名單這不應該限制 claude 吧" +
"改成開啟資料夾來選擇路徑" + noticing json.dumps was still being logged as
a target.

1. Hook cwd: whitelist → exclusion list

The v0.6.59 cwd whitelist inverted the sensible default. Claude Code Bash
tool calls are AI actions worth auditing, so they should default to ON;
the operator can opt paths OUT (personal notes, hobby coding, secrets
folder). Settings ▸ 整合 renamed to "Claude Code Hook — 例外清單" and
now writes `excludedPaths` to ~/.redlog/hook-config.json instead of
`watchPaths`. The hook keeps reading `watchPaths` for backward-compat
with anyone still holding a v0.6.59 config, and the UI shows an amber
"legacy whitelist still active" banner in that case so it's obvious the
old rule is narrowing the log.

Also: Settings picks a folder via Electron's native openDirectory dialog
(hookConfig:pickPath IPC) instead of asking users to type the path.

2. Shell hook auto-upgrade

Anyone who installed the shell hook between v0.6.20 and v0.6.46 has a
copy with `'pid': $$$` that fails to log a single command_start /
command_end. autoUpgradeInstalledHooks() runs at RedLog startup, checks
every installed shell-source hook for the known-broken marker, and
overwrites with the bundled fresh copy when it matches. Idempotent, and
emits a `system.hook_auto_upgrade` chain event when it fires so the
mutation is on the record.

3. Target extractor: require explicit URL scheme in the fallback

The fallback in extractTarget() ran DOMAIN_RE across any command, so
`python -c "import json.dumps"` recorded target=json.dumps, and any
`source ~/.redlog/shell-preexec-hook.sh` recorded that filename. Now
the fallback only fires when the command contains `http://` or
`https://` — real URL cases (docker run … http://svc, etc) still land,
false positives stop.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>