Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates flow/util/docker_shell to use a unique X11 authority file path based on the process ID, adds a trap to clean up this file on exit, and removes the exec command when executing the Docker container. Feedback highlights a security vulnerability (CWE-377) where using predictable filenames with $$ in /tmp is susceptible to symlink attacks and race conditions, and recommends using mktemp to securely generate the temporary file with restricted permissions.
2a4e305 to
f64119e
Compare
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 0 with regression(s), 0 without a comparable baseline. |
vvbandeira
left a comment
There was a problem hiding this comment.
The comment at flow/util/docker_shell:104 still says "otherwise exec it", but the PR removes the exec, and the new blank line 105 separates the comment from DOCKER_CMD.
--dry-run now prints a mktemp path that the EXIT trap deletes. If someone runs the printed command, docker mounts a missing path, so X forwarding fails.
Please quote $XAUTH at line 74, like the other uses at lines 116-117.
switched to mktemp incorporated code review feedback Signed-off-by: Jeff Ng <jeffng@precisioninno.com>
thanks for the feedback. I've made the updates and ran it through Claude for further refinement. |
f64119e to
eb7f03c
Compare
Change the xauth file to be PID specific to avoid conflicts when multiple users are using docker_shell on the same machine. Added cleanup of the PID specific files so they don't accumulate.
Fixes https://github.com/The-OpenROAD-Project-private/OpenROAD-flow-scripts/issues/1960