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

Make groups inherit platforms from parent groups #9465

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

evgenyz
Copy link
Member

@evgenyz evgenyz commented Sep 2, 2022

This is a creative revert of the revert (#6807) of the fix (#6772).

Description:

Rules will now inherit platforms from the whole group hierarchy not only the direct parent.

Rationale:

Previous implementation propagated group platforms to rules only from the closest group in hierarchy. This fixes it. you can see a good example with rule file_groupowner_efi_grub2_cfg. Before this PR, the rule inherited only platform "uefi". After this PR, it inherits also "grub2". This manifests in the rule remediation. Before this PR the remediation was actually not checking if grub2 package is installed.

Rules will now inherit platforms from the whole group hierarchy
not only the direct parent.
@evgenyz evgenyz added Infrastructure Our content build system CPE-AL CPE Applicability Language labels Sep 2, 2022
@github-actions
Copy link

github-actions bot commented Sep 2, 2022

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

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@evgenyz evgenyz requested a review from a team September 2, 2022 11:30
@codeclimate
Copy link

codeclimate bot commented Sep 2, 2022

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

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

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

View more on Code Climate.

@jan-cerny jan-cerny self-assigned this Sep 2, 2022
@jan-cerny jan-cerny added this to the 0.1.64 milestone Sep 2, 2022
@jan-cerny jan-cerny merged commit a4d9918 into ComplianceAsCode:master Sep 2, 2022
@evgenyz evgenyz deleted the fix_cpe_inheritance branch September 2, 2022 13:20
@matejak
Copy link
Member

matejak commented Sep 5, 2022

Good job, the compiled rule now also contains inherited_platforms entries, which was not the case before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CPE-AL CPE Applicability Language Infrastructure Our content build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants