aquasecurity / intellij-trivy

Trivy Plugin for the JetBrains family of IDEs
Apache License 2.0
7 stars 4 forks source link

Running trivy scan returns serialization error #11

Open niklev opened 1 year ago

niklev commented 1 year ago

When running trivy (Version: 0.36.1) trivy fs --security-checks=config,vuln,secret --severity=CRITICAL,HIGH,MEDIUM,LOW,UNKNOWN --format=json --output=C:\Users\\AppData\Local\Temp\Trivy15924074954574361504.json C:/Users//IdeaProjects/

Failed to deserialize the results file. No content to map due to end-of-input at [Source: (File); line: 1, column: 0]

Contents of the Trivy15924074954574361504.json is 0 bytes

kahennig commented 1 year ago

Hi niklev, I was facing the same issue with IDEA 2023.1.2 CE, Trivy findings explorer 1.5.0 and an old version of trivy. Once I upgraded to the latest version (0.43.1) the plugin started working fine. I am not related to the trivy, IDEA or the plugin, just a user and wondering if you managed to fix you issue.

fischermatte commented 1 year ago

still not working in 1.5.0 on intellji 2023.2. I have trivy 0.44.0 from snap

imotsch commented 5 months ago

Same problem here: IntelliJ 2023.2, trivy plugin 1.5.0, trivy_0.51.2_windows-64bit. Failed to deserialize the results file. No content to map due to end-of-input at [Source: (File); line: 1, column: 0]

@Trivy when is this fixed?

I found out that the reason was in trivy.exe and is related to a docker/config.json issue. Due to a connection error to ghcr.io the output file was 0 bytes long.

Solution: In file ~/.docker/config.json replace "credsStore" by "credStore" and it will work.