Enhancement: use `pubspec.lock` as an SBOM lockfile

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
74/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
dart, typescript
領域
backend, security

調査の方向性

Read src/engine/lockfile.ts around the pubspecLock helper, then trace how fullDependencyGraph handles pubspec.yaml and how test/sbom-composer-lock.test.ts and test/sbom-dart-dev-dependencies.test.ts cover exports. Add nearby Dart lockfile tests for transitive packages, SDK exclusions, development scope, invalid input, and --no-transitive; update docs/sbom-dependency-scope.md. Done when the acceptance cases pass for CycloneDX and SPDX.

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

説明

enhancement help wanted
  • Difficulty: medium
  • Area: SBOM / Dart
Problem

Same shape as issue 18, for Dart. docs/sbom-dependency-scope.md says the export list has no pubspec.lock. fullDependencyGraph does not call a pubspec lock tree (there is already a pubspecLock helper in src/engine/lockfile.ts around lines 147–151 for version lookup, but it is not part of the export graph). SDK packages (sdk: flutter, sdk: dart / sdk: flutter test packages) must stay out of the component list, matching the manifest rules already tested in test/sbom-dart-dev-dependencies.test.ts.

Direct pubspec.yaml rows already export with pkg:pub/…. Transitive packages that only the lockfile knows are missing from vg sbom export.

Expected behaviour

Expand pubspec.lock in fullDependencyGraph with ecosystem dart. A locked package also declared in pubspec.yaml at that version stays direct; lockfile-only packages are transitive. dev_dependencies already declared in the manifest keep their development marks (scope excluded / SPDX DEV_DEPENDENCY_OF). SDK entries in the lockfile are not components. A truncated or invalid pubspec.lock fails the export. --no-transitive drops lockfile-only rows. Update docs/sbom-dependency-scope.md. KIND_BY_BASENAME already lists pubspec.lock as YAML; keep fail-closed parsing.

Acceptance
  • Tests next to test/sbom-dart-dev-dependencies.test.ts, modelled on test/sbom-composer-lock.test.ts.
  • A lockfile-only transitive pub package appears in both CycloneDX and SPDX with a pkg:pub/… purl when transitives are on.
  • flutter / flutter_test SDK entries are still absent.
  • flutter_lints declared under dev_dependencies stays a direct development row.
  • An invalid pubspec.lock exits non-zero with an actionable, content-free error.

主要言語
TypeScript
スター
4
フォーク
3
平均マージ
1日 22時間
マージ済み PR(30日)
76

環境構築

はじめの一歩

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

vibgrate/cli のほかの issue

vibgrate/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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