Skip to content

Add ability to specify trivy timeout value

  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo.

What does this MR do?

This MR introduces a new timeout value, which replaces the existing --timeout-minutes flag, that specifies both the timeout of the Trivy Scan as well as the Job itself.

The timeout defaults to 15 minutes.

Timeout is configured by either passing the --timeout flag to the wrapper image or by setting the TIMEOUT environment variable.

Why are we doing this?

In clusters that have a high number of pods and large container images, the default Trivy timeout of 5 minutes (or the job timeout of 15 minutes) is not sufficient. We should allow users to specify a timeout value of their choosing.

What are the relevant issue numbers?

gitlab-org/gitlab#497460

Edited by Alex Marston

Merge request reports

Loading