-
Notifications
You must be signed in to change notification settings - Fork 147
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
Stackrox/ACS reporting vulns in packages removed in later layers #7033
Comments
Thank you for bringing this to our attention. This is very strange, as we do try to ensure we do not show results for packages which do not exist in the final image. I have been able to reproduce this with the provided image,
I have compared my image to yours, and I can only find one difference: mine is a Docker image (mediatype So, for some reason, your OCI image is not scanned correctly, while my Docker image is. We will need to investigate this further. |
I believe I determined the cause of this: my Docker image recreates the I inspected the layers, and I found the Docker image has So, StackRox Scanner correctly does not say Thank you for bringing this to our attention. We will track the progress of this internally. |
@RTann is there any update on this please? |
@mtcolman we hae shifted our efforts to working on a new Scanner, based on ClairCore, which will be released sometime soon in the future. That being said, it looks like the new scanner has this same issue. See https://issues.redhat.com/browse/CLAIRDEV-6 |
Hi,
When scanning image
node:18.16.1
with ACS it will give this violation:The image has npm version 9.5.1:
and it clearly uses semver 7.3.8:
I therefore upgrade npm to 9.8.0 to update semver to 7.5.2:
And that aligns to where ACS says the fix is: "Fixable CVE-2022-25883 (CVSS 7.5) (severity Important) found in component 'semver' (version 7.3.8), resolved by version 7.5.2".
I create a new container with the npm upgrade within it and scan this with ACS. And the finding is still present:
If I check the package.json in the container, it shows it's version 7.5.2:
And if I check globally the version of semver in the container, I get:
So it looks like ACS is finding something in a layer in the container, which is then resolved by a later layer
When I scan the updated image with trivy and grype, I don't get any semver alerts. And when I create an SBOM with syft, I get:
If I then scan again with Grype, using the
-s AllLayers
flag (otherwise default is "Squashed"), I get:I can't see a similar option for
roxctl
and I also don't now whyroxctl
wouldn't default to squashed too; the vulnerability isn't in my image if I've removed/upgraded the package. Here is theroxctl
command I used:Here's the Dockerfile I've used:
The text was updated successfully, but these errors were encountered: