DependencyTrack / DependencyTrack/dependency-track

Trivy Scanner Integration Fails

Open
#4,132 1 comment 0 reactions 0 assignees View on GitHub
defect in triage
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

I have a Trivy scanner running in server mode. I verified that it is correctly set up:
`wget http://trivy.xyz/version`
`trivy image --server http://trivy.xyz --token dummy -d alpine:3.10`
Both give me correct results.
I then tried to configure DTrack to use trivy as an analyzer as described in the documentation.

![image](https://github.com/user-attachments/assets/6690e328-fb64-4cb1-98fd-88372dc7c15f)

In the logs I see the following errors:

2024-09-06 11:02:18,504 WARN [TrivyAnalysisTask] Encountered retryable error for trivy-api; Will execute retry #1 in PT1S
...

2024-09-06 11:24:18,520 DEBUG [HttpClientPool] Stats: [leased: 3; pending: 0; available: 0; max: 200]
...
2024-09-06 11:26:52,100 ERROR [TrivyAnalysisTask] Max retry attempts exceeded for trivy-api after 10 attempts
io.github.resilience4j.retry.MaxRetriesExceeded: max retries is reached out for the result predicate check

It seems that there is not even an http call going out. Also the HttpClientPool seems to always report 0 available. I am using trivy v0.55 (I also tried to use older versions with the same setup)

### Steps to Reproduce

1. Configure Trivy as above.

### Expected Behavior

Trivy returns scan result

### Dependency-Track Version

4.11.7

### Dependency-Track Distribution

Container Image

### Database Server

PostgreSQL

### Database Server Version

_No response_

### Browser

Microsoft Edge

### Checklist

- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this defect was already reported

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.