diff --git a/GNUmakefile b/GNUmakefile index e149677c..296a6893 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -32,13 +32,13 @@ build: ./cmd/vuls/main.go pretest fmt b: ./cmd/vuls/main.go $(GO) build -a -ldflags "$(LDFLAGS)" -o vuls ./cmd/vuls -install: ./cmd/vuls/main.go pretest fmt +install: ./cmd/vuls/main.go $(GO) install -ldflags "$(LDFLAGS)" ./cmd/vuls -build-scanner: ./cmd/scanner/main.go pretest fmt +build-scanner: ./cmd/scanner/main.go $(CGO_UNABLED) build -tags=scanner -a -ldflags "$(LDFLAGS)" -o vuls ./cmd/scanner -install-scanner: ./cmd/scanner/main.go pretest fmt +install-scanner: ./cmd/scanner/main.go $(CGO_UNABLED) install -tags=scanner -ldflags "$(LDFLAGS)" ./cmd/scanner lint: diff --git a/detector/github.go b/detector/github.go index cf8d61c2..23b83d0c 100644 --- a/detector/github.go +++ b/detector/github.go @@ -1,3 +1,5 @@ +// +build !scanner + package detector import ( diff --git a/detector/library.go b/detector/library.go index 273b9aae..26d7c5e0 100644 --- a/detector/library.go +++ b/detector/library.go @@ -1,3 +1,5 @@ +// +build !scanner + package detector import ( diff --git a/detector/util.go b/detector/util.go index d3f149a3..0e16b875 100644 --- a/detector/util.go +++ b/detector/util.go @@ -1,3 +1,5 @@ +// +build !scanner + package detector import ( diff --git a/detector/wordpress.go b/detector/wordpress.go index b0211e97..672cae51 100644 --- a/detector/wordpress.go +++ b/detector/wordpress.go @@ -1,3 +1,5 @@ +// +build !scanner + package detector import ( diff --git a/detector/wordpress_test.go b/detector/wordpress_test.go index 99165208..d5cc1c10 100644 --- a/detector/wordpress_test.go +++ b/detector/wordpress_test.go @@ -1,3 +1,5 @@ +// +build !scanner + package detector import ( diff --git a/gost/debian_test.go b/gost/debian_test.go index ef41e113..638a0577 100644 --- a/gost/debian_test.go +++ b/gost/debian_test.go @@ -1,3 +1,5 @@ +// +build !scanner + package gost import "testing" diff --git a/gost/gost_test.go b/gost/gost_test.go index 81608a84..9defdede 100644 --- a/gost/gost_test.go +++ b/gost/gost_test.go @@ -1,3 +1,5 @@ +// +build !scanner + package gost import ( diff --git a/gost/redhat_test.go b/gost/redhat_test.go index 72eb5f66..fe2f4f08 100644 --- a/gost/redhat_test.go +++ b/gost/redhat_test.go @@ -1,3 +1,5 @@ +// +build !scanner + package gost import ( diff --git a/gost/util.go b/gost/util.go index a3149b24..9e2043a6 100644 --- a/gost/util.go +++ b/gost/util.go @@ -1,3 +1,5 @@ +// +build !scanner + package gost import ( diff --git a/oval/empty.go b/oval/empty.go deleted file mode 100644 index 5df0f81b..00000000 --- a/oval/empty.go +++ /dev/null @@ -1 +0,0 @@ -package oval diff --git a/scanner/base.go b/scanner/base.go index b1f28435..a657b9dd 100644 --- a/scanner/base.go +++ b/scanner/base.go @@ -623,6 +623,7 @@ func (l *base) scanLibraries() (err error) { return nil } +// AnalyzeLibraries : detects libs defined in lockfile func AnalyzeLibraries(ctx context.Context, libFilemap map[string][]byte) (libraryScanners []models.LibraryScanner, err error) { disabledAnalyzers := []analyzer.Type{ analyzer.TypeAlpine,