T09 · Insecure Skill Coding Practices
- Location
scripts/deploy.js:416- Finding
Symbolic Link Traversal Can Expose Files Outside the Shared Directory
- Content
View full analysis
{ if (!res.headersSent) res.writeHead(500); res.end('Internal Server Error'); }); stream.pipe(res); ``` ### Technical Analysis `safeJoin` provides only lexical traversal protection. It normalizes the requested path and verifies that the resulting string begins with the configured root directory. This blocks conventional `../` traversal, but it does not verify where the path resolves on the filesystem. `fs.statSync` and `fs.createReadStream` follow symbolic links. Consequently, a path can lexically remain under the shared directory while re ...[truncated 1999 chars]- Remediation
View remediation
