Skip to content

Commit d6b08a1

Browse files
committed
fix: ignore reference to 'go@version' from newer go mod graph output
1 parent 07465cf commit d6b08a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/providers/golang_gomodules.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,9 @@ function getSBOM(manifest, opts = {}, includeTransitive) {
262262
let ignoredDeps = getIgnoredDeps(manifest);
263263
let allIgnoredDeps = ignoredDeps.map((dep) => dep.toString())
264264
let sbom = new Sbom();
265-
let rows = goGraphOutput.split(getLineSeparatorGolang());
265+
let rows = goGraphOutput.split(getLineSeparatorGolang()).filter(line => {
266+
return !line.includes(' go@')
267+
});
266268
let root = getParentVertexFromEdge(rows[0])
267269
let matchManifestVersions = getCustom("MATCH_MANIFEST_VERSIONS", "false", opts);
268270
if(matchManifestVersions === "true") {

0 commit comments

Comments
 (0)