Replies: 1 comment 3 replies
-
Right below the download button is this warning: The entire node API is available to import for anyone who wants to write a more "safe" script. This article has some suggestions around using https://auth0.com/blog/preventing-command-injection-attacks-in-node-js-apps/ |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Am I not right in thinking that
term
andexec
are both vulnerable to command injection attacks (or even just accidents) when user input is passed to commands?Say for example the input contained something like
; rm -rf /;
.Should there perhaps be a warning in the documentation? A quick search and it looks like there are loads of places where
exec
is being used and variables are being added to command strings using template literals.Is there not an equivalent to Python's
subprocess.run
which handles all that for you?I think in
child_process
perhaps has methods that are less dangerous?Beta Was this translation helpful? Give feedback.
All reactions