fix: remove leading newline from login banner files for CIS 1.6.2/1.6.3#8297
Closed
fix: remove leading newline from login banner files for CIS 1.6.2/1.6.3#8297
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes CIS benchmark regressions for 1.6.2 (/etc/issue) and 1.6.3 (/etc/issue.net) by ensuring the login banner files do not start with a leading newline, so the banner text begins immediately at byte/line 1.
Changes:
- Removed the leading empty first line from
parts/linux/cloud-init/artifacts/etc-issue. - Removed the leading empty first line from
parts/linux/cloud-init/artifacts/etc-issue.net.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| parts/linux/cloud-init/artifacts/etc-issue | Removes leading blank line so the local login banner starts immediately. |
| parts/linux/cloud-init/artifacts/etc-issue.net | Removes leading blank line so the remote login banner starts immediately. |
awesomenix
approved these changes
Apr 13, 2026
cameronmeissner
approved these changes
Apr 13, 2026
The etc-issue and etc-issue.net files had a leading empty line before the banner text. CIS benchmark rules 1.6.2 (local login warning banner) and 1.6.3 (remote login warning banner) expect the file to begin with the banner content directly, causing these checks to regress to fail. AB#37518794 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
|
Closing — the CIS 1.6.2/1.6.3 regression root cause was |
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.
Summary
Fixes CIS benchmark regressions for rules 1.6.2 (local login warning banner) and 1.6.3 (remote login warning banner).
Root Cause
The files
parts/linux/cloud-init/artifacts/etc-issueandparts/linux/cloud-init/artifacts/etc-issue.nethad a leading newline character before the banner text:The CIS checks expect the file to start directly with the banner text — no leading whitespace or newlines. This caused both rules to flip from
passtofailin VHD CIS scanning (vhdbuilder/packer/vhd-scanning.sh).Evidence
Regression confirmed across 4 independent builds spanning March 27 – April 13:
Fix
Removed the leading empty line from both files so content starts immediately with the banner text. The banner content itself is unchanged.
Note on CIS 6.1.4.1
ADO #37518794 also tracks an intermittent regression for rule 6.1.4.1 (logfile permissions). That issue is timing-dependent during VHD build and will be investigated separately.
AB#37518794