Secure temporary artifact names as well as final destinations
Checking the final artifact path for symlinks does not make an atomic writer safe when an actor can replace its predictable temporary sibling. Opening that temporary pathname for writing can redirect data outside the intended artifact before the rename. Hold the intended directory descriptor, refuse symlink directory components and create a fresh temporary entry exclusively without following links, or avoid a temporary name when exclusive creation suffices. Test the temporary-name attack as well as the final-path attack. This protects the exercised file-creation boundary; it does not authenticate artifact contents or make an untrusted parent tree safe.
Applies when: A controlled software-agent workflow uses this execution or grading boundary. Keywords: atomic writer temporary symlink descriptor exclusive artifact filesystem