Replaces `child_process.exec` with `child_process.spawn` for both asynchronous and synchronous dependency checks. This change mitigates potential command injection vulnerabilities by passing arguments separately, enhancing the security of the application.