fix(privilege): enforce CIS privileged access controls - #18439
Merged
Christopher Co (christopherco) merged 1 commit intoAug 15, 2026
Conversation
Lynsey Rydberg (corvus-callidus)
requested a review
from a team
as a code owner
August 14, 2026 17:51
Copilot started reviewing on behalf of
Lynsey Rydberg (corvus-callidus)
August 14, 2026 17:51
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Enforces CIS privileged-access defaults through release packaging and a util-linux overlay.
Changes:
- Requires sudo PTYs and dedicated audit logging with rotation.
- Restricts
suaccess to the emptysugroup. - Refreshes component locks and rendered specifications.
Reviewed changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
base/comps/components.toml |
Moves util-linux to dedicated configuration. |
base/comps/util-linux/util-linux.comp.toml |
Configures util-linux overlays. |
base/comps/util-linux/overlays/0001-restrict-su-command.overlay.toml |
Applies the su PAM restriction. |
base/comps/azurelinux-release/azurelinux-release.spec |
Packages privileged-access policy files. |
base/comps/azurelinux-release/azurelinux-sugroup.conf |
Declares the restricted group. |
base/comps/azurelinux-release/azurelinux-sudoers.conf |
Enables PTY use and audit logging. |
base/comps/azurelinux-release/azurelinux-sudo.logrotate |
Configures sudo log rotation. |
base/comps/azurelinux-release/azurelinux-sudo.conf |
Creates the sudo audit log. |
locks/azurelinux-release.lock |
Refreshes the release component fingerprint. |
locks/util-linux.lock |
Refreshes the util-linux fingerprint. |
specs/a/azurelinux-release/azurelinux-release.spec |
Renders updated release packaging. |
specs/a/azurelinux-release/azurelinux-sugroup.conf |
Renders the group declaration. |
specs/a/azurelinux-release/azurelinux-sudoers.conf |
Renders sudo defaults. |
specs/a/azurelinux-release/azurelinux-sudo.logrotate |
Renders log rotation policy. |
specs/a/azurelinux-release/azurelinux-sudo.conf |
Renders tmpfiles configuration. |
specs/u/util-linux/util-linux.spec |
Updates rendered release metadata. |
specs/u/util-linux/util-linux-su.pamd |
Renders restricted su authentication. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Lynsey Rydberg (corvus-callidus)
force-pushed
the
lyrydber/cis-sudo-su-hardening
branch
from
August 14, 2026 18:06
c7d7a20 to
d2ba78c
Compare
Copilot started reviewing on behalf of
Lynsey Rydberg (corvus-callidus)
August 14, 2026 18:07
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 17 changed files in this pull request and generated no new comments.
Suppressed comments (1)
base/comps/azurelinux-release/azurelinux-release.spec:424
- Installing this tmpfiles entry does not apply it on an in-place
azurelinux-release-commoninstall or upgrade, so/var/log/sudo.logcan remain absent until the next boot, a manual tmpfiles run, or the first sudo invocation. That leaves CIS 5.2.3 failing immediately after an update. Add a%post commoninvocation ofsystemd-tmpfiles --create %{_tmpfilesdir}/azurelinux-sudo.conftogether with an ordered runtime dependency on(systemd-standalone-tmpfiles or systemd);specs/s/samba/samba.spec:531,1713-1715demonstrates this pattern.
install -Dm0644 %{SOURCE27} %{buildroot}%{_prefix}/lib/tmpfiles.d/azurelinux-sudo.conf
Lynsey Rydberg (corvus-callidus)
marked this pull request as draft
August 14, 2026 18:19
Require a PTY and dedicated log for sudo, and restrict su to the empty sugroup.
Tobias Brick (tobiasb-ms)
force-pushed
the
lyrydber/cis-sudo-su-hardening
branch
from
August 14, 2026 19:27
d2ba78c to
1eb09f1
Compare
Tobias Brick (tobiasb-ms)
marked this pull request as ready for review
August 14, 2026 20:57
Contributor
|
/azp run |
|
Azure Pipelines: 2 pipeline(s) were filtered out due to trigger conditions. |
Tobias Brick (tobiasb-ms)
approved these changes
Aug 14, 2026
Christopher Co (christopherco)
approved these changes
Aug 15, 2026
Christopher Co (christopherco)
deleted the
lyrydber/cis-sudo-su-hardening
branch
August 15, 2026 03:04
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
Configure Azure Linux defaults to require a PTY for sudo, maintain a dedicated sudo audit log, and restrict direct
suaccess through an empty system group.The sudo policy, log lifecycle, and group declaration are delivered by
azurelinux-release-common; thesuPAM policy is delivered through the util-linux component overlay.CIS rules
Validation
azurelinux-releaseandutil-linux.vm-base-devimage from the local RPM repository, ran CIS-CAT Level 1 Server on its first boot and confirmed that all three targeted CIS rules pass.