0

I'm writing a simple crawler with node.js, which searches for web pages and conditionally executes any JavaScript present.

The problem is that in doing so, I execute code form untrusted sources in my node.js environment. Can running untrusted code on node.js in such a way be dangerous (i.e. when encountering malicious scripts), and, if so, how do I act on this?

Code is executed by jsdom

3
  • 1
    it will depend on how you code your crawler. You are basically asking, "what could a malicious site do to my custom client that I have not finished yet?" And that's a little like asking "how long is a piece of string?"
    – schroeder
    Aug 8, 2022 at 15:03
  • The question is too broad. You are asking how to code your project securely. There are entire libraries of tips. Please look up OWASP as a start .
    – schroeder
    Aug 8, 2022 at 15:13
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – schroeder
    Aug 14, 2022 at 11:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.