You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(security): close ~/.odek/ write carve-out privilege escalation (#30)
* fix(security): close ~/.odek/ write carve-out privilege escalation
A confined agent could rewrite its own trust anchors through the
auto-allowed LocalWrite path: confineToCWD carved out all of ~/.odek/,
and ~/.odek/config.json classified as LocalWrite — so a prompt-injected
sub-agent could disable the sandbox or enable YOLO mode for the next
run, or drop an auto-loaded SKILL.md. Shell rc files also fell through
to auto-allowed LocalWrite.
- ClassifyPath now escalates ~/.odek/config.json, ~/.odek/secrets.env,
~/.odek/skills/, and shell rc/profile files in $HOME to SystemWrite
(prompt/deny). Crontab locations were already SystemWrite via the
/etc, /var, /usr prefixes — locked in with tests.
- confineToCWD excludes those trust anchors from the ~/.odek/ carve-out
(skills are legitimately written via skill_save/skill_patch, not the
generic file tools).
- patch and batch_patch get the same restrictToCWD confinement
write_file already had; both are now wired with it in builtinTools.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* docs(danger): update ClassifyPath doc comment with new classification rules
Axis 2.9 auto-remediation (vprotocol): the exported ClassifyPath function
gained new SystemWrite cases (odek trust anchors, shell rc files) but the
function-level comment still described only the old rules.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments