SAST for Node.js fails on ES6 projects
Summary
SAST fails when processing ECMASCRIPT6 projects.
Steps to reproduce
Enable SAST or Auto DevOps on a project that features ES6 files with .js extension.
Example Project
https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/79449985
What is the current bug behavior?
The Closure compiler fails to process many JS files:
/tmp/app/spec/javascripts/pipelines/graph/action_component_spec.js:5: ERROR - This language feature is only supported for ECMASCRIPT6 mode or better: modules.
import mountComponent from '../../helpers/vue_mount_component_helper';
^
What is the expected correct behavior?
It should process and scan ES6 files.
Possible fixes
Switch to some other tool to remove the code comments.