mirror of
https://github.com/JuliusBrussee/caveman.git
synced 2026-08-11 13:21:09 +02:00
Writes were hardened via safeWriteFlag (PRs #70/#71) but readers still trusted whatever the flag contained. A local attacker with write access to ~/.claude/ could symlink the flag at a secret file and have the per-turn reinforcement inject its bytes into model context, or the statuslines echo ANSI escapes to the terminal on every keystroke. - caveman-config.js: new readFlag() — lstat symlink refuse, 64-byte cap, O_NOFOLLOW, VALID_MODES whitelist. Returns null on any anomaly. - caveman-mode-tracker.js: per-turn reinforcement routes through readFlag() instead of fs.readFileSync. - caveman-statusline.sh / .ps1: symlink + size refuse, strip to [a-z0-9-], whitelist-validate before rendering. - compress.py (3 synced copies): is_sensitive_path() denylist refuses .env*, .netrc, keys/certs, ~/.ssh|.aws|.gnupg|.kube|.docker, and any basename containing secret/credential/password/apikey/token/privatekey (separator-insensitive). Fails loudly before read — no silent exfil of credentials to the Anthropic API. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>