Developer Builds CIS-Hardened CentOS 9 Golden Images with Packer and QEMU on WSL2
A software developer has published a method for building production-grade CentOS 9 Stream golden images entirely on a Windows laptop using WSL2 with nested KVM, eliminating the need for a cloud builder or dedicated Linux machine. The pipeline uses Packer and QEMU to produce a QCOW2 image that is CIS Level 1 hardened via the ansible-lockdown role and pre-loaded with PingAccess 8.3.5 on a JRE 17 runtime. The build process is split into two sequential Packer stages — one for base OS hardening and one for application layering — each driven by a single shell script with targeted build options. A signed Software Bill of Materials (SBOM) and VEX attestations are generated so that Trivy vulnerability scans can distinguish actually exploitable issues from theoretical ones. The guide also documents WSL2-specific pitfalls, such as a CIS sudoers rule that deadlocks Ansible pipelining and a noexec-mounted /tmp partition that breaks PingAccess installation assumptions.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in