Skip to content

Use TRIVY_CACHE_DIR variable to load the database

Brian Williams requested to merge bwill/use-cache-dir into master

Why is this change being made?

Fixes gitlab-org/gitlab#362303 (closed)
Fixes gitlab-org/gitlab#363182 (closed)

Remove the trivy setup method and use the TRIVY_CACHE_DIR to point to different database directories instead. This means that we do not have to perform operations on the file system, which could lead to errors like gitlab-org/gitlab#363182 (closed).

Also refactors the tests to use shared examples.

Edited by Brian Williams

Merge request reports