Skip to content

feat(audit): check user group memberships#1596

Merged
RoyalOughtness merged 2 commits intosecureblue:livefrom
HastD:audit-groups
Nov 11, 2025
Merged

feat(audit): check user group memberships#1596
RoyalOughtness merged 2 commits intosecureblue:livefrom
HastD:audit-groups

Conversation

@HastD
Copy link
Copy Markdown
Collaborator

@HastD HastD commented Nov 10, 2025

Membership in groups like docker or libvirt grants the user access equivalent to root. People sometimes add their main user account to these groups for convenience, possibly without being aware of the security implications. This adds a new check to the audit script that flags membership in these groups and informs the user.

Additionally, the systemd-journal group is flagged as a warning due to allowing viewing the kernel logs, and other unrecognized groups are flagged with a generic warning about the potential security risks of group memberships.

The only groups that aren't flagged are the user's username group, wheel (which is already checked earlier), and usbguard.

@TheHooly
Copy link
Copy Markdown
Collaborator

TheHooly commented Nov 10, 2025

The only groups a user account would be expected to be in are their own user group, wheel if it is an administrative account, and usbguard if they use the Gnome integration.

The simplest way would be to treat any unexpected groups as failures, and it also avoids falling into the badness enumeration approach.

Membership in groups like `docker` or `libvirt` grants the user access
equivalent to root. People sometimes add their main user account to
these groups for convenience, possibly without being aware of the
security implications. This adds a new check to the audit script that
flags membership in these groups and informs the user.

Additionally, the `systemd-journal` group is flagged as a warning due to
allowing viewing the kernel logs, and other unrecognized groups are
flagged with a generic warning about the potential security risks of
group memberships.

The only groups that aren't flagged are the user's username group,
`wheel` (which is already checked earlier), and `usbguard`.
@HastD HastD changed the title feat(audit): check for privilege escalation via groups feat(audit): check user group memberships Nov 10, 2025
@RoyalOughtness RoyalOughtness enabled auto-merge (squash) November 11, 2025 20:17
@RoyalOughtness RoyalOughtness merged commit fd29983 into secureblue:live Nov 11, 2025
15 checks passed
@HastD HastD deleted the audit-groups branch November 11, 2025 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants