Skip to content

Commit a0e19e8

Browse files
committed
add comment
1 parent a601ede commit a0e19e8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

internal/batches/executor/run_steps.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,7 @@ func createCidFile(ctx context.Context, tempDir string, repoSlug string) (string
610610
}
611611

612612
func getAbsoluteMountPath(batchSpecDir string, mountPath string) (string, error) {
613+
// Use OpenRoot to prevent path traversal and symlink attacks via mount paths
613614
root, err := os.OpenRoot(batchSpecDir)
614615
if err != nil {
615616
return "", errors.Wrap(err, "opening batch spec directory")

0 commit comments

Comments
 (0)