-
Notifications
You must be signed in to change notification settings - Fork 714
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 Script to Import DISA STIG to Policy Specific Content #11611
Add Script to Import DISA STIG to Policy Specific Content #11611
Conversation
Skipping CI for Draft Pull Request. |
🤖 A k8s content image for this PR is available at: Click here to see how to deploy itIf you alread have Compliance Operator deployed: Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: |
5f3acdb
to
069969e
Compare
/packit build |
rule_dir_json = get_rule_dir_json(args.json) | ||
srgs = ssg.build_stig.parse_srgs(stig_filename) | ||
|
||
for stig_id, stig_rule in srgs.items(): |
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.
I suggest splitting the main function to multiple smaller functions to improve code complexity.
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.
I have cleaned up the main method a bit, but moving the code the edits the file results in very ugly method signatures.
Code Climate has analyzed commit f50aaa1 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 33.3% (50% is the threshold). This pull request will bring the total coverage in the repository to 58.3% (0.1% change). View more on Code Climate. |
/packit retest-failed |
1 similar comment
/packit retest-failed |
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.
I have executed the script and it updated the policy specific content as expected.
Description:
This PR adds a script that takes the SRG Requirement, Fix text, check text, and Vulnerability discussion from the DISA STIG XML files and imports them to the Policy Specific Content (PSC) files.
Rationale:
Help prep for the next STIG.
Review Hints:
Observe that under the rules used by the STIG the PSC content is updated.