Skip to content

Commit e342718

Browse files
committed
gopls/internal/vulncheck: skip vuln entries without callstacks
Vulnerability entries that do not have call traces are considered false-positives by govulncheck. Change-Id: I50d7fc815723038e904805213cd039a05934a469 Reviewed-on: https://go-review.googlesource.com/c/tools/+/396434 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> gopls-CI: kokoro <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Jamal Carvalho <[email protected]>
1 parent b22bc85 commit e342718

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gopls/internal/vulncheck/command.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ func toVulns(pkgs []*packages.Package, callstacks map[*vulncheck.Vuln][]vulnchec
121121

122122
var vulns []Vuln
123123
for v, trace := range callstacks {
124+
if len(trace) == 0 {
125+
continue
126+
}
124127
vuln := Vuln{
125128
ID: v.OSV.ID,
126129
Details: v.OSV.Details,

0 commit comments

Comments
 (0)