You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -444,26 +444,25 @@ Two possible values for this setting:
444
444
2. MATCH_MANIFEST_VERSIONS="true" - means that before starting the analysis,
445
445
the api will compare all the versions of packages in manifest against installed/resolved versions on client' environment, in case there is a difference, it will throw an error to the client/user with message containing the first encountered versions mismatch, including package name, and the versions difference, and will suggest to set setting `MATCH_MANIFEST_VERSIONS`="false" to ignore all differences
446
446
447
-
448
447
#### Golang Support
449
448
450
-
By default, all go.mod' packages' transitive modules will be taken to analysis with their original package version, that is,
451
-
if go.mod has 2 modules, `a` and `b`, and each one of them has the same package c with same major version v1, but different minor versions:
By default, Golang dependency resolution follows the [Minimal Version Selection (MVS) Algorithm](https://go.dev/ref/mod#minimal-version-selection).
450
+
This means that when analyzing a project, only the module versions that would actually be included in the final executable are considered.
455
451
456
-
Then both of these packages will be entered to the generated sbom and will be included in analysis returned to client.
457
-
In golang, in an actual build of an application into an actual application executable binary, only one of the minor versions will be included in the executable, as only packages with same name but different major versions considered different packages ,
458
-
hence can co-exist together in the application executable.
452
+
For example, if your `go.mod` file declares two modules, `a` and `b`, and both depend on the same package `c` (same major version `v1`) but with different minor versions:
459
453
460
-
Go ecosystem knows how to select one minor version among all the minor versions of the same major version of a given package, using the [MVS Algorithm](https://go.dev/ref/mod#minimal-version-selection).
461
-
462
-
In order to enable this behavior, that only shows in analysis modules versions that are actually built into the application executable, please set
463
-
system property/environment variable - `EXHORT_GO_MVS_LOGIC_ENABLED=true`(Default is false)
Only one of these versions — the minimal version selected by MVS — will be included in the generated SBOM and analysis results.
458
+
This mirrors the behavior of a real Go build, where only one minor version of a given major version can be present in the executable (since Go treats packages with the same name and major version as identical).
465
459
460
+
The MVS-based resolution is **enabled by default**.
461
+
If you want to disable this behavior and instead include **all transitive module versions** (as listed in `go.mod` dependencies), set the system property or environment variable:
0 commit comments