fix: cis regressions — re-apply /etc/issue banners + comprehensive logfile permissions for scan VM#8317
Open
fix: cis regressions — re-apply /etc/issue banners + comprehensive logfile permissions for scan VM#8317
Conversation
awesomenix
approved these changes
Apr 15, 2026
Devinwong
approved these changes
Apr 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Re-applies custom /etc/issue and /etc/issue.net login banners after Ubuntu apt operations to prevent CIS 1.6.2/1.6.3 regressions caused by base-files conffile overwrites during dist-upgrade.
Changes:
- Adds a post-
aptstep inpost-install-dependencies.shto copy the custom local and remote login banners back into place. - Documents why
apt_get_dist_upgrade --force-confnewcan revert the banner files.
c5e7b94 to
a7ce954
Compare
a7ce954 to
9b4d2cc
Compare
awesomenix
approved these changes
Apr 16, 2026
9b4d2cc to
57b672b
Compare
awesomenix
approved these changes
Apr 16, 2026
awesomenix
requested changes
Apr 16, 2026
Contributor
awesomenix
left a comment
There was a problem hiding this comment.
something changed to downgrade here is that expected?
Re-copies custom login banners from packer staging area after all apt operations complete in post-install-dependencies.sh, ensuring banners survive any base-files upgrade that overwrites /etc/issue via --force-confnew. Fixes CIS 1.6.2 and 1.6.3 regressions on Ubuntu VHD builds. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
57b672b to
b4a1c56
Compare
awesomenix
approved these changes
Apr 16, 2026
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.
Problem
Multiple CIS rules are regressing on Ubuntu VHD builds, blocking every PR on pipeline 119535:
apt_get_dist_upgrade --force-confnewoverwrites custom/etc/issueand/etc/issue.netbanners whenbase-filespackage upgradesRoot Causes
/etc/issue (1.6.2/1.6.3)
copyPackerFiles()inpre-install-dependencies.shcopies custom banners early in the buildapt_get_dist_upgrade()runs with--force-confnew, overwriting conffiles with maintainer versions\n \lescape sequencesLogfile permissions (6.1.3.1/6.1.4.1)
cis.shfixes log permissions during VHD build (runs last among config scripts)syslogas a valid group — CIS only allowsrootoradmFixes
Banner fix: Re-copy banners in post-install-dependencies.sh
reapplyBanners()function inpacker_source.shre-copies custom login banners from the packer staging area after all apt operations complete, ensuring banners survive anybase-filesupgrade.Logfile fix: Comprehensive permission/ownership fix in cis-report.sh
Runs on the scan VM before the CIS assessor, fixing all four dimensions the benchmark checks:
rootoradmonly (files with other groups likesyslog,utmp→adm)rootorsyslogonly (files owned by other users →root)Impact