-
Notifications
You must be signed in to change notification settings - Fork 61
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
Enhancement to handle arboretum fetcher-built OSCO evidence as input #311
Conversation
Signed-off-by: Lou Degenaro <[email protected]>
a5818e2
to
5edb864
Compare
Codecov Report
@@ Coverage Diff @@
## develop #311 +/- ##
========================================
Coverage 99.08% 99.08%
========================================
Files 52 52
Lines 6098 6133 +35
========================================
+ Hits 6042 6077 +35
Misses 56 56
Continue to review full report at Codecov.
|
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.
LGTM
If you can have a quick look at the comment w.r.t. logging before merging it would be appreciated.
if not quiet: | ||
logger.debug(f'[simluate] Rules Analysis:') | ||
logger.debug(f'[simluate] config_maps: {analysis["config_maps"]}') | ||
logger.debug(f'[simluate] dispatched rules: {analysis["dispatched_rules"]}') | ||
logger.debug(f'[simluate] result types: {analysis["result_types"]}') |
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.
So one item I forgot to mention. The logger should automatically observe a -v flag passed into the CLI which will turn on debug logging. If that behaves as expected that would be my preference (as it removes the need for an additional flag.
It is not a blocker more of a FYI
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.
For the most part the code does expect and follow the standard of the -v flag. Note that the task produces logging output about the file written and some analysis of the results encountered at the info level of execute. The quiet flag is meant to suppress all logging output, meaning the aforementioned info. At this point it is a frill, you might say, and can be removed entirely...or not. Nevertheless and with respect to symmetry, for the case of simulate these outputs are at the debug level while at the execute level they are at the info level. I think it's OK the way it is, but am not wedded to the need for the quiet flag. If preference is to remove, just say the word. Is there a way to suppress .info level output already?
Types of changes
Description
Comments
The Compliance-As-Code auditree-arboretum cluster resource fetcher (see ComplianceAsCode/auditree-arboretum#9) produces evidence which comprises the equivalent of one or more OpenShift Compliance Operator (OSCO) .yaml files.
In the end, the XML results of the OSCO .yaml file and of the auditree-arboretum fetcher are formatted the same. Thus, ingesting either OSCO .yaml files or fetcher .json files boils down to being able to find the XML results then transform them into OSCAL. The code contributed here provides the ability to do the OSCAL transformation on the fetcher-built .json files.
closes #310