altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

fix: add path traversal guard for {file:path} config interpolation

Open anandgupta42 opened this issue 7 months ago • 0 comments

Found during v0.5.21 release review. The {file:path} substitution in config/paths.ts has no path traversal guard — {file:../../etc/passwd} or {file:~/.ssh/id_rsa} would be resolved. Currently low risk since configs are user-authored, but should be hardened if configs are ever loaded from less-trusted sources (e.g. shared repo .opencode/opencode.json).

Deferred because: requires design (path jail under config dir or project root, ~45 min).

anandgupta42 avatar Apr 13 '26 06:04 anandgupta42