datadog-static-analyzer does not recognize MJS files - even if explicitly including them via config.
To Reproduce
Steps to reproduce the behavior:
Download the latest linux build. I used https://github.com/datadog/datadog-static-analyzer/releases/latest/download/datadog-static-analyzer-$(uname -m)-unknown-linux-gnu.zip
Create a directory containing javascript files using the .mjs file extension, which is used by Node to distinguish JS files using the ES6 module system. Note, I did not try it, but I suspect this is an issue w/ .cjs files as well.
Describe the bug
datadog-static-analyzer
does not recognize MJS files - even if explicitly including them via config.To Reproduce
Steps to reproduce the behavior:
https://github.com/datadog/datadog-static-analyzer/releases/latest/download/datadog-static-analyzer-$(uname -m)-unknown-linux-gnu.zip
.mjs
file extension, which is used by Node to distinguish JS files using the ES6 module system. Note, I did not try it, but I suspect this is an issue w/.cjs
files as well.static-analysis.datadog.yml
:datadog-static-analyzer --directory . --print-violations --debug yes --format json --output output.json
.mjs
files to.js
and re-run.Expected behavior
I expected the files to be scanned as javascript... or a config option that allowed me to specify that MJS files should be scanned as javascript.
Desktop (please complete the following information):
node:20-slim
docker image