-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add AUDIT and POLICY to EntityType enum #353
Add AUDIT and POLICY to EntityType enum #353
Conversation
This allows using these compliance types in commands that distinguish them from TASK and SCAN_CONFIG. The new types will be translated to TASK and SCAN_CONFIG for the GMP commands.
Codecov Report
@@ Coverage Diff @@
## master #353 +/- ##
==========================================
+ Coverage 97.51% 97.58% +0.07%
==========================================
Files 20 20
Lines 4311 4438 +127
==========================================
+ Hits 4204 4331 +127
Misses 107 107
Continue to review full report at Codecov.
|
You somehow also added create/modify permission/tags ... is that intended? |
The checks only recognize the enum variables as equal if the values are compared explicitly.
Yes, I added new versions of those functions that translate AUDIT into TASK and POLICY into SCAN_CONFIG because gvmd does not recognize the compliance types as valid resource/entity types. |
You need to provide tests for the new functions and Types. |
These tests cover the new entity types and the special cases for handling permissions and tags referencing them.
850cdde
to
73e7181
Compare
These tests check if the create and modify functions for permissions and tags detect an invalid resource type.
What:
The types AUDIT and POLICY are added to the EntityType enum and
the functions using them are updated to change them to TASK and
SCAN_CONFIG internally.
Why:
This allows using these compliance types in commands that distinguish
them from TASK and SCAN_CONFIG.
One such command will be GET_AGGREGATES where it will determine
what the usage_type option is set to in the GMP command.
The new types will be translated to TASK and SCAN_CONFIG for the GMP
commands.
How:
Tested by running a test script that uses the affected function with new entity types:
https://gist.github.com/timopollmeier/d6d45c832e49771b73e0b94d8b94daaa
Checklist: