From 418779df4b30e9f647ce6385790bfcbd53147342 Mon Sep 17 00:00:00 2001 From: David Korczynski Date: Wed, 13 Dec 2023 22:04:33 +0000 Subject: [PATCH] adjust path for finding Signed-off-by: David Korczynski --- probes/sastToolSnykInstalled/impl.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/probes/sastToolSnykInstalled/impl.go b/probes/sastToolSnykInstalled/impl.go index cc1af9abd44..dba73332c18 100644 --- a/probes/sastToolSnykInstalled/impl.go +++ b/probes/sastToolSnykInstalled/impl.go @@ -39,11 +39,14 @@ func Run(raw *checker.RawResults) ([]finding.Finding, string, error) { for _, wf := range r.Workflows { if wf.Type == checker.SnykWorkflow { f, err := finding.NewWith(fs, Probe, - fmt.Sprintf("SAST tool installed: Snyk at location '%v'", wf.File.Path), nil, + "SAST tool installed: Snyk", nil, finding.OutcomePositive) if err != nil { return nil, Probe, fmt.Errorf("create finding: %w", err) } + f = f.WithLocation(&finding.Location{ + Path: wf.File.Path, + }) return []finding.Finding{*f}, Probe, nil } }