lazy-actions / gitrivy

GitHub Issue + Trivy Action
MIT License
54 stars 25 forks source link

SyntaxError: Unexpected end of JSON input #72

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi guys,

Hope you are all well !

I tried gitrivy in a workflow but it triggers the following error:

Run homoluctus/gitrivy@master
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
Download URL: https://github.com/aquasecurity/trivy/releases/download/v0.14.0/trivy_0.14.0_Linux-64bit.tar.gz
Trivy Command Path: /home/runner/work/prestashop-docker/prestashop-docker/trivy
Error: SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Trivy.scan (/home/runner/work/_actions/homoluctus/gitrivy/master/dist/index.js:13839:69)
    at /home/runner/work/_actions/homoluctus/gitrivy/master/dist/index.js:7114:34
    at Generator.next (<anonymous>)
    at fulfilled (/home/runner/work/_actions/homoluctus/gitrivy/master/dist/index.js:7077:58)
Error: Unexpected end of JSON input
Screenshot 2020-12-15 at 06 49 01

Here is my workflow https://github.com/lucmichalski/prestashop-docker/blob/docker-trivy/.github/workflows/security.yml

Any chance or ideas how to sort it out ?

Cheers, Luc Michalski

jananathbanuka commented 2 years ago

try using trivy_version: "0.22.0"