-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create temporary directories using fsPromises.mkdtemp()
#181
Comments
@BrianJDrake can you please state what your exact concern is here? |
@guybedford You point out that But this (undocumented) function doesn't exist in a vacuum; it comes with unwritten expectations about how it should be used. It is reasonable to expect that When
We can do away with all this complexity by just using a standard function like |
If you'd like to create a PR to use |
jco run
creates a temporary directory using this complex, undocumented and possibly insecure (no verification that the directory is private or empty) code:jco/src/cmd/run.js
Lines 11 to 13 in cbc396d
Node.js 10+ provides a function that does this task:
fsPromises.mkdtemp()
. According to nodejs/node#6142 (comment), that function is a thin binding to libc'smkdtemp
, so it should be secure.The text was updated successfully, but these errors were encountered: