T09 · Insecure Skill Coding Practices
- Location
scripts/session_log_snip.py:47- Finding
Unsanitized Path Components Permit Out-of-Scope File Writes and Overwrites
- Content
View full analysis
{args.ref_to}\nfile: {path.name}\n", encoding="utf-8", ) ``` ### Technical Analysis The user-controlled `slug` and `ref_to` arguments are interpolated directly into filesystem paths. The implementation does not reject path separators, traversal components such as `..`, absolute-path syntax, or paths resolving through symbolic links. It also does not resolve the final destination and verify that it remains beneath the intended `LYRA_CORE_ROOT/memory` directory. The date and static filename prefixes limit simple traversal strings because any prefixed intermediate directory must exist. However, traversal can still become exploitable where a corresponding directory or symbolic link already exists beneath the memory tree. This is particularly relevant on shared systems or where another process can prepare entr ...[truncated 1758 chars]- Remediation
View remediation
