Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
Summary
Mapping .vue files to TypeScript for scanning.
Products
Fortify Static Code Analyzer
Environment
Fortify Static Code Analyzer (SCA) 22.2.x
Vue 2
Situation
Scanning .vue files returns an error like the following:
java.lang.StackOverflowError: null
The sca.log includes the following:
Unexpected exception while parsing file ${0} com.fortify.frontend.parser.ParserException: Parse error in file parent_folder/subfolder1/subfolder2/filename.vue at 3:3. Encountered: "Parser returned error condition.". at com.fortify.frontend.parser.typescript.TypeScriptService.checkNodeFlags(TypeScriptService.java:565) ~[sca-frontend-22.2.2.0004.jar:?] at com.fortify.frontend.parser.typescript.TypeScriptService.marshalObject(TypeScriptService.java:454) ~[sca-frontend-22.2.2.0004.jar:?]
Resolution
Add the below parameter to the fortify-sca.properties file so .vue files are treated as JavaScript:
com.fortify.sca.fileextensions.vue = TYPESCRIPT
URL Name
KM000016669