Commit d151586
committed
fix(go): remove directDepPaths filtering that drops direct dependencies
Commit de12f6a introduced filtering in getSBOM() that uses go mod edit
-json's Indirect flag to exclude root-level edges from go mod graph.
This caused go_mod_no_ignore direct dependency count to drop from 45
to 7 (84% reduction).
The Java client treats all root-level edges from go mod graph as direct
dependencies. The go mod graph output is the authoritative dependency
tree after MVS resolution — filtering based on go.mod's indirect
markers removes real edges from the graph.
Remove the directDepPaths set construction and its filtering guards
from both the stack analysis and component analysis paths. Add a
reproducer test asserting 45 direct deps for go_mod_no_ignore.
Regenerate all affected expected SBOM fixtures.
Implements TC-4275
Assisted-by: Claude Code1 parent d9c1ae4 commit d151586
11 files changed
Lines changed: 3950 additions & 2517 deletions
File tree
- src/providers
- test/providers
- tst_manifests/golang
- go_mod_light_no_ignore
- go_mod_mvs_versions
- go_mod_no_ignore
- go_mod_test_ignore
- go_mod_with_ignore
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | 252 | | |
262 | 253 | | |
263 | 254 | | |
| |||
281 | 272 | | |
282 | 273 | | |
283 | 274 | | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | 275 | | |
288 | 276 | | |
289 | 277 | | |
| |||
296 | 284 | | |
297 | 285 | | |
298 | 286 | | |
299 | | - | |
300 | | - | |
301 | | - | |
| 287 | + | |
302 | 288 | | |
303 | 289 | | |
304 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
61 | 70 | | |
62 | 71 | | |
63 | 72 | | |
| |||
Lines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
39 | | - | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
Lines changed: 16 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
33 | 41 | | |
34 | 42 | | |
35 | 43 | | |
| |||
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
| 320 | + | |
320 | 321 | | |
321 | 322 | | |
322 | 323 | | |
| |||
341 | 342 | | |
342 | 343 | | |
343 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
344 | 351 | | |
345 | 352 | | |
346 | 353 | | |
| |||
422 | 429 | | |
423 | 430 | | |
424 | 431 | | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | 432 | | |
432 | 433 | | |
433 | 434 | | |
| |||
0 commit comments