Intent-Code Divergence
Medium
- Confidence
- 98% confidence
- Finding
- The example implementation uses a naive string prefix check with `startswith`, which can be bypassed by sibling paths sharing the same prefix, such as allowing `/backend/api/endpoints-malicious/file.py` when `/backend/api/endpoints/` is intended. In a skill explicitly meant to constrain where an AI agent may write, this undermines the safety boundary and could permit unauthorized edits outside the approved directory.
