Fixed dependency warnings stay open when the upgrade is in a version catalog, Directory.Packages.props, Package.resolved and similar files
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust, typescript
Direzione di ricerca
Start with isDependencyManifest in packages/engine/src/scan/fixcheck.ts and compare its list with the formats the indexer reads in crates/indexer/src/deps/formats.rs. The consumers are affectedFindings in apps/web/src/server/scans.ts and changesDependencies in apps/web/src/server/webhooks.ts. Done means the missing files (libs.versions.toml, Package.resolved, pdm.lock, .gitmodules and the others listed) are recognised, and a test fails if the indexer gains a format the check does not know about.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi! I found a gap between what Sandchest reads and what it watches.
What happens
When I upgrade a vulnerable library in some dependency files, Sandchest doesn’t notice the upgrade. The warning stays open even though the problem is fixed, and the CVE directory keeps the old version.
Why
The indexer reads dependencies from these files (crates/indexer/src/deps/formats.rs). But isDependencyManifest in packages/engine/src/scan/fixcheck.ts decides whether a push “changed dependencies”, and its list is shorter. So when a push only touches one of the missing files:
affectedFindings (apps/web/src/server/scans.ts) skips re-checking the open vulnerable_dependency findings.
changesDependencies (apps/web/src/server/webhooks.ts) skips refreshing the dependency inventory.
Files the indexer reads but the check misses
libs.versions.toml (Gradle version catalogs, common in Android/Kotlin)
Directory.Packages.props, packages.config, *.fsproj, .vbproj (.NET)
Package.resolved (Swift)
pdm.lock (Python)
rebar.lock (Erlang), Manifest.toml (Julia), renv.lock (R)
cabal.project.freeze, stack.yaml.lock (Haskell), opam.locked (OCaml)
.gitmodules, .github/workflows/.yml
Steps to reproduce
Use a Gradle project that keeps versions in gradle/libs.versions.toml, with a library that has a known CVE.
Let Sandchest report the vulnerable dependency.
Push a commit that only bumps that library’s version in libs.versions.toml.
The finding stays open.
Expected
Any file the indexer reads dependencies from should count as a dependency change.
Suggested fix
Add the missing file names to isDependencyManifest. Also add a test that lists every file the indexer supports, so the two lists can’t drift apart again.
Happy to open a PR for this if it sounds good.
- Lingua principale
- TypeScript
- Stelle
- 57
- Fork
- 8
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Issue simili
-
enhancement needs peer review
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pnp/cli-microsoft365#7696 ·
I maintainer di solito rispondono entro 3 giorni
-
Add: AutomotoApertacheck:passed streams:add
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
inmanta/web-console#7899 ·
I maintainer di solito rispondono entro 1 giorno