feat: add functionallity of EXHORT_GO_MVS_LOGIC_ENABLED setting #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add functionallity of EXHORT_GO_MVS_LOGIC_ENABLED setting
Summary:
In case go modules stack analysis , it happens occasionally that the different transitive packages uses the same module( same major version) but each one, with different minor version ( packages with same namespace and name that contain different major versions are different packages, for example gopkg.in/yaml.v2 and /gopkg.in/yaml.v3 are two different packages/ modules).
In such case, the analysis showing for each package , all its transitive according to the go module tree graph, with the original version defined in the transitive module' go.mod file, and not the version picked for building the final executable binary ( using go build or go install commands)
for example, if application
c
has 2 modules/packages -a
andb
, and if modulea
has package pkg:golang/gopkg.in/yaml.v2@v2.2.2, and moduleb
has package pkg:golang/gopkg.in/yaml.v2@v2.2.8, then the sbom will be generated with both versions for same package.In order to reflect the actual state of the application more accurately, we introducing setting EXHORT_GO_MVS_LOGIC_ENABLED.
for example, for the above sbom sample, with this feature new logic, the sbom will contain only the selected version now
Jira Tickets: JIRA #2169 , JIRA #2168
Checklist