insidersec/insider

Issue running Javascript analysis

Closed this issue · 2 comments

Describe the bug
An error is thrown when trying to run a Javascript analysis.

[INSIDER]: 2020/06/26 21:46:07 Starting analysis for JavaScript/TypeScript app #
[INSIDER]: 2020/06/26 21:46:07 Starting JavaScript source code analysis
[INSIDER]: 2020/06/26 21:46:08 Found package.json file at package.json
[INSIDER]: 2020/06/26 21:46:10 Removing: [package.json package-lock.json] from file list from javascript tech
[INSIDER]: 2020/06/26 21:46:10 Removing: [target_001] from file list from javascript tech
[INSIDER]: 2020/06/26 21:46:10 Found 5901 files to analyze.
[INSIDER]: 2020/06/26 21:46:10 loading core rules
[INSIDER]: 2020/06/26 21:46:10 Rules 8
[INSIDER]: 2020/06/26 21:46:10 Rules 9
[INSIDER]: 2020/06/26 21:46:10 Starting extracting hardcoded information
[INSIDER]: 2020/06/26 21:46:10 Finished hardcoded information extraction
[INSIDER]: 2020/06/26 21:46:10 Staring main code analysis
panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
insider/visitor.NewInputFile(0x7ffeefbff907, 0x1, 0xc00054f890, 0xa, 0xc0004be380, 0x143, 0x343, 0x0, 0x0, 0x0, ...)
        /Users/cynthia.baran/insider/visitor/file.go:238 +0x701
insider/lib.AnalyzeNonAppSource(0x7ffeefbff907, 0x1, 0x0, 0x0, 0x15e564d, 0xa, 0xc000b53a48, 0x15dfe1f, 0x2, 0x1d53300, ...)
        /Users/cynthia.baran/insider/lib/analyzer.go:195 +0xc53
insider/supervisors.RunJSSourceCodeAnalysis(0x15e01ad, 0x3, 0x7ffeefbff90f, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /Users/cynthia.baran/insider/supervisors/javascript.go:29 +0x1d8
main.main()
        /Users/cynthia.baran/insider/main.go:99 +0xef9

To Reproduce
Running any Javascript analysis. I tried running it with two different projects.

**Desktop **

  • OS: Catalina
  • Version 2.0.2

Hello @cynthiabaran.
I just run Insider javascript analysis on 4 big Node.js projects and worked great.

We are working hard to find asap whats is happening with you. Maybe we can chat (Discord?) or if you could share with us a piece of code that are making trouble on Insider would be great.

Captura de Tela 2020-06-27 às 19 33 36

Please do not run the insider inside the same folder as the code to be analyzed.