feat(db): added insecure skip tls verify to download trivy db (#2140)

Co-authored-by: Teppei Fukuda <knqyf263@gmail.com>
This commit is contained in:
DmitriyLewen
2022-05-26 17:54:39 +06:00
committed by GitHub
parent 1e1ccbec52
commit b7ec642572
18 changed files with 75 additions and 39 deletions

View File

@@ -98,8 +98,8 @@ func (c Cache) ClearArtifacts() error {
}
// DownloadDB downloads the DB
func DownloadDB(appVersion, cacheDir, dbRepository string, quiet, skipUpdate bool) error {
client := db.NewClient(cacheDir, quiet, db.WithDBRepository(dbRepository))
func DownloadDB(appVersion, cacheDir, dbRepository string, quiet, insecure, skipUpdate bool) error {
client := db.NewClient(cacheDir, quiet, insecure, db.WithDBRepository(dbRepository))
ctx := context.Background()
needsUpdate, err := client.NeedsUpdate(appVersion, skipUpdate)
if err != nil {