Use alternate solution for running batch script (.cmd or .bat) without shell option
Starting in Node.js 22, it will no longer be possible to run a batch script (.cmd or .bat) using spawn without using a shell (i.e., shell: true). See https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2 for the announcement. In earlier versions of Node.js, it's possible to re-enable this behavior by passing the --security-revert=CVE-2024-27980 CLI option to node. However, this is only a stopgap measure. It's also very difficult for users to enable when running Antora (since it can't be set using the NODE_OPTIONS environment variable).
The reason for not having to use a shell (which is the default setting) is that it takes the burden off the user to worry about sanitizing the command, which we still want to be able to provide (see #30 (closed)).
One possible way to solve this is to write the command to a file (perhaps antora-collector-run.bat) and run that batch script with the shell options enabled. Some escaping of the command (base call and arguments) will still need to be done, but perhaps simpler than passing the command through the shell directly. The other option is to go back to forcing the use of the shell in the case the base call is a batch script and making sure arguments are properly quoted/escaped. (This would still be different than setting shell: true on the run action, which assumes the command can be passed to the shell without further escaping. In other words, what we do when shell: true is not set is transparent to the user).