-
Notifications
You must be signed in to change notification settings - Fork 671
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
SRG Import/Export Uses Policy Specific Content #9570
SRG Import/Export Uses Policy Specific Content #9570
Conversation
psc = rule_object.policy_specific_content | ||
if not psc: | ||
return "" | ||
stig = psc.get('stig') | ||
if not stig: | ||
return "" | ||
return stig.get(key, "") |
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 think that it should pick the content from rule.yml if a policy specific key isn't present.
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.
With the new import process, my plan was to remove the existing keys once the existing content was migrated to policy files.
Code Climate has analyzed commit 0d0d805 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 40.7% (0.0% change). View more on Code Climate. |
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.
It picks the keys from custom policy file to the generated HTML table.
Description:
Convert
utils/import_srg_spreadsheet.py
andutils/create_srg_export.py
to use thepolicy_specific_content
attribute of rules.Rationale:
Use the fields introduced in #9553 to help with SRG import and cleaning up the code.