From adf177788c4eb205461c7f18a294e62430cb05e1 Mon Sep 17 00:00:00 2001 From: Joshua Irmer Date: Wed, 3 Jul 2024 20:03:55 +0200 Subject: [PATCH] Set default database config true This enables the db curator to fully validate the db file by hash Signed-off-by: Joshua Irmer --- cmd/grype/cli/options/database.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/grype/cli/options/database.go b/cmd/grype/cli/options/database.go index 83faff302a7..2e3115e7458 100644 --- a/cmd/grype/cli/options/database.go +++ b/cmd/grype/cli/options/database.go @@ -35,10 +35,11 @@ const ( func DefaultDatabase(id clio.Identification) Database { return Database{ - Dir: path.Join(xdg.CacheHome, id.Name, "db"), - UpdateURL: internal.DBUpdateURL, - AutoUpdate: true, - ValidateAge: true, + Dir: path.Join(xdg.CacheHome, id.Name, "db"), + UpdateURL: internal.DBUpdateURL, + AutoUpdate: true, + ValidateByHashOnStart: true, + ValidateAge: true, // After this period (5 days) the db data is considered stale MaxAllowedBuiltAge: defaultMaxDBAge, UpdateAvailableTimeout: defaultUpdateAvailableTimeout,