-
Notifications
You must be signed in to change notification settings - Fork 86
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
False positives for packages installed from RH EUS streams #809
Comments
I suspect this is because of claircore's (poor) heuristic for matching packages to repositories. I think claircore would need to interrogate dnf/yum databases to get this information. |
We'd also seen this article about determining the CPE for a package but installing packages from the EUS stream did not appear to alter the |
Maybe? But those files are put there by the Red Hat build system, so putting something there in a "downstream" build would be contra the intended use. |
The crucial step in the rpm fixes identification is finding the package source repository. Knowing the repository for the particular rpm package you can use the repository-to-cpe to find the unique product CPE that later use it as a search key in the Red Hat Security Data. I thought that |
|
See also PROJQUAY-5185. |
tk See-also: quay#809 Signed-off-by: Hank Donnay <[email protected]>
tk See-also: quay#809 Signed-off-by: Hank Donnay <[email protected]>
tk See-also: #809 Signed-off-by: Hank Donnay <[email protected]>
This change consults the dnf history database for the repository a package came from, unless the layer has some features that we know means the results will be useless. See-also: quay#809 Signed-off-by: Hank Donnay <[email protected]>
@hdonnay I've just got round to testing your WIP code against a layer from the image in my original post and it finds the correct repo-id for the package 🎉
Key field being |
Thank you so much for doing that. That's very heartening, I'll keep plugging away at it. |
This change consults the dnf history database for the repository a package came from, unless the layer has some features that we know means the results will be useless. See-also: quay#809 Signed-off-by: Hank Donnay <[email protected]>
This change consults the dnf history database for the repository a package came from, unless the layer has some features that we know means the results will be useless. See-also: quay#809 Signed-off-by: Hank Donnay <[email protected]>
This change consults the dnf history database for the repository a package came from, unless the layer has some features that we know means the results will be useless. See-also: quay#809 Signed-off-by: Hank Donnay <[email protected]>
This change consults the dnf history database for the repository a package came from, unless the layer has some features that we know means the results will be useless. See-also: quay#809 Signed-off-by: Hank Donnay <[email protected]>
This change consults the dnf history database for the repository a package came from, unless the layer has some features that we know means the results will be useless. See-also: quay#809 Signed-off-by: Hank Donnay <[email protected]>
This change consults the dnf history database for the repository a package came from, unless the layer has some features that we know means the results will be useless. See-also: quay#809 Signed-off-by: Hank Donnay <[email protected]>
Summary
False positive is caused because Clair finds the security notice for RHEL 8 rather than for example RHEL 8.4 Extended support
Example
Openssl has a vulnerability CVE-2022-0778 which was fixed in the 8.4 extended support stream in openssl-1.1.1g-16.el8_4.src.rpm. However Clair finds the RHEL 8 security notice which states the fix is in
openssl-1.1.1k-6.el8_5.src.rpm
.As 1.1.1g-16 is deemed a lower version than openssl-1.1.1k-6 it is marked as vulnerble to the CVE.
I think the core of issue is Clairs ability to find the correct security notice.
Recreate
The following Dockerfile can be used to produce an image that contains many of these false positives
Interested in whether there is something we can do to help Clair determine the correct stream as a user or if this is a bug/missing feature on the Clair side
The text was updated successfully, but these errors were encountered: