Fixed dependency warnings stay open when the upgrade is in a version catalog, Directory.Packages.props, Package.resolved and similar files

オープン
#3 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
rust, typescript
領域
devtools, security

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
57
フォーク
8
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。