OpenSCAP / openscap

NIST Certified SCAP 1.2 toolkit
https://www.open-scap.org/tools/openscap-base
GNU Lesser General Public License v2.1
1.35k stars 372 forks source link

Improve Kickstart remediations #2147

Closed evgenyz closed 1 month ago

evgenyz commented 1 month ago

Add header-less variant via --raw switch.

The purpose of the raw mode is to be tools, integrations and customization-friendly. It is not meant to be directly consumable by a user.

For now the behavior is implemented only for Kickstart remediation type. We'll derefine the raw shape of others later.

jan-cerny commented 1 month ago

@evgenyz Nice idea! I think that we can go this way. Please be aware that for some remediation types (Ansible, Kickstart) the "header" also contains essential parts of the output that shouldn't be removed. On the other hand, in some remediation types (Bash, Kickstart) additional comments are added also in a lower part of the generated output and these are not essential so we can remove these in the --raw mode.

evgenyz commented 1 month ago

Come to think about it, if we are going to backport it we'd better not break the API in this change. Hmm.

evgenyz commented 1 month ago

OTOH, we already broke it in the initial PR with the Kickstart remediation.