-
Notifications
You must be signed in to change notification settings - Fork 109
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
Implement OpenSCAP JSON tailoring support (HMS-3825) #1777
Implement OpenSCAP JSON tailoring support (HMS-3825) #1777
Conversation
c7f6331
to
56f3332
Compare
The above idea adds a lot of extra complexity and would also create a hard dependency on |
We merged an update to the repo snapshots from yesterday, so this conflicts now and the first commit can be dropped. |
5ce560c
to
022e7c8
Compare
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.
This LGTM. I'm not approving since we haven't resolved the property name discussion, but other than that I think we're good to go.
d3ca1f4
to
4782342
Compare
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.
Thanks! This LGTM now.
Sorry for all the pedantry :)
Thanks! No need to apologise, I appreciate that we take the time to think about this and try get it right rather than living with the pain of something we're not 100% happy with |
4782342
to
06aae6a
Compare
We need a minimum version of `oscap-utils-1.3.10` which is available in the `20240508` updates snapshot.
Since updating the snapshots the diffs for some stage tests have changed. This commit updates the diffs accordingly. I followed the same steps used in 1148a6e.
With the `oscap-utils-1.3.10` release, the `autotailor` command now supports importing a JSON tailoring file[1] that is then converted to the XML tailoring file which is consumed by the `oscap` command in the remediation stage. [1] https://github.com/ComplianceAsCode/schemas/blob/main/tailoring/schema.json
06aae6a
to
ee265a4
Compare
One of the tests broke after a rebase :/ so just fixing that now |
Add a small unit test for the json tailoring file import.
Add a test to ensure that json tailoring import is supported for the `oscap.autotailor` stage.
ee265a4
to
3b59402
Compare
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
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.
Looks good!
With the
oscap-utils-1.3.10
release, theautotailor
command now supports importing a JSON tailoring file[1] that is then converted to the XML tailoring file which is consumed by theoscap
command in the remediation stage.[1] https://github.com/ComplianceAsCode/schemas/blob/main/tailoring/schema.json