SonarScanner tries to open node-gyp in node_modules autonomously

Versions

  • SonarScanner: 4.4.0.2170;
  • SonarQube: 8.5.1 (build 38104).

Error observed

I’m in a Javascript node-based environment. I want to launch the scanner in the back end.
Although I explicitly included three javascript files in the configuration GUI of SonarQube, SonarScanner in any case tries to open the node_modules/.bin/node-gyp files. I think it’s a bug because there are tons of similar files in the same directory which are correctly ignored; if I manually remove the files node-gyp, node-gyp.bat and node-gyp.ps1 from node_modules/.bin, everything works.

Reproducing the bug

For reproducing the bug, it’s enough to install node-gyp or a library that uses it, like sqlite3.

Here a snapshot from the command line: