Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Go module parser includes too many dependencies #1

Open
dlorenc opened this issue May 28, 2021 · 0 comments
Open

Go module parser includes too many dependencies #1

dlorenc opened this issue May 28, 2021 · 0 comments
Labels
bug Something isn't working golang Issue or feature related to the golang module

Comments

@dlorenc
Copy link
Contributor

dlorenc commented May 28, 2021

The command here returns too many modules, including some that never make it into the compiled code: https://github.com/spdx/spdx-sbom-generator/blob/master/internal/modules/gomod/handler.go#L86

You can see it for this repo itself:

##### Package representing the rsc.io/pdf

PackageName: rsc.io/pdf
SPDXID: SPDXRef-Package-rsc.io/pdf
PackageVersion: v0.1.1
PackageSupplier: NOASSERTION
PackageDownloadLocation: pkg:golang/rsc.io/[email protected]
FilesAnalyzed: false
PackageChecksum: TEST: SHA-1 dac232c78e91cce5aa2489507b1c7a4737b24b42
PackageHomePage: pkg:golang/rsc.io/[email protected]
PackageLicenseConcluded: BSD-3-Clause
PackageLicenseDeclared: BSD-3-Clause
PackageCopyrightText: NOASSERTION
PackageLicenseComments: NOASSERTION
PackageComment: NOASSERTION

rsc.io/pdf never shows up in the actual import graph for this repo:

$ go mod why rsc.io/pdf
# rsc.io/pdf
(main module does not need package rsc.io/pdf)

It is used during module version resolution, which is why it shows up the go mod graph output. I don't think these types of "resolution only" packages should show up in an SBOM. It's difficult to do this right, so I want to first discuss here before starting on any code.

NaveenGMProxima referenced this issue in NaveenGMProxima/spdx-sbom-generator Jun 8, 2021
method to get package digest from PyPi added
@dealako dealako added golang Issue or feature related to the golang module bug Something isn't working labels Jun 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working golang Issue or feature related to the golang module
Projects
None yet
Development

No branches or pull requests

2 participants