add CVE_PRODUCT for docker, containerd, runc
RFC PATCH 1/1 add CVE_PRODUCT for docker, containerd, runc
This is more of an RFC than an actual review request. Currently, the yocto CVE checker fails to report CVEs in docker, due to mismatch of the package names (eg "docker-moby" versus just "docker" in NVD).
So set CVE_PRODUCT in each recipe to match up the names. I have only done this for docker, containerd and runc. Perhaps there are more components needing similar treatment.
Possible TODOs include:
* rebase/update this to master, and test it there
* split into separate commits, one per component
--- recipes-containers/containerd/containerd-docker_git.bb | 2 ++ recipes-containers/containerd/containerd-opencontainers_git.bb | 2 ++ recipes-containers/docker/docker-ce_git.bb | 2 ++ recipes-containers/docker/docker-moby.bb | 2 ++ recipes-containers/runc/runc-docker_git.bb | 2 ++ recipes-containers/runc/runc-opencontainers_git.bb | 2 ++ 6 files changed, 12 insertions(+)
recipes-containers/containerd/containerd-docker_git.bb +2 -0
@@ -12,3 +12,5 @@ PROVIDES += "virtual/containerd" RPROVIDES_${PN} = "virtual/containerd" DEPENDS += "btrfs-tools" + +CVE_PRODUCT = "containerd"
recipes-containers/containerd/containerd-opencontainers_git.bb +2 -0
@@ -14,3 +14,5 @@ EXTRA_OEMAKE += "GODEBUG=1" PROVIDES += "virtual/containerd" RPROVIDES_${PN} = "virtual/containerd" + +CVE_PRODUCT = "containerd"
recipes-containers/docker/docker-ce_git.bb +2 -0
@@ -129,3 +129,5 @@ FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" FILES_${PN}-contrib += "${datadir}/docker/check-config.sh" RDEPENDS_${PN}-contrib += "bash" + +CVE_PRODUCT = "docker"
recipes-containers/docker/docker-moby.bb +2 -0
@@ -148,3 +148,5 @@ FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" FILES_${PN}-contrib += "${datadir}/docker/check-config.sh" RDEPENDS_${PN}-contrib += "bash" + +CVE_PRODUCT = "docker"
recipes-containers/runc/runc-docker_git.bb +2 -0
@@ -11,3 +11,5 @@ SRC_URI = "git://github.com/opencontainers/runc;nobranch=1;name=runc-docker \ " RUNC_VERSION = "1.0.0-rc8" + +CVE_PRODUCT = "runc"
recipes-containers/runc/runc-opencontainers_git.bb +2 -0
@@ -7,3 +7,5 @@ SRC_URI = " \ file://0001-Only-allow-proc-mount-if-it-is-procfs.patch \ " RUNC_VERSION = "1.0.0-rc8" + +CVE_PRODUCT = "runc"
Signature · 1 line
2.17.1
Quoted 8 lines · Ralph Siemsen
This is more of an RFC than an actual review request. Currently, the yocto CVE checker fails to report CVEs in docker, due to mismatch of the package names (eg "docker-moby" versus just "docker" in NVD).
So set
CVE_PRODUCTin each recipe to match up the names. I have only done this for docker, containerd and runc. Perhaps there are more components needing similar treatment.
There likely are more components that need this, in particular where I used to have support for docker variants, but we don't need to solve the entire problem now .. just starting is enough.
It's easy enough to port this to master, only that runc version being caught in the context might make it fail to apply .. and that's an easy fix.
Quoted 4 lines
Possible TODOs include:
* rebase/update this to master, and test it there
* split into separate commits, one per component
I'd suggest the split into the three, and go ahead and do the change on master. I'll carry it back to the released branches and pickup dunfell.
The testing is pretty simple, so I'll make sure master is ok and you've already tested on dunfell, so that is enough.
Bruce
Quoted 75 lines
--- recipes-containers/containerd/containerd-docker_git.bb | 2 ++ recipes-containers/containerd/containerd-opencontainers_git.bb | 2 ++ recipes-containers/docker/docker-ce_git.bb | 2 ++ recipes-containers/docker/docker-moby.bb | 2 ++ recipes-containers/runc/runc-docker_git.bb | 2 ++ recipes-containers/runc/runc-opencontainers_git.bb | 2 ++ 6 files changed, 12 insertions(+)recipes-containers/containerd/containerd-docker_git.bb +2
-0@@ -12,3 +12,5 @@ PROVIDES += "virtual/containerd" RPROVIDES_${PN} = "virtual/containerd" DEPENDS += "btrfs-tools" + +CVE_PRODUCT = "containerd"recipes-containers/containerd/containerd-opencontainers_git.bb +2
-0@@ -14,3 +14,5 @@ EXTRA_OEMAKE += "GODEBUG=1" PROVIDES += "virtual/containerd" RPROVIDES_${PN} = "virtual/containerd" + +CVE_PRODUCT = "containerd"recipes-containers/docker/docker-ce_git.bb +2
-0@@ -129,3 +129,5 @@ FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" FILES_${PN}-contrib += "${datadir}/docker/check-config.sh" RDEPENDS_${PN}-contrib += "bash" + +CVE_PRODUCT = "docker"recipes-containers/docker/docker-moby.bb +2
-0@@ -148,3 +148,5 @@ FILES_${PN} += "${systemd_unitdir}/system/* ${sysconfdir}/docker" FILES_${PN}-contrib += "${datadir}/docker/check-config.sh" RDEPENDS_${PN}-contrib += "bash" + +CVE_PRODUCT = "docker"recipes-containers/runc/runc-docker_git.bb +2
-0@@ -11,3 +11,5 @@ SRC_URI = "git://github.com/opencontainers/runc;nobranch=1;name=runc-docker \ " RUNC_VERSION = "1.0.0-rc8" + +CVE_PRODUCT = "runc"recipes-containers/runc/runc-opencontainers_git.bb +2
-1@@ -7,3 +7,5 @@ SRC_URI = " \ file://0001-Only-allow-proc-mount-if-it-is-procfs.patch \ " RUNC_VERSION = "1.0.0-rc8" + +CVE_PRODUCT = "runc" --2.17.1
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II