From 319f752b1bea46446dc732c4905385afed8bc92f Mon Sep 17 00:00:00 2001 From: Eran Turgeman Date: Sun, 22 Sep 2024 18:27:56 +0300 Subject: [PATCH] adding config profile to Scan repository command --- scanrepository/scanrepository.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scanrepository/scanrepository.go b/scanrepository/scanrepository.go index 8cf0183f9..683a3a447 100644 --- a/scanrepository/scanrepository.go +++ b/scanrepository/scanrepository.go @@ -150,7 +150,8 @@ func (cfp *ScanRepositoryCmd) scanAndFixProject(repository *utils.Repository) er vulnerabilitiesByPathMap := make(map[string]map[string]*utils.VulnerabilityDetails) projectFullPathWorkingDirs := utils.GetFullPathWorkingDirs(cfp.scanDetails.Project.WorkingDirs, cfp.baseWd) for _, fullPathWd := range projectFullPathWorkingDirs { - scanResults, err := cfp.scan(fullPathWd) + cfp.scanDetails.SetConfigProfile(repository.ConfigProfile) + scanResults, err := cfp.scan(fullPathWd) // TODO here is the point where we lost the config profile (kept in repository) and we proceed only with scanDetails (that can store configProfile) if err != nil { return err }