auth0 / repo-supervisor

Scan your code for security misconfiguration, search for passwords and secrets. :mag:
MIT License
637 stars 88 forks source link

repo-supervisor not running #50

Closed Vikran closed 4 years ago

Vikran commented 4 years ago

When building from scratch on ubuntu 16

`> repo-supervisor@3.0.0 cli /home/ubuntu/repo-supervisor

node dist/cli.js "./src/"

internal/modules/cjs/loader.js:1068 throw err; ^

Error: Cannot find module '/home/ubuntu/repo-supervisor/dist/cli.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1065:15) at Function.Module._load (internal/modules/cjs/loader.js:911:27) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) at internal/main/run_main_module.js:17:47 { code: 'MODULE_NOT_FOUND', requireStack: [] } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! repo-supervisor@3.0.0 cli: node dist/cli.js "./src/" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the repo-supervisor@3.0.0 cli script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/ubuntu/.npm/_logs/2020-07-25T04_23_31_921Z-debug.log `

Not working.

While building the Docker and running the command docker run -it --rm -v $(pwd):/opt/scan_me repo-supervisor /bin/bash -c "source ~/.bashrc && JSON_OUTPUT=1 node /opt/repo-supervisor/dist/cli.js /opt/scan_me"

getting /bin/bash: //.bashrc: No such file or directory

Also, Docker is not great in handling "." path hence explicit env was mentioned and still not working

--env BASH_ENV="/root/.bashrc"

radekk commented 4 years ago

Hi @Vikran ,

The error message Error: Cannot find module '/home/ubuntu/repo-supervisor/dist/cli.js' indicates that there is no dist/cli.js file that is created with npm run build command. Try it out and let me know if that works.