Before adapting a file tool:
- Write down trusted root, allowed users, allowed files and allowed operations.
- Keep the model-supplied path as data. Do not let it choose the trusted root.
- Define relative-path / URI / encoding policy at the real input boundary.
- Demonstrate parent, sibling-prefix and symlink escapes using fictional fixtures.
- Keep unresolved, outside-root and not-file results visible; do not guess a fallback.
- A file inside a directory may still be unauthorized or sensitive.
- Require separate operation-specific access policy and OS-enforced restrictions.
- Review check/use races and handle-based/platform-specific access design.
- Test the installed server/tool and OS independently; this teaching kit does not do that.
