Skip to content

Commit

Permalink
Check if frs sync.Map is nil within handleArchive (#476)
Browse files Browse the repository at this point in the history
Signed-off-by: egibs <[email protected]>
  • Loading branch information
egibs authored Oct 2, 2024
1 parent 6d1cc3b commit 69bb9d4
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions pkg/action/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,19 @@ func recursiveScan(ctx context.Context, c malcontent.Config) (*malcontent.Report
}
}

frs.Range(func(key, value any) bool {
if key == nil || value == nil {
return true
}
if k, ok := key.(string); ok {
if fr, ok := value.(*malcontent.FileReport); ok {
scanPathFindings.Store(k, fr)
if frs != nil {
frs.Range(func(key, value any) bool {
if key == nil || value == nil {
return true
}
}
return true
})
if k, ok := key.(string); ok {
if fr, ok := value.(*malcontent.FileReport); ok {
scanPathFindings.Store(k, fr)
}
}
return true
})
}
return nil
}

Expand Down

0 comments on commit 69bb9d4

Please sign in to comment.