False positive when a *.deps.json file contains a dependency to a vulnerable package with directory.package.props file and multiple projects

Aperta
#228 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
csharp, docker, powershell
Ambito
devops, security

Direzione di ricerca

Inizia con il repository per la riproduzione del problema della dipendenza ed esegui l’invocazione Docker Scout di build.ps1. Confronta il modo in cui il main branch e il dep-issue-fixed branch elaborano l’other.csproj referenziato e il relativo *.deps.json con directory.package.props. Il lavoro è completato quando il main branch non segnala più le due vulnerabilità elevate errate e corrisponde al risultato pulito del dep-issue-fixed branch.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi,
We have just switched to docker scout to scan our docker images.
We are seeing an issue which seems like issue 93 has returned.

I have made a repoduction repository, it seems to be an issue if there are multiple projects which use a directory.package.props file to manage dependecies. The reproduction also uses dotnet 8 with 10.x.x packages, but that might not be contributing to it.
The code is in this repo https://github.com/chestercodes/docker-scout-playground/tree/main/dependency-issue
There is one difference in that i am using a slightly different base image for the build part, which allows my company laptop to get around the VPN, but the sdk one should work as well.

The docker scout output for the version is included in the run script

The issue seems to stem from the deps file of the referenced project, in this case called other.csproj.
It is not present when the directory.package.props file is remove and the version is specified in each of the csproj files, there is a branch with this case

The differences can be seen in the docker scout invocation, the main branch shows 2 high vulns, which is incorrect, as the updated package is specified in the packages props file.

Image

The branch built image shows no high vulns, which is correct.

Image
Lingua principale
Shell
Stelle
454
Fork
134
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di docker/scout-cli

Tutte le issue di docker/scout-cli

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.