From d9ad5223849a23e412d4a6ac1f61ecfc94cab0d8 Mon Sep 17 00:00:00 2001 From: Zvonimir Pavlinovic Date: Wed, 10 Jul 2024 17:53:51 +0000 Subject: [PATCH] all: remove build restrictions requiring go1.18 govulncheck's go.mod file explicitly requires go1.21 and it can analyze binaries built before go1.18. There is no need to have these build restrictions. Change-Id: I50a80da2490fd4bd8fb3d5b7a68f8796ff3ffe18 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/597575 LUCI-TryBot-Result: Go LUCI Reviewed-by: Maceo Thompson --- cmd/govulncheck/main_test.go | 6 ------ internal/scan/binary.go | 3 --- internal/scan/extract.go | 3 --- internal/vulncheck/binary.go | 3 --- internal/vulncheck/binary_test.go | 3 --- internal/vulncheck/doc.go | 3 +-- 6 files changed, 1 insertion(+), 20 deletions(-) diff --git a/cmd/govulncheck/main_test.go b/cmd/govulncheck/main_test.go index c02a4486..21b6d21c 100644 --- a/cmd/govulncheck/main_test.go +++ b/cmd/govulncheck/main_test.go @@ -2,12 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Only run this on Go 1.18 or higher, because govulncheck can't -// run on binaries before 1.18. - -//go:build go1.18 -// +build go1.18 - package main import ( diff --git a/internal/scan/binary.go b/internal/scan/binary.go index 56121a87..d28c356b 100644 --- a/internal/scan/binary.go +++ b/internal/scan/binary.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.18 -// +build go1.18 - package scan import ( diff --git a/internal/scan/extract.go b/internal/scan/extract.go index 30ee0985..58a3f673 100644 --- a/internal/scan/extract.go +++ b/internal/scan/extract.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.18 -// +build go1.18 - package scan import ( diff --git a/internal/vulncheck/binary.go b/internal/vulncheck/binary.go index ca20f446..db96ba33 100644 --- a/internal/vulncheck/binary.go +++ b/internal/vulncheck/binary.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.18 -// +build go1.18 - package vulncheck import ( diff --git a/internal/vulncheck/binary_test.go b/internal/vulncheck/binary_test.go index 02e70a9a..ab7a38db 100644 --- a/internal/vulncheck/binary_test.go +++ b/internal/vulncheck/binary_test.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.18 -// +build go1.18 - package vulncheck import ( diff --git a/internal/vulncheck/doc.go b/internal/vulncheck/doc.go index 3f19e299..e56cdfbc 100644 --- a/internal/vulncheck/doc.go +++ b/internal/vulncheck/doc.go @@ -24,8 +24,7 @@ detection in Go source code and binaries, respectively. [Source] accepts a list of [Package] objects, which are a trimmed version of [golang.org/x/tools/go/packages.Package] objects to -reduce memory consumption. [Binary] accepts a path to a Go binary file that -must have been compiled with Go 1.18 or greater. +reduce memory consumption. [Binary] accepts a path to a Go binary file. Both [Source] and [Binary] require information about known vulnerabilities in the form of a vulnerability database,