-
Notifications
You must be signed in to change notification settings - Fork 594
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
Syft finds no apks for some images with apks #1354
Labels
bug
Something isn't working
Comments
We definitely should log issues instead of completely failing to return any packages when we hit an error like this. Also -- as you say, for this specific one, we could probably bump a buffer size somewhere. |
spiffcs
pushed a commit
that referenced
this issue
Nov 29, 2022
Repository owner
moved this from Backlog (Pulled Forward for Priority)
to Done
in OSS
Nov 29, 2022
This was referenced Nov 30, 2022
This was referenced Dec 13, 2022
GijsCalis
pushed a commit
to GijsCalis/syft
that referenced
this issue
Feb 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please provide a set of steps on how to reproduce the issue
What happened:
No
apk
type packages are found by Syft for this image.What you expected to happen:
Since the image's
/lib/apk/db/installed
does contain several package entries, Syft should have reported those packages.Anything else we need to know?:
I did a small amount of debugging. It seems like Syft does find the
installed
db and starts to find packages, but then hits a scanner error (ErrTooLong
) and so it returns anil
slice of packages.Package entries in the apk db can be pretty large. I think Syft's current parsing approach isn't able to handle these larger entries, because the entry's byte count exceeds the scanner's buffer size.
This may be solvable by increasing the size of the buffer, but it may be better to try an approach that doesn't require the scanner to hold an entire package entry in the buffer at once. I haven't thought through this idea, but would be happy to chat through it on this issue if that helps!
The text was updated successfully, but these errors were encountered: