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
Fix Rule CPE Name inheritance #6943
Fix Rule CPE Name inheritance #6943
Conversation
This ensures that rules inheriting platforms from groups have them converted to CPE names.
Changes identified: Show detailsOthers: Recommended tests to execute: |
/retest |
I'd really like to see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rerun of the test that found #6938 passed on this change. Looks good to me.
It would be amazing to have a test for this. |
@jan-cerny @vojtapolasek Do you have suggestions how to test this "implicit inheritance"? (A) I would write a test that checks if a specific rule whose parent (B) Ideally, we need a test content tree to build and include into a test product so that we a have stable test from content tree to DS, but that seem too much work for this PR. I think it would be good to have this test content tree, and actually a lot of tests could be built on top of that. |
I think the proposal A is good for this case. This state should be only temporary anyway. How about checking the datastream like this: I am not sure what you mean by "But the rule applicability could change and the test start to fail.". |
Hello @yuumasato! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-05-05 10:26:29 UTC |
a5957fd
to
ed0ccfe
Compare
/retest |
The machine_only_rules.py test already filtered for rules with machine platform in the yml files but never checked the rules in the built DS.
Iterates over all available DS and print all groups and rules missing machine platform. Also better formats the error messages.
ed0ccfe
to
08e2ade
Compare
@vojtapolasek Enhanced the test per feedback. Now it goes through all available data streams and prints every error it finds. |
/retest |
Description:
platforms
tocpe_name
was not done when a rule inherited a platform from a parent group.Rationale:
machine
.