Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatus file_groupownership_sshd_private_key/correct_groupowner.pass fails on RHEL-10 #12893

Open
comps opened this issue Jan 24, 2025 · 0 comments · May be fixed by #12896
Open

Automatus file_groupownership_sshd_private_key/correct_groupowner.pass fails on RHEL-10 #12893

comps opened this issue Jan 24, 2025 · 0 comments · May be fixed by #12896
Assignees
Labels
productization-issue Issue found in upstream stabilization process. RHEL10 Red Hat Enterprise Linux 10 product related.

Comments

@comps
Copy link
Collaborator

comps commented Jan 24, 2025

Description of problem:

This seems like a broken test that should never have worked .. ?

A .pass.sh test is defined in the README as

Success scenario - script is expected to prepare machine in such way that the rule is expected to pass.

But the test does

if ! grep -q ssh_keys /etc/group; then
    groupadd ssh_keys
fi

FAKE_KEY=$(mktemp -p /etc/ssh/ XXXX_key)
chgrp ssh_keys "$FAKE_KEY"

where the rule description says:

SSH server private keys, files that match the /etc/ssh/*_key glob, must be group-owned by root group.

So of course the oscap scan fails, failing the test, when the test intentionally creates a scenario that fails the check (a new ssh_keys group will not have GID 0).

Even when reusing an existing group, the GID is not 0, ie. on RHEL-8 it is 995, on my Fedora it's 999, likely created with groupadd -r / --system.

Attaching ARF in case you'd like to investigate.

SCAP Security Guide Version:

master @ 2edb023

Operating System Version:

RHEL-10

Steps to Reproduce:

  1. Run automatus scenarios for file_groupownership_sshd_private_key

Additional Information/Debugging Steps:

@comps comps added productization-issue Issue found in upstream stabilization process. RHEL10 Red Hat Enterprise Linux 10 product related. labels Jan 24, 2025
@Mab879 Mab879 self-assigned this Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
productization-issue Issue found in upstream stabilization process. RHEL10 Red Hat Enterprise Linux 10 product related.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants