Closed yokawasa closed 3 years ago
For debugging, I added debug log like this
trivy.ts
public parse(image: string, vulnerabilities: Vulnerability[]): string { let issueContent: string = ''; // debug console.debug(vulnerabilities) for (const vuln of vulnerabilities)
Then I came up with vulnerabilities dump from which I was able to figure out why the error causes. Simply there is a case where
Vulnerabilities
field does not exist in an array entry[ { Target: 'my-test-api:latest (debian 10.9)', Type: 'debian', Vulnerabilities: [ [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object], [Object] ] }, { Target: 'test-agent.jar', Type: 'jar' }, <<<<< THIS { Target: 'my-test-api.jar', Type: 'jar', Vulnerabilities: [ [Object], [Object], [Object], [Object] ] } ]
It was observed that the action gets the following error and fails