snyk / snyk-to-html

export test reports from CLI to html
Other
87 stars 77 forks source link

slightly incorrect CLI usage creates silent failures #154

Open davidawad opened 1 year ago

davidawad commented 1 year ago

Hey everyone, this should be a really easy issue to solve.

here's an example usage I tried to use the CLI, where I tried to convert valid SNYK output json to html.

$ snyk-to-html ./snyk-report.json -o ./snyk-output.html

This command SHOULD have worked but in reality this command silently failed. I ran this many times, (I would note the -d flag also produced no output) and I was VERY confused for a little while as I couldn't find any issues similar to mine on silent failures.

The correct command is to pass the -i flag to specify the input file.

$ snyk-to-html -i ./snyk-report.json -o ./snyk-output.html
Vulnerability snapshot saved at ./snyk-output.html

It would be awesome to just validate the input flags or complain if they're not good.

Thanks