chore: remove util-linux family, gzip, cracklib from runtime image#197
Merged
jmromeroes merged 1 commit intoJul 18, 2026
Merged
Conversation
Eliminates CVEs by removing packages that have no runtime consumers, per Ross's feedback rejecting the gzip waiver and suggesting util-linux via rpm -e --nodeps with a /sbin/nologin symlink stand-in. Runtime verification: - Zero binaries in the image link libblkid/libmount/libsmartcols/libuuid/ libfdisk after removal (verified via readelf -d across all ELF files) - No runtime reference to gzip/gunzip in start.sh or the IQ Server bundle - ssh, ssh-keygen, git-over-https, and git-over-ssh all continue to work despite openssh's declared RPM file-dep on /sbin/nologin (a symlink to /bin/false substitutes with identical exit behavior) - Server boots and admin auth API responds correctly Ordering: microdnf remove runs first for the packages it can cleanly resolve, then rpm -e --nodeps removes the util-linux family (breaking openssh's file-dep), then a final rpm -e removes rpm/rpm-libs plus libarchive/libxml2/sqlite-libs/xz-libs/bzip2-libs which rpm itself depends on until it exits.
jmromeroes
merged commit Jul 18, 2026
10ae041
into
chore/remove-libgcrypt-runtime
5 of 8 checks passed
Contributor
Author
|
This got auto-closed as merged when I fast-forwarded 's branch to include this commit. Everything ended up on #196. See you there! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on top of #196 (libgcrypt removal).
What this does
Removes 10 additional RHEL packages that have no runtime consumers, per Ross's feedback (Slack thread):
util-linux,util-linux-core,libblkid,libmount,libsmartcols,libuuid,libfdisk— all reported against the same underlying CVEs by the scanner even though the vuln is in libblkid.cracklib,cracklib-dicts,gzip— transitively pulled in bypam(already removed viarpm -e --nodepsin tier 1). Ross rejected the gzip waiver noting gzip could be removed instead.How this works
opensshdeclares an RPM file-dep on/sbin/nologin(owned byutil-linux), so a straightmicrodnf removerefuses. We userpm -e --nodepsto break that declared dep and substitute/sbin/nologinwith a symlink to/bin/false—coreutils-single(still in the image) provides/bin/falsewith identical exit behavior, so any/etc/passwdshell entries referencing nologin still resolve.The removal happens in this order because the
rpmbinary dynamically links againstlibsqlite3,liblzma,libbz2,libarchive(vialibrpm.so), and transitivelylibxml2:rpm -e --nodepsfor the current tier 1 list (unchanged):gawk libfido2 systemd-libs p11-kit p11-kit-trust libtasn1 pam libpwquality expatmicrodnf removefor everything the depsolver can cleanly resolve (this step addscracklib,cracklib-dicts,gzip; removeslibxml2/libarchive/sqlite-libs/xz-libs/bzip2-libs/rpm/rpm-libsfrom this step sorpmstays alive one step longer)rpm -e --nodeps util-linux util-linux-core libblkid libmount libsmartcols libuuid libfdisk(breaks openssh's declared file-dep on/sbin/nologin)ln -sf /bin/false /sbin/nologinrpm -e --nodeps rpm rpm-libs libarchive libxml2 sqlite-libs xz-libs bzip2-libs— rpm has already loaded its libs at process start, so it can remove them from the same transactionVerification
Static analysis
libblkid,libmount,libsmartcols,libuuid,libfdisk,libsqlite3,liblzma,libbz2across all ELF files in the built image (verified viareadelf -d).gziporgunzipinstart.shor the IQ Server bundle./var/lib/rpm/rpmdb.sqliteconfirms all 16 target packages absent from theNametable — the Sonatype scanner reads this DB to build its inventory.Full end-to-end runtime test (real license, real APIs)
Started the built image with the
sonatype-lc-only.liclicense, then exercised the complete IQ Server stack:POST /api/v2/product/licensehealth=healthylog4j-core@2.14.0ssh -V+ssh-keygen -t ed25519Log analysis
Full log scan surfaced 25 WARN/ERROR lines. All fall into one of these expected categories, none related to tier 2 removals:
CVEs eliminated (from open waiver requests)
util-linuxfamily (×7)libblkid/libmount/libsmartcolsCVEsgzipCVE-2026-41991(Ross-rejected waiver)7 REQUESTED waivers for
CVE-2026-13595on the util-linux subpackages have been withdrawn via API (HTTP 204).Testing done
Built and ran
Dockerfile.slimlocally viadocker build --platform linux/amd64. Same removal pattern applied identically toDockerfileandDockerfile.rh.🤖 Generated with Claude Code