tools: add a structured JSON/YAML/TOML read+edit tool, and extend the path policy to the shell tool #1543

Open
opened 2026-10-27 13:40:49 +00:00 by sam · 0 comments
Owner

Precautionary hardening ticket raised from reading the builtin tool set (not an incident report). Two gaps: (1) no structured-format tool — the builtin read/edit tools are line-oriented, so JSON/YAML/TOML files are read as raw bytes (secret-bearing values dumped, no key structure) and edited by exact-text replace (brittle against reformatting, reordering, duplicate substrings); TOML read/write capability already exists in internal/infrastructure/configuration (issue 348). (2) The shell tool is outside the path policy: read.go and write.go gate on ResolveReadable/isReadConfined/isConfined, shell.go references neither, and command/hardline.go is explicit that screening is a floor not a boundary — so a jailed read tool is routed around with cat/sed/redirects. Full evidence in the GitHub issue body.


Imported from beads archie-core-r52n · GitHub #1234 · type task · priority P3 · created 2026-09-29

Precautionary hardening ticket raised from reading the builtin tool set (not an incident report). Two gaps: (1) no structured-format tool — the builtin read/edit tools are line-oriented, so JSON/YAML/TOML files are read as raw bytes (secret-bearing values dumped, no key structure) and edited by exact-text replace (brittle against reformatting, reordering, duplicate substrings); TOML read/write capability already exists in internal/infrastructure/configuration (issue 348). (2) The shell tool is outside the path policy: read.go and write.go gate on ResolveReadable/isReadConfined/isConfined, shell.go references neither, and command/hardline.go is explicit that screening is a floor not a boundary — so a jailed read tool is routed around with cat/sed/redirects. Full evidence in the GitHub issue body. --- _Imported from beads `archie-core-r52n` · GitHub #1234 · type task · priority P3 · created 2026-09-29_
sam added the lowtask labels 2026-10-27 13:40:49 +00:00
sam self-assigned this 2026-10-27 13:40:49 +00:00
sam added the deferred label 2026-11-15 17:26:16 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1543