Skip to content

Commit

Permalink
Update dep label selector to explictly not scan open-source libraries…
Browse files Browse the repository at this point in the history
… when analyze-known-libraries is not set

Signed-off-by: kthatipally <[email protected]>
  • Loading branch information
kthatipally committed Dec 16, 2024
1 parent d1d0c6b commit f6b9210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/analyze-bin.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ func (a *analyzeCommand) RunAnalysisContainerless(ctx context.Context) error {
}

var dependencyLabelSelector *labels.LabelSelector[*konveyor.Dep]
depLabel := fmt.Sprintf("%v=open-source", provider.DepSourceLabel)
if a.analyzeKnownLibraries {
depLabel := fmt.Sprintf("!%v=open-source", provider.DepSourceLabel)
if !a.analyzeKnownLibraries {
dependencyLabelSelector, err = labels.NewLabelSelector[*konveyor.Dep](depLabel, nil)
if err != nil {
errLog.Error(err, "failed to create label selector from expression", "selector", depLabel)
Expand Down

0 comments on commit f6b9210

Please sign in to comment.