Trevor PaughSystems engineer
Trevor PaughProject Chronicles

Chronicles / The Factory

Where a file really is

Progress

The tool that sends a job's files to the site decided whether a file was allowed by looking at its path. Four jobs in a row taught it to find out where the file really is first, and to refuse what it cannot resolve instead of guessing from the name.

The site sync tool only accepts files from a job folder or the temp folder. That check is a trust boundary, and its first version trusted the path as written.

Resolve first

A link inside an allowed folder can point anywhere, and a shortened Windows folder name can make a real temp file look foreign. The tool now follows links and expands short names before it decides. If it cannot read a file’s real location, it refuses the file.

Never reach out

Network and device paths are refused outright, and a path that runs through a link to one is refused without following the link. Each of the four jobs came from the security review of the one before, which is the review doing its job.