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

Use distributed product properties in Automatus #10878

Merged

Conversation

jan-cerny
Copy link
Collaborator

Automatus needs to start using distributed product properties. Loading only product.yml will not obtain all variables that appear in rule YAML files.

Addressing:

[jcerny@fedora scap-security-guide{master}]$ tests/automatus.py rule --libvirt qemu:///system ssgts_rhel8 --remediate-using ansible --datastream build/ssg-rhel8-ds.xml dir_perms_world_writable_system_owned_group
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2023-07-19-1524/test_suite.log
ERROR - Terminating due to error: Error loading a Rule from /home/jcerny/work/git/scap-security-guide/linux_os/guide/system/permissions/files/dir_perms_world_writable_system_owned_group/rule.yml: 'auid' is undefined.
WARNING - Nothing has been tested!

Fixes: #10866

Automatus needs to start using distributed product properties.
Loading only `product.yml` will not obtain all variables
that appear in rule YAML files.

Addressing:

```
[jcerny@fedora scap-security-guide{master}]$ tests/automatus.py rule --libvirt qemu:///system ssgts_rhel8 --remediate-using ansible --datastream build/ssg-rhel8-ds.xml dir_perms_world_writable_system_owned_group
Setting console output to log level INFO
INFO - The base image option has not been specified, choosing libvirt-based test environment.
INFO - Logging into /home/jcerny/work/git/scap-security-guide/logs/rule-custom-2023-07-19-1524/test_suite.log
ERROR - Terminating due to error: Error loading a Rule from /home/jcerny/work/git/scap-security-guide/linux_os/guide/system/permissions/files/dir_perms_world_writable_system_owned_group/rule.yml: 'auid' is undefined.
WARNING - Nothing has been tested!
```

Fixes: ComplianceAsCode#10866
@jan-cerny jan-cerny added the Test Suite Update in Test Suite. label Jul 19, 2023
@jan-cerny jan-cerny added this to the 0.1.70 milestone Jul 19, 2023
@github-actions
Copy link

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@vojtapolasek vojtapolasek self-assigned this Jul 19, 2023
@codeclimate
Copy link

codeclimate bot commented Jul 19, 2023

Code Climate has analyzed commit e9c3aee and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 53.2% (0.0% change).

View more on Code Climate.

Copy link
Collaborator

@vojtapolasek vojtapolasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @jan-cerny and thank you for this fix. I tested this fix on many tests which started failing and it works indeed.

@vojtapolasek vojtapolasek merged commit e2638f2 into ComplianceAsCode:master Jul 20, 2023
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test Suite Update in Test Suite.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatus Sanity Tests Are Failing
3 participants