utils/oscap-xccdf.c's app_generate_fix() (lines 1071-1097) supports the following --fix-type values, each mapped to an XCCDF fix/@system URN:
--fix-type |
fix/@system |
bash |
urn:xccdf:fix:script:sh |
ansible |
urn:xccdf:fix:script:ansible |
kickstart |
urn:xccdf:fix:script:kickstart |
puppet |
urn:xccdf:fix:script:puppet |
anaconda |
urn:redhat:anaconda:pre |
ignition |
urn:xccdf:fix:script:ignition |
kubernetes |
urn:xccdf:fix:script:kubernetes |
blueprint |
urn:redhat:osbuild:blueprint |
bootc |
urn:xccdf:fix:script:bootc |
The HTML-guide XSLT (xsl/xccdf-share.xsl, the $fix_type variable at lines 318-328) only translates 6 of these 9 systems into a human-readable label:
<xsl:variable name="fix_type">
<xsl:choose>
<xsl:when test="$fix/@system = 'urn:xccdf:fix:script:sh'">Shell script</xsl:when>
<xsl:when test="$fix/@system = 'urn:xccdf:fix:script:ansible'">Ansible snippet</xsl:when>
<xsl:when test="$fix/@system = 'urn:xccdf:fix:script:puppet'">Puppet snippet</xsl:when>
<xsl:when test="$fix/@system = 'urn:redhat:anaconda:pre'">Anaconda snippet</xsl:when>
<xsl:when test="$fix/@system = 'urn:xccdf:fix:script:kubernetes'">Kubernetes snippet</xsl:when>
<xsl:when test="$fix/@system = 'urn:redhat:osbuild:blueprint'">OSBuild Blueprint snippet</xsl:when>
<xsl:otherwise>script</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Missing xsl:when branches for:
urn:xccdf:fix:script:kickstart (kickstart)
urn:xccdf:fix:script:ignition (ignition)
urn:xccdf:fix:script:bootc (bootc)
Fixes generated with these three --fix-type values fall through to the generic "script" label in the generated HTML guide instead of a descriptive one (e.g. "Kickstart snippet", "Ignition snippet", "Bootc script").
Suggested fix: add the three missing xsl:when branches to xsl/xccdf-share.xsl, with labels consistent with the existing naming convention.
utils/oscap-xccdf.c'sapp_generate_fix()(lines 1071-1097) supports the following--fix-typevalues, each mapped to an XCCDFfix/@systemURN:--fix-typefix/@systembashurn:xccdf:fix:script:shansibleurn:xccdf:fix:script:ansiblekickstarturn:xccdf:fix:script:kickstartpuppeturn:xccdf:fix:script:puppetanacondaurn:redhat:anaconda:preignitionurn:xccdf:fix:script:ignitionkubernetesurn:xccdf:fix:script:kubernetesblueprinturn:redhat:osbuild:blueprintbootcurn:xccdf:fix:script:bootcThe HTML-guide XSLT (
xsl/xccdf-share.xsl, the$fix_typevariable at lines 318-328) only translates 6 of these 9 systems into a human-readable label:Missing
xsl:whenbranches for:urn:xccdf:fix:script:kickstart(kickstart)urn:xccdf:fix:script:ignition(ignition)urn:xccdf:fix:script:bootc(bootc)Fixes generated with these three
--fix-typevalues fall through to the generic"script"label in the generated HTML guide instead of a descriptive one (e.g. "Kickstart snippet", "Ignition snippet", "Bootc script").Suggested fix: add the three missing
xsl:whenbranches toxsl/xccdf-share.xsl, with labels consistent with the existing naming convention.