Bug: Dependency Trees uses dependencies[0] as root instead of metadata.component.bom-ref
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- frontend, testing-qa
調査の方向性
Read spring-boot-admin-server-ui/src/main/frontend/views/instances/sbomdependencytrees/sbomUtils.ts and tree.vue to trace how the SBOM root and dependency records reach normalizeData(). Use the provided root-not-first.cdx.json or mock instance.fetchSbom() in tree.spec.ts, then verify that metadata.component["bom-ref"] selects the root regardless of dependency order and that reordered-root regression cases pass.
索引モデルが issue の本文から書いたものです。
説明
Spring Boot Admin Server information
- Version: 4.1.3
- Spring Boot version: 4.1.1
Client information
- Spring Boot versions: 3.5.10
- SBOM format: CycloneDX JSON
Description
The Dependency Trees view selects the first entry in dependencies as the root. It does not use the component described by metadata.component["bom-ref"].
As a result, the UI can display only a library's subtree even though the SBOM contains the application's dependency graph. Reordering otherwise identical dependency records changes the displayed root and visible dependencies.
This is present in the 4.1.3 source and in master inspected on 2026-10-03. The normalization behavior was reproduced in isolation using the existing helper's executable logic; this is not a claim that a full SBA browser integration test was run.
Minimal input
Save as root-not-first.cdx.json:
{
"bomFormat": "CycloneDX",
"specVersion": "1.6",
"version": 1,
"metadata": {
"component": { "type": "application", "bom-ref": "app", "name": "demo-app", "version": "1.0.0" }
},
"components": [
{ "type": "library", "bom-ref": "a", "name": "library-a", "version": "1.0.0" },
{ "type": "library", "bom-ref": "b", "name": "library-b", "version": "1.0.0" },
{ "type": "library", "bom-ref": "c", "name": "library-c", "version": "1.0.0" }
],
"dependencies": [
{ "ref": "a", "dependsOn": ["c"] },
{ "ref": "app", "dependsOn": ["a", "b"] },
{ "ref": "b", "dependsOn": [] },
{ "ref": "c", "dependsOn": [] }
]
}
Reproduction
At helper level, pass the fixture's dependencies to normalizeData(). The result is rooted at a with child c. Move only the app record to index zero and repeat: the root becomes app and both a and b appear.
For UI reproduction, return the same document from the monitored application's SBOM endpoint (or mock instance.fetchSbom() in tree.spec.ts), then open Dependency Trees. Repeat with only the array order changed.
Actual normalized tree:
a
└── c
Expected tree:
app
├── a
│ └── c
└── b
The result should be independent of the order of dependencies records.
Cause
In sbomUtils.ts at 4.1.3, normalizeData() reads both the root's reference and its children from sbomDependencies[0].
In tree.vue at 4.1.3, fetchSbomDependencies() retains only res.data.dependencies, so the normalizer never receives the metadata root reference.
CycloneDX identifies dependency targets by bom-ref; metadata.component describes the component that the BOM is about. The consumer should not infer that component from array position. See the CycloneDX 1.6 schema.
Suggested fix and regression coverage
- Pass
metadata.component["bom-ref"]along with the dependency records, or pass the required parts of the SBOM document to the normalizer. - Select the root by exact, unmodified
bom-ref, then look up its outgoing edges byref. - Keep display-name normalization separate from graph identity.
- Define a safe policy for absent metadata, absent root records and missing/empty dependency data; do not silently invent an application root from index zero.
- Test reordered records, root first/middle/last, and metadata propagation through
tree.vue.
There is a related independent problem: recursive expansion currently has no cycle detection. Selecting the correct root can expose a previously unreachable cycle, so the two fixes should be considered together. [Add the cycle issue link after creating it.]
Related reports
- #5153 concerns missing dependency data / an undefined-index error; its discussion does not establish this ordering defect.
- #5358 reports missing dependencies without a minimal example demonstrating root selection.
- #3463 originally requested dependency graph visualization.
I would be happy to contribute a PR targeting master with regression tests.
- 主要言語
- Java
- スター
- 12.9k
- フォーク
- 3.2k
- 平均マージ
- 23時間 31分
- マージ済み PR(30日)
- 72
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codecentric/spring-boot-admin のほかの issue
-
Bug: Dependency Trees overflows the call stack on cyclic SBOM dependency graphs対応中かも @faystmax が 3 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
codecentric/spring-boot-admin#5746 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
codecentric/spring-boot-admin#5743 ·
メンテナーはふだん 1 日以内に返信
-
Bug: Filtering rules are not synchronized between SBA nodes対応中かも @SteKoe が 5 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
codecentric/spring-boot-admin#5721 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug: Multiple notifications from multiple instances対応中かも @YadavKshitiz が 7 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
codecentric/spring-boot-admin#5716 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
codecentric/spring-boot-admin#5597 · コメント 6 件 ·
メンテナーはふだん 1 日以内に返信
codecentric/spring-boot-admin の issue をすべて見る
似ている issue
-
Clock.MakeTime fails to validate hour, minute, and second ranges due to inert Calendar.set try-catchオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
mit-cml/appinventor-sources#4139 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
Vakore/ZappierGames#81 ·
-
proposal
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
beemdevelopment/Aegis#1843 · リアクション 1 件 ·
-
[Bug] Logo style setting missing and `classic` style not applied across multiple platforms (v3.1.0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Stirling-Tools/Stirling-PDF#8382 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
>enhancement needs:triage
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
elastic/elasticsearch#161191 ·
メンテナーはふだん 1 日以内に返信