Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to read golang buildinfo error=not a Go executable file #1039

Closed
workerus opened this issue Dec 15, 2022 · 2 comments
Closed

unable to read golang buildinfo error=not a Go executable file #1039

workerus opened this issue Dec 15, 2022 · 2 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@workerus
Copy link

What happened:

In Grype version 0.54.0 when i scan an image with increased verbosity -vv there are warnings:

./grype trivy -vv

[0003] WARN unable to read golang buildinfo error=not a Go executable file=/bin/busybox form-lib=syft
[0003] WARN golang cataloger: bin parsing: number of builds and readers doesn't match form-lib=syft
[0003] WARN unable to read golang buildinfo error=not a Go executable file=/lib/ld-musl-x86_64.so.1 form-lib=syft
[0003] WARN golang cataloger: bin parsing: number of builds and readers doesn't match form-lib=syft
[0003] WARN unable to read golang buildinfo error=not a Go executable file=/lib/libapk.so.3.12.0 form-lib=syft
[0003] WARN golang cataloger: bin parsing: number of builds and readers doesn't match form-lib=syft
[0003] WARN unable to read golang buildinfo error=not a Go executable file=/lib/libcrypto.so.1.1 form-lib=syft
[0003] WARN golang cataloger: bin parsing: number of builds and readers doesn't match form-lib=syft
[0003] WARN unable to read golang buildinfo error=not a Go executable file=/lib/libssl.so.1.1 form-lib=syft
[0003] WARN golang cataloger: bin parsing: number of builds and readers doesn't match form-lib=syft
[0003] WARN unable to read golang buildinfo error=not a Go executable file=/lib/libz.so.1.2.12 form-lib=syft

WARN some package(s) are missing CPEs. This may result in missing vulnerabilities. You may autogenerate these using: --add-cpes-if-none

What you expected to happen:

I think these warnings should be fixed.

How to reproduce it (as minimally and precisely as possible):

Scan any image and you'll get these warnings.
./grype nginx -vv

Anything else we need to know?:

Environment:

  • Output of grype version:
# ./grype version
Application:          grype
Version:                 0.54.0
Syft Version:          v0.63.0
BuildDate:             2022-12-14T00:35:44Z
GitCommit:           93499eec7e3ce2704755e9f51457181b06b519c5
GitDescription:      v0.54.0
Platform:               linux/amd64
GoVersion:            go1.18.1
Compiler:              gc
Supported DB Schema:  5
  • OS (e.g: cat /etc/os-release or similar):
    Rocky Linux release 8.6
@workerus workerus added the bug Something isn't working label Dec 15, 2022
@tgerla tgerla added this to OSS Dec 16, 2022
@wagoodman
Copy link
Contributor

I agree the log output should not appear. The issue is here https://github.com/anchore/syft/blob/main/syft/pkg/cataloger/golang/scan_binary.go where we're making the assumption that any binary passed in is a go binary, however, that is not always the case since we select files by MIME type.

We should probably change the execution path to return an error and ignore the error in the context of the go binary cataloger.

@kzantow
Copy link
Contributor

kzantow commented Dec 22, 2022

I'm going to close this as a duplicate, as this a Syft related issue, which was reported in: anchore/syft#1403

@kzantow kzantow closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2022
Repository owner moved this from Parking Lot (Comments or Progress) to Done in OSS Dec 22, 2022
@kzantow kzantow added the duplicate This issue or pull request already exists label Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
Archived in project
Development

No branches or pull requests

3 participants