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

Migrate the base image to bci-busybox #186

Merged
merged 2 commits into from
Oct 22, 2024
Merged

Conversation

pjbgf
Copy link
Member

@pjbgf pjbgf commented Jun 13, 2024

Issues:

The aim of this change is to decrease the long-term number of CVEs this image gets due to the decreased attack surface. As a result, the final image is 40MB lighter and does not contain the following commands:

add-shell
bbconfig
blkdiscard
busybox
chroot
cifsiostat
c_rehash
crond
crontab
depmod
dumpkmap
envsubst
fbsplash
fc-conflist
fc-list
fc-match
fc-pattern
fc-query
fc-scan
fc-validate
fdflush
fstrim
geoiplookup6
getty
halt
hwclock
ifconfig
ifdown
ifenslave
ifup
init
inotifyd
insmod
iostat
ipaddr
iplink
ipneigh
iproute
iprule
kbd_mode
link
linux32
linux64
logread
lsmod
modinfo
modprobe
mountpoint
ntpd
partprobe
printenv
raidautorun
rdate
rdev
readahead
reboot
remove-shell
rev
rfkill
rmmod
route
swapoff
swapon
syslogd
tapestat
traceroute6
tree
unlzop
watchdog
xsltproc

The list above was generated by comparing a local image with the previous tagged version:

DIRS="/usr/local/bin /usr/sbin /usr/bin /sbin /bin /opt/rke-tools/bin /opt/rke-tools /tmp" diff.sh rancher/rke-tools v0.1.99 dev

@pjbgf pjbgf requested review from a team as code owners June 13, 2024 13:31
@snasovich snasovich removed the request for review from a team July 8, 2024 23:26
@snasovich snasovich changed the title Migrate the base image to bci-busybox [DNM until v2.9.1 is released] Migrate the base image to bci-busybox Aug 9, 2024
@pjbgf
Copy link
Member Author

pjbgf commented Aug 12, 2024

PR rebased.

kinarashah
kinarashah previously approved these changes Sep 10, 2024
Copy link
Member

@kinarashah kinarashah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pjbgf Could you rebase to resolve the conflicts?

The overall changes look good to me, and it appears that most of these utilities aren't being used by rke-tools, so I'm approving the PR. However, I do have some concerns about potential regressions from removing a utility that might be relied on by users, or cases where its usage isn't immediately obvious. This might be something we only catch through QA validation. Would it make sense to hold off until v2.10? That way, we can validate it more thoroughly during testing for new k8s minor version v1.31, as opposed to just a patch release.

@pjbgf
Copy link
Member Author

pjbgf commented Sep 11, 2024

@kinarashah the push for v2.10 sounds reasonable. PR rebased.

macedogm
macedogm previously approved these changes Sep 11, 2024
Copy link
Member

@macedogm macedogm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved from security point of view only. Further approval from Hostbusters is needed.

Made only a comment that is not mandatory.

package/Dockerfile Show resolved Hide resolved
@snasovich snasovich changed the title [DNM until v2.9.1 is released] Migrate the base image to bci-busybox [DNM until Sep 2024 (v2.9.3) patches are out] Migrate the base image to bci-busybox Sep 24, 2024
@snasovich snasovich changed the title [DNM until Sep 2024 (v2.9.3) patches are out] Migrate the base image to bci-busybox Migrate the base image to bci-busybox Oct 21, 2024
@pjbgf pjbgf force-pushed the base-image branch 2 times, most recently from 7b1da20 to cce1029 Compare October 22, 2024 07:20
The aim of this change is to decrease the long-term number of CVEs this image
gets due to the decreased attack surface. As a result, the final image is 40MB
lighter and does not contain the following commands:

add-shell
bbconfig
blkdiscard
busybox
chroot
cifsiostat
c_rehash
crond
crontab
depmod
dumpkmap
envsubst
fbsplash
fc-conflist
fc-list
fc-match
fc-pattern
fc-query
fc-scan
fc-validate
fdflush
fstrim
geoiplookup6
getty
halt
hwclock
ifconfig
ifdown
ifenslave
ifup
init
inotifyd
insmod
iostat
ipaddr
iplink
ipneigh
iproute
iprule
kbd_mode
link
linux32
linux64
logread
lsmod
modinfo
modprobe
mountpoint
ntpd
partprobe
printenv
raidautorun
rdate
rdev
readahead
reboot
remove-shell
rev
rfkill
rmmod
route
swapoff
swapon
syslogd
tapestat
traceroute6
tree
unlzop
watchdog
xsltproc

Signed-off-by: Paulo Gomes <paulo.gomes@suse.com>
Signed-off-by: Paulo Gomes <paulo.gomes@suse.com>
@kinarashah kinarashah merged commit a447c39 into rancher:master Oct 22, 2024
3 checks passed
@pjbgf pjbgf deleted the base-image branch November 4, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants