Skip to content

Commit

Permalink
Container-less Kantra: Update dep label selector to explicitly not sc…
Browse files Browse the repository at this point in the history
…an open-source libraries when analyze-known-libraries is not set (#407)

* Update dep label selector to explictly not scan open-source libraries when analyze-known-libraries is not set

Signed-off-by: kthatipally <[email protected]>

* 🐛 fix podman installation

Signed-off-by: Pranav Gaikwad <[email protected]>

---------

Signed-off-by: kthatipally <[email protected]>
Signed-off-by: Pranav Gaikwad <[email protected]>
Co-authored-by: Pranav Gaikwad <[email protected]>
Signed-off-by: Emily McMullan <[email protected]>
  • Loading branch information
2 people authored and eemcmullan committed Dec 17, 2024
1 parent 416cb72 commit a1c4d1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
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

0 comments on commit a1c4d1e

Please sign in to comment.