Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container-less Kantra: Update dep label selector to explicitly not scan open-source libraries when analyze-known-libraries is not set #407

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@ jobs:
if: github.event_name == 'push' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Upgrade podman
run: |
sudo apt-get install -y ansible
# export DEB=$(curl -s https://passt.top/builds/latest/x86_64/ | grep deb | awk -F '"' '{ print $4}')
# sudo ansible -m apt -a deb=https://passt.top/builds/latest/x86_64/${DEB} localhost
sudo apt-get remove podman crun
brew install crun podman

- name: Extract pull request number from inputs or PR description
run: |
echo "${{ github.event.pull_request.body }}"
Expand Down Expand Up @@ -105,17 +94,6 @@ jobs:
if: github.event_name != 'push' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Setup Homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Upgrade podman
run: |
sudo apt-get install -y ansible
export DEB=$(curl -s https://passt.top/builds/latest/x86_64/ | grep deb | awk -F '"' '{ print $4}')
sudo ansible -m apt -a deb=https://passt.top/builds/latest/x86_64/${DEB} localhost
sudo apt-get remove podman crun
brew install crun podman

- uses: actions/checkout@v3
with:
ref: ${{ inputs.tag == 'latest' && 'main' || inputs.tag }}
Expand Down
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
Loading